/* =========================================================
   SoftGenTech Crystal Video Header v3.1
   Responsive / Mobile Duplicate Header FIX
   Desktop design preserved
========================================================= */

html,
body {
    overflow-x: hidden !important;
}

.aih,
.aih * {
    box-sizing: border-box;
}

.aih {
    --cyan: #25dcff;
    --blue: #168cff;

    position: absolute !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    width: 100%;
    height: 92px;

    display: grid;
    grid-template-columns: minmax(235px, 25%) 1fr;
    align-items: center;

    padding: 0 clamp(26px, 4vw, 70px);

    font: 400 15px/1.5 Inter, system-ui, sans-serif;
    color: #fff;

    background: linear-gradient(
        180deg,
        rgba(1,13,32,.14),
        rgba(1,18,42,.035)
    );

    border-bottom: 0 !important;
    box-shadow: none !important;

    -webkit-backdrop-filter: none;
    backdrop-filter: none;

    transition:
        background .28s ease,
        box-shadow .28s ease,
        backdrop-filter .28s ease,
        height .28s ease;
}

/* Header decorative layers */
.aih:before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        rgba(3,37,73,.11),
        transparent 23%,
        transparent 77%,
        rgba(3,37,73,.10)
    );
}

/* Decorative bottom line removed — desktop design otherwise unchanged. */
.aih:after {
    display: none !important;
    content: none !important;
}

/* =========================================================
   STICKY STATE
========================================================= */

.aih.aih-scrolled {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;

    width: 100% !important;
    height: 78px;

    background: linear-gradient(
        105deg,
        rgba(2,19,43,.78),
        rgba(4,42,79,.70)
    );

    border-bottom: 0 !important;
    box-shadow: 0 10px 32px rgba(0,12,32,.22) !important;

    -webkit-backdrop-filter: blur(12px) saturate(125%);
    backdrop-filter: blur(12px) saturate(125%);
}

/* Inner pages */
body:not(.home) .aih {
    position: relative !important;

    background: linear-gradient(
        105deg,
        rgba(3,24,53,.96),
        rgba(5,52,96,.94)
    );

    box-shadow: 0 8px 25px rgba(0,18,45,.15) !important;

    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

body:not(.home) .aih.aih-scrolled {
    position: fixed !important;
    top: 0 !important;
}

/* Admin bar */
body.admin-bar .aih {
    top: 32px;
}

body:not(.home).admin-bar .aih {
    top: 0;
}

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

.aih a {
    text-decoration: none !important;
    box-shadow: none !important;
}

/* =========================================================
   BRAND
========================================================= */

.aih-brand {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    height: 100%;
    min-width: 0;
    color: #fff;
}

.aih .aih-logo-img {
    display: block;
    width: auto;
    height: auto;
    max-width: 245px;
    max-height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.18));
}

.aih .aih-logo {
    width: 54px;
    height: 54px;
}

.aih-brand b {
    font: 700 25px Sora, sans-serif;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,.35);
}

/* =========================================================
   DESKTOP NAVIGATION
========================================================= */

.aih-right {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    min-width: 0;
    height: 100%;
}

.aih-top {
    display: none !important;
}

.aih-bar {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(18px,2.25vw,40px);
    padding-bottom: 18px !important;
}

.aih-nav {
    min-width: 0;
    height: 100%;
}

.aih-menu {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(15px,1.6vw,29px);
}

.aih-menu > li {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.aih-menu > li > a {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 2px;

    color: #fff !important;
    white-space: nowrap;

    font: 600 14px Sora, sans-serif;
    letter-spacing: -.1px;

    text-shadow:
        0 2px 10px rgba(0,8,22,.75),
        0 1px 2px rgba(0,0,0,.55);

    transition: color .2s ease, transform .2s ease;
}

.aih-menu > li > a:before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 20px;
    width: 0;
    height: 2px;
    border-radius: 3px;

    background: linear-gradient(90deg,#18d4ff,#67efff);
    box-shadow: 0 0 10px rgba(29,220,255,.65);

    transition: .22s ease;
}

.aih-menu > li:hover > a,
.aih-menu > .current-menu-item > a,
.aih-menu > .current_page_item > a,
.aih-menu > .current-menu-ancestor > a {
    color: #55eaff !important;
}

.aih-menu > li:hover > a:before,
.aih-menu > .current-menu-item > a:before,
.aih-menu > .current_page_item > a:before,
.aih-menu > .current-menu-ancestor > a:before {
    left: 0;
    width: 100%;
}

.aih-menu > li.menu-item-has-children > a,
.aih-menu > li.page_item_has_children > a {
    padding-right: 15px;
}

.aih-menu > li.menu-item-has-children > a:after,
.aih-menu > li.page_item_has_children > a:after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    width: 6px;
    height: 6px;

    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;

    transform: translateY(-70%) rotate(45deg);
}

