/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #e5e5e5;
    /* Slightly darker to make header pop like in screenshot preview */
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
}

html {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Header Styles */
.site-header {
    background-color: #fff;
    /* Screenshot doesn't show a strong shadow, but a clean separator or none. keeping subtle. */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1000;
}

.header-container {
    max-width: 1300px;
    /* Slightly tighter than 1400 based on spacing */
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    /* Explicit design spec: 60px */
}

/* Logo */
.logo img {
    height: 48px !important;
    /* Reduced for better proportion - mobile first */
    width: auto;
    display: block;
}

@media (min-width: 1100px) {
    .logo img {
        height: 40px !important;
        /* Adjusted for 60px header (leaving 10px padding) */
        max-height: 50px !important;
        width: auto !important;
    }
}

/* Desktop Navigation */
.desktop-nav {
    display: none;
}

@media (min-width: 1100px) {
    .desktop-nav {
        display: block;
        /* margin-left: auto; */
        /* margin-right: 40px; */
        /* More space before actions */
        height: 100%;
        /* Ensure desktop-nav takes full height */
    }

    /* Navigation */
    .main-navigation {
        margin-left: auto;
        margin-right: 40px;
        /* Adjust spacing to actions */
        height: 100%;
        display: flex;
        align-items: center;
    }

    .nav-menu {
        display: flex;
        list-style: none;
        margin: 0;
        padding: 0;
        gap: 36px;
        /* Exact spacing from spec */
        height: 100%;
    }

    .menu-item {
        position: relative;
        height: 100%;
        display: flex;
        align-items: center;
        font-size: 15px;
        /* Looks correct */
        font-weight: 600;
        /* Bold/Semi-bold */
        color: #1a1a1a;
        /* Darker black */
        /* padding: 10px 0; */
        cursor: pointer;
    }

    .nav-menu>li>a {
        text-decoration: none;
        color: #333;
        font-weight: 600;
        font-size: 14px;
        /* Reduced from 15px to match tighter look */
        display: flex;
        align-items: center;
        gap: 6px;
        /* Spacing for arrow */
        padding: 5px 0;
        /* Reduce padding to rely on gap */
        transition: color 0.2s;
        /* text-transform: uppercase; Looks uppercase in some shots, checking.. actually Title Case in latest shot "Who We Are". Keeping Title Case. */
    }

    .menu-item:hover>a {
        color: #00BFB3;
    }

    .arrow-icon {
        width: 14px;
        /* Increased for better visibility */
        height: 14px;
        fill: none !important;
        stroke: currentColor !important;
        stroke-width: 2 !important;
        opacity: 0.9;
    }


    /* Dropdown & Mega Menu Base */
    .sub-menu {
        position: absolute;
        top: 100%;
        left: 0;
        background: #fff;
        min-width: 220px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: all 0.2s ease;
        border-radius: 0 0 4px 4px;
        padding: 20px 0;
        z-index: 1000;
        border-top: 3px solid #00BFB3;
        margin-top: 0;
    }

    /* Hover State */
    .menu-item:hover>.sub-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* Mega Menu Variations */
    .sub-menu.mega-menu-3-col {
        min-width: 600px;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
        padding: 30px;
        left: 0;
        transform: translateY(0);
        margin-top: 0;
    }

    .menu-item:hover>.sub-menu.mega-menu-3-col {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .sub-menu.mega-menu-2-col {
        min-width: 450px;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
        padding: 30px;
        left: 0;
        transform: translateY(0);
        margin-top: 0;
    }

    .menu-item:hover>.sub-menu.mega-menu-2-col {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
}

/* Column Styling */
.sub-menu .column {
    display: flex;
    flex-direction: column;
}

.sub-menu .column ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

/* Links in Dropdown */
.sub-menu a {
    display: block;
    padding: 8px 12px;
    color: #555;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
    border-radius: 4px;
    text-align: left;
}

.sub-menu a:hover {
    background: #fbfbfb;
    color: #00BFB3;
    padding-left: 16px;
}

/* Menu Headings */
.menu-heading {
    display: block;
    font-size: 13px;
    text-transform: uppercase;
    color: #999;
    font-weight: 700;
    padding: 0 12px 8px 12px;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
    text-align: left;
}

/* Nested Submenu (for What We Do) */
.has-nested {
    position: relative;
}

.arrow-icon-right {
    width: 12px;
    height: 12px;
    fill: currentColor;
    margin-left: auto;
    /* Push to right */
    opacity: 0.6;
}

.has-nested>a {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nested-menu {
    position: absolute;
    top: 0;
    left: 100%;
    margin-left: 5px;
    background: #fff;
    min-width: 220px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.2s ease;
    border-radius: 6px;
    padding: 10px 0;
    border: 1px solid #f0f0f0;
}

.has-nested:hover .nested-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}


/* Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Hide Desktop Actions by default (Mobile) */
.search-btn,
.donate-btn {
    display: none;
}

/* Mobile Toggle - Visible by default */
.mobile-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
    padding: 5px;
}

@media (min-width: 1100px) {

    /* Show Desktop Actions on larger screens */
    .search-btn,
    .donate-btn {
        display: flex;
        /* or block/inline-flex as needed */
    }

    /* Hide Mobile Toggle */
    .ccivs-custom-header .mobile-toggle,
    .mobile-toggle {
        display: none !important;
    }

    /* Ensure desktop nav is visible on large screens */
    .ccivs-custom-header .desktop-nav,
    .desktop-nav {
        display: block !important;
    }
}

/* Global Font Reset for Plugin */
.site-header,
.mobile-menu-container,
.mobile-menu-overlay,
.mobile-menu,
.mobile-item,
.mobile-link-wrapper a {
    font-family: 'Inter', Helvetica, Arial, sans-serif !important;
}

#ccivs-mobile-close {
    all: unset !important;
    /* NUKE ALL THEME STYLES */
    cursor: pointer !important;
    padding: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: 40px !important;
    /* Ensure touch target */
    height: 40px !important;
    /* Fix Visibility: Prevent shrink, ensure top z-index */
    flex-shrink: 0 !important;
    z-index: 100005 !important;
    position: relative !important;
    color: #333 !important;
}

#ccivs-mobile-close svg {
    width: 24px !important;
    height: 24px !important;
    fill: none !important;
    stroke: #333 !important;
    stroke-width: 2 !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

#ccivs-mobile-close svg line {
    stroke: #333 !important;
    stroke-width: 2 !important;
    opacity: 1 !important;
}

