/* --- Brand Colours Extracted from SGS Logo --- */
:root {
    --primary-blue: #1C4D8F;   /* The deep border blue */
    --light-blue: #7CBCEF;     /* The soft fill blue */
    --accent-green: #6DB33F;   /* The leaf/book green */
    --accent-gold: #F7CC46;    /* The cross/stars gold */
    --text-dark: #333333;
    --bg-light: #F8F9FA;
    --white: #FFFFFF;
}

/* --- Global Resets & Typography --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Prevents header from hiding section titles */
}

body {
    color: var(--text-dark);
    line-height: 1.6;
}

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

/* --- Typography & Utilities --- */
.section-title {
    text-align: center;
    color: var(--primary-blue);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.section-subtitle {
    text-align: center;
    margin-bottom: 40px;
    color: #666;
}

.bg-light { background-color: var(--bg-light); }
.bg-dark { background-color: var(--primary-blue); }
.text-white { color: var(--white); }
.text-center { text-align: center; }

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--accent-gold);
    color: var(--primary-blue);
}
.btn-primary:hover {
    background-color: #e5bb30;
}

.btn-secondary {
    background-color: var(--accent-green);
    color: var(--white);
}
.btn-secondary:hover {
    background-color: #5a9930;
}

/* --- Header & Navigation --- */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-logo {
    max-height: 75px;
    width: auto;
    transition: transform 0.3s ease;
}

/* Desktop Navigation */
#nav-links {
    display: flex;
    align-items: center;
}

#nav-links a {
    color: var(--primary-blue);
    text-decoration: none;
    margin-left: 20px;
    font-weight: 600;
    transition: color 0.3s ease;
}

#nav-links a:hover {
    color: var(--light-blue);
}

.mobile-menu-btn {
    display: none;
    font-size: 28px; /* Slightly larger for easier thumb tapping */
    background: none;
    border: none;
    color: var(--primary-blue);
    cursor: pointer;
}

/* ========================================= */
/* --- Mobile Navigation Fix --- */
/* ========================================= */
@media (max-width: 768px) {
    .mobile-menu-btn { 
        display: block; 
    }
    
    #nav-links {
        position: absolute;
        top: 80px; /* Sits directly beneath the white header */
        left: -100%; /* Hides the menu completely off the left side of the screen */
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        align-items: center;
        padding: 30px 0;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        transition: left 0.3s ease-in-out; /* Creates the smooth slide effect */
        z-index: 999;
    }

    #nav-links.active { 
        left: 0; /* The JavaScript adds this class to slide it into view */
    }
    
    #nav-links a { 
        margin: 15px 0; 
        font-size: 1.2rem;
        width: 100%;
        text-align: center;
    }
}

/* --- Sections Layout --- */
.section {
    padding: 100px 0;
}

#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    background: linear-gradient(rgba(28, 77, 143, 0.9), rgba(124, 188, 239, 0.7)), url('assets/hero-bg.jpg') center/cover;
    color: var(--white);
}

#hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

#hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Grids --- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

/* --- Cards (Store, Services, Team) --- */
.product-card, .service-card, .team-card {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s ease;
}

.product-card:hover, .service-card:hover {
    transform: translateY(-5px);
}

.product-image-placeholder, .team-avatar {
    background-color: var(--light-blue);
    height: 200px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    font-weight: bold;
}

.team-avatar {
    height: 150px;
    width: 150px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: block; /* Ensures the image centers correctly */
    object-fit: cover; /* CRITICAL: Prevents the face from stretching if the image isn't perfectly square */
    border: 3px solid var(--light-blue); /* Adds a nice brand-colored ring around the photos */
}

/* --- Store Carousel Styles --- */
.relative-container {
    position: relative;
}

.carousel-container {
    display: flex;
    align-items: center;
    position: relative;
    max-width: 1000px; 
    margin: 0 auto;
}

.product-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory; 
    scroll-behavior: smooth;
    padding: 20px 0;
    width: 100%;
    
    /* Hide scrollbars */
    -ms-overflow-style: none;  
    scrollbar-width: none;  
}

.product-carousel::-webkit-scrollbar {
    display: none; 
}

.product-carousel .product-card {
    min-width: calc(33.333% - 14px); 
    scroll-snap-align: start;
    flex-shrink: 0;
}

/* Navigation Buttons */
.carousel-btn {
    background-color: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 20px;
    cursor: pointer;
    position: absolute;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover { 
    background-color: var(--light-blue); 
    transform: scale(1.05);
}

.prev-btn { left: -60px; }
.next-btn { right: -60px; }

/* --- Contact Form --- */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
}

/* --- Footer Styles --- */
#footer {
    background-color: var(--text-dark);
    color: var(--white);
    padding: 30px 0;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; 
    gap: 20px;
}

.footer-socials {
    display: flex;
    gap: 15px;
    align-items: center;
}

.social-icon {
    width: 24px;
    height: 24px;
    filter: invert(100%); 
    transition: transform 0.3s ease, filter 0.3s ease;
}

.footer-socials a:hover .social-icon {
    transform: translateY(-3px);
    filter: invert(85%) sepia(31%) saturate(1210%) hue-rotate(345deg) brightness(101%) contrast(95%);
}

/* ========================================= */
/* --- Responsive Design (Media Queries) --- */
/* ========================================= */

/* Tablets and smaller */
@media (max-width: 992px) {
    /* Show 2 carousel items on tablet */
    .product-carousel .product-card { 
        min-width: calc(50% - 10px); 
    }
    .prev-btn { left: -20px; }
    .next-btn { right: -20px; }
}

/* Mobile Phones */
@media (max-width: 768px) {
    /* Header & Nav Mobile Styles */
    .mobile-menu-btn { display: block; }
    
    nav {
        position: absolute;
        top: 80px;
        left: -100%;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        transition: 0.3s ease;
    }

    nav.active { left: 0; }
    nav a { margin: 15px 0; display: block; }

    /* Layout Mobile Styles */
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    #hero h1 { font-size: 2.5rem; }

    /* Footer Mobile Styles */
    .footer-container {
        flex-direction: column;
        text-align: center;
        justify-content: center;
    }
}

/* Very Small Mobile Phones */
@media (max-width: 600px) {
    /* Show 1 carousel item strictly centred on mobile */
    .product-carousel .product-card { 
        min-width: 100%; 
        scroll-snap-align: center;
    }
    /* Hide buttons on mobile so users naturally swipe with their thumbs */
    .carousel-btn {
        display: none; 
    }
}