/* ══════════════════════════════════════════
   Gandhi Immigration – Header
   ══════════════════════════════════════════ */

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    position: relative;
    width: 100%;
}

/* ── Header bar ── */
.gandhi-header {
    position: relative;
    width: 100%;
    background: transparent;
    z-index: 1002;
    box-shadow: none;
    transition: background 0.35s ease, box-shadow 0.35s ease;
}

.gandhi-header.gandhi-sticky {
    position: fixed;
    top: 0;
    left: 0;
}

.gandhi-header.gandhi-sticky.scrolled {
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* WP admin bar offset */
.admin-bar .gandhi-header.gandhi-sticky {
    top: 32px;
}

/* ── Inner container ── */
.gandhi-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1340px;
    margin: 0 auto;
    padding: 0 30px;
    height: 80px;
}

/* ── Logo ── */
.gandhi-logo {
    flex-shrink: 0;
}

.gandhi-logo a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.gandhi-logo .custom-logo {
    max-width: 180px;
    height: auto;
    display: block;
}

.gandhi-site-title {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    text-decoration: none;
}

/* ── Navigation ── */
.gandhi-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.gandhi-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
}

.gandhi-menu li {
    position: relative;
}

.gandhi-menu li a {
    display: block;
    padding: 28px 18px;
    font-size: 15px;
    font-weight: 600;
    color: #222222;
    text-decoration: none;
    text-transform: capitalize;
    position: relative;
    transition: color 0.25s ease;
    white-space: nowrap;
}

/* Orange underline on hover / active */
.gandhi-menu li a::after {
    content: '';
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 20px;
    height: 2px;
    background-color: #f37021;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.gandhi-menu li a:hover::after,
.gandhi-menu li.current-menu-item > a::after,
.gandhi-menu li.current_page_item > a::after {
    transform: scaleX(1);
}

.gandhi-menu li a:hover,
.gandhi-menu li.current-menu-item > a,
.gandhi-menu li.current_page_item > a {
    color: #f37021;
}

/* ── Dropdown (depth 2) ── */
.gandhi-menu li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 8px 0;
    list-style: none;
    z-index: 999;
}

.gandhi-menu li:hover > ul {
    display: block;
}

.gandhi-menu li ul li a {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    display: block;
    color: #222;
    transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
    border-left: 3px solid transparent;
}

.gandhi-menu li ul li a:hover {
    background: #f0f6ff;
    color: #01559E;
    padding-left: 26px;
    border-left-color: #F57D26;
}

.gandhi-menu li ul li a::after {
    display: none;
}

/* ── Inline search ── */
.gandhi-search-wrap {
    flex-shrink: 0;
    margin-left: 15px;
    display: flex;
    align-items: center;
}

/* Expanding input area */
.gandhi-search-expand {
    overflow: hidden;
    width: 0;
    opacity: 0;
    transition: width 0.35s ease, opacity 0.3s ease;
}

.gandhi-search-wrap.active .gandhi-search-expand {
    width: 260px;
    opacity: 1;
}

.gandhi-search-expand form {
    display: flex;
    align-items: center;
    background: #f4f6f9;
    border: 1.5px solid #e0e6ef;
    border-radius: 50px;
    overflow: hidden;
    padding: 0 6px 0 16px;
}

.gandhi-search-wrap.active .gandhi-search-expand form {
    border-color: #01559E;
}

.gandhi-search-field {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #222;
    padding: 9px 0;
    min-width: 0;
}

.gandhi-search-field::placeholder {
    color: #999;
}

.gandhi-search-submit {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: #F57D26;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.gandhi-search-submit:hover {
    background: #e06a15;
}

/* Hide mobile close button on desktop */
.gandhi-search-mobile-close {
    display: none;
}

/* Toggle button */
.gandhi-search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #222;
    padding: 8px;
    margin-left: 4px;
    transition: color 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gandhi-search-toggle:hover {
    color: #F57D26;
}

/* Icon swap */
.gandhi-icon-close {
    display: none;
}

.gandhi-search-wrap.active .gandhi-icon-search {
    display: none;
}

.gandhi-search-wrap.active .gandhi-icon-close {
    display: block;
    color: #F57D26;
}

/* ── Mobile hamburger ── */
.gandhi-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    z-index: 1005;
}

.gandhi-menu-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: #222;
    border-radius: 2px;
    transition: 0.3s ease;
}

.gandhi-menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.gandhi-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.gandhi-menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ── Sticky body offset ── */
body.gandhi-has-sticky-header {
    padding-top: 80px;
}

.admin-bar body.gandhi-has-sticky-header,
.admin-bar.gandhi-has-sticky-header {
    padding-top: 80px;
}

