/*
 * Dana Prime — Custom Headers
 * File: blocksy-child/assets/css/dana-headers.css
 * Font Update: SF Pro Display (Medium 500 & Semibold 600/700)
 */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SHARED BASE (STICKY)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.dh {
    width: 100%;
    position: sticky !important; 
    top: 0;
    left: 0;
    z-index: 9999;
    /* Updated Font */
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #ffffff !important;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08) !important;
}

/* Facilities Header Gradient (28% Opacity) */
.dh-2 {
    background: linear-gradient(90deg, rgba(44, 78, 121, 0.28) 0%, rgba(69, 102, 147, 0.28) 100%) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dh-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 32px;
    height: 72px;
    gap: 20px;
    position: relative;
}

.dh-logo-link {
    display: flex;
    align-items: center;
}

.dh-main-logo {
    height: 65px; /* Adjust height to fit your header design */
    width: auto;
    display: block;
}
/* ── NAV ── */
.dh-nav { 
    flex: 1; 
    min-width: 0; 
}

.dh-nav-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 22px !important;
    justify-content: center !important;
}

.dh-nav-list li a {
    display: block !important;
    text-decoration: none !important;
    /* Updated Font & Weight */
    font-family: 'SF Pro Display', sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important; /* Medium */
    padding: 6px 8px !important;
    white-space: nowrap !important;
    color: #2C3E50 !important;
    position: relative;
}

/* ── ACTIVE STATE UNDERLINE (GOLD) ── */
.dh-nav-list li.current-menu-item a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 8px;
    right: 8px;
    height: 2px;
    background-color: #C9A847;
}

/* ── RIGHT GROUP ── */
.dh-right {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-shrink: 0;
}

/* ── FACILITIES SEARCH ── */
.dh-fac-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid #6B7280 !important; 
    border-radius: 4px;
    height: 38px;
    max-width: 230px !important;
    background: transparent !important;
}

.dh-fac-search i, 
.dh-fac-search svg {
    color: #6B7280 !important;
    fill: #6B7280 !important;
}

.dh-fac-search.mob-inline {
    display: none !important;
}

.dh-fac-input {
    background: none !important;
    border: none !important;
    color: #2C3E50 !important;
    /* Updated Font */
    font-family: 'SF Pro Display', sans-serif;
    font-size: 13px;
    width: 100%;
    outline: none !important;
}

.dh-fac-input::placeholder { color: #6B7280; }

/* ── BUTTON STYLING ── */
.dh-btn {
    /* Updated Font */
    font-family: 'SF Pro Display', sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important; /* SemiBold */
    padding: 10px 18px !important;
    border-radius: 4px !important;
    text-transform: capitalize !important;
    display: inline-flex !important;
    align-items: center !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    border: none !important;
    white-space: nowrap !important;
}

.dh-btn-navy, 
.dh-btn-navy-outline { 
    background-color: #2C4E79 !important; 
    color: #ffffff !important; 
    border: none !important;
}

.dh-btn-gold { 
    background-color: #C9A847 !important; 
    color: #ffffff !important; 
}

/* ── MOBILE STYLES ── */
.dh-mob-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 36px; 
    height: 36px;
    background: none; 
    border: none; 
    cursor: pointer;
    position: relative;
    z-index: 10001;
}

