/* Menú global Educatic · aislado del contenido, administradores y AdSense */
.educatic-topbar {
    color: #dce8fa;
    background: #111b2b;
    border-bottom: 1px solid rgba(148, 163, 184, .13);
}

.educatic-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 38px;
}

.educatic-topbar-socials {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 3px;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}

.educatic-topbar-socials::-webkit-scrollbar { display: none; }

.educatic-topbar-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    border-radius: 9px;
    color: #e2ebfa;
    font-size: .84rem;
    text-decoration: none;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.educatic-topbar-socials a:hover {
    background: rgba(255, 255, 255, .13);
    color: #fff;
    transform: translateY(-1px);
}

.educatic-topbar-note {
    margin: 0;
    color: #b8c9e3;
    white-space: nowrap;
    font-size: .73rem;
    font-weight: 600;
}

.educatic-topbar-note i { color: #38bdf8; margin-right: 6px; }

.educatic-navbar {
    --educatic-nav-ink: #34445d;
    --educatic-nav-muted: #64748b;
    --educatic-nav-hover: #eff6ff;
    min-height: 72px;
    padding: 11px 0;
    background: rgba(255, 255, 255, .98) !important;
    border-bottom: 1px solid #e5edf7;
    box-shadow: 0 7px 26px rgba(15, 23, 42, .045);
    z-index: 1030;
}

.educatic-navbar .container {
    gap: 12px;
}

.educatic-navbar .educatic-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    white-space: nowrap;
    color: #135bcf !important;
    font-size: 1.25rem;
    font-weight: 850;
    letter-spacing: -.035em;
    text-decoration: none;
}

.educatic-brand-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 41px;
    height: 41px;
    flex: 0 0 41px;
    border-radius: 13px;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: #fff;
    font-size: 1.27rem;
    box-shadow: 0 7px 16px rgba(37, 99, 235, .19);
}

.educatic-navbar .educatic-nav-main,
.educatic-navbar .educatic-nav-actions {
    align-items: center;
    gap: 2px;
}

.educatic-navbar .nav-item::after {
    display: none;
}

.educatic-navbar .educatic-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: auto;
    min-height: 41px;
    padding: 9px 11px !important;
    border: none;
    border-radius: 11px;
    background: transparent;
    color: var(--educatic-nav-ink) !important;
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: none;
    transform: none !important;
    transition: color .2s ease, background-color .2s ease;
}

.educatic-navbar .educatic-nav-link i {
    margin: 0;
    font-size: .98rem;
}

.educatic-navbar .educatic-nav-link:hover,
.educatic-navbar .educatic-nav-link:focus-visible,
.educatic-navbar .educatic-nav-link.is-active {
    color: #1658c5 !important;
    background: var(--educatic-nav-hover);
}

.educatic-navbar .educatic-nav-link.is-active {
    font-weight: 800;
}

.educatic-navbar .educatic-nav-link.nav-free {
    color: #b91c1c !important;
}

.educatic-navbar .educatic-nav-link.nav-free:hover,
.educatic-navbar .educatic-nav-link.nav-free.is-active {
    color: #991b1b !important;
    background: #fff1f2;
}

.educatic-navbar .educatic-nav-link.nav-coupons {
    color: #16804c !important;
}

.educatic-navbar .educatic-nav-link.nav-coupons:hover,
.educatic-navbar .educatic-nav-link.nav-coupons.is-active {
    color: #11663f !important;
    background: #e8f8ef;
}

.educatic-navbar .educatic-nav-link.nav-news {
    color: #155fc9 !important;
}

.educatic-navbar .educatic-nav-link.nav-news:hover,
.educatic-navbar .educatic-nav-link.nav-news.is-active {
    background: #eaf2ff;
}

.educatic-navbar .educatic-nav-link.dropdown-toggle::after {
    margin-left: 1px;
    font-size: .7em;
}

.educatic-navbar .educatic-nav-account {
    max-width: 160px;
}

