    /* ========================================
   HEADER SECTION - MINIMALISTIC DESIGN
   ======================================== */

/* Header Color System - Uses variables from main style.css */
:root {
    /* Inherit colors from main stylesheet, add header-specific */
    --header-bg-light: rgba(252, 195, 0, 0.03);
}

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: #E0FFFF;
    /* Light aqua background */
    box-shadow: 0 2px 10px rgba(0, 146, 68, 0.08);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 146, 68, 0.1);
}

.main-header.header-scrolled {
    box-shadow: 0 4px 20px rgba(0, 146, 68, 0.12);
    background: #FFFFFF;
    /* White on scroll */
}

.header-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

/* Logo Section */
.header-logo {
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.05);
}

.logo-icon {
    width: 50px;
    height: 50px;
    /* background: linear-gradient(135deg, var(--primary-teal) 0%, var(--light-teal) 100%); */
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    /* box-shadow: 0 4px 12px rgba(0, 128, 128, 0.25); */
    transition: all 0.3s ease;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-link:hover .logo-icon {
    box-shadow: 0 6px 18px rgba(0, 146, 68, 0.35);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--yellow-primary);
    letter-spacing: -0.5px;
}

/* Navigation Menu */
.header-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
    display: flex; /* Allow nav-link and toggle to sit next to each other */
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 1.25rem;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    /* Remove chevron-down styling from here, it's now in .mega-menu-toggle */
}

.nav-item.mega-menu-open .mega-menu-toggle {
    color: #ffc43a;
}

.nav-item:focus-visible {
    outline: unset;
}

/* .nav-item.mega-menu-parent .nav-link:hover,
.nav-item.mega-menu-parent .nav-link:active {
    background: rgba(0, 146, 68, 0.08);
    padding: 0.55rem 1.15rem 0.55rem 0.55rem;
} */

/* New style for the dropdown toggle */
.mega-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem; /* Adjust as needed */
    height: 1.5rem; /* Adjust as needed */
    cursor: pointer;
    border-radius: 50%; /* Make it round */
    transition: background 0.3s ease, transform 0.3s ease;
    margin-left: -0.5rem; /* Overlap slightly with nav-link for better visual flow */
    color: var(--text-dark); /* Default color for the icon */
    font-size: 0.7rem; /* Size of the chevron icon */
}

.mega-menu-toggle i {
    transition: transform 0.3s ease;
}

/* Rotate chevron when mega-menu is open */
.mega-menu-parent.mega-menu-open .mega-menu-toggle i {
    transform: rotate(180deg);
}

.mega-menu-toggle:hover {
    color: var(--yellow-primary); /* Icon color on hover */
}

/* Remove this, as the chevron is no longer part of nav-link directly */
/*
.nav-link.has-mega-menu i.fa-chevron-down {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.mega-menu-parent.mega-menu-open .nav-link.has-mega-menu i.fa-chevron-down {
    transform: rotate(180deg);
}
*/


.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--yellow-primary);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--yellow-primary);
    /* background: rgba(0, 146, 68, 0.08); */
}

.nav-link:hover::before,
.nav-link.active::before {
    width: calc(100% - 2.5rem);
}

/* Mega Menu Styles */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    width: 700px;
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 146, 68, 0.15);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 1rem;
    padding: 2rem;
    border: 1px solid rgba(0, 146, 68, 0.1);
}

.mega-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: #FFFFFF;
    border-left: 1px solid rgba(0, 146, 68, 0.1);
    border-top: 1px solid rgba(0, 146, 68, 0.1);
    transform: translateX(-50%) rotate(45deg);
}

.mega-menu.mega-menu-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
    height: max-content;
    overflow-y: auto; /* Changed to auto for better default behavior, scrollbar will appear only when needed */
    max-height: 380px;

    /* Custom Scrollbar Styles for Webkit Browsers */
    &::-webkit-scrollbar {
        width: 4px; /* Width of the scrollbar */
    }

    &::-webkit-scrollbar-track {
        background: #f1f1f1; /* Color of the track */
        border-radius: 10px;
    }

    &::-webkit-scrollbar-thumb {
        background: var(--brand-yellow); /* Color of the scroll thumb */
        border-radius: 10px;
    }

    &::-webkit-scrollbar-thumb:hover {
        background: #555; /* Color of the scroll thumb on hover */
    }
}