.aih-menu .sub-menu,
.aih-menu .children {
    position: absolute;
    top: calc(100% - 10px);
    left: -20px;

    min-width: 235px;
    padding: 9px;

    background: rgba(2,21,47,.88);
    border: 1px solid rgba(83,224,255,.22);
    border-radius: 13px;

    box-shadow: 0 20px 45px rgba(0,8,28,.30);

    -webkit-backdrop-filter: blur(14px) saturate(125%);
    backdrop-filter: blur(14px) saturate(125%);

    opacity: 0;
    visibility: hidden;
    transform: translateY(7px);

    transition: .2s ease;
}

.aih-menu .sub-menu:before,
.aih-menu .children:before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -12px;
    height: 12px;
}

.aih-menu li:hover > .sub-menu,
.aih-menu li:focus-within > .sub-menu,
.aih-menu li:hover > .children,
.aih-menu li:focus-within > .children {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.aih-menu .sub-menu a,
.aih-menu .children a {
    display: block;
    padding: 11px 13px;
    border-radius: 8px;

    color: #f1fbff !important;
    font: 500 13px Sora, sans-serif;
    text-shadow: none;

    transition: .18s;
}

.aih-menu .sub-menu a:hover,
.aih-menu .children a:hover {
    color: #42e6ff !important;
    background: rgba(33,215,255,.10);
}

/* =========================================================
   CTA
========================================================= */

.aih-btn {
    flex: 0 0 auto;

    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 158px;
    min-height: 46px;
    padding: 0 22px;

    border: 1.5px solid rgba(83,230,255,.90);
    border-radius: 26px;

    color: #fff !important;
    background: rgba(2,30,62,.10);

    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.03),
        0 4px 18px rgba(0,0,0,.06);

    font: 600 14px Sora, sans-serif;
    white-space: nowrap;

    text-shadow: 0 2px 8px rgba(0,8,22,.65);

    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);

    transition: .22s ease;
}

.aih-btn:after {
    content: "→";
    margin-left: 11px;
    font-size: 18px;
    color: #58eaff;
}

