.main-header {
    width: 100%;
    background-color: #fff;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 135px;
    max-width: 1920px;
    margin: 0 auto;
}

.header-container {
    max-width: 1770px; /* Matching the grid width you used before */
    margin: 0 auto;
    padding: 0px 30px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

/* --- Navigation --- */
.nav-list {
    display: flex;
    list-style: none;
    gap: clamp(15px, 2vw, 40px);
    margin: 0;
    padding: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.nav-item a {
    text-decoration: none;
    color: #373536;
    font-size: 18px;
    font-weight: 700;
    transition: color 0.2s;
}

.nav-item:hover a {
    color: #358FAF;
}

/* Dropdown Arrow (Chevron) */
.chevron-icon::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 2px solid #358FAF;
    border-bottom: 2px solid #358FAF;
    transform: rotate(45deg);
    margin-top: -3px;
    line-height: 1;
    margin: 2px 4px;
}

/* --- Search Bar --- */
/* Header button styling */
.search-toggle-btn {
    background: #F2F4F7;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    width: 100%;
    font-size: 16px;
    font-weight: 400;
    color: #373536;
    gap: 10px;
}

/* Full screen overlay */
.search-bar {
    display: flex;
    align-items: center;
    background-color: #F2F4F7;
    border-radius: 15px;
    padding: 0;
    width: 114px;
    height: 45px;
    flex-direction: row-reverse;
    /* gap: 16px; */
    justify-content: center;
}

.search-bar input {
    background: none;
    border: none;
    outline: none;
    width: 40%;
    font-size: 16px;
    color: #373536;
    font-weight: 400;
    margin-inline-start: 10px;
}

.search-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    width: 22px;
    height: 22px;
}
.search-overlay {
    position: fixed;
    inset: 0; /* covers full screen */
    background: rgba(255, 255, 255, 0.98);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay-inner {
    width: 100%;
    max-width: 1100px;
    padding: 0 40px;
    position: relative;
}

.search-form-wrapper {
    display: flex;
    align-items: center;
    gap: 25px;
}

.floating-search-icon {
    background: #F4F4F4;
    width: 72px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlay-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    color: #0E2551;
    font-family: inherit;
    font-size: 18px;
    font-weight: 400;
    border-bottom: 2px solid #358FAF;
    padding-bottom: 15px;
}

.close-overlay {
    position: absolute;
    top: -100px; /* Adjusted based on your layout */
    left: 40px;
    background: none;
    border: none;
    cursor: pointer;
}

/* --- Login Button --- */
.header-left {
    display: flex;
    align-items: center;
    gap: 47px;
}

.login-button {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #358FAF; /* Exact blue from JPG */
    color: #fff;
    text-decoration: none;
    padding: 10px 23px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 18px;
    transition: background 0.3s;
    flex-direction: row-reverse;
}

.login-button:hover {
    background-color: #2D7A96;
}

.user-icon {
    display: flex;
    align-items: center;
}

/* --- Logo --- */
.header-logo {
    height: clamp(60px, 5vw, 98px);
    width: auto;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 1200px) {
    .header-nav {
        display: none;
    }
}

/* ── Hamburger Button ─────────────────────────────────────── */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    transition: background 0.2s;
}

.nav-toggle:hover {
    background: #f2f4f7;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #373536;
    border-radius: 2px;
    transition: all 0.3s ease;
    margin: 0 auto;
}

@media (max-width: 1200px) {
    .nav-toggle { display: flex; }
}

/* ── Mobile Nav Drawer ────────────────────────────────────── */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(320px, 85vw);
    height: 100vh;
    background: #fff;
    z-index: 9998;
    padding: 80px 30px 40px;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.12);
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    direction: rtl;
}

.mobile-nav.is-open { right: 0; }

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9997;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-nav-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-close {
    position: absolute;
    top: 18px;
    left: 18px;
    background: #f2f4f7;
    border: none;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

/* ── Hamburger → X animation ─────────────────────────────── */
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile Nav Item Structure ───────────────────────────── */
.mobile-nav-item {
    border-bottom: 1px solid #eef3f8;
}

.mobile-nav-item:last-child {
    border-bottom: none;
}

/* Row wrapper for Link + Arrow */
.mobile-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer; /* Suggests the whole row is clickable */
}

.mobile-nav-link {
    text-decoration: none;
    color: #373536;
    font-size: clamp(16px, 4.5vw, 19px); /* Slightly larger for thumb-friendliness */
    font-weight: 600;
    display: block;
    padding: 16px 0;
    flex: 1;
    transition: color 0.2s;
    /* display: flex; */
    /* justify-content: space-between; */
    position: relative;
}