.mega-menu-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1.5rem;
}

.mega-menu-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mega-menu-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    background: rgba(224, 255, 255, 0.3);
    border: 1px solid transparent;
}

.mega-menu-item:hover {
    background: rgba(0, 146, 68, 0.08);
    border-color: rgba(0, 146, 68, 0.2);
    transform: translateX(4px);
}

.mega-menu-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 146, 68, 0.2);
    transition: all 0.3s ease;
}

.mega-menu-item:hover .mega-menu-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 18px rgba(0, 146, 68, 0.3);
}

.mega-menu-text {
    flex: 1;
}

.mega-menu-text h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 0.25rem 0;
    transition: color 0.3s ease;
}

.mega-menu-item:hover .mega-menu-text h4 {
    color: var(--yellow-primary);
}

.mega-menu-text p {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin: 0;
    line-height: 1.4;
}

/* Right Side Section */
.header-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-phone {
    display: flex;
    align-items: center;
}

.phone-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
}

.phone-link i {
    color: var(--yellow-primary);
    font-size: 1rem;
}

.phone-number {
    font-weight: 700;
    color: var(--text-dark);
}

.phone-link:hover {
    background: rgba(0, 146, 68, 0.08);
    color: var(--yellow-primary);
}

.phone-link:hover .phone-number {
    color: var(--yellow-primary);
}

.whatsapp-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #25D366;
    color: #FFFFFF;
    border-radius: 12px;
    text-decoration: none;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.whatsapp-link:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    background: #20BA5A;
    color: #ffffff;
}

/* CTA Button */
.btn-appointment {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--gradient-primary);
    color: var(--white);
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(0, 146, 68, 0.3);
    white-space: nowrap;
    border: none;
    cursor: pointer;
}

.btn-appointment:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 146, 68, 0.4);
    background: var(--gradient-cta);
    color: var(--white);
}

.btn-appointment:active {
    transform: translateY(0);
}

/* Mobile Appointment Button in Drawer */
.mobile-appointment-item {
    display: none;
}

.mobile-appointment-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: var(--gradient-primary) !important;
    color: var(--white) !important;
    padding: 1rem 1.5rem !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    margin-top: 1rem;
    text-align: center;
    box-shadow: 0 4px 14px rgba(0, 146, 68, 0.3);
    transition: all 0.3s ease;
}

.mobile-appointment-btn::before {
    display: none !important;
}

.mobile-appointment-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 146, 68, 0.4);
    background: linear-gradient(135deg, var(--light-teal) 0%, var(--primary-teal) 100%) !important;
    color: var(--white) !important;
}