.aih-btn:hover {
    color: #03213e !important;
    background: linear-gradient(100deg,#20d4f7,#67efff);
    border-color: #67efff;
    box-shadow: 0 8px 24px rgba(26,215,255,.24);
    transform: translateY(-2px);
    text-shadow: none;
}

.aih-btn:hover:after {
    color: #03213e;
}

.aih-pulse {
    display: none;
}

/* =========================================================
   BURGER
========================================================= */

.aih-burger {
    display: none;

    position: relative;
    z-index: 5;

    width: 43px;
    height: 43px;
    padding: 0;

    border: 1px solid rgba(255,255,255,.38);
    border-radius: 11px;

    background: rgba(2,25,54,.16);
    color: #fff;

    font-size: 24px;
    line-height: 1;

    cursor: pointer;

    text-shadow: 0 2px 8px rgba(0,0,0,.6);
}

.aih.aih-scrolled .aih-menu > li > a:before {
    bottom: 15px;
}

.aih.aih-scrolled .aih-logo-img {
    max-height: 56px;
}

/* =========================================================
   DESKTOP / LAPTOP
========================================================= */

@media (max-width: 1200px) and (min-width: 992px) {

    .aih {
        grid-template-columns: 205px 1fr;
        padding: 0 26px;
    }

    .aih .aih-logo-img {
        max-width: 205px;
    }

    .aih-menu {
        gap: 14px;
    }

    .aih-menu > li > a {
        font-size: 13px;
    }

    .aih-bar {
        gap: 17px;
    }

    .aih-btn {
        min-width: 140px;
        padding: 0 17px;
    }
}

/* =========================================================
   TABLET + MOBILE
========================================================= */

/* Desktop-only bottom spacing — preserved from the original design. */
@media (min-width: 992px) {
    .aih-bar {
        padding-bottom: 18px !important;
    }
}

@media (max-width: 991px) {

    /* =====================================================
       MOBILE ONLY — DO NOT CHANGE DESKTOP DESIGN
    ===================================================== */

    .aih {
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 74px !important;
        min-height: 74px !important;
        padding: 0 15px !important;
        grid-template-columns: none !important;
        overflow: visible !important;
    }

    /* Only the SoftGen plugin header remains visible on mobile. */
    body header:not(#aih),
    body > header:not(#aih),
    body > #masthead:not(#aih),
    body > #site-header:not(#aih),
    body > .site-header:not(#aih),
    body > .main-header:not(#aih),
    body > .header-wrapper:not(#aih),
    body > .header-area:not(#aih),
    body .site-header:not(#aih),
    body #masthead:not(#aih),
    body #site-header:not(#aih),
    body .ast-mobile-header,
    body .ast-desktop-header,
    body .ast-main-header-wrap {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    /* If the plugin itself was output twice, keep the first one only. */
    #aih ~ #aih,
    #aih ~ header#aih,
    header#aih ~ header#aih {
        display: none !important;
    }

    .aih.aih-scrolled {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 74px !important;
        min-height: 74px !important;
        margin: 0 !important;
        z-index: 999999 !important;
    }

    body:not(.home) .aih {
        position: relative !important;
    }

    body:not(.home) .aih.aih-scrolled {
        position: fixed !important;
        top: 0 !important;
    }

    /* Brand stays on the left; burger stays on the right. */
    .aih-brand {
        position: relative !important;
        z-index: 3 !important;
        display: flex !important;
        align-items: center !important;
        flex: 1 1 auto !important;
        width: auto !important;
        min-width: 0 !important;
        height: 74px !important;
        overflow: hidden !important;
    }

    .aih .aih-logo-img {
        display: block !important;
        width: auto !important;
        height: auto !important;
        max-width: min(205px, 72vw) !important;
        max-height: 52px !important;
    }

    .aih .aih-logo {
        width: 44px !important;
        height: 44px !important;
    }

    .aih-brand b {
        font-size: 20px !important;
    }

    .aih-burger {
        display: flex !important;
        position: relative !important;
        z-index: 100002 !important;
        flex: 0 0 43px !important;
        align-items: center !important;
        justify-content: center !important;
        width: 43px !important;
        height: 43px !important;
        margin-left: 12px !important;
    }

    /* Mobile menu is a panel below the SAME header, never a second header. */
    .aih-right {
        display: none !important;
        position: absolute !important;
        top: calc(100% + 7px) !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        height: auto !important;
        max-height: calc(100vh - 90px) !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        padding: 10px 13px 15px !important;
        border: 1px solid rgba(74,221,255,.20) !important;
        border-radius: 15px !important;
        background: rgba(2,22,48,.96) !important;
        box-shadow: 0 20px 42px rgba(0,10,30,.34) !important;
        -webkit-backdrop-filter: blur(16px) !important;
        backdrop-filter: blur(16px) !important;
        z-index: 100001 !important;
    }

    .aih.aih-open .aih-right {
        display: block !important;
    }

    .aih-bar {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        padding: 0 !important;
    }

    .aih-nav,
    .aih-menu {
        width: 100% !important;
        height: auto !important;
    }

    .aih-menu {
        display: block !important;
    }

    .aih-menu > li {
        display: block !important;
        width: 100% !important;
        height: auto !important;
    }

    .aih-menu > li > a {
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        height: 47px !important;
        padding: 0 28px 0 10px !important;
        border-bottom: 1px solid rgba(255,255,255,.07) !important;
    }

    .aih-menu > li > a:before {
        display: none !important;
    }

    .aih-menu > li.menu-item-has-children > a:after,
    .aih-menu > li.page_item_has_children > a:after {
        right: 11px !important;
        top: 19px !important;
    }

    .aih-menu .sub-menu,
    .aih-menu .children {
        position: static !important;
        display: none;
        width: 100% !important;
        min-width: 0 !important;
        padding: 4px 0 7px 13px !important;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }

    .aih-menu li.aih-sub-open > .sub-menu,
    .aih-menu li.aih-sub-open > .children {
        display: block !important;
    }

    .aih-btn {
        width: 100% !important;
        margin-top: 13px !important;
    }
}

/* =========================================================
   ADMIN BAR MOBILE
========================================================= */

@media (max-width: 782px) {

    body.admin-bar .aih {
        top: 46px !important;
    }

    body.admin-bar .aih.aih-scrolled {
        top: 46px !important;
    }

    body:not(.home).admin-bar .aih {
        top: 0 !important;
    }

    body:not(.home).admin-bar .aih.aih-scrolled {
        top: 0 !important;
    }
}

/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    .aih {
        height: 64px !important;
        min-height: 64px !important;

        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .aih.aih-scrolled {
        height: 64px !important;
        min-height: 64px !important;
    }

    .aih-brand {
        height: 64px !important;
    }

    .aih .aih-logo-img {
        max-width: 172px !important;
        max-height: 47px !important;
    }

    .aih-burger {
        width: 41px !important;
        height: 41px !important;
        flex-basis: 41px !important;
        margin-left: 10px !important;
    }

    .aih-right {
        left: 8px;
        right: 8px;
    }
}

/* =========================================================
   EXTRA SMALL PHONES
========================================================= */

@media (max-width: 360px) {

    .aih .aih-logo-img {
        max-width: 150px !important;
        max-height: 43px !important;
    }

    .aih-burger {
        width: 39px !important;
        height: 39px !important;
        flex-basis: 39px !important;
    }
}

/* =========================================================
   REMOVE EXTRA LINE / BORDER
========================================================= */

#aih,
#aih .aih-top,
#aih .aih-bar,
#aih .aih-nav {
    border-bottom: none !important;
}

#aih::before,
#aih::after,
#aih .aih-top::before,
#aih .aih-top::after,
#aih .aih-bar::before,
#aih .aih-bar::after,
#aih .aih-nav::before,
#aih .aih-nav::after {
    border: none !important;
    box-shadow: none !important;
}

/* Sticky logo must remain visible */
#aih.is-sticky .aih-brand,
#aih.is-sticky .aih-logo-img {
    opacity: 1 !important;
    visibility: visible !important;
}

#aih.is-sticky .aih-logo-img {
    max-height: 55px !important;
    width: auto !important;
    height: auto !important;
}

#aih.is-sticky {
    border-bottom: none !important;
}

/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .aih,
    .aih * {
        transition: none !important;
    }
}