/* Active/Focus states for the parent link */
.mobile-nav-link:hover,
.mobile-nav-link:focus-visible {
    color: #358FAF;
    outline: none;
}

/* ── Sub-menu Toggle (The Span Arrow) ────────────────────── */
.mobile-sub-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #b0bac5; /* Subtle color for the arrow */
    transition: transform 0.3s ease, color 0.3s ease;
    position: absolute;
    left: 0;
    top: 8px;
    pointer-events: none;
}

/* Rotate the arrow when the link is expanded */
.mobile-nav-link[aria-expanded="true"] + .mobile-sub-toggle {
    transform: rotate(180deg);
    color: #358FAF;
}

.mobile-sub-toggle svg {
    display: block;
}

/* ── Sub-menu Accordion (Grid Technique) ──────────────────── */
.mobile-sub-menu {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #fafcfe; /* Slight background difference for sub-menus */
}

/* When open, change grid to 1fr */
.mobile-sub-menu.is-open {
    grid-template-rows: 1fr;
}

.mobile-sub-menu .mobile-contact-content,
.mobile-sub-menu > ul,
.mobile-sub-menu > .mobile-contact-panel {
    overflow: hidden;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 6px;
    display: flex;
    flex-flow: column;
}

/* Sub-menu Links */
.mobile-sub-menu > a {
    display: block;
    padding: 12px 20px 12px 0; /* RTL Padding */
    color: #60758b;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    border-right: 2px solid #eef3f8; /* Visual guide line on the right */
    transition: all 0.25s ease;
}

.mobile-sub-menu > a:hover,
.mobile-sub-menu > a:focus-visible {
    color: #358FAF;
    border-right-color: #358FAF;
    background-color: #f0f8fb;
    padding-right: 25px; /* Slight indent on hover */
    outline: none;
}

/* ── Specialized Mobile Mega Contact ─────────────────────── */
.mobile-contact-panel {
    padding: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #373536;
}

.m-info-item {
    margin-bottom: 12px;
}

.m-whatsapp-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25D366;
    color: #fff;
    padding: 14px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    margin: 20px 0;
    transition: opacity 0.2s;
}

.m-whatsapp-link:active {
    opacity: 0.8;
}

.m-hours-info h5 {
    margin: 0 0 8px 0;
    font-size: 15px;
    color: #358FAF;
}

/* ── Responsive Header Sizing ─────────────────────────────── */
@media (max-width: 1200px) {
    .main-header {
        height: clamp(80px, 10vw, 120px);
    }
    .header-left {
        gap: clamp(15px, 3vw, 47px);
    }
}

@media (max-width: 768px) {
    .main-header {
        height: 70px;
        padding: 10px 0;
    }
    .header-container {
        padding: 0 16px;
        align-items: center;
    }
    .header-logo {
        height: clamp(38px, 9vw, 58px);
    }
    .login-button {
        padding: 8px;
        font-size: clamp(13px, 3.5vw, 16px);
        gap: 8px;
        border-radius: 10px;
    }
    .header-left {
        gap: 10px;
    }
    .search-bar {
        width: clamp(80px, 20vw, 114px);
    }
}

/* Ensure the nav-item is the anchor for the menu */
.nav-item {
    position: relative; /* Keep this for standard dropdowns */
    /* If you want the menu to span the full site width, 
       ensure the parent .main-header has position: relative */
}

/* Mega Menu Container */
.mega-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #F5FFFF;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    padding: 50px;
    z-index: 999;
    width: max-content;
    /*min-width: 1240px;  Using min-width to maintain your design */
    /* Animation & Accessibility Properties */
    display: block;        /* Always block */
    visibility: hidden;    /* But hidden from keyboard/screen readers */
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;  /* Prevents accidental clicks when hidden */
}

