/* ============================================
   ECR International School - Header V2
   Premium Attractive Header Design
   ============================================ */

/* ---- TOPBAR ---- */
.hv2-topbar {
    background: linear-gradient(135deg, #0A2155 0%, #0d2f6b 50%, #0A2155 100%);
    padding: 0;
    font-size: 13px;
    color: #fff;
    position: relative;
    z-index: 1001;
    border-bottom: 2px solid rgba(246, 88, 1, 0.5);
}

.hv2-topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 42px;
}

/* Info list (email, phone, timing) */
.hv2-info-list {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hv2-info-list li {
    position: relative;
}

.hv2-info-list li:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.2);
}

.hv2-info-list li a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    transition: all 0.3s ease;
    font-size: 13px;
    letter-spacing: 0.2px;
}

.hv2-info-list li a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.hv2-info-list li a i {
    font-size: 12px;
    color: #F65801;
}

/* Topbar Right */
.hv2-topbar-right {
    display: flex;
    align-items: center;
    gap: 0;
}

.hv2-topbar-links {
    display: flex;
    align-items: center;
}

.hv2-topbar-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.hv2-topbar-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.hv2-topbar-link i {
    font-size: 12px;
}

.hv2-topbar-link.hv2-highlight {
    background: #F65801;
    color: #fff;
}

.hv2-topbar-link.hv2-highlight:hover {
    background: #e04f00;
}

/* Social icons */
.hv2-topbar-social {
    display: flex;
    align-items: center;
    gap: 0;
    margin-left: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    padding-left: 4px;
}

