/* Header Styles - FET */

/* Media Queries para mostrar/ocultar headers */
@media (min-width: 992px) {
    .mobile-header {
        display: none !important;
    }
}

@media (max-width: 991.98px) {
    .desktop-header {
        display: none !important;
    }
}



/* Topbar */
.topbar {
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
}

.social-link {
    text-decoration: none;
    font-size: 1.25rem;
    line-height: 1;
}



/* Navbar */
.navbar .brand-logo {
    height: 84px;
    width: auto;
}

@media (max-width: 991.98px) {
    .navbar .brand-logo {
        height: 70px;
    }
}

.navbar .nav-link {
    padding: .75rem 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: var(--red-primary);
}

.navbar .dropdown-menu {
    border: 0;
    border-radius: 1rem;
    min-width: 260px;
}

.dropdown-hover:hover>.dropdown-menu {
    display: block;
    margin-top: 0;
}

.minw-300 {
    min-width: 300px;
}

/* ====== Nueva estructura de header: Brandbar + Categorybar ====== */
.brandbar {
    box-shadow: 0 2px 0 rgba(0, 0, 0, .05);
}

.brandbar .brand-logo {
    height: 88px;
    width: auto;
    transition: height .35s ease;
}

.categorybar {
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .06);
    transition: box-shadow .35s ease;
}

.categorybar .category-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    padding: 8px 0;
    display: inline-block;
}

/* Evitar anillo/contorno de foco en el toggle de la categorybar */
.categorybar .category-link,
.categorybar .category-link:hover,
.categorybar .category-link:focus,
.categorybar .category-link:active,
.categorybar .category-link:focus-visible,
.categorybar .dropdown-toggle:focus,
.categorybar .dropdown-toggle:active,
.categorybar .dropdown-toggle:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

.categorybar .dropdown-menu {
    border: 0;
    min-width: 240px;
}

.category-dropdown {
    position: relative;
}

.category-dropdown:hover>.dropdown-menu {
    display: block;
}

@media (max-width: 991.98px) {
    .brandbar .brand-logo {
        height: 72px;
    }
}

.btn-red {
    background-color: var(--red-primary);
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

.btn-red:hover {
    background-color: #c41e22;
    color: #fff;
}

/* Top Row Styles */
.top-row {
    border-bottom: 1px solid #f0f0f0;
    min-height: 60px;
    padding-top: 8px;
    padding-bottom: 8px;
}


.btn-red {
    background-color: var(--red-primary);
    border: none;
    color: var(--text-white);
    font-weight: 400;
    font-size: 16px;
    padding: 0px;
    border-radius: 100px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    font-family: "Manrope", "Manrope Placeholder", sans-serif;
}

.btn-red:hover {
    background-color: #c41e22;
    color: var(--text-white);
    transform: translateY(-1px);
}


/* Clean brand spacing for previous layout (kept for compatibility) */
.school-logo {
    display: flex;
    align-items: center;
}

.flags-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-right: 10px;
}

.flag-icon {
    width: auto;
    height: 64px;
    object-fit: contain;
    background: white;
}

.school-text {
    line-height: 1.1;
}

.school-name {
    font-weight: bold;
    font-size: 22px;
    color: var(--text-dark);
    letter-spacing: 0.5px;
}

.school-location {
    font-weight: bold;
    font-size: 16px;
    color: var(--text-dark);
    letter-spacing: 0.5px;
}

/* Navigation Icons */
.nav-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-dark);
    transition: transform 0.3s ease;
    min-width: 90px;
    min-height: 80px;
}

.nav-icon-item:hover {
    transform: translateY(-2px);
    color: var(--text-dark);
    text-decoration: none;
}

.bg-red {
    background-color: var(--red-primary);
}

.bg-blue {
    background-color: var(--blue-primary);
}

.icon-label {
    font-size: 18px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    margin-top: 2px;
    font-family: inherit;
}

/* Mobile-first hamburger menu styles */
/* Offcanvas (mobile menu) */
.offcanvas .menu-title {
    font-size: .9rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: .5rem 0;
}

.offcanvas .nav-link {
    padding-left: .25rem;
}

.navbar-toggler {
    border: none;
    padding: 4px 8px;
    font-size: 1.25rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.mobile-logo {
    height: 50px;
    width: auto;
}

/* Logo dentro del offcanvas móvil */
#mobileNav .brand-logo {
    height: 48px;
    width: auto;
}

.mobile-menu-section {
    border-bottom: 1px solid #f0f0f0;
    padding: 20px 0;
}

.mobile-menu-section:last-child {
    border-bottom: none;
}

.mobile-menu-title {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 15px;
    font-family: "Manrope", "Manrope Placeholder", sans-serif;
}

.mobile-nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 16px;
    padding: 10px 0;
    display: block;
    transition: color 0.3s ease;
    font-family: "Manrope", "Manrope Placeholder", sans-serif;
}

.mobile-nav-link:hover {
    color: var(--red-primary);
    text-decoration: none;
}

/* Estilos para el botón toggle del submenu móvil */
.mobile-nav-toggle {
    background: transparent;
    border: none;
    padding: 0;
    width: 100%;
    text-align: left;
    color: inherit;
}

.mobile-nav-toggle:focus {
    outline: none;
    box-shadow: none;
}

.mobile-submenu {
    background: #fff;
}

.mobile-btn-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-nav-icons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-top: 10px;
}

.mobile-nav-icon-item {
    width: 90%;
    max-width: 340px;
    justify-content: flex-start;
    margin: 0 auto;
}

