/* Header Redesign Styles for i9d */

.header-redesign {
    position: relative;
    z-index: 999;
    background: #fff;
    box-shadow: 0 1px 10px rgba(0,0,0,0.05);
}

/* Main Navigation Bar */
.header-lower-new {
    background: #ffffff;
    padding: 14px 20px !important;
    min-height: 72px !important;
    display: flex !important;
    align-items: center !important;
}

.header-main-flex {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    gap: 20px !important;
}
.header-main-flex > div {
    float: none !important;
    display: flex !important;
    align-items: center !important;
}

.logo-box {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.logo-box a {
    display: flex !important;
    align-items: center !important;
}

.logo-box img {
    max-height: 50px !important;
    display: block !important;
}

.menu-area {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.nav-right-actions {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    height: 100% !important;
}

.header-redesign .main-menu {
    float: none !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
}

.header-redesign .main-menu .navbar-collapse {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 0 !important;
}

/* Pyramide style Book Button */
.btn-book-appointment {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    background-color: #7f181c !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    min-height: 42px !important;
    height: 42px !important;
    padding: 0 24px !important;
    border-radius: 40px !important; /* pill shape */
    transition: all 0.3s ease !important;
    box-shadow: 0 3px 10px rgba(186, 19, 26, 0.22) !important;
    margin: 0 !important;
    text-decoration: none !important;
    line-height: 1 !important;
}

.nav-right-actions {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    height: 100% !important;
}

.btn-book-appointment i {
    display: inline-flex !important;
    align-items: center !important;
}

.btn-book-appointment:hover {
    background-color: #9a0f15 !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(186, 19, 26, 0.4) !important;
}

/* Clean up existing menu styles for this redesign */
.header-redesign .main-menu .navigation {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 18px !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
}

.header-redesign .main-menu .navigation > li {
    float: none !important;
    display: flex !important;
    align-items: center !important;
    min-height: 48px !important;
    padding: 0 !important;
    margin: 0 !important;
    position: relative !important;
}

.header-redesign .main-menu .navigation > li > a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 48px !important;
}

.header-redesign .main-menu .navigation > li:last-child {
    margin-right: 0 !important;
}

.header-redesign .main-menu .navigation > li > a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 80px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #4a5568 !important;
    padding: 0 12px !important;
    margin: 0 !important;
    line-height: 1 !important;
    transition: color 0.3s ease !important;
    text-decoration: none !important;
}

.header-redesign .main-menu .navigation > li > a:hover,
.header-redesign .main-menu .navigation > li.current > a {
    color: #7f181c !important;
}

/* Remove default before line */
.header-redesign .main-menu .navigation > li > a:before {
    display: none !important;
}
.header-redesign .main-menu .navigation > li > a:before {
    display: none;
}

/* Megamenu Styles */
.megamenu-item .megamenu-panel {
    position: absolute;
    top: 100%;
    left: 0;
    width: 320px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    padding: 20px;
    z-index: 99;
    text-align: left;
}

/* Show megamenu on hover */
.megamenu-item:hover .megamenu-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-header {
    font-size: 11px;
    font-weight: 700;
    color: #8c98a4;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f2f5;
}

/* Services Megamenu */
.services-megamenu {
    width: 350px !important;
}

.mega-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mega-link {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    color: #2d3748;
    transition: all 0.2s ease;
}

.mega-link:hover {
    color: #7f181c;
}

.mega-icon {
    font-size: 18px;
    color: #a0aec0;
    margin-top: 3px;
    transition: color 0.2s ease;
}

.mega-link:hover .mega-icon {
    color: #7f181c;
}

.mega-text {
    display: flex;
    flex-direction: column;
}

.mega-title {
    font-size: 14px;
    font-weight: 600;
}

.mega-subtitle {
    font-size: 12px;
    color: #718096;
    margin-top: 2px;
}

.mega-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f2f5;
}

.mega-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #060f1a;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.mega-btn:hover {
    background: #0a192f;
    color: #fff;
}