.mobile-appointment-btn i {
    font-size: 1.1rem;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background: var(--yellow-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet (Large) */
@media (max-width: 1440px) {
    .nav-link {
        padding: 0.55rem 0.65rem;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
    }

    .logo-text {
        font-size: 1.4rem;
    }
}

@media (max-width: 1330px) {
    .phone-number {
        display: none;
    }
}

@media (max-width: 1200px) {
    .mega-menu {
        width: 600px;
        padding: 1.5rem;
    }

    .header-right {
        gap: 0.5rem;
    }

    .header-container {
        gap: 1rem;
    }

    .phone-link i {
        font-size: 1.1rem;
    }
}

/* Tablet (Medium) */
@media (max-width: 1024px) {
    .header-container {
        padding: 1rem 1.5rem;
        gap: 1rem;
    }

    .nav-link {
        padding: 0.65rem 0.5rem;
        font-size: 0.9rem;
    }

    .header-right {
        gap: 0.75rem;
    }

    .btn-appointment {
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
    }

    /* Mega menu adjustments for tablet */
    .mega-menu {
        width: 100%;
        min-width: 300px;
        max-width: 500px;
        left: 0;
        transform: translateX(0) translateY(-10px);
    }

    .mega-menu::before {
        left: 2rem;
        transform: translateX(0) rotate(45deg);
    }

    .mega-menu.mega-menu-active {
        transform: translateX(0) translateY(0);
    }

    .mega-menu-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    /* Hide phone number on mobile */
    .header-phone {
        display: none;
    }

    /* Hide desktop navigation */
    .header-nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        width: 100%;
        background: #FFFFFF;
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        box-shadow: 0 10px 40px rgba(0, 146, 68, 0.15);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, padding 0.4s ease;
        padding: 0 1.25rem;
    }

    .header-nav.nav-active {
        max-height: 90vh;
        overflow-y: auto;
        padding: 1.5rem 1.25rem;
        border-top: 1px solid rgba(0, 146, 68, 0.1);
    }

    .nav-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        width: 100%;
    }

    .nav-item {
        width: 100%;
        flex-direction: column;
        position: relative;
    }

    .mega-menu-toggle {
        position: absolute;
        right: 13px;
        top: 10px;
        color: #ffc63b;
        font-size: 0.9rem;
    }

    .nav-link {
        padding: 1rem 1.25rem;
        border-radius: 10px;
        text-align: left;
        font-size: 1rem;
        width: 100%;
        display: flex;
        justify-content: space-between;
    }

    .nav-link.mobile-appointment-btn {
        justify-content: center;
    }

    .nav-link::before {
        display: none;
    }

    /* Mobile Mega Menu */
    .mega-menu {
        position: static;
        width: 100%;
        max-width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0;
        margin: 0rem 0 0 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
        background: rgba(224, 255, 255, 0.3);
    }

    .mega-menu::before {
        display: none;
    }

    .mega-menu.mega-menu-active {
        max-height: 1000px;
        padding: 1rem;
        margin-top: 0.5rem;
    }

    .mega-menu-content {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .mega-menu-item {
        padding: 0.875rem;
        gap: 0.875rem;
    }

    .mega-menu-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 1.1rem;
    }

    .mega-menu-text h4 {
        font-size: 0.95rem;
    }

    .mega-menu-text p {
        font-size: 0.8rem;
    }

    /* Adjust CTA button for mobile */
    .btn-appointment {
        padding: 0.7rem 1rem;
        font-size: 0.8rem;
    }

    .whatsapp-link {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }

    /* Show mobile appointment button in drawer */
    .mobile-appointment-item {
        display: block;
        width: 100%;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(0, 146, 68, 0.1);
    }

    .header-right .btn-appointment {
        display: none;
    }

    .nav-link:hover,
    .nav-link.active {
        color: var(--yellow-primary);
        background: rgba(0, 146, 68, 0.08);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .header-container {
        padding: 1rem 1.25rem;
        gap: 1rem;
    }

    .logo-text {
        font-size: 1.35rem;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }
}

/* Mobile (Small) */
@media (max-width: 480px) {
    .header-container {
        padding: 0.875rem 1rem;
    }

    .logo-text {
        font-size: 1.25rem;
    }

    .logo-icon {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }

    .header-nav {
        top: 65px;
    }

    .nav-link {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }

    .btn-appointment {
        padding: 0.65rem 0.875rem;
        font-size: 0.75rem;
    }

    .whatsapp-link {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }

    .mega-menu-toggle {
        top: 5px;
    }
}

/* Extra Small Devices */
@media (max-width: 360px) {
    .logo-text {
        font-size: 1.1rem;
    }

    .logo-icon {
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }

    .btn-appointment {
        padding: 0.65rem;
        min-width: 44px;
    }
}

.btn-appointment:focus,
.phone-link:focus,
.whatsapp-link:focus,
.mega-menu-item:focus {
    outline: 2px solid var(--yellow-primary);
    outline-offset: 2px;
}

html {
    scroll-behavior: smooth;
}

.mega-menu {
    pointer-events: auto;
}

.mega-menu-item {
    pointer-events: auto;
}

header .logo-rotator {
    width: 240px;
    height: 50px;
  }


  header .logo-img {
    width: 240px;
    height: 50px;
  }

.flip-box {
    background-color: transparent;
    width: 300px;
    height: 200px;
    perspective: 1000px;
  }
  
  .flip-box-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transform-style: preserve-3d;
    
    animation: auto-flip 8s infinite ease-in-out; 
  }
  
  @keyframes auto-flip {
    0% { transform: rotateY(0deg); }
    
    45% { transform: rotateY(180deg); }
    55% { transform: rotateY(180deg); } 
    
    100% { transform: rotateY(360deg); } 
  }
  
  .flip-box-front, .flip-box-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; 
    backface-visibility: hidden;
  }
  
  .flip-box-back {
    transform: rotateY(180deg);
  }

  @media (max-width: 1200px) {
    header .logo-rotator {
        width: 180px;
        height: 40px;
    }

    header .logo-img {
        width: 180px;
        height: 40px;
    }
}