/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');

/* --- CSS Variables --- */
:root {
    --primary-color: #3b0d78;     /* Requested Main Color */
    --primary-light: #5a1cae;     /* Lighter shade for hover */
    --accent-color: #f39c12;      /* Matching Amber/Gold for contrast */
    --text-dark: #333333;
    --text-light: #ffffff;
    --bg-light: #f4f6f8;
    --bg-white: #ffffff;
    --transition: all 0.3s ease;
}

/* --- Global Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

ul { list-style: none; }
a { text-decoration: none; color: inherit; }

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section { padding: 80px 0; }
.bg-light { background-color: var(--bg-light); }
.text-center { text-align: center; }

/* Section Titles */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}
.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
}
.section-title .underline {
    width: 80px;
    height: 4px;
    background-color: var(--accent-color);
    margin: 10px auto 0;
    border-radius: 2px;
}
.section-title p { margin-top: 15px; color: #666; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}
.btn-primary {
    background-color: var(--accent-color);
    color: var(--text-light);
}
.btn-primary:hover {
    background-color: #d68910;
}
.btn-secondary {
    background-color: transparent;
    border-color: var(--text-light);
    color: var(--text-light);
    margin-left: 15px;
}
.btn-secondary:hover {
    background-color: var(--text-light);
    color: var(--primary-color);
}

/* --- Header & Navigation --- */
header {
    background-color: var(--primary-color);
    color: var(--text-light);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: var(--transition);
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}
.logo img {
    height: 50px;
    border-radius: 4px;
}
.logo h1 { font-size: 2rem; }
.logo span { color: var(--accent-color); }

.nav-links { display: flex; }
.nav-links li { margin-left: 30px; }
.nav-links a {
    font-weight: 700;
    transition: var(--transition);
}
.nav-links a:hover { color: var(--accent-color); }

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(59, 13, 120, 0.4), rgba(59, 13, 120, 0.2)), url('../images/csd_head.jpg') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    padding-top: 80px; /* offset for fixed header */
    position: relative;
    overflow: hidden;
}
#hex-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}
.hero-content {
    position: relative;
    z-index: 2;
}
.hero-content h2 { font-size: 3.5rem; margin-bottom: 20px; }
.hero-content p { font-size: 1.2rem; margin-bottom: 30px; max-width: 600px; margin-left: auto; margin-right: auto; }

/* --- About Us --- */
.about-content {
    display: flex;
    gap: 50px;
    align-items: center;
}
.about-text { flex: 2; }
.about-text h3 { color: var(--primary-color); margin-bottom: 20px; font-size: 1.8rem; }
.about-text p { margin-bottom: 15px; color: #555; }

.about-stats {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.stat-box {
    background: var(--bg-white);
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-bottom: 4px solid var(--primary-color);
}
.stat-box i { font-size: 2.5rem; color: var(--accent-color); margin-bottom: 10px; }
.stat-box h4 { font-size: 2rem; color: var(--primary-color); }

/* --- Services --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.service-card {
    background: var(--bg-light);
    padding: 40px 20px;
    text-align: center;
    border-radius: 8px;
    transition: var(--transition);
    border: 1px solid #ddd;
}
.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(59, 13, 120, 0.1);
    border-color: var(--primary-color);
}
.service-card img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 15px;
}
.service-card i { font-size: 3rem; color: var(--primary-color); margin-bottom: 20px; }
.service-card h3 { margin-bottom: 15px; color: var(--text-dark); }

/* --- Video Section --- */
.video-container {
    max-width: 800px;
    margin: 0 auto;
}

/* --- Products Showcase (2 rows, 6 per row) --- */
.products-grid {
    display: grid;
    /* Forces exactly 3 columns on large screens to make cards bigger. Auto adds rows if more items exist */
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.product-item {
    background: var(--bg-white);
    padding: 15px;
    text-align: center;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: var(--transition);
}
.product-item:hover {
    box-shadow: 0 5px 15px rgba(59, 13, 120, 0.2);
}
.product-img {
    background-color: #eee;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 2rem;
    color: #999;
    overflow: hidden;
}
.product-img img {
    object-fit: cover;
    max-width: 100%;
    max-height: 100%;
}
.product-item h4 { font-size: 1rem; color: var(--primary-color); }

/* --- Image Modal --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
}
.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease;
}
@keyframes zoomIn {
    from {transform: scale(0.8); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}
.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}
.modal-close:hover,
.modal-close:focus {
    color: var(--accent-color);
    text-decoration: none;
    cursor: pointer;
}
.product-img {
    cursor: pointer;
}

/* --- Contact Us --- */
.contact-wrapper {
    display: flex;
    gap: 50px;
}
.contact-info, .contact-map { flex: 1; }
.contact-info h3 { color: var(--primary-color); margin-bottom: 20px; font-size: 1.8rem; }
.info-list li {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
}
.info-list i {
    color: var(--accent-color);
    font-size: 1.5rem;
    margin-right: 15px;
    width: 25px;
}

/* --- Footer --- */
footer {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 30px 0;
    border-top: 4px solid var(--accent-color);
}

/* --- Floating WhatsApp Button --- */
.whatsapp-float {
    position: fixed;
    width: clamp(50px, 5vw, 65px);
    height: clamp(50px, 5vw, 65px);
    bottom: clamp(20px, 4vw, 40px);
    right: clamp(20px, 4vw, 40px);
    background-color: #25d366;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: clamp(28px, 3vw, 35px);
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
}
.whatsapp-float:hover {
    background-color: #1ebe57;
    transform: scale(1.1);
    box-shadow: 3px 3px 15px rgba(0,0,0,0.4);
}
.whatsapp-float:active {
    transform: scale(0.95);
    box-shadow: 1px 1px 5px rgba(0,0,0,0.3);
}

/* --- Responsive Media Queries --- */
@media (max-width: 1024px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); } /* Tablet landscape: 2 per row */
    .services-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* Hide default nav */
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--primary-color);
        text-align: center;
    }
    .nav-links.active { display: flex; }
    .nav-links li { margin: 20px 0; }
    .mobile-menu { display: block; }
    
    .logo h1 { font-size: 1.2rem; }
    .hero-content h2 { font-size: 2.5rem; }
    
    .about-content, .contact-wrapper { flex-direction: column; gap: 30px; }
    
    .products-grid { grid-template-columns: repeat(2, 1fr); } /* Tablet portrait: 2 per row */
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .products-grid { grid-template-columns: 1fr; } /* Mobile: 1 per row */
    .services-grid { grid-template-columns: 1fr; }
    .btn-secondary { margin-left: 0; margin-top: 15px; }
}