/* =========================================
   1. GLOBAL VARIABLES & RESET
   ========================================= */
:root {
    /* Color Palette - Premium Biotech Theme */
    --primary-navy: #1B2A41;   /* Deep Navy - Trust/Authority */
    --accent-gold: #C5A059;    /* Muted Gold - Premium/Quality */
    --gold-hover: #b08d4a;     /* Darker Gold for hover states */
    --light-grey: #F4F6F8;     /* Light background for contrast */
    --white: #ffffff;
    --text-dark: #333333;      /* Main Body Text */
    --text-light: #666666;     /* Subtitles/Descriptions */
    --border-color: #e0e0e0;

    /* Spacing & Layout */
    --container-width: 1200px;
    --section-padding: 80px;
    --mobile-padding: 20px;
    --border-radius: 4px;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

/* Typography Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--primary-navy);
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =========================================
   2. UTILITY CLASSES & CONTAINERS
   ========================================= */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--mobile-padding);
    width: 100%;
}

.section {
    padding: var(--section-padding) 0;
}

.text-center { text-align: center; }
.text-white { color: var(--white); }

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    border-radius: var(--border-radius);
    letter-spacing: 1px;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--accent-gold);
    color: var(--white);
    border-color: var(--accent-gold);
}

.btn-primary:hover {
    background-color: var(--gold-hover);
    border-color: var(--gold-hover);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary-navy);
}

/* =========================================
   3. HEADER & NAVIGATION
   ========================================= */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-navy);
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background-color: var(--primary-navy);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-gold);
    font-size: 1.2rem;
}

.main-nav ul {
    display: flex;
    gap: 32px;
    align-items: center;
}

.main-nav a {
    color: var(--primary-navy);
    font-weight: 600;
    font-size: 0.95rem;
}

.main-nav a:hover {
    color: var(--accent-gold);
}

/* Mobile Menu Toggle (Hidden by default on Desktop) */
.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-navy);
}

/* =========================================
   4. HERO SECTION
   ========================================= */
.hero {
    /* Gradient overlay + Background Image */
    background: linear-gradient(rgba(27, 42, 65, 0.9), rgba(27, 42, 65, 0.75)), url('images/hero-bg.avif');
    background-size: cover;
    background-position: center;
    min-height: 600px; /* Minimum height for desktop */
    display: flex;
    align-items: center;
    color: var(--white);
    text-align: center;
    padding: 60px 0;
}

.hero-content h1 {
    color: var(--white);
    font-size: 3.5rem; /* Large headline */
    margin-bottom: 24px;
}

.hero-content p {
    font-size: 1.25rem;
    max-width: 750px;
    margin: 0 auto 40px;
    opacity: 0.9;
    font-weight: 300;
}

/* =========================================
   5. COMPONENTS (Trust Bar, Cards, Grids)
   ========================================= */
/* Trust Bar */
.trust-bar {
    background-color: var(--light-grey);
    padding: 30px 0;
    border-bottom: 1px solid var(--border-color);
}

.trust-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
}

.trust-item {
    font-weight: 700;
    color: #999;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    letter-spacing: 1px;
}

/* Feature Cards (Icon Boxes) */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    text-align: center;
    padding: 40px 30px;
    background: var(--white);
    border: 1px solid var(--light-grey);
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: var(--border-radius);
}

.feature-card:hover {
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
    transform: translateY(-5px);
    border-color: var(--accent-gold);
}

.icon-box {
    font-size: 3rem;
    color: var(--accent-gold);
    margin-bottom: 24px;
}

/* Product Cards */
.products-section {
    background-color: var(--light-grey);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.product-card {
    background: var(--white);
    padding: 35px;
    border-left: 4px solid var(--accent-gold);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    transition: 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.product-card:hover {
    background: var(--primary-navy);
    transform: translateX(5px);
}

.product-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    transition: color 0.3s;
}

.product-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 20px;
    transition: color 0.3s;
}

.product-card:hover h3, 
.product-card:hover p {
    color: var(--white);
}