/* ══════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════ */
@media (max-width: 992px) {

    /* ── Keep sticky on mobile ── */
    .gandhi-header.gandhi-sticky {
        position: fixed;
        top: 0;
        left: 0;
    }

    .gandhi-header.gandhi-sticky.scrolled {
        background: #ffffff;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    }

    body.gandhi-has-sticky-header {
        padding-top: 70px !important;
    }

    .admin-bar .gandhi-header.gandhi-sticky {
        top: 46px;
    }

    /* ── Header bar ── */
    .gandhi-header-inner {
        height: 70px;
        padding: 0 20px;
    }

    /* Push hamburger + search to the right */
    .gandhi-menu-toggle {
        display: flex;
        margin-left: auto;
        order: 2;
    }

    .gandhi-search-wrap {
        order: 3;
        margin-left: 8px;
    }

    /* On mobile: drop search below header instead of inline */
    .gandhi-search-expand {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        width: 100% !important;
        height: auto;
        background: #fff;
        padding: 0 16px;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
        z-index: 1001;
        opacity: 0;
        max-height: 0;
        overflow: hidden;
        transition: opacity 0.3s ease, max-height 0.3s ease, padding 0.3s ease;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    /* Admin bar shifts header down 46px on mobile */
    .admin-bar .gandhi-search-expand {
        top: 116px;
    }

    .gandhi-search-wrap.active .gandhi-search-expand {
        opacity: 1;
        max-height: 100px;
        padding: 16px 16px;
    }

    .gandhi-search-expand form {
        flex: 1;
        border-radius: 8px;
        padding: 0 8px 0 16px;
    }

    /* Mobile close button */
    .gandhi-search-mobile-close {
        flex-shrink: 0;
        width: 36px;
        height: 36px;
        background: #f4f6f9;
        border: 1.5px solid #e0e6ef;
        border-radius: 50%;
        color: #444;
        font-size: 14px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.2s ease, color 0.2s ease;
    }

    .gandhi-search-mobile-close:hover {
        background: #F57D26;
        border-color: #F57D26;
        color: #fff;
    }

    /* ── Full-width drop-down nav panel ── */
    .gandhi-nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 0;
        height: auto;
        background: #fff;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        flex-direction: column;
        justify-content: flex-start;
        padding: 0;
        transition: max-height 0.4s ease, padding 0.4s ease;
        z-index: 1002;
        overflow: hidden;
        overflow-x: hidden;
        order: 1;
    }

    .gandhi-nav.open {
        max-height: 100vh;
        padding: 10px 0 20px;
        overflow-y: auto;
    }

    /* ── Menu list ── */
    .gandhi-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .gandhi-menu > li > a {
        padding: 13px 20px;
        border-bottom: 1px solid #f0f0f0;
        font-size: 14px;
        font-weight: 600;
        text-align: left;
    }

    .gandhi-menu li a::after {
        display: none;
    }

    /* ── Dropdown arrow indicator ── */
    .gandhi-menu li.menu-item-has-children > a {
        padding-right: 44px;
    }

    .gandhi-menu li.menu-item-has-children > a .gandhi-dropdown-arrow {
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 10px;
        color: #888;
        transition: transform 0.3s ease;
        pointer-events: none;
    }

    .gandhi-menu li.menu-item-has-children.open > a .gandhi-dropdown-arrow {
        transform: translateY(-50%) rotate(180deg);
    }

    /* ── Submenu: accordion ── */
    .gandhi-menu li ul {
        position: static;
        box-shadow: none;
        border-radius: 0;
        padding: 0;
        background: #f7f7f7;
        display: none;
        width: 100%;
        min-width: 0;
    }

    /* Disable hover-based dropdown on mobile */
    .gandhi-menu li:hover > ul {
        display: none;
    }

    .gandhi-menu li.open > ul {
        display: block;
    }

    .gandhi-menu li ul li {
        border-bottom: 1px solid #ebebeb;
    }

    .gandhi-menu li ul li a {
        padding: 11px 20px 11px 38px;
        font-size: 13px;
        font-weight: 500;
        border-bottom: none;
        color: #444;
        white-space: normal;
        word-break: break-word;
    }

    .gandhi-menu li ul li a:hover {
        color: #f37021;
        background: #fef6f0;
    }


    /* ── Keep header visible when menu is open ── */
    .gandhi-header.gandhi-menu-open {
        background: #ffffff !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    }

    body.gandhi-has-sticky-header {
        padding-top: 70px;
    }
}

/* Adjust nav top when admin bar is visible */
.admin-bar .gandhi-nav {
    top: 102px;
}

@media (max-width: 480px) {
    .gandhi-logo .custom-logo {
        max-width: 140px;
    }

    .gandhi-header-inner {
        padding: 0 15px;
    }
}


/* ── Google Translate Switcher — desktop ── */
@media (min-width: 993px) {
    .gt_switcher_wrapper {
        position: fixed;
        top: 29px !important;
        right: 10px !important;
        z-index: 999999 !important;
    }

    button.gandhi-search-toggle {
        margin-right: 8px;
    }
}

/* ── Google Translate Switcher — mobile ── */
@media (max-width: 992px) {
    .gt_switcher_wrapper {
        position: fixed;
        top: 25px !important;
        right: 105px !important;
        z-index: 999999 !important;
    }
}