/* Destinations Megamenu */
.destinations-megamenu {
    width: 320px !important;
}

.mega-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mega-link-grid {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #4a5568;
    font-weight: 500;
    transition: color 0.2s ease;
}

.mega-link-grid:hover {
    color: #7f181c;
}

.mega-flag {
    font-size: 16px;
}

/* Sticky Header Refinements */
.sticky-header-new .sticky-header,
.sticky-header {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.sticky-header .header-main-flex {
    padding: 0 !important;
    min-height: 80px !important;
}

@media only screen and (max-width: 991px) {
    /* Raised specificity (.header-redesign prefix) so this reliably beats
       the unconditional ".nav-right-actions{display:flex!important}" rule
       above, which has the same specificity and would otherwise win ties
       depending on file state. */
    .header-redesign .nav-right-actions,
    .header-redesign .sticky-header .hidden-mobile {
        display: none !important;
    }
    .header-lower-new {
        padding: 10px 0;
    }
    .header-main-flex {
        justify-content: space-between !important;
        gap: 16px !important;
        position: relative !important;
        padding-right: 60px !important;
    }
    .header-redesign .logo-box {
        max-width: calc(100% - 60px) !important;
    }
    /* Pin the button to the header's right edge with an absolute offset
       instead of a flex auto-margin — more reliable across this file's
       cascade than depending on .header-main-flex having leftover space. */
    .header-redesign .menu-area {
        position: absolute !important;
        right: 0 !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        margin-left: 0 !important;
    }
    /* Let the theme's own off-canvas .mobile-menu drive mobile nav —
       .header-redesign .main-menu has higher specificity than the base
       theme's ".main-menu { display:none }" mobile rule, so without this
       it wins and the desktop nav renders inline, breaking the layout. */
    .header-redesign .menu-area .main-menu {
        display: none !important;
    }
    .header-redesign .menu-area {
        flex: 0 0 auto !important;
        justify-content: flex-end !important;
    }

    /* Redesigned mobile menu button: a solid brand-colored circle instead
       of three bare dark bars, so it reads clearly as a tappable control. */
    .header-redesign .mobile-nav-toggler {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        width: 44px !important;
        height: 44px !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #7f181c;
        border-radius: 50%;
        box-shadow: 0 3px 10px rgba(127, 24, 28, 0.3);
        float: none !important;
        font-size: 0 !important;
        line-height: 0 !important;
        flex-shrink: 0;
    }
    .header-redesign .mobile-nav-toggler .icon-bar {
        width: 18px !important;
        height: 2px !important;
        margin: 0 !important;
        background-color: #ffffff !important;
        border-radius: 2px;
    }

    /* Copied nav inside the off-canvas .mobile-menu drawer: dropdown
       items (Training / Study In / Visa) expand on tap via the
       .mobile-open class toggled in script.js, since :hover doesn't
       work reliably on touch. */
    .mobile-menu .megamenu-item .megamenu-panel {
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        box-shadow: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        display: none;
        padding: 10px 25px !important;
        background: transparent !important;
    }
    .mobile-menu .megamenu-item.mobile-open .megamenu-panel {
        display: block !important;
    }
    .mobile-menu .megamenu-item .mega-header {
        color: rgba(255,255,255,0.5) !important;
        border-bottom-color: rgba(255,255,255,0.1) !important;
    }
    .mobile-menu .megamenu-item .mega-link,
    .mobile-menu .megamenu-item .mega-link-grid {
        color: rgba(255,255,255,0.85) !important;
    }

    /* Visa services grid on the homepage "Choose Country" section: the
       inline margin-left:80px + fixed 130px card width are sized for the
       wide desktop column and only leave room for one card per row on a
       phone. Override with !important since inline styles otherwise win. */
    .country-section .visa-grid {
        margin-left: 0 !important;
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
    .country-section .visa-grid .single-item {
        width: 100% !important;
    }
    .country-section .visa-grid .single-item .image-box,
    .country-section .visa-grid .single-item .image-box img {
        width: 100% !important;
        height: 180px !important;
    }
}