.search-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #00BFB3;
    padding: 5px;
    transition: transform 0.2s;
    align-items: center;
}

.search-btn svg {
    width: 22px;
    height: 22px;
}

.donate-btn {
    background-color: #00BFB3;
    color: #fff;
    padding: 10px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    transition: background 0.2s, transform 0.2s;
    letter-spacing: 0.3px;
    /* Ensure flex display is respected in media query */
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99998;
    /* High z-index */
    display: none;
    /* Hide by default to not block clicks */
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-menu-overlay.active {
    display: block;
    /* Show when active */
    opacity: 1;
}

/* Ensure Toggle Button is ALWAYS above everything */


.mobile-menu-overlay.active #ccivs-mobile-drawer {
    right: 0 !important;
    /* Force visibility */
    transform: translateX(0) !important;
    opacity: 1 !important;
}

#ccivs-mobile-drawer {
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 100%;
    height: 100%;
    background: #ffffff !important;
    /* Force white background */
    transition: right 0.3s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 2147483647 !important;
    /* Ultra High Z-Index */
    font-family: 'Inter', Helvetica, Arial, sans-serif !important;
}

.mobile-menu {
    display: flex !important;
    flex-direction: column !important;
    /* Force vertical stack */
    gap: 0 !important;
    /* Remove gap, use padding on items */
    width: 100%;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

.mobile-item {
    border-bottom: none;
    display: flex !important;
    flex-direction: column !important;
    width: 100%;
    margin: 0 !important;
}

.mobile-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 20px 25px !important;
    /* increased top/bottom padding for better alignment */
    border-bottom: 1px solid #eee !important;
    height: 80px !important;
    /* Force height to match desktop header approx */
}

.mobile-header .logo img {
    height: 32px !important;
    /* Smaller logo for mobile */
}

.mobile-link-wrapper,
.mobile-item>a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    /* Standardize gap */
    align-items: center;
    width: 100%;
    order: 1 !important;
    cursor: pointer;
    padding: 8px 0 !important;
    /* Reduced padding for tighter menu */
    line-height: 1.2;
    text-decoration: none !important;
    color: #222 !important;
    position: relative;
}

.mobile-sub-menu {
    order: 2 !important;
}

.mobile-scroll-content {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
}

.mobile-link-wrapper a {
    font-weight: 600 !important;
    /* Slightly lighter than 700 to match screenshot */
    font-size: 16px;
    color: #222 !important;
    text-decoration: none !important;
    /* Remove underline */
    display: block;
    font-family: inherit !important;
    flex: 1 1 auto;
}