.arrow {
    font-weight: 700;
    color: var(--accent-gold);
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* Services Split Layout */
.services-split {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    background-color: var(--primary-navy);
}

.service-img {
    flex: 1;
    min-width: 300px;
    background: url('https://images.unsplash.com/photo-1579165466741-7f35a4755657?ixlib=rb-1.2.1&auto=format&fit=crop&w=1000&q=80') center/cover no-repeat;
    min-height: 400px;
}

.service-text {
    flex: 1;
    min-width: 300px;
    padding: 80px 60px;
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.service-text h2 {
    color: var(--white);
    font-size: 2.5rem;
}

.service-text ul li {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
}

.check {
    color: var(--accent-gold);
    font-weight: bold;
    font-size: 1.2rem;
}

/* =========================================
   6. FOOTER
   ========================================= */
footer {
    background-color: var(--primary-navy);
    color: #a0a0a0;
    padding: 80px 0 30px;
    font-size: 0.95rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 24px;
    font-size: 1.2rem;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col a:hover {
    color: var(--accent-gold);
    padding-left: 5px; /* Small slide effect */
}

.copyright {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    font-size: 0.85rem;
}

/* =========================================
   7. RESPONSIVE DESIGN (Media Queries)
   ========================================= */

/* Tablet & Smaller Laptops (Max Width 1024px) */
@media (max-width: 1024px) {
    :root {
        --container-width: 90%;
        --section-padding: 60px;
    }
    
    .hero-content h1 { font-size: 2.8rem; }
}

/* Mobile Devices (Max Width 768px) */
@media (max-width: 768px) {
    /* Layout Adjustments */
    .nav-container {
        height: auto;
        padding: 15px 0;
        flex-wrap: wrap;
    }

    /* Stack the Navigation vertically or use a hamburger menu logic here */
    .main-nav {
        display: none; /* In real WP dev, you'd toggle this with JS */
        width: 100%;
        margin-top: 15px;
    }
    
    .main-nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .mobile-menu-toggle {
        display: block; /* Show hamburger icon placeholder */
    }

    /* Hero Section Mobile */
    .hero {
        min-height: auto;
        padding: 80px 0;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }

    /* Stack Grids to Single Column */
    .features-grid,
    .product-grid {
        grid-template-columns: 1fr; /* 1 column */
    }

    .trust-logos {
        gap: 20px;
    }

    .service-text {
        padding: 40px 20px;
    }

    /* Buttons full width on mobile for easier tapping */
    .hero .btn {
        display: block;
        width: 100%;
        margin: 10px 0 0 0 !important;
    }
}

/* --- MOBILE MENU ACTIVATION --- */
@media (max-width: 768px) {
    /* When the menu has the class 'active', show it! */
    .main-nav.active {
        display: flex !important;
        flex-direction: column;
    }
}

/* --- PRODUCT PAGE MAIN --- */
.product-card-premium {
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
    border-radius: 4px;
}

.product-card-premium:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.product-card-premium h3 {
    color: var(--primary-navy);
    font-weight: 700;
}

/* Ensure the product header text responds nicely */
@media (max-width: 768px) {
    .section-header p {
        white-space: normal !important; /* Allow wrapping on small mobile screens */
        font-size: 0.95rem;
        padding: 0 15px;
    }
}

/* =========================================
   VITAMIN CATEGORY CARD - HOVER EFFECTS
   ========================================= */

.category-card:hover {
    /* Lift the card upward by 10 pixels for a floating effect */
    transform: translateY(-10px);
    
    /* Apply a deeper, softer shadow to create depth when "lifted" */
    box-shadow: 0 20px 40px rgba(0,0,0,0.08) !important;
    
    /* Change the border color to our Brand Gold to highlight the selection */
    border-color: var(--accent-gold) !important;
}

.category-card:hover i {
    /* Slightly enlarge the icon (10% bigger) to create a "zoom" interaction */
    transform: scale(1.1);
    
    /* Ensure the icon scales smoothly over 0.3 seconds */
    transition: transform 0.3s ease;
}

/* =========================================
   FIX: UNIFIED CARD HOVER (SLIDE & INVERT)
   ========================================= */

/* Base style for both Product and Vitamin cards */
.product-card-premium, .category-card {
    background: var(--white);
    padding: 45px;
    border-left: 4px solid var(--accent-gold); /* The gold badge line */
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
    text-align: left; /* Aligned like the main page */
}

/* Hover State: Background turns Navy and slides Right */
.product-card-premium:hover, .category-card:hover {
    background: var(--primary-navy) !important;
    transform: translateX(8px); /* The moving right effect */
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* This ensures all text, including the links, turns pure white on hover */
.product-card:hover h3, 
.product-card:hover p,
.product-card:hover .inquire-link,
.product-card-premium:hover h3, 
.product-card-premium:hover p,
.product-card-premium:hover .inquire-link,
.category-card:hover h3, 
.category-card:hover p,
.category-card:hover i,
.category-card:hover .inquire-link {
    color: #ffffff !important;
    opacity: 1 !important;
}

/* Add this to make sure the link is visible even before hover */
.inquire-link {
    color: var(--accent-gold);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    display: inline-block;
    margin-top: 15px;
}

/* Make the entire card feel like a single button */
.product-card-premium, .category-card {
    position: relative; /* Essential for the 'stretched link' trick */
}

/* This stretches the link to cover the whole card area */
.inquire-link::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
}

/* FIXED SEARCH STRIP */
.search-strip {
    background: #ffffff;
    border-bottom: 1px solid #f0f0f0;
    padding: 15px 0;
    box-shadow: inset 0 -5px 10px rgba(0,0,0,0.02);
    
    /* Stick to top below the header */
    position: sticky;
    top: 80px; /* This must match the height of your .nav-container */
    z-index: 999; /* Just below the main header z-index */
}

/* Ensure the header and strip don't overlap awkwardly */
header {
    box-shadow: none; /* We will let the search strip provide the bottom shadow */
    z-index: 1000;
}

.search-field:focus {
    background: white;
}

#search-results-dynamic div:last-child {
    border-bottom: none;
}

/* MODERN SEARCH BAR STYLING */
.modern-search-form {
    width: 100%;
}

.modern-search-form .search-field {
    width: 100%;
    padding: 12px 15px 12px 45px; /* Extra left padding for the gold icon */
    background: var(--light-grey);
    border: 1px solid #e0e0e0;
    border-radius: 30px; /* Modern pill shape */
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9rem;
    color: var(--primary-navy);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

/* Gold Glow Focus Effect */
.modern-search-form .search-field:focus {
    background: #ffffff;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.1); /* Subtle gold aura */
}

/* Dynamic Results Box Styling */
#search-results-dynamic {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: white;
    z-index: 1001;
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(27, 42, 65, 0.15); /* Navy-tinted shadow */
    border: 1px solid #eee;
    display: none;
    overflow: hidden;
}

#search-results-dynamic div {
    padding: 15px 20px;
    border-bottom: 1px solid #f8f9fa;
    transition: all 0.2s ease;
}

#search-results-dynamic div:hover {
    background: var(--light-grey);
    padding-left: 25px; /* Slight slide effect on hover */
}

