/* Basado en Elements/menu_top.ctp + menu_top.css (el compartido), pero SIN el reset global
   de `body` que traía el original (font-family/color/background) — eso era lo que pisaba la
   tipografía de todo el layout de Business al cargarse después del CSS de la página. Ver
   [[feedback_css_nonblocking]] y la nota de business_layout_new.ctp sobre por qué este archivo
   se carga en el <head>, bloqueante, junto con el resto del CSS de Business.

   Rediseño TIN-565: estilos de la barra superior de edutin-landing-home.html (.ea-topbar),
   con clases propias header-top__* para no chocar con el .ea-pop sin scope de
   menu_native_new.css. Los colores van fijos (no var(--...)) porque este elemento se usa en
   layouts con sistemas de tokens distintos. */

.header-top {
    position: relative;
    z-index: 1000; /* el popover cruza por delante del navbar (.ea-nav, z-index:100) */
    background: #fff;
    border-bottom: 1px solid #E6EAF3;
    font-family: 'Mulish', sans-serif;
}

/* 1336px/24px: alineado con .ea-nav .wrap de menu_native_new.css (maqueta edutin-programas-certificacion) */
.header-top__in {
    max-width: 1336px;
    margin: 0 auto;
    padding: 0 24px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-sizing: border-box;
}

/* ---------- Personal / Empresas ---------- */
.header-top__seg {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 0;
}

.header-top__seg a {
    padding: 0 16px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    font-size: 15.5px;
    font-weight: 700;
    color: #56607D;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: .14s ease;
}

.header-top__seg a:hover {
    color: #1C2541;
}

.header-top__seg a.is-on {
    color: #1C2541;
    border-bottom-color: #2979FF;
}

/* ---------- Sobre nosotros ---------- */
.header-top__right {
    position: relative;
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-top__about {
    background: none;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 2px;
    font-size: 15.5px;
    font-weight: 700;
    color: #1C2541;
    white-space: nowrap;
    transition: color .14s ease;
}

.header-top__about:hover,
.header-top__about[aria-expanded="true"] {
    color: #2979FF;
}

.header-top__about .caret {
    width: 15px;
    height: 15px;
    transition: transform .2s ease;
}

.header-top__about[aria-expanded="true"] .caret {
    transform: rotate(180deg);
}

.header-top__pop {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 380px;
    background: #fff;
    border: 1px solid #E6EAF3;
    border-radius: 16px;
    box-shadow: 0 26px 44px -22px rgba(50, 50, 93, .34);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px) scale(.985);
    transition: .2s cubic-bezier(.22, .61, .36, 1);
}

.header-top__pop.open {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.header-top__menu {
    padding: 8px;
}

.header-top__item {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    transition: .13s ease;
}

.header-top__item:hover {
    background: #ECF0FF;
}

.header-top__item .ai-t {
    display: block;
    color: #2979FF;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.35;
}

.header-top__item .ai-d {
    display: block;
    margin-top: 2px;
    color: #56607D;
    font-size: 13px;
    line-height: 1.45;
}

.header-top__sep {
    height: 1px;
    background: #E6EAF3;
    margin: 6px 10px;
}

/* Tablet angosta: las cuatro pestañas y "Sobre nosotros" en una línea */
@media (max-width: 760px) {
    .header-top__seg a {
        padding: 0 10px;
    }
}

/* En celular la barra lleva solo las pestañas, repartidas a lo ancho: con "Sobre nosotros" no cabe
   (pedía ~430px). "Sobre nosotros" está en el menú principal de cada sitio. */
@media (max-width: 620px) {
    .header-top__in {
        padding: 0 8px;
    }

    .header-top__seg {
        flex: 1;
        gap: 0;
    }

    .header-top__seg a {
        flex: 1;
        justify-content: center;
        padding: 0 6px;
        font-size: 15px;
        white-space: nowrap;
    }

    .header-top__right {
        display: none;
    }
}

/* Celulares angostos: las pestañas caben desde 320px */
@media (max-width: 380px) {
    .header-top__seg a {
        padding: 0 4px;
        font-size: 13px;
    }
}

/* ---------- Selector de sitio (barra en español) ----------
   En celular un selector con el sitio actual («Instituciones ▾») que al tocarlo
   despliega los cuatro, con el actual marcado. En computador la barra muestra las pestañas. */
.header-top__pick {
    display: none;
}

@media (max-width: 620px) {
    .header-top--pick .header-top__in {
        padding: 0 16px;
    }

    .header-top--pick .header-top__pick {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        height: 44px;
        padding: 0;
        background: none;
        border: 0;
        cursor: pointer;
        font-family: inherit;
        font-size: 14.5px;
        font-weight: 600;
        color: #56607D;
        white-space: nowrap;
    }

    .header-top--pick .header-top__pick b {
        font-weight: 800;
        color: #1C2541;
    }

    .header-top--pick .header-top__pick .caret {
        width: 16px;
        height: 16px;
        color: #1C2541;
        transition: transform .2s ease;
    }

    .header-top--pick.is-pick .header-top__pick .caret {
        transform: rotate(180deg);
    }

    .header-top--pick .header-top__in {
        height: 44px;
    }

    .header-top--pick .header-top__seg {
        position: absolute;
        top: calc(100% + 6px);
        left: 12px;
        width: 240px;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 6px;
        background: #fff;
        border: 1px solid #E6EAF3;
        border-radius: 14px;
        box-shadow: 0 26px 44px -22px rgba(50, 50, 93, .34);
        box-sizing: border-box;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: .18s cubic-bezier(.22, .61, .36, 1);
    }

    .header-top--pick.is-pick .header-top__seg {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .header-top--pick .header-top__seg a {
        flex: none;
        justify-content: space-between;
        height: 44px;
        padding: 0 12px;
        border: 0;
        border-radius: 10px;
        font-size: 15px;
    }

    .header-top--pick .header-top__seg a:hover {
        background: #F2F6FD;
    }

    .header-top--pick .header-top__seg a.is-on {
        color: #2979FF;
        background: #ECF0FF;
    }

    .header-top--pick .header-top__seg a.is-on::after {
        content: "";
        width: 16px;
        height: 16px;
        background: currentColor;
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5l10 -10'/%3E%3C/svg%3E") center / contain no-repeat;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5l10 -10'/%3E%3C/svg%3E") center / contain no-repeat;
    }
}