/* Show on Hover, Focus-Within, or Active Class */
.nav-item:hover .mega-menu,
.nav-item:focus-within .mega-menu, /* Shows menu when a child link is tabbed into */
.mega-menu.is-active {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.mega-menu-container {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    width: 840px;
    margin: 0 auto;
}

.mega-col {
    flex: 1;
    text-align: right;
}

.mega-col h4 {
    font-size: 18px;
    color: #358FAF;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 8px;
}

.mega-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-col ul li {
    margin-bottom: 10px;
}

.mega-col ul li a {
    font-size: 16px;
    font-weight: 400;
    color: #0E2551;
    transition: color 0.2s;
}

.mega-col ul li a:hover {
    color: #358FAF;
    /* padding-right: 5px; */
}

/* Small nudge to align the chevron on hover */
.nav-item:hover .chevron-icon::after {
    transform: rotate(-135deg); /* Flip arrow up when open */
    margin-top: 2px;
}


/* Container Override for Contact Menu */
.mega-contact {
    width: max-content; /* Fixed width to match the JPG aspect */
    padding: 40px 60px;
    right: auto;
    left: 0;
    /* display: block; */
    /* opacity: 1; */
    /* visibility: visible; */
    left: 0;
    right: 0;
    margin: 0 auto;
    right: -500%;
}

.contact-grid {
    display: flex;
    justify-content: space-between;
    width: 100% !important;
    gap: 0; /* Gaps handled by column widths */
}

.contact-col {
    flex: 1;
    position: relative;
}

/* Vertical Divider Lines */
.hours-col::before, .hours-col::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: rgba(53, 143, 175, 0.2);
}
.hours-col::before { right: -20px; }
.hours-col::after { left: -20px; }

/* Right Column (Details) Styling */
.details-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* padding-right: 20px; */
    min-width: 400px;
}

.nav-item .detail-row,
.nav-item .detail-row a {
    display: flex;
    justify-content: flex-start;
    gap: 15px;
    font-size: 16px;
    color: #0E2551;
    font-weight: normal;
}

.detail-label {
    font-weight: 700;
    color: #358FAF;
    min-width: 60px;
    text-align: right;
}

/* Middle Column (Hours) Styling */
.hours-col {
    text-align: center;
    color: #358FAF;
    text-align: start;
    padding-inline-start: 40px;
    min-width: 400px;
}

.contact-sub-title {
    color: #358FAF;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}

.hours-col p {
    font-size: 15px;
    margin-bottom: 5px;
}

.spacing-top { margin-top: 25px; }

/* Left Column (Links) Styling */
.links-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
    padding-inline-start: 100px;
    min-width: 400px;
}

.contact-link-item {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: #358FAF;
    font-weight: 600;
    font-size: 18px;
    flex-direction: row-reverse;
}

.circle-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: 0.3s;
}

/* Specific Colors from JPG */
.teal-arrow { background-color: rgba(53, 143, 175, 0.1); color: #358FAF; }
.orange-arrow { background-color: rgba(241, 90, 34, 0.1); color: #F15A22; }
.green-arrow { background-color: rgba(169, 183, 36, 0.1); color: #A9B724; }

.whatsapp-row {
    margin-top: 10px;
    display: flex;
    justify-content: flex-start;
}

/* ── Mega Menu Responsive ────────────────────────────────── */

/* 1440px — trim padding and fixed widths */
@media (max-width: 1440px) {
    .mega-menu {
        padding: 40px;
    }
    .mega-menu-container {
        width: 680px;
        gap: 30px;
    }
    .mega-contact {
        padding: 35px 45px;
    }
    .details-col,
    .hours-col,
    .links-col {
        min-width: 240px;
    }
    .links-col {
        padding-inline-start: 55px;
    }
}

/* 1280px — compact layout, reduce font sizes */
@media (max-width: 1280px) {
    .nav-item a {
        font-size: 16px;
    }
    .nav-list {
        gap: clamp(10px, 1.2vw, 25px);
    }
    .mega-menu {
        padding: 30px;
    }
    .mega-menu-container {
        width: auto;
        gap: 20px;
    }
    .mega-col h4 {
        font-size: 16px;
        margin-bottom: 12px;
    }
    .mega-col ul li a {
        font-size: 14px;
    }
    .mega-contact {
        padding: 28px 32px;
    }
    .details-col,
    .hours-col,
    .links-col {
        min-width: 185px;
    }
    .links-col {
        padding-inline-start: 18px;
    }
    .hours-col {
        padding-inline-start: 18px;
    }
    .contact-sub-title {
        font-size: 15px;
    }
    .hours-col p {
        font-size: 13px;
    }
    .nav-item .detail-row,
    .nav-item .detail-row a {
        font-size: 13px;
    }
    .contact-link-item {
        font-size: 15px;
        gap: 10px;
    }
    .detail-label {
        min-width: 50px;
    }
    .m-contact-link-item{
        justify-content: space-between;
        display: flex;
        margin-bottom: 20px;
    }
}