.hv2-topbar-social a {
    color: rgba(255, 255, 255, 0.7);
    width: 34px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.hv2-topbar-social a:hover {
    color: #fff;
    background: rgba(246, 88, 1, 0.3);
}

/* ---- MAIN NAVBAR ---- */
.hv2-navbar {
    background: #fff;
    position: relative;
    z-index: 1000;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hv2-navbar .navbar {
    padding: 0;
}

.hv2-navbar .container {
    position: relative;
}

/* Brand / Logo */
.hv2-brand {
    flex-shrink: 0;
    padding: 8px 0;
    margin-right: 0 !important;
}

.hv2-brand img {
    height: 62px;
    transition: all 0.4s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

/* ---- NAV LINKS (DESKTOP) ---- */
.hv2-nav {
    display: flex;
    align-items: center;
    margin: 0 auto !important;
    gap: 30px;
}

.hv2-nav .nav-link {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #0A2155;
    padding: 22px 14px;
    transition: all 0.3s ease;
    position: relative;
    text-transform: capitalize;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.hv2-nav .nav-link:hover,
.hv2-nav .nav-link.active {
    color: #F65801;
}

/* Animated underline for non-dropdown items */
.hv2-nav .nav-item:not(.dropdown) > .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, #F65801, #ff8534);
    border-radius: 3px 3px 0 0;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.hv2-nav .nav-item:not(.dropdown) > .nav-link:hover::after,
.hv2-nav .nav-item:not(.dropdown) > .nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

/* Dropdown caret */
.hv2-nav .dropdown > .nav-link.dropdown-toggle::after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    border: none;
    font-size: 10px;
    margin-left: 5px;
    vertical-align: middle;
    transition: transform 0.3s ease;
    display: inline-block;
}

.hv2-nav .dropdown:hover > .nav-link.dropdown-toggle::after {
    transform: rotate(180deg);
}

/* ---- DROPDOWN MENUS ---- */
.hv2-dropdown {
    border: none;
    border-radius: 12px;
    padding: 8px;
    min-width: 230px;
    margin-top: 0 !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
    opacity: 0;
    visibility: hidden;
    display: block;
    transform: translateY(12px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    border-top: 3px solid #F65801;
}

@media (min-width: 992px) {
    .hv2-nav .nav-item:hover > .hv2-dropdown,
    .hv2-nav .nav-item.show > .hv2-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }
}

@media (max-width: 991px) {
    .hv2-dropdown {
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        pointer-events: auto;
        position: static !important;
        box-shadow: none;
        border: none;
        border-top: none;
        border-radius: 0;
        padding: 0 0 0 12px;
        background: transparent;
    }
    .hv2-dropdown.show {
        display: block;
    }
}

.hv2-dropdown .dropdown-item {
    padding: 9px 14px;
    font-size: 13.5px;
    color: #333;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.hv2-dropdown .dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #F65801;
    transform: scaleY(0);
    transition: transform 0.25s ease;
    border-radius: 0 3px 3px 0;
}

.hv2-dropdown .dropdown-item:hover {
    background: linear-gradient(90deg, rgba(246, 88, 1, 0.08), transparent);
    color: #F65801;
    padding-left: 20px;
}

.hv2-dropdown .dropdown-item:hover::before {
    transform: scaleY(1);
}

/* Mega/Others dropdown */
.hv2-mega-dropdown {
    min-width: 320px;
}

.hv2-section-title {
    color: #0A2155;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 12px;
    padding: 10px 14px 4px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    display: block;
    opacity: 0.7;
}

.hv2-dropdown .dropdown-divider {
    margin: 4px 10px;
    border-color: rgba(0, 0, 0, 0.06);
}

/* ---- CTA BUTTON ---- */
.hv2-nav-cta {
    display: flex;
    align-items: center;
    margin-left: auto;
    flex-shrink: 0;
}

.hv2-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #F65801, #ff6f20);
    color: #fff;
    padding: 10px 24px;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.35s ease;
    box-shadow: 0 4px 15px rgba(246, 88, 1, 0.3);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.hv2-cta-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0A2155, #0d3577);
    opacity: 0;
    transition: opacity 0.35s ease;
    border-radius: inherit;
}

.hv2-cta-btn span,
.hv2-cta-btn i {
    position: relative;
    z-index: 1;
}

.hv2-cta-btn:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(246, 88, 1, 0.4);
}

.hv2-cta-btn:hover::before {
    opacity: 1;
}

.hv2-cta-btn i {
    font-size: 11px;
    transition: transform 0.3s ease;
}

.hv2-cta-btn:hover i {
    transform: translateX(3px);
}

/* ---- MOBILE CONTROLS ---- */
.hv2-mobile-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (min-width: 992px) {
    .hv2-mobile-actions {
        display: none;
    }
}

.hv2-mob-call {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #F65801, #ff6f20);
    color: #fff;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(246, 88, 1, 0.25);
}

.hv2-mob-call:hover,
.hv2-mob-call:focus {
    color: #fff;
    transform: scale(1.05);
}

/* Hamburger */
.hv2-toggler {
    width: 42px;
    height: 42px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 2px solid #0A2155;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.hv2-toggler:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(10, 33, 85, 0.15);
}

.hv2-toggler-line {
    display: block;
    width: 20px;
    height: 2.5px;
    background: #0A2155;
    border-radius: 3px;
    transition: all 0.35s ease;
    transform-origin: center;
}

.hv2-toggler:hover .hv2-toggler-line:nth-child(1) {
    transform: translateY(-1px);
}

.hv2-toggler:hover .hv2-toggler-line:nth-child(3) {
    transform: translateY(1px);
}

/* ---- OFFCANVAS (MOBILE) ---- */
.hv2-offcanvas {
    /* max-width: 320px; */
    border-right: none !important;
}

.hv2-offcanvas-header {
    background: linear-gradient(135deg, #0A2155, #0d3577);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hv2-offcanvas-header .offcanvas-brand img {
    height: 45px;
    filter: brightness(0) invert(1);
}

.hv2-close-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hv2-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.hv2-offcanvas-body {
    padding: 0 !important;
    display: flex;
    flex-direction: column;
}

@media (max-width: 991px) {
    .hv2-offcanvas-body .hv2-nav {
        flex-direction: column;
        gap: 0;
        padding: 0;
    }

    .hv2-offcanvas-body .hv2-nav .nav-item {
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    .hv2-offcanvas-body .hv2-nav .nav-link {
        padding: 13px 20px;
        font-size: 14px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .hv2-offcanvas-body .hv2-nav .dropdown-toggle::after {
        margin-left: auto;
    }

    .hv2-offcanvas-body .hv2-dropdown .dropdown-item {
        padding: 10px 20px;
        font-size: 13px;
        border-radius: 0;
    }

    .hv2-offcanvas-body .hv2-dropdown .dropdown-item::before {
        display: none;
    }

    .hv2-offcanvas-body .hv2-dropdown .dropdown-item:hover {
        padding-left: 28px;
        background: rgba(246, 88, 1, 0.05);
    }

    .hv2-section-title {
        padding: 10px 20px 4px;
    }
}

/* Mobile offcanvas footer */
.hv2-offcanvas-footer {
    margin-top: auto;
    padding: 16px 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: #f8f9fb;
}

.hv2-mobile-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #F65801, #ff6f20);
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(246, 88, 1, 0.25);
}

.hv2-mobile-cta:hover,
.hv2-mobile-cta:focus {
    color: #fff;
    background: linear-gradient(135deg, #e04f00, #F65801);
}

.hv2-mobile-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 14px;
}

.hv2-mobile-social a {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    color: #0A2155;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.hv2-mobile-social a:hover {
    background: #F65801;
    color: #fff;
    transform: translateY(-2px);
}

/* ---- STICKY HEADER ---- */
.hv2-navbar.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    animation: hv2SlideDown 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.hv2-navbar.sticky .hv2-brand img {
    height: 50px;
}

.hv2-navbar.sticky .hv2-nav .nav-link {
    padding-top: 18px;
    padding-bottom: 18px;
}

@keyframes hv2SlideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ---- RESPONSIVE BREAKPOINTS ---- */

/* Extra-large screens */
@media (min-width: 1400px) {
    .hv2-nav .nav-link {
        font-size: 15px;
        padding: 24px 16px;
    }
}

/* Large screens */
@media (min-width: 1200px) and (max-width: 1399px) {
    .hv2-nav .nav-link {
        font-size: 13.5px;
        padding: 22px 11px;
    }

    .hv2-cta-btn {
        padding: 9px 18px;
        font-size: 12px;
    }
}

/* Medium-large screens */
@media (min-width: 992px) and (max-width: 1199px) {
    .hv2-nav .nav-link {
        font-size: 12.5px;
        padding: 20px 8px;
    }

    .hv2-nav {
        gap: 0;
    }

    .hv2-cta-btn {
        padding: 8px 14px;
        font-size: 11.5px;
    }

    .hv2-brand img {
        height: 52px;
    }
}

/* Tablet */
@media (max-width: 991px) {
    .hv2-topbar {
        display: none;
    }

    .hv2-navbar {
        box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
    }

    .hv2-brand img {
        height: 50px;
    }

    .hv2-brand {
        padding: 6px 0;
    }

    .hv2-navbar .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
}

/* Small tablets */
@media (max-width: 767px) {
    .hv2-brand img {
        height: 45px;
    }
}

/* Mobile phones */
@media (max-width: 575px) {
    .hv2-brand img {
        height: 40px;
    }

    .hv2-offcanvas {
        max-width: 290px;
    }
}

/* ---- DESKTOP OFFCANVAS OVERRIDE ---- */
@media (min-width: 992px) {
    .hv2-offcanvas.offcanvas-start {
        flex-grow: 1;
        position: static !important;
        transform: none !important;
        visibility: visible !important;
        background: transparent;
        border: none;
        z-index: auto;
    }

    .hv2-offcanvas .offcanvas-header {
        display: none;
    }

    .hv2-offcanvas-body {
        flex-grow: 1;
        display: flex !important;
        flex-direction: row !important;
        align-items: center;
        overflow: visible !important;
    }

    .hv2-offcanvas-footer {
        display: none !important;
    }
}

/* ---- TOPBAR RESPONSIVE ---- */
@media (max-width: 1199px) {
    .hv2-info-list li a {
        padding: 10px 12px;
        font-size: 12px;
    }

    .hv2-topbar-link {
        padding: 10px 12px;
        font-size: 12px;
    }
}

@media (max-width: 991px) {
    .hv2-hide-sm {
        display: none;
    }
}