#search-results-dynamic a {
    color: var(--primary-navy);
    font-weight: 600;
    display: block;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .search-strip {
        top: 70px; /* Adjusted for the smaller mobile header height */
    }
}

/* Styling for individual search items */
.search-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f8f9fa;
    transition: all 0.2s ease;
    cursor: pointer;
}

.search-item a {
    color: var(--primary-navy);
    font-weight: 600;
    display: block;
    text-decoration: none;
}

/* THE HIGHLIGHTED STATE (For Keyboard & Hover) */
.search-item:hover, 
.search-item.highlighted {
    background: var(--primary-navy) !important;
    padding-left: 30px; /* Consistent slide effect */
}

.search-item:hover a, 
.search-item.highlighted a {
    color: var(--white) !important;
}

#search-results-dynamic {
    position: absolute !important;
    top: 100% !important; /* Positions it exactly at the bottom of the white strip */
    left: 0;
    right: 0;
    background: #ffffff !important;
    z-index: 999999 !important; /* Extremely high to float over banners */
    border: 1px solid #e0e0e0;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    display: none; /* Controlled by your main.js */
    max-height: 450px;
    overflow-y: auto;
}

/* Style for each product link in the dropdown */
.search-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.2s ease;
    background: #ffffff;
}

.search-item a {
    color: var(--primary-navy);
    font-weight: 600;
    text-decoration: none;
    display: block;
}

/* Hover & Keyboard Selection State */
.search-item:hover, 
.search-item.highlighted {
    background: var(--primary-navy) !important;
    padding-left: 25px !important;
}

.search-item:hover a, 
.search-item.highlighted a {
    color: #ffffff !important;
}

/* SEARCH ENGINE STYLING */
.search-results-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    z-index: 99999 !important; /* Makes it float on top */
    border: 1px solid #e0e0e0;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: none; /* JavaScript will show this when you type */
    max-height: 400px;
    overflow-y: auto;
}

.search-item {
    padding: 12px 20px;
    border-bottom: 1px solid #f8f8f8;
    cursor: pointer;
}

.search-item:hover, .search-item.highlighted {
    background: #1B2A41 !important; /* Navy Blue hover */
}

.search-item a {
    color: #1B2A41;
    font-weight: 600;
    text-decoration: none;
    display: block;
}

.search-item:hover a, .search-item.highlighted a {
    color: #ffffff !important; /* White text on hover */
}

/* SERVICES PAGE CUSTOM STYLES */
.services-hero h1 {
    font-family: 'Montserrat', sans-serif;
    letter-spacing: -1px;
}

.icon-box i {
    color: var(--accent-gold); /* Using your biotech gold */
    font-size: 3.5rem;
    margin-bottom: 15px;
}

.feature-card h3 {
    margin-top: 15px;
    font-size: 1.4rem;
}

/* UNIFIED PAGE ALIGNMENT */
.content-flex-container {
    display: flex;
    gap: 80px;
    align-items: start;
    margin-bottom: 80px;
}

.content-flex-container > div {
    flex: 1; /* Makes both sides exactly 50% width */
}

@media (max-width: 992px) {
    .content-flex-container {
        flex-direction: column; /* Stacks perfectly on mobile */
        gap: 40px;
    }
}


* PREMIUM CORPORATE TYPOGRAPHY */
.corporate-title {
    font-size: 3.5rem !important; /* Larger, more dominant headings */
    line-height: 1.1;
    margin-bottom: 30px;
    font-weight: 700;
}

.corporate-text {
    font-size: 1.25rem; /* Larger body text for readability */
    line-height: 1.8;
    color: var(--text-light);
}

/* THE ALIGNMENT ENGINE */
.content-flex-container {
    display: flex;
    gap: 100px; /* Wider gap for a "roomy" professional feel */
    align-items: start;
    margin-bottom: 120px;
}

.content-flex-container > div {
    flex: 1; /* Ensures perfect 50/50 split alignment */
}