.mobile-nav-icon-item {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-dark);
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.mobile-nav-icon-item:hover {
    background-color: #f8f9fa;
    color: var(--text-dark);
    text-decoration: none;
}

.mobile-social-icons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

/* Accordion móvil del menú */
.offcanvas .accordion-button {
    box-shadow: none;
    color: var(--text-dark);
    /* Evitar que tome la tipografía/estilo nativo de button en móvil */
    font-family: var(--font-ui);
    font-size: 1rem;
    line-height: 1.25;
    text-transform: none;
    letter-spacing: normal;
}
.offcanvas .accordion-button:not(.collapsed) {
    background-color: #fff;
}
.offcanvas .accordion-button::after {
    transition: transform .2s ease;
}
.offcanvas .accordion-button:not(.collapsed)::after {
    transform: rotate(-180deg);
}
.offcanvas .accordion-item {
    border-bottom: 1px solid #f0f0f0 !important;
}
.offcanvas .accordion-body .nav-link {
    padding: .25rem 0;
}

/* === Botón flotante PQRs === */
.pqr-fab {
    position: fixed;
    right: 22px;
    bottom: 22px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(180deg, #FFB84D 0%, #F7A21A 100%); /* naranja similar */
    color: #fff;
    text-decoration: none;
    border-radius: 50%;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    z-index: 1060; /* por encima de header y dropdowns */
    font-weight: 700;
    line-height: 1;
    transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
}
.pqr-fab:hover,
.pqr-fab:focus {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
    filter: brightness(0.98);
}
.pqr-fab:focus {
    outline: 3px solid rgba(255, 184, 77, 0.35);
    outline-offset: 2px;
}
.pqr-fab__iconwrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.pqr-fab i {
    font-size: 1.25rem;
}
.pqr-fab__bubble {
    position: absolute;
    right: -6px;
    top: -6px;
    font-size: .9rem;
}
.pqr-fab__text {
    font-size: .75rem;
    line-height: 1;
    letter-spacing: .5px;
    margin-top: 4px;
}

/* Compacto en pantallas pequeñas: solo el icono */
@media (max-width: 575.98px) {
    .pqr-fab {
        width: 58px;
        height: 58px;
    }
    .pqr-fab i {
        font-size: 1.15rem;
    }
    .pqr-fab__text {
        font-size: .7rem;
    }
}

/* Asegurar que el título herede del body, no del botón */
#mobileNav .accordion-button .menu-title {
    font-family: inherit !important;
    font-size: 1rem;
    line-height: 1.25;
    font-weight: 600; /* ajustar si prefieres 700 */
    letter-spacing: normal;
    text-transform: none;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .btn-red {
        padding: 10px 18px;
        font-size: 13px;
    }
}

@media (max-width: 992px) {
    .top-row .row {
        flex-direction: column;
        gap: 15px;
    }

    .bottom-row .row {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .nav-icon-item {
        margin: 0 8px;
    }

    .school-logo {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .d-flex.gap-4 {
        flex-wrap: wrap;
        gap: 15px !important;
    }

    .nav-icon-item {
        margin: 0 5px;
    }

    .icon-label {
        font-size: 11px;
    }

    .btn-red {
        padding: 8px 16px;
        font-size: 12px;
    }

    .school-name {
        font-size: 14px;
    }

    .school-location {
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .top-row .d-flex.gap-3 {
        flex-direction: column;
        gap: 10px !important;
    }

    .bottom-row .d-flex.gap-4 {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px !important;
    }

    .nav-icon-item {
        margin: 5px;
    }
}

@media (max-width: 991.98px) {
    .desktop-header {
        display: none !important;
    }

    .mobile-header {
        display: block !important;
    }
}

@media (min-width: 992px) {
    .mobile-header {
        display: none !important;
    }

    .desktop-header {
        display: block !important;
    }
}

/* Simple sticky header */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1050;
    background: #fff;
    transition: box-shadow .2s ease, transform .2s ease;
}

/* Estado compacto cuando hay scroll */
.sticky-header.is-scrolled .brandbar .brand-logo {
    height: 64px;
}
.sticky-header.is-scrolled .brandbar .container-xxl {
    padding-top: .25rem;
    padding-bottom: .25rem;
    transition: padding .35s ease;
}
.sticky-header.is-scrolled {
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

/* Suavizar también la categorybar en escritorio cuando está visible */
.sticky-header.is-scrolled .categorybar .container-fluid {
    padding-top: .25rem;
    padding-bottom: .25rem;
    transition: padding .35s ease;
}

/* Mega menú Admisiones escritorio */
.admissions-desktop-trigger:hover .admissions-desktop-menu,
.admissions-desktop-trigger:focus-within .admissions-desktop-menu {
    display: block !important;
}

.admissions-desktop-menu {
    animation: fadeInMenu 0.25s;
}

@keyframes fadeInMenu {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 991.98px) {
    .admissions-desktop-menu {
        display: none !important;
    }
}

/* Mega menú móvil */
@media (min-width: 992px) {
    .admissions-mobile-menu {
        display: none !important;
    }
}

/* Ajuste scroll menú móvil */
@media (max-width: 991.98px) {
    /* Ajuste scroll del offcanvas móvil (usar el id real #mobileNav) */
    #mobileNav {
        height: 100vh;
        max-height: 100vh;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    body.menu-open {
        overflow: hidden !important;
        position: fixed;
        width: 100vw;
    }
}