/* --- Global Styles & Variables --- */
:root {
    --primary-color: #005A9C; /* A professional blue */
    --secondary-color: #D4A017; /* A rich gold/yellow */
    --text-dark: #2c3e50;
    --text-light: #ecf0f1;
    --background-light: #f8f8f8; /* Changed from #f9f9f9 */
    --background-white: #fdfdfd; /* Changed from #ffffff */
    --font-family: 'Poppins', sans-serif;
}

/* --- Basic Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-dark);
    background-color: var(--background-light);
    line-height: 1.7;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.text-light {
    color: var(--text-light);
}

/* --- Header & Navigation --- */
.header {
    background: rgba(253, 253, 253, 0.9); /* Changed from 255, 255, 255 */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    padding: 0 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
    position: relative;
    padding: 0.5rem 0;
}

/* Active page link styling */
.nav-link.active {
    font-weight: 700;
    color: var(--primary-color);
}
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    transition: all 0.3s ease;
}

/* Hamburger animation */
.hamburger.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
    opacity: 0;
}
.hamburger.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* --- FIX 1: MOBILE MENU --- */
/* This section contains the fixes for the mobile menu */
.mobile-nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--background-white);
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.05);
    z-index: 999;
    transform: translateY(-100%);
    transition: transform 0.3s ease-out;
}

.mobile-nav.open {
    transform: translateY(0);
    display: block; /* ADDED this line to show the nav only when open */
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    align-items: center; /* ADDED BACK: This re-centers your links */
    padding: 1rem 0;
}

.mobile-nav-link {
    display: block; /* ADDED: This makes it respect vertical padding */
    font-size: 1.2rem;
    padding: 1rem;
    /* REMOVED 'width: 100%;' to allow 'align-items' to work */
    text-align: center;
    color: var(--text-dark);
    min-.width: 200px; /* ADDED: Gives the links a consistent, centered width */
}
.mobile-nav-link.active {
    background-color: var(--background-light);
    color: var(--primary-color);
    font-weight: 600;
}

/* --- FIX 2: CONTENT OVERLAP (Z-INDEX) --- */
/* This section contains the fixes for the content overlap */
.hero {
    height: calc(100vh - 70px);
    min-height: 500px;
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax effect */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 5; /* ADDED: Sets the hero section's stacking order */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Transparent color as requested */
    background: rgba(0, 48, 87, 0.4); 
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--text-light);
    padding: 2rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
}

.hero-button {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-color);
}

.hero-button:hover {
    background: transparent;
    border-color: var(--text-light);
    color: var(--text-light);
    transform: translateY(-3px);
}

.content-section {
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 10; /* ADDED: Makes content sections scroll OVER the hero */
}

.content-overlay {
    padding: 5rem 0;
    width: 100%;
    height: 100%;
    /* Transparent white overlay */
    background: rgba(253, 253, 253, 0.9); /* Adjusted to new broken white */
    backdrop-filter: blur(8px);
}
.content-overlay-dark {
    padding: 5rem 0;
    width: 100%;
    height: 100%;
    /* Transparent dark overlay */
    background: rgba(44, 62, 80, 0.8);
    backdrop-filter: blur(8px);
}

.content-overlay-dark .section-title {
    color: var(--text-light);
}


.content-wrapper {
    position: relative;
    z-index: 2; /* This z-index is local to the content-section, it's fine */
}

.content-section-solid {
    padding: 5rem 0;
    background: var(--background-white);
    position: relative; /* ADDED: Ensure this also stacks correctly */
    z-index: 10; /* ADDED: Makes content sections scroll OVER the hero */
}

.section-text {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 1.5rem auto;
    text-align: center;
}

.two-column-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.column {
    background: var(--background-light);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.column-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.values-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* CHANGED: Creates a stable 3-column grid */
    gap: 1.5rem;
    text-align: center;
    max-width: 900px;
    margin: 2rem auto 0;
}

.values-list li {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
}

/* --- Footer --- */
.footer {
    background: var(--text-dark);
    color: #bdc3c7;
    padding-top: 4rem;
    position: relative; /* ADDED: Ensure this also stacks correctly */
    z-index: 10; /* ADDED: Makes content sections scroll OVER the hero */
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding-bottom: 3rem;
}

.footer-column .footer-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.footer-column p {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: #bdc3c7;
}

.footer-links a:hover {
    color: var(--text-light);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
}

/* --- Product Page (products.html) --- */
.product-gallery-container {
    padding: 4rem 0;
    position: relative; /* ADDED: Ensure this also stacks correctly */
    z-index: 10; /* ADDED: Makes content sections scroll OVER the hero */
}

.product-page-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 0.5rem;
}

.product-page-subtitle {
    font-size: 1.2rem;
    text-align: center;
    color: #555;
    margin-bottom: 3rem;
}