.dh-mob-btn span {
    display: block;
    height: 3px;
    width: 24px;
    background: #2C3E50;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

/* ── X ANIMATION ── */
.dh-mob-btn.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.dh-mob-btn.is-open span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.dh-mob-btn.is-open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ── MOBILE MENU ── */
.dh-mob-nav { 
    display: none; 
    flex-direction: column; 
    padding: 20px; 
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 10px 15px rgba(0,0,0,0.05);
    z-index: 9998;
}

/* Force show when open */
.dh-mob-nav.is-open { 
    display: flex !important; 
}

.dh-mob-list { list-style: none; margin: 0; padding: 0; }

.dh-mob-list li a { 
    display: block; 
    padding: 15px 10px; 
    color: #2C3E50; 
    text-decoration: none; 
    border-bottom: 1px solid #eee; 
    /* Updated Font */
    font-family: 'SF Pro Display', sans-serif;
    font-weight: 500;
}

.dh-mob-list li.current-menu-item a {
    color: #C9A847 !important;
    font-weight: 700;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CLASH FIX: 1024px - 1180px
   Prevents items from breaking onto new lines
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 1180px) and (min-width: 1024px) {
    .dh-inner {
        padding: 0 15px !important;
        gap: 10px !important;
    }
    .dh-logo-text {
        font-size: 19px !important;
    }
    .dh-nav-list {
        gap: 12px !important;
    }
    .dh-nav-list li a {
        font-size: 13px !important;
        padding: 4px 6px !important;
    }
    .dh-right {
        gap: 15px !important;
    }
    .dh-fac-search {
        max-width: 160px !important;
    }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   EARLY BURGER TRIGGER
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 1024px) {
    .dh-nav { display: none !important; }
    .dh-right .dh-btn { display: none !important; }
    .dh-mob-btn { display: flex !important; }
    .dh-right .dh-fac-search { display: none !important; }
}

/* ==========================================================================
   DANA CUSTOM HEADER: DESKTOP STYLES (1024px+)
   ========================================================================== */
@media (min-width: 1024px) {
    .dh-nav-list > .menu-item {
        position: relative;
        padding: 20px 0;
    }

    .dh-nav-list .menu-item > a {
        display: flex;
        align-items: center;
        gap: 8px;
        color: #2C4E79;
        font-weight: 600; /* SemiBold */
        text-decoration: none;
        transition: color 0.3s ease;
    }

    .dh-chevron, 
    .dh-nav-list .menu-item a i {
        display: inline-block;
        font-size: 11px;
        transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        opacity: 0.8;
    }

    .dh-nav-list .menu-item:hover > a .dh-chevron,
    .dh-nav-list .menu-item:hover > a i {
        transform: rotate(180deg);
        color: #C9A847;
    }

    .dh-nav-list .sub-menu {
        position: absolute;
        top: calc(100% - 10px);
        left: 50%;
        transform: translateX(-50%) translateY(10px);
        width: 260px;
        background: #ffffff;
        padding: 10px 0;
        border-radius: 12px;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
        border: 1px solid rgba(0, 0, 0, 0.05);
        list-style: none;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
        z-index: 999;
    }

    .dh-nav-list .menu-item:hover > .sub-menu {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
        pointer-events: auto;
    }

    .dh-nav-list .sub-menu li a {
        display: block;
        padding: 12px 25px;
        color: #2C4E79;
        /* Updated Font */
        font-family: 'SF Pro Display', sans-serif;
        font-size: 15px;
        font-weight: 500;
        text-decoration: none;
        transition: all 0.2s ease;
    }

    .dh-nav-list .sub-menu li a:hover {
        background: #fbf9f4;
        color: #C9A847;
        padding-left: 32px;
    }

    .dh-nav-list .menu-item::after {
        content: '';
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        height: 10px; 
        z-index: 10;
    }
}

/* ==========================================================================
   DANA CUSTOM HEADER: MOBILE STYLES (0 - 1023px)
   ========================================================================== */
@media (max-width: 1023px) {
    .dh-mob-nav .sub-menu {
        display: none !important;
        visibility: hidden;
        opacity: 0;
        height: 0;
        overflow: hidden;
        list-style: none;
        padding-left: 20px;
        background: rgba(44, 78, 121, 0.03);
        transition: all 0.3s ease;
    }

    .dh-mob-nav .menu-item-has-children.sub-menu-open > .sub-menu {
        display: block !important;
        visibility: visible;
        opacity: 1;
        height: auto;
        padding-top: 10px;
        padding-bottom: 15px;
    }

    .dh-mob-nav .menu-item-has-children > a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 20px;
    }

    .dh-mob-nav .menu-item-has-children.sub-menu-open > a .dh-chevron,
    .dh-mob-nav .menu-item-has-children.sub-menu-open > a i {
        transform: rotate(180deg) !important;
        color: #C9A847;
    }
}

/* ── HIGHLIGHT PARENT WHEN SUB-MENU IS ACTIVE ── */
.dh-nav-list li.current-menu-ancestor > a,
.dh-nav-list li.current-page-ancestor > a {
    color: #C9A847 !important;
    font-weight: 600;
}

.dh-nav-list li.current-menu-ancestor > a::after,
.dh-nav-list li.current-page-ancestor > a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 8px;
    right: 8px;
    height: 2px;
    background-color: #C9A847;
}

.dh-nav-list .sub-menu li.current-menu-item a {
    color: #C9A847 !important;
    background: #fbf9f4;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE FIXES
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 1024px) {
    .dh-nav-list { gap: 10px !important; }
    .dh-fac-search { max-width: 140px !important; }
}

@media (max-width: 768px) {
    .dh-inner { padding: 0 20px; height: 64px; }
    .dh-right .dh-fac-search { display: none !important; } 
    .dh-fac-search.mob-inline { display: flex !important; max-width: 150px !important; height: 34px; }
    .dh-nav { display: none !important; }
    .dh-btn { display: none !important; }
    .dh-mob-btn { display: flex; }
    .dh-mob-nav .menu-item-has-children > a { padding: 10px 10px !important; }

    /* MOBILE MENU PARENT HIGHLIGHT */
    .dh-mob-list li.current-menu-ancestor > a,
    .dh-mob-list li.current-page-ancestor > a {
        color: #C9A847 !important;
        font-weight: 700;
    }

    .dh-mob-list .sub-menu li.current-menu-item a {
        color: #C9A847 !important;
        background: rgba(201, 168, 71, 0.05);
        border-left: 3px solid #C9A847;
        padding-left: 15px;
    }

    .dh-mob-list li.current-menu-ancestor > a .dh-chevron,
    .dh-mob-list li.current-menu-ancestor > a i {
        color: #C9A847 !important;
    }
}