.ccivs-custom-header .submenu-toggle,
.mobile-menu .submenu-toggle,
.submenu-toggle {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    /* Remove focus ring */
    width: 32px;
    height: 32px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s;
    -webkit-tap-highlight-color: transparent;
    /* Remove mobile tap box */
    flex: 0 0 32px;
    min-width: 32px;
    min-height: 32px;
    z-index: 2;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative;
    color: #111 !important;
}

.ccivs-custom-header .submenu-toggle svg,
.mobile-menu .submenu-toggle svg,
.submenu-toggle svg {
    width: 20px !important;
    height: 20px !important;
    fill: none !important;
    stroke: #111 !important;
    stroke-width: 2.5 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    display: block !important;
    opacity: 1 !important;
    stroke-linejoin: round !important;
    display: block !important;
    opacity: 1 !important;
    pointer-events: none;
    fill: none !important;
    /* Force NO FILL */
}

/* Fallback arrow if SVG is hidden by theme styles */
.ccivs-custom-header .submenu-toggle::after,
.mobile-menu .submenu-toggle::after,
.submenu-toggle::after {
    content: "▼";
    font-size: 14px;
    line-height: 1;
    color: #111;
    display: inline-block;
    position: absolute;
}

.submenu-toggle svg polyline {
    fill: none !important;
    stroke: #333 !important;
    stroke-width: 2.5 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    opacity: 1 !important;
    display: block !important;
    visibility: visible !important;
}

/* Force Arrow SVG dimensions globally */
.submenu-toggle svg {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    display: block !important;
}

/* Accordion Logic - Simplified for Reliability */
.mobile-sub-menu {
    display: none !important;
    /* Hidden by default */
    padding-left: 0 !important;
    margin-left: 0 !important;
    margin-top: 8px !important;
    margin-bottom: 0 !important;
    width: 100%;
    list-style: none !important;
}

.mobile-item.open .mobile-sub-menu {
    display: block !important;
    /* Force visible when open */
    margin-bottom: 15px !important;
}

/* Fallback if JS fails: allow focus to show submenu */
.mobile-item:focus-within .mobile-sub-menu {
    display: block !important;
    margin-bottom: 15px !important;
}

.mobile-sub-menu li {
    margin: 0 !important;
    padding: 0 !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    list-style: none !important;
}

.mobile-sub-menu li a {
    display: block !important;
    padding: 10px 0 !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    text-indent: 0 !important;
    color: #555 !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: all 0.2s !important;
}

.mobile-sub-menu li a:hover {
    color: #00BFB3 !important;
    background-color: #f5f5f5 !important;
    padding-left: 0 !important;
}

.mobile-item.open .submenu-toggle {
    transform: rotate(180deg);
}

.mobile-item.open>.mobile-link-wrapper a {
    color: #333 !important;
}

/* Screenshot shows sub-items are teal */
.mobile-sub-menu li a {
    display: block;
    padding: 10px 0;
    margin-left: 0 !important;
    padding-left: 0 !important;
    text-indent: 0 !important;
    color: #00BFB3 !important;
    /* Force teal */
    font-size: 15px;
    font-weight: 500;
}

.mobile-actions {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
    padding-top: 20px;
    /* border-top: 1px solid #f0f0f0; Remove border if not in screenshot */
}

.mobile-actions .donate-btn {
    display: block !important;
    /* Override global mobile hide */
    width: auto;
    /* Button size */
    min-width: 140px;
    text-align: center;
    padding: 12px 30px;
    background-color: #00BFB3;
    color: #fff;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
}

.search-btn-mobile {
    background: none;
    border: none;
    cursor: pointer;
    color: #00BFB3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

.search-btn-mobile svg {
    width: 20px;
    height: 20px;
}

/* Menu Heading Style */
.menu-heading {
    display: block;
    font-size: 13px;
    text-transform: uppercase;
    color: #999;
    font-weight: 700;
    padding: 0 12px 8px 12px;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

/* Column handling for mega menus */
.sub-menu .column {
    display: flex;
    flex-direction: column;
}

.menu-heading {
    color: #1a1a1a !important;
    font-size: 14px;
    margin-bottom: 5px;
    text-transform: none;
}

.mega-menu-2-col {
    grid-template-columns: 1.5fr 1fr;
}

/* Adjust column ratio for Who We Are */