.product-gallery {
    display: grid;
    /* Responsive grid: min 300px width, max 1fr */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.product-card {
    background: var(--background-white);
    border-radius: 12px;
    overflow: hidden;
    /* Floating shadow */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    /* Animation */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    /* Floating animation on hover */
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.product-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

.product-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    padding: 1.5rem 1rem;
    color: var(--text-dark);
}

/* --- Product Modal (Lightbox) --- */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-container.modal-hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: var(--background-white);
    padding: 2.5rem;
    border-radius: 10px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(1);
    transition: transform 0.3s ease;
}

.modal-container.modal-hidden .modal-content {
    transform: scale(0.9);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 2.5rem;
    font-weight: 300;
    color: #888;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #000;
}

.modal-body {
    display: flex;
    gap: 2rem;
}

.modal-img {
    width: 45%;
    object-fit: cover;
    border-radius: 8px;
    align-self: flex-start; /* Fix for flex layout */
}

.modal-details {
    width: 55%;
}

#modal-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.3;
}

#modal-details-text ul {
    list-style: disc;
    padding-left: 20px;
}

#modal-details-text li {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

#modal-details-text li strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* --- Responsive Design --- */

/* Tablets & Small Desktops */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.8rem;
    }
    .hero-subtitle {
        font-size: 1.3rem;
    }
    .two-column-grid {
        grid-template-columns: 1fr;
    }
    .modal-body {
        flex-direction: column;
    }
    .modal-img, .modal-details {
        width: 100%;
    }

    .values-list {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for tablets */
    }

    /* This disables the 'fixed' background on tablets, which causes overlap */
    .hero, .content-section {
        background-attachment: scroll;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    .header-container {
        padding: 0 1rem;
    }
    .nav-links {
        display: none; /* Hide desktop nav */
    }
    .hamburger {
        display: flex; /* Show hamburger */
    }
    .mobile-nav {
        /* REMOVED 'display: block;' - this was causing the pull-to-refresh bug */
    }

    .hero {
        height: auto;
        min-height: auto; /* Fixes 100vh issue */
        padding: 5rem 1rem;
        background-attachment: scroll; /* ADDED - Fixes parallax/overlap bug on mobile */
    }

    .hero-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1.1rem;
    }

    .content-section {
        background-attachment: scroll; /* Fixes parallax/sizing issue on mobile */
    }

    .section-title {
        font-size: 2rem;
    }

    .values-list {
        grid-template-columns: 1fr; /* 1 column for phones */
        gap: 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .product-gallery {
        grid-template-columns: repeat(2, 1fr); /* Changed from 1fr to 2 columns */
        gap: 1rem; /* Reduced gap for smaller cards */
    }

    /* Added rules to make cards smaller for the 2-column view */
    .product-card img {
        height: 160px;
    }
    
    .product-card-title {
        font-size: 0.9rem;
        padding: 1rem 0.75rem;
    }

    .product-gallery-container {
        padding: 2rem 0;
    }
    .product-page-title {
        font-size: 2rem;
    }
    .modal-content {
        padding: 2rem 1.5rem;
    }
    #modal-title {
        font-size: 1.5rem;
    }
}

/* ==============================================
   PRODUCT ACCORDION STYLES
   ============================================== */

/* The clickable button */
.accordion-header {
    background-color: var(--background-white);
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    width: 100%;
    text-align: left;
    font-family: var(--font-family);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    transition: background-color 0.3s ease, border-radius 0.1s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem; /* Space between categories */
}

/* Hover and active states */
.accordion-header:hover, .accordion-header.active {
    background-color: #f7faff; /* A very light blue */
}

/* Makes the button "merge" with the panel when open */
.accordion-header.active {
     border-bottom-left-radius: 0;
     border-bottom-right-radius: 0;
     border-bottom-color: transparent;
}

/* The +/- icon */
.accordion-icon {
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--primary-color);
}

/* The panel that holds the content */
.accordion-panel {
    max-height: 0; /* This is the key: starts closed */
    overflow: hidden;
    transition: max-height 0.5s ease-out; /* Animation */
    background: var(--background-white);
    border: 1px solid #ddd;
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Placeholder text for empty panels */
.panel-placeholder {
    padding: 2rem 1.5rem;
    font-size: 1.1rem;
    color: #555;
}

/* Gives your existing product grid some space inside the panel */
.accordion-panel .product-gallery {
    padding: 2rem; 
    border-top: 1px solid #eee; /* Adds a nice line */
}

/* Responsive fixes for the accordion */
@media (max-width: 768px) {
    .accordion-header {
        font-size: 1.2rem;
        padding: 1rem;
    }
    .accordion-panel .product-gallery {
        padding: 1.5rem 1rem;
    }
}

/* ==============================================
   CONTACT US BUTTON (ACCORDION)
   ============================================== */

.contact-scroll-btn {
    background-color: var(--primary-color);
    color: var(--text-light);
    border: 2px solid var(--primary-color);
    padding: 0.7rem 2rem;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
    box-shadow: 0 6px 16px rgba(0, 90, 156, 0.25);
}

.contact-scroll-btn:hover {
    background-color: transparent;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(0, 90, 156, 0.35);
}

.contact-scroll-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(0, 90, 156, 0.25);
}