.educatic-navbar .educatic-nav-account .educatic-account-name {
    display: inline-block;
    overflow: hidden;
    max-width: 108px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.educatic-navbar .educatic-nav-register {
    color: #fff !important;
    background: #1769e6;
    padding-inline: 15px !important;
    box-shadow: 0 6px 13px rgba(23, 105, 230, .13);
}

.educatic-navbar .educatic-nav-register:hover {
    color: #fff !important;
    background: #0954c9;
}

.educatic-navbar .dropdown-menu {
    min-width: 232px;
    margin-top: 8px;
    padding: 9px;
    border: 1px solid #e2eaf5;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .13);
}

.educatic-navbar .dropdown-item {
    display: flex;
    align-items: center;
    gap: 3px;
    min-height: 39px;
    padding: 9px 11px;
    border-radius: 9px;
    color: #42536c;
    font-size: .81rem;
    font-weight: 600;
    white-space: normal;
    transition: color .2s ease, background-color .2s ease;
}

.educatic-navbar .dropdown-item i {
    flex: 0 0 20px;
    margin: 0 !important;
    color: #3779de;
    font-size: .95rem;
    text-align: center;
}

.educatic-navbar .dropdown-item:hover,
.educatic-navbar .dropdown-item:focus-visible,
.educatic-navbar .dropdown-item.active {
    color: #1556bb;
    background: #eff6ff;
}

.educatic-navbar .educatic-menu-label {
    padding: 8px 11px 5px;
    color: #73829a;
    font-size: .64rem;
    font-weight: 850;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.educatic-navbar .dropdown-divider {
    margin: 7px 4px;
    border-color: #e7eef8;
}

.educatic-navbar .educatic-logout {
    width: 100%;
    background: transparent;
    border: 0;
    text-align: left;
}

.educatic-navbar .educatic-navbar-toggler {
    width: 43px;
    height: 42px;
    /* Solo visible en el punto de quiebre de navbar-expand-xxl. */
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #d8e5f5;
    border-radius: 11px;
    color: #1f5cba;
    box-shadow: none;
}

.educatic-navbar a:focus-visible,
.educatic-navbar button:focus-visible,
.educatic-topbar a:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 3px;
}

body.dark-mode .educatic-navbar {
    --educatic-nav-ink: #e1eaf9;
    --educatic-nav-hover: #24354e;
    background: #1c2534 !important;
    border-color: #303e50;
}

body.dark-mode .educatic-navbar .educatic-brand { color: #93c5fd !important; }

body.dark-mode .educatic-navbar .educatic-nav-link:hover,
body.dark-mode .educatic-navbar .educatic-nav-link.is-active {
    color: #b9d7ff !important;
}

body.dark-mode .educatic-navbar .dropdown-menu {
    background: #1f2c3f;
    border-color: #324258;
}

body.dark-mode .educatic-navbar .dropdown-item {
    color: #e2e8f0;
}

body.dark-mode .educatic-navbar .dropdown-item:hover,
body.dark-mode .educatic-navbar .dropdown-item:focus-visible {
    background: #32465d;
    color: #fff;
}

body.dark-mode .educatic-navbar .educatic-nav-register {
    background: #1769e6;
    color: #fff !important;
}

/* Gratis Udemy mantiene el rojo legible también en modo oscuro. */
body.dark-mode .educatic-navbar .educatic-nav-link.nav-free,
body.dark-mode .educatic-navbar .educatic-nav-link.nav-free:hover,
body.dark-mode .educatic-navbar .educatic-nav-link.nav-free.is-active {
    color: #fca5a5 !important;
}

body.dark-mode .educatic-navbar .educatic-nav-link.nav-free:hover,
body.dark-mode .educatic-navbar .educatic-nav-link.nav-free.is-active {
    background: #452226;
}

@media (min-width: 1400px) {
    .educatic-navbar .educatic-nav-main { gap: 0; }
    .educatic-navbar .educatic-nav-link { padding-inline: 9px !important; font-size: .8rem; }
}

@media (max-width: 1399.98px) {
    .educatic-navbar {
        padding: 10px 0;
        min-height: 65px;
    }

    /* En tablet/móvil el botón despliega #navbarMenu mediante Bootstrap. */
    .educatic-navbar .educatic-navbar-toggler {
        display: inline-flex;
    }

    .educatic-navbar .navbar-collapse {
        max-height: calc(100dvh - 115px);
        overflow-y: auto;
        padding: 15px 0 8px;
        margin-top: 8px;
        border-top: 1px solid #e7edf6;
    }

    .educatic-navbar .educatic-nav-main,
    .educatic-navbar .educatic-nav-actions {
        align-items: stretch;
        gap: 3px;
    }

    .educatic-navbar .educatic-nav-main { margin-bottom: 13px; }
    .educatic-navbar .educatic-nav-actions { padding-top: 12px; border-top: 1px solid #e7edf6; }
    .educatic-navbar .educatic-nav-link { display: flex; justify-content: flex-start; min-height: 44px; padding: 11px 14px !important; }
    .educatic-navbar .dropdown-menu {
        position: static !important;
        float: none;
        margin: 5px 0 9px;
        padding: 7px;
        box-shadow: none;
        border-radius: 12px;
    }

    .educatic-navbar .educatic-nav-account { max-width: none; }
    .educatic-navbar .educatic-nav-account .educatic-account-name { max-width: none; }
    .educatic-navbar .educatic-nav-register { justify-content: center; }
}

@media (max-width: 575px) {
    .educatic-topbar-inner { min-height: 35px; }
    .educatic-topbar-note { display: none; }
    .educatic-navbar .educatic-brand { font-size: 1.12rem; }
    .educatic-brand-icon { width: 38px; height: 38px; flex-basis: 38px; border-radius: 12px; }
    .educatic-topbar-socials { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .educatic-navbar *,
    .educatic-topbar-socials a { transition: none !important; }
}
