/* =========================================================
   STYLE PAC COMPACT
   Colibrí™ — Sistema visual compartido PAC + Manual
   =========================================================
   SISTEMA VISUAL BASE
   Derivado del sistema visual oficial de style_t1_c1.css.

   Esta hoja contiene:
   1. Sistema de diseño Colibrí OS
   2. Accesibilidad
   3. App shell
   4. Header
   5. Progreso
   6. Componentes PAC
   7. Navegación
   8. Recursos / modales
   9. Componentes Manual del Estudiante

   El contenido específico de cada PAC NO vive aquí.
   ========================================================= */


/* =========================================================
   1. SISTEMA DE DISEÑO COLIBRÍ OS
   ========================================================= */

:root {

    /* -----------------------------------------------------
       Marca
       ----------------------------------------------------- */

    --colibri-emerald: #009975;
    --colibri-teal: #00cfcf;
    --colibri-nectar: #ffd166;
    --colibri-blue: #031322;
    --colibri-magenta: #ff4d6d;


    /* -----------------------------------------------------
       Compatibilidad con variables previas
       ----------------------------------------------------- */

    --color-azul-profundo: #031322;
    --color-turquesa: #00cfcf;
    --color-magenta: #ff4d6d;
    --color-amarillo-nectar: #ffd166;


    /* -----------------------------------------------------
       Neutros
       ----------------------------------------------------- */

    --neutral-900: #f8fafc;
    --neutral-850: #eaf2f7;
    --neutral-800: #f1f5f9;
    --neutral-700: #e2e8f0;
    --neutral-650: #d5e1ea;
    --neutral-600: #cbd5e1;
    --neutral-500: #64748b;
    --neutral-300: #475569;
    --neutral-200: #334155;
    --neutral-150: #1e293b;
    --neutral-100: #0f172a;


    /* -----------------------------------------------------
       Alias
       ----------------------------------------------------- */

    --color-gris-suave: var(--neutral-600);


    /* -----------------------------------------------------
       Tipografía
       ----------------------------------------------------- */

    --font-title: "Montserrat", sans-serif;
    --font-body: "Inter", sans-serif;


    /* -----------------------------------------------------
       Entorno
       ----------------------------------------------------- */

    --app-bg: #010a12;
    --card-radius: 16px;
    --card-radius-lg: 20px;
    --transition-speed: 0.28s;


    /* -----------------------------------------------------
       Legibilidad
       ----------------------------------------------------- */

    --base-font-size: 18px;
    --base-line-height: 1.65;

    --text-color: var(--neutral-900);
    --muted-text: var(--neutral-600);


    /* -----------------------------------------------------
       Foco
       ----------------------------------------------------- */

    --focus-ring: 3px;
    --focus-color: var(--colibri-nectar);

    --focus-shadow:
        0 0 0 6px rgba(255, 209, 102, 0.35);


    /* -----------------------------------------------------
       Targets
       ----------------------------------------------------- */

    --min-target: 48px;


    /* -----------------------------------------------------
       Header
       ----------------------------------------------------- */

    --header-glass:
        rgba(3, 19, 34, 0.72);

    --header-border:
        rgba(0, 207, 207, 0.18);

    --header-meta-gap:
        0.8rem;


    /* -----------------------------------------------------
       Manual del Estudiante
       ----------------------------------------------------- */

    --manual-surface:
        rgba(255, 255, 255, 0.035);

    --manual-surface-strong:
        rgba(255, 255, 255, 0.055);

    --manual-border:
        rgba(255, 255, 255, 0.10);

    --manual-muted:
        rgba(255, 255, 255, 0.68);

    --manual-radius:
        18px;

    --manual-shadow:
        0 12px 35px rgba(0, 0, 0, 0.14);

}


/* =========================================================
   2. RESET SUAVE Y ACCESIBILIDAD
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}


html {
    font-size: var(--base-font-size);

    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;

    scroll-behavior: smooth;
}


body {
    margin: 0;

    min-height: 100vh;

    font-family: var(--font-body);
    line-height: var(--base-line-height);

    color: var(--text-color);

    display: flex;
    justify-content: center;
    align-items: center;

    background:
        radial-gradient(
            circle at 0% 0%,
            var(--color-turquesa) 0%,
            transparent 40%
        ),
        radial-gradient(
            circle at 100% 0%,
            var(--color-magenta) 0%,
            transparent 40%
        ),
        radial-gradient(
            circle at 50% 100%,
            var(--color-amarillo-nectar) 0%,
            transparent 45%
        ),
        var(--color-azul-profundo);

    background-attachment: fixed;
}


img {
    max-width: 100%;
    display: block;
}


p,
li,
span,
a,
button,
label,
input,
textarea,
select {
    line-height: var(--base-line-height);
}


p,
li {
    font-size: 1rem;
}


a {
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
}


button,
input,
textarea,
select {
    font: inherit;
}


/* =========================================================
   FOCUS
   ========================================================= */

a:focus-visible,
button:focus-visible,
.nav-btn:focus-visible,
.action-link:focus-visible,
.resource-btn:focus-visible,
.accordion-button:focus-visible,
[role="button"]:focus-visible {

    outline:
        var(--focus-ring)
        solid
        var(--focus-color);

    outline-offset: 2px;

    box-shadow:
        var(--focus-shadow);

    border-radius: 10px;
}


/* =========================================================
   SKIP LINK
   ========================================================= */

.skip-link {

    position: absolute;

    top: 0.75rem;
    left: 0.75rem;

    z-index: 9999;

    padding: 0.7rem 1rem;

    border-radius: 999px;

    background:
        var(--colibri-nectar);

    color:
        var(--colibri-blue);

    border:
        2px solid
        var(--focus-color);

    text-decoration: none;

    font-weight: 800;
    font-size: 0.95rem;

    transform:
        translateY(-200%);

    transition:
        transform 0.2s ease;
}


.skip-link:focus,
.skip-link:focus-visible {

    transform:
        translateY(0);
}


/* =========================================================
   SCREEN READER ONLY
   ========================================================= */

.sr-only {

    position: absolute !important;

    width: 1px !important;
    height: 1px !important;

    padding: 0 !important;
    margin: -1px !important;

    overflow: hidden !important;

    clip:
        rect(0, 0, 0, 0) !important;

    white-space: nowrap !important;

    border: 0 !important;
}


/* =========================================================
   3. PREFERENCIAS DE ACCESIBILIDAD
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    #content-area {
        scroll-behavior: auto;
    }

    .fade-in,
    .animate-fade-in,
    .nft-wrapper {

        animation:
            none !important;
    }

    .flight-card,
    .flight-card:hover,
    .action-link,
    .resource-btn,
    .nav-btn {

        transition:
            none !important;

        transform:
            none !important;
    }

}


@media (prefers-contrast: more) {

    :root {

        --colibri-emerald:
            #00ffaa;

        --colibri-teal:
            #00ffff;

        --muted-text:
            #ffffff;

        --focus-shadow:
            0 0 0 7px
            rgba(255, 209, 102, 0.6);
    }


    .flight-card,
    .resource-card,
    .modal-content.dark-modal {

        box-shadow:
            none;

        border:
            2px solid
            #ffffff !important;
    }

}


@media (forced-colors: active) {

    * {
        forced-color-adjust: auto;
    }


    .flight-card,
    .resource-card,
    .bottom-nav,
    .modal-content.dark-modal {

        border:
            1px solid
            CanvasText !important;
    }

}


/* =========================================================
   4. CONTENEDOR TIPO APP
   ========================================================= */

#mobile-viewport {

    width: 100%;
    max-width: 100%;

    height: 100vh;
    max-height: 100vh;

    position: relative;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    background: transparent;

    box-shadow:
        0 0 60px
        rgba(0, 0, 0, 0.8);

    transition:
        all
        var(--transition-speed)
        ease;
}


@media (min-width: 576px) {

    #mobile-viewport {

        max-width: 540px;

        height: 95vh;
        max-height: 900px;

        border-radius: 30px;

        border:
            2px solid
            rgba(0, 207, 207, 0.3);
    }

}


@media (min-width: 768px) {

    #mobile-viewport {
        max-width: 720px;
    }

}


@media (min-width: 992px) {

    #mobile-viewport {
        max-width: 960px;
    }

}


@media (min-width: 1200px) {

    #mobile-viewport {
        max-width: 1140px;
    }

}


/* =========================================================
   5. HEADER
   ========================================================= */

.app-header {

    background:
        var(--header-glass);

    backdrop-filter:
        blur(12px);

    -webkit-backdrop-filter:
        blur(12px);

    padding:
        0.8rem
        0.95rem
        0.7rem;

    border-bottom:
        1px solid
        var(--header-border);

    z-index: 10;
}


.app-header > .d-flex {

    align-items:
        flex-start !important;

    gap:
        0.75rem;
}


.header-top,
.header-top.compact-header {

    display: flex;

    justify-content:
        space-between;

    align-items:
        flex-start;

    gap:
        0.95rem;
}


.header-main {

    flex: 1;

    min-width: 0;
}


.header-kicker {

    margin-bottom:
        0.22rem;
}


.category-badge {

    display: inline-block;

    font-size:
        0.78rem;

    font-weight:
        800;

    text-transform:
        uppercase;

    letter-spacing:
        0.42px;

    color:
        var(--colibri-teal);

    line-height:
        1.18;

    margin-bottom:
        0;
}


.header-meta-row {

    display: flex;

    flex-wrap: wrap;

    align-items:
        flex-start;

    justify-content:
        space-between;

    gap:
        0.45rem
        0.8rem;

    margin-bottom:
        0.35rem;
}


.header-title {

    margin:
        0
        0.52rem
        0
        0;

    font-family:
        var(--font-title);

    font-size:
        1.22rem;

    font-weight:
        800;

    line-height:
        1.08;

    color:
        var(--neutral-900);

    text-wrap:
        balance;
}


.app-title {

    font-family:
        var(--font-title);

    font-weight:
        800;

    color:
        var(--neutral-900);

    margin:
        0;

    line-height:
        1.05;

    font-size:
        1.24rem;
}


.app-title span {
    color:
        var(--colibri-teal);
}


.title-line-1,
.title-line-2 {
    display: block;
}


.title-line-1 {

    font-size:
        0.98rem;

    color:
        var(--neutral-900);

    line-height:
        1.06;
}


.title-line-2 {

    font-size:
        1.2rem;

    color:
        var(--colibri-teal);

    line-height:
        1.06;

    margin-top:
        0.02rem;
}


/* =========================================================
   METADATOS
   ========================================================= */

.header-meta-stack {

    display: flex;

    flex-direction:
        column;

    gap:
        0.42rem;
}


.meta-line {

    display: flex;

    flex-wrap:
        wrap;

    gap:
        0.7rem
        1rem;
}


.course-meta,
.course-meta.compact-meta {

    display: flex;

    flex-wrap:
        wrap;

    gap:
        0.7rem;

    margin-top:
        0;
}


.meta-item {

    display: inline-flex;

    align-items:
        center;

    gap:
        0.42rem;

    color:
        var(--colibri-teal);

    font-size:
        0.94rem;

    font-weight:
        700;

    line-height:
        1.2;

    min-width:
        0;
}


.meta-item i {

    flex-shrink:
        0;

    font-size:
        0.92rem;
}


.meta-item > span {
    min-width:
        0;
}


.app-header .small {

    font-size:
        0.84rem !important;

    line-height:
        1.15;
}


.app-header .mt-2 {

    margin-top:
        0.3rem !important;
}


.profile-avatar,
.profile-avatar.compact-avatar {

    flex-shrink:
        0;

    align-self:
        flex-start;
}


.profile-avatar img,
.compact-avatar img {

    width:
        46px;

    height:
        46px;

    border-radius:
        50%;

    object-fit:
        cover;

    border:
        2px solid
        var(--colibri-teal);

    background:
        rgba(255, 255, 255, 0.97);

    padding:
        2px;

    box-shadow:
        0 0 0 2px
        rgba(255, 77, 109, 0.18);
}


.text-muted {
    color:
        var(--muted-text) !important;
}


/* =========================================================
   6. PROGRESO
   ========================================================= */

.app-header > .mt-3 {

    margin-top:
        0.55rem !important;
}


.app-header .small.mb-1 {

    margin-bottom:
        0.28rem !important;

    font-size:
        0.84rem !important;

    line-height:
        1.1;
}


.header-progress,
.compact-progress {

    margin-top:
        0.55rem;
}


.progress-header-row {

    display: flex;

    justify-content:
        space-between;

    align-items:
        center;

    gap:
        0.6rem;

    margin-bottom:
        0.28rem;
}


.progress-label {

    font-size:
        0.82rem;

    font-weight:
        800;

    color:
        var(--neutral-900);

    line-height:
        1.1;
}


.progress-value {

    font-size:
        0.84rem;

    font-weight:
        800;

    color:
        var(--colibri-teal);

    line-height:
        1.1;
}


.progress {

    height:
        8px;

    background-color:
        rgba(255, 255, 255, 0.1);

    border-radius:
        999px;

    overflow:
        hidden;
}


.progress-bar {

    background:
        linear-gradient(
            90deg,
            var(--colibri-emerald),
            var(--colibri-teal)
        );

    box-shadow:
        0 0 10px
        rgba(0, 207, 207, 0.45);
}


/* =========================================================
   7. ÁREA DE CONTENIDO
   ========================================================= */

#content-area {

    flex: 1;

    overflow-y:
        auto;

    padding:
        1.2rem
        1.1rem
        7rem
        1.1rem;

    scroll-behavior:
        smooth;
}


#content-area:focus {
    outline:
        none;
}


#content-area::-webkit-scrollbar {
    width:
        6px;
}


#content-area::-webkit-scrollbar-thumb {

    background-color:
        var(--colibri-teal);

    border-radius:
        999px;
}


#content-area::-webkit-scrollbar-track {

    background:
        rgba(0, 0, 0, 0.2);
}


/* =========================================================
   8. GRID DE TARJETAS
   ========================================================= */

.cards-grid {

    display:
        grid;

    grid-template-columns:
        1fr;

    gap:
        1.12rem;
}


@media (min-width: 768px) {

    .cards-grid {
        gap:
            1.3rem;
    }

}


@media (min-width: 1200px) {

    .cards-grid {
        gap:
            1.45rem;
    }

}


/* =========================================================
   9. TARJETAS DEL PAC
   ========================================================= */

.flight-card {

    position:
        relative;

    display:
        flex;

    flex-direction:
        column;

    justify-content:
        space-between;

    background:
        rgba(7, 20, 38, 0.66);

    backdrop-filter:
        blur(6px);

    border-radius:
        var(--card-radius);

    box-shadow:
        0 6px 16px
        rgba(0, 0, 0, 0.3);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border 0.2s ease,
        opacity 0.2s ease,
        background 0.2s ease;

    cursor:
        pointer;

    border:
        1px solid
        rgba(255, 255, 255, 0.06);
}


.flight-card.active-card {

    border:
        1px solid
        rgba(0, 207, 207, 0.55);
}


.flight-card.active-card:hover {

    transform:
        translateY(-2px);

    box-shadow:
        0 12px 26px
        rgba(0, 0, 0, 0.5);

    background:
        rgba(7, 20, 38, 0.84);
}


.flight-card.active-card:active {

    transform:
        scale(0.99);
}


.flight-card.completed {

    border:
        1px solid
        rgba(0, 153, 117, 0.65);

    background:
        rgba(0, 153, 117, 0.07);
}


.flight-card.locked {

    opacity:
        0.82;

    background:
        rgba(7, 20, 38, 0.35);

    border:
        1px dashed
        var(--neutral-500);

    cursor:
        not-allowed;
}


.thumbnail-box {

    width:
        88px;

    height:
        88px;

    border-radius:
        12px;

    overflow:
        hidden;

    position:
        relative;

    background-color:
        var(--neutral-150);

    flex-shrink:
        0;

    border:
        1px solid
        rgba(255, 255, 255, 0.08);
}


.thumbnail-box img {

    width:
        100%;

    height:
        100%;

    object-fit:
        cover;

    opacity:
        0.74;

    transition:
        opacity 0.2s ease,
        filter 0.2s ease;
}


.active-card .thumbnail-box img {
    opacity:
        1;
}


.completed .thumbnail-box img {

    opacity:
        1;

    filter:
        grayscale(40%);
}


.locked .thumbnail-box img {

    opacity:
        0.3;

    filter:
        grayscale(100%);
}


.play-icon-overlay {

    position:
        absolute;

    inset:
        0;

    background:
        rgba(3, 19, 34, 0.34);

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    color:
        var(--neutral-900);

    font-size:
        1.3rem;
}


.completed .play-icon-overlay {
    color:
        var(--colibri-emerald);
}


.locked .play-icon-overlay {
    color:
        var(--neutral-900);
}


.flight-card h2,
.flight-card .h6 {

    color:
        var(--neutral-900);
}


.flight-card p.small {

    color:
        var(--neutral-650);
}
/* =========================================================
   10. ENLACES DE ACCIÓN
   ========================================================= */

.action-link {

    position:
        relative;

    z-index:
        2;

    display:
        flex;

    justify-content:
        space-between;

    align-items:
        center;

    gap:
        0.8rem;

    min-height:
        var(--min-target);

    margin-top:
        0.72rem;

    padding:
        12px 14px;

    border-radius:
        10px;

    text-decoration:
        none;

    font-size:
        1rem;

    font-weight:
        700;

    color:
        var(--colibri-teal);

    background-color:
        rgba(0, 207, 207, 0.1);

    border:
        1px solid
        rgba(0, 207, 207, 0.3);

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}


.action-link:hover,
.action-link:focus-visible {

    border-color:
        var(--colibri-teal);

    color:
        var(--colibri-blue) !important;

    background-color:
        var(--colibri-teal);
}


.action-link:hover i,
.action-link:focus-visible i {

    color:
        var(--colibri-blue) !important;
}


.action-link:active {

    transform:
        translateY(1px);
}


/* =========================================================
   11. ACORDEÓN
   ========================================================= */

.flight-accordion {

    --bs-accordion-bg:
        transparent;

    --bs-accordion-color:
        var(--neutral-600);

    --bs-accordion-border-color:
        rgba(0, 207, 207, 0.2);

    --bs-accordion-btn-color:
        var(--neutral-900);

    --bs-accordion-btn-bg:
        rgba(7, 20, 38, 0.44);

    --bs-accordion-active-color:
        var(--colibri-teal);

    --bs-accordion-active-bg:
        rgba(0, 207, 207, 0.1);

    --bs-accordion-btn-focus-box-shadow:
        0 0 0 0.25rem
        rgba(0, 207, 207, 0.25);
}


.flight-accordion .accordion-item {

    margin-bottom:
        0.45rem;
}


.flight-accordion .accordion-item:last-child {

    margin-bottom:
        0;
}


.flight-accordion .accordion-button {

    border-radius:
        8px !important;

    font-size:
        1rem;

    font-weight:
        700;

    line-height:
        1.45;

    color:
        var(--neutral-900);

    background:
        rgba(7, 20, 38, 0.42);
}


.flight-accordion .accordion-button:not(.collapsed) {

    color:
        var(--colibri-teal);

    background:
        rgba(0, 207, 207, 0.1);
}


.flight-accordion .accordion-button:disabled {

    opacity:
        0.65;

    cursor:
        not-allowed;
}


.flight-accordion .accordion-body {

    font-size:
        1rem;

    line-height:
        1.7;

    color:
        var(--neutral-650);
}


.flight-accordion ul,
.flight-accordion ol {

    padding-left:
        1.2rem;
}


.flight-accordion li + li {

    margin-top:
        0.22rem;
}


/* =========================================================
   12. NAVEGACIÓN INFERIOR DEL PAC
   ========================================================= */

.bottom-nav {

    position:
        absolute;

    bottom:
        0;

    left:
        0;

    width:
        100%;

    height:
        92px;

    display:
        flex;

    justify-content:
        space-around;

    align-items:
        center;

    padding-bottom:
        10px;

    z-index:
        20;

    background:
        rgba(3, 19, 34, 0.9);

    backdrop-filter:
        blur(15px);

    box-shadow:
        0 -6px 22px
        rgba(0, 0, 0, 0.5);

    border-top:
        1px solid
        rgba(255, 255, 255, 0.05);

    border-radius:
        0;
}


.nav-btn {

    width:
        33%;

    min-height:
        var(--min-target);

    padding:
        12px 10px;

    border:
        none;

    background:
        none;

    display:
        flex;

    flex-direction:
        column;

    align-items:
        center;

    color:
        var(--neutral-500);

    font-family:
        var(--font-title);

    font-size:
        0.92rem;

    font-weight:
        700;

    line-height:
        1.25;

    cursor:
        pointer;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}


.nav-btn i {

    font-size:
        1.5rem;

    margin-bottom:
        6px;
}


.nav-btn.active {

    color:
        var(--colibri-teal);
}


.nav-btn:active {

    transform:
        translateY(1px);
}


@media (min-width: 576px) {

    .bottom-nav {

        border-radius:
            0 0 28px 28px;
    }

}


/* =========================================================
   13. ANIMACIONES
   ========================================================= */

.fade-in,
.animate-fade-in {

    animation:
        fadeIn
        0.4s
        ease-in-out;
}


@keyframes fadeIn {

    from {

        opacity:
            0;

        transform:
            translateY(10px);
    }

    to {

        opacity:
            1;

        transform:
            translateY(0);
    }

}


.nft-wrapper {

    animation:
        float
        5s
        ease-in-out
        infinite;
}


@keyframes float {

    0%,
    100% {

        transform:
            translateY(0);
    }

    50% {

        transform:
            translateY(-10px);
    }

}


/* =========================================================
   14. RECURSOS
   ========================================================= */

.resources-title {

    margin:
        1.4rem
        0
        0.9rem
        0;

    text-align:
        left;

    font-family:
        var(--font-title);

    font-size:
        1.2rem;

    font-weight:
        800;

    color:
        var(--neutral-900);
}


.resources-grid {

    display:
        grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(240px, 1fr)
        );

    gap:
        1rem;
}


.resource-card {

    display:
        flex;

    flex-direction:
        column;

    gap:
        0.7rem;

    padding:
        1.2rem;

    background:
        rgba(7, 20, 38, 0.6);

    border-radius:
        16px;

    border:
        1px solid
        rgba(255, 255, 255, 0.1);

    box-shadow:
        0 10px 28px
        rgba(0, 0, 0, 0.3);
}


.resource-icon {

    font-size:
        2.15rem;

    line-height:
        1;
}


.resource-card h4 {

    margin:
        0;

    font-size:
        1.15rem;

    font-weight:
        800;

    line-height:
        1.35;

    color:
        var(--neutral-900);
}


.resource-card p {

    margin:
        0;

    font-size:
        1rem;

    line-height:
        1.6;

    color:
        var(--muted-text);
}


.resource-btn {

    margin-top:
        auto;

    display:
        inline-flex;

    justify-content:
        center;

    align-items:
        center;

    gap:
        0.5rem;

    min-height:
        var(--min-target);

    padding:
        0.8rem 1rem;

    border-radius:
        999px;

    text-align:
        center;

    text-decoration:
        none;

    font-size:
        1rem;

    font-weight:
        800;

    line-height:
        1.35;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        filter 0.2s ease;
}


.resource-card.pdf .resource-btn {

    border:
        2px solid
        var(--colibri-emerald);

    color:
        var(--colibri-emerald);

    background:
        transparent;
}


.resource-card.pdf .resource-btn:hover,
.resource-card.pdf .resource-btn:focus-visible {

    background:
        var(--colibri-emerald);

    color:
        #ffffff;
}


.resource-card.gema {

    background:
        rgba(0, 207, 207, 0.05);

    border:
        1px solid
        rgba(0, 207, 207, 0.3);
}


.resource-card.gema .resource-btn {

    background:
        var(--colibri-teal);

    color:
        var(--colibri-blue);

    border:
        2px solid
        transparent;
}


.resource-card.gema .resource-btn:hover,
.resource-card.gema .resource-btn:focus-visible {

    filter:
        brightness(0.95);
}


/* =========================================================
   15. MODALES
   ========================================================= */

.modal-content.dark-modal {

    background-color:
        var(--colibri-blue);

    border:
        1px solid
        var(--colibri-teal);

    color:
        var(--neutral-600);
}


.modal-content.dark-modal .font-title {

    color:
        var(--neutral-900) !important;
}


.modal-content.dark-modal .text-dark {

    color:
        var(--neutral-900) !important;
}


.modal-content.dark-modal p,
.modal-content.dark-modal li,
.modal-content.dark-modal span,
.modal-content.dark-modal button {

    font-size:
        1rem;

    line-height:
        1.65;
}


.btn-close-white {

    width:
        44px;

    height:
        44px;

    padding:
        0;

    border:
        2px solid
        var(--colibri-teal);

    border-radius:
        50%;

    background:
        var(--colibri-blue) !important;

    background-image:
        none !important;

    opacity:
        1;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    position:
        relative;

    box-shadow:
        0 4px 14px
        rgba(0, 0, 0, 0.45);

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}


.btn-close-white::before {

    content:
        "×";

    color:
        var(--colibri-teal);

    font-family:
        Arial,
        sans-serif;

    font-size:
        30px;

    font-weight:
        400;

    line-height:
        1;

    transform:
        translateY(-1px);
}


.btn-close-white:hover,
.btn-close-white:focus-visible {

    background:
        var(--colibri-teal) !important;

    border-color:
        var(--colibri-teal);

    opacity:
        1;

    transform:
        scale(1.05);
}


.btn-close-white:hover::before,
.btn-close-white:focus-visible::before {

    color:
        var(--colibri-blue);
}


.btn-close-white:focus-visible {

    outline:
        var(--focus-ring)
        solid
        var(--focus-color);

    outline-offset:
        3px;

    box-shadow:
        var(--focus-shadow);
}


.btn-close-white:active {

    transform:
        scale(0.96);
}


/* =========================================================
   16. RESPONSIVE DEL PAC
   ========================================================= */

@media (max-width: 767.98px) {

    .app-header {

        padding:
            0.72rem
            0.82rem
            0.66rem;
    }


    .header-top.compact-header {

        gap:
            0.75rem;
    }


    .category-badge {

        font-size:
            0.72rem;
    }


    .header-title {

        font-size:
            1.06rem;

        line-height:
            1.1;
    }


    .app-title {

        font-size:
            1.12rem;
    }


    .title-line-1 {

        font-size:
            0.9rem;
    }


    .title-line-2 {

        font-size:
            1.08rem;
    }


    .meta-item {

        font-size:
            0.9rem;

        line-height:
            1.18;
    }


    .profile-avatar img,
    .compact-avatar img {

        width:
            42px;

        height:
            42px;
    }


    #content-area {

        padding:
            1rem
            0.92rem
            7rem
            0.92rem;
    }


    .thumbnail-box {

        width:
            80px;

        height:
            80px;
    }


    .flight-card {

        border-radius:
            14px;
    }


    .flight-accordion .accordion-button,
    .flight-accordion .accordion-body,
    .action-link,
    .resource-card p,
    .resource-btn {

        font-size:
            0.95rem;
    }

}


@media (min-width: 768px) {

    .app-header {

        padding:
            0.86rem
            1rem
            0.74rem;
    }


    .header-title {

        font-size:
            1.34rem;
    }


    .app-title {

        font-size:
            1.38rem;
    }


    .title-line-1 {

        font-size:
            1.05rem;
    }


    .title-line-2 {

        font-size:
            1.32rem;
    }


    .profile-avatar img,
    .compact-avatar img {

        width:
            48px;

        height:
            48px;
    }

}
/* =========================================================
   17. MANUAL DEL ESTUDIANTE
   CAPA REUTILIZABLE
   =========================================================

   IMPORTANTE:

   Esta sección NO reemplaza el sistema visual del PAC.

   Complementa:
       style_t1_c1.css

   y permite que:

       student_manual.html

   utilice el mismo lenguaje visual que los PAC.

   El contenido sigue viviendo exclusivamente en JSON.
   ========================================================= */


/* =========================================================
   CONTEXTO ESPECIAL DEL MANUAL
   =========================================================

   student_manual.html no utiliza #mobile-viewport.

   El PAC conserva su app-shell original.

   El Manual necesita un shell documental de ancho
   controlado y navegación inferior fija.
   ========================================================= */


body:has(#student-manual) {

    display:
        block;

    min-height:
        100vh;

    overflow-x:
        hidden;
}


body:has(#student-manual) #content-area {

    width:
        100%;

    max-width:
        1180px;

    min-height:
        calc(100vh - 150px);

    margin:
        0 auto;

    overflow-y:
        visible;

    padding:
        1.25rem
        1rem
        calc(
            110px +
            env(safe-area-inset-bottom)
        );
}


body:has(#student-manual) .app-header {

    position:
        sticky;

    top:
        0;

    z-index:
        1000;
}


/* =========================================================
   NAVEGACIÓN DEL MANUAL
   ========================================================= */

body:has(#student-manual) .bottom-nav {

    position:
        fixed;

    right:
        0;

    bottom:
        0;

    left:
        0;

    width:
        100%;

    height:
        calc(
            78px +
            env(safe-area-inset-bottom)
        );

    padding-bottom:
        max(
            8px,
            env(safe-area-inset-bottom)
        );

    border-radius:
        0;

    display:
        grid;

    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        );
}


body:has(#student-manual) .nav-btn {

    width:
        auto;

    min-height:
        48px;

    padding:
        7px 8px;

    font-size:
        0.78rem;
}


body:has(#student-manual) .nav-btn i {

    margin-bottom:
        3px;

    font-size:
        1.25rem;
}


/* =========================================================
   CONTENEDOR
   ========================================================= */

.student-manual {

    width:
        min(
            100%,
            920px
        );

    margin:
        0 auto;
}


/* =========================================================
   SECCIONES
   ========================================================= */

.manual-section {

    margin-bottom:
        1.15rem;

    scroll-margin-top:
        7rem;
}


.manual-section-heading {

    margin-bottom:
        0.8rem;
}


.manual-section-kicker {

    display:
        block;

    margin-bottom:
        0.2rem;

    color:
        var(--colibri-teal);

    font-size:
        0.72rem;

    font-weight:
        800;

    letter-spacing:
        0.08em;

    line-height:
        1.2;

    text-transform:
        uppercase;
}


.manual-section-title {

    margin:
        0;

    font-family:
        var(--font-title);

    color:
        var(--neutral-900);

    font-size:
        clamp(
            1.2rem,
            3vw,
            1.65rem
        );

    font-weight:
        800;

    line-height:
        1.15;

    text-wrap:
        balance;
}


/* =========================================================
   TARJETAS
   ========================================================= */

.manual-card {

    padding:
        1rem;

    border:
        1px solid
        var(--manual-border);

    border-radius:
        var(--manual-radius);

    background:
        var(--manual-surface);

    box-shadow:
        var(--manual-shadow);
}


.manual-card + .manual-card {

    margin-top:
        0.75rem;
}


.manual-lead {

    margin-bottom:
        0.8rem;

    color:
        var(--neutral-900);

    font-size:
        1rem;

    line-height:
        1.65;
}


.manual-question {

    margin:
        0;

    color:
        var(--neutral-900);

    font-size:
        1.05rem;

    font-weight:
        800;

    line-height:
        1.45;
}


.manual-muted {

    color:
        var(--manual-muted);
}


/* =========================================================
   LISTAS
   ========================================================= */

.manual-list {

    margin:
        0;

    padding-left:
        1.25rem;

    color:
        var(--neutral-650);
}


.manual-list li + li {

    margin-top:
        0.45rem;
}


/* =========================================================
   RUTA
   ========================================================= */

.manual-stage {

    position:
        relative;

    min-height:
        3.2rem;

    padding:
        0.85rem
        0.85rem
        0.85rem
        3.2rem;

    border:
        1px solid
        rgba(255, 255, 255, 0.08);

    border-radius:
        14px;

    background:
        rgba(7, 20, 38, 0.48);
}


.manual-stage-number {

    position:
        absolute;

    top:
        0.85rem;

    left:
        0.85rem;

    display:
        grid;

    width:
        1.75rem;

    height:
        1.75rem;

    place-items:
        center;

    border:
        1px solid
        rgba(0, 207, 207, 0.4);

    border-radius:
        50%;

    color:
        var(--colibri-teal);

    background:
        rgba(0, 207, 207, 0.08);

    font-size:
        0.75rem;

    font-weight:
        800;
}


.manual-stage-title {

    margin:
        0
        0.25rem;

    color:
        var(--neutral-900);

    font-family:
        var(--font-title);

    font-size:
        0.95rem;

    font-weight:
        800;

    line-height:
        1.3;
}


/* =========================================================
   DETAILS
   ========================================================= */

.manual-details {

    border-top:
        1px solid
        rgba(255, 255, 255, 0.10);
}


.manual-details:first-child {

    border-top:
        0;
}


.manual-details summary {

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        1rem;

    min-height:
        48px;

    padding:
        0.7rem 0;

    color:
        var(--neutral-900);

    cursor:
        pointer;

    list-style:
        none;

    font-weight:
        800;

    line-height:
        1.35;
}


.manual-details summary::-webkit-details-marker {

    display:
        none;
}


.manual-details summary::after {

    content:
        "+";

    flex:
        0 0 auto;

    color:
        var(--colibri-teal);

    font-size:
        1.15rem;

    font-weight:
        500;
}


.manual-details[open]
> summary::after {

    content:
        "−";
}


.manual-details summary:focus-visible {

    outline:
        var(--focus-ring)
        solid
        var(--focus-color);

    outline-offset:
        2px;

    box-shadow:
        var(--focus-shadow);

    border-radius:
        8px;
}


.manual-details-content {

    padding:
        0
        0
        0.85rem;

    color:
        var(--neutral-650);
}


/* =========================================================
   MICROACCIONES
   ========================================================= */

.microaction {

    overflow:
        hidden;
}


.microaction-header {

    margin:
        -1rem
        -1rem
        1rem;

    padding:
        1rem;

    border-bottom:
        1px solid
        rgba(255, 255, 255, 0.10);

    background:
        var(--manual-surface-strong);
}


.microaction-id {

    display:
        inline-flex;

    align-items:
        center;

    min-height:
        28px;

    padding:
        0.2rem
        0.55rem;

    border:
        1px solid
        rgba(0, 207, 207, 0.35);

    border-radius:
        999px;

    color:
        var(--colibri-teal);

    background:
        rgba(0, 207, 207, 0.06);

    font-size:
        0.7rem;

    font-weight:
        800;

    letter-spacing:
        0.05em;

    line-height:
        1.2;
}


.microaction-title {

    margin:
        0.55rem
        0
        0;

    color:
        var(--neutral-900);

    font-family:
        var(--font-title);

    font-size:
        clamp(
            1.05rem,
            3vw,
            1.4rem
        );

    font-weight:
        800;

    line-height:
        1.2;
}


/* =========================================================
   BLOQUES SEMÁNTICOS
   ========================================================= */

.artifact-box,
.hypothesis-box,
.support-box,
.evidence-box {

    padding:
        0.85rem;

    border:
        1px solid
        var(--manual-border);

    border-radius:
        14px;

    background:
        rgba(7, 20, 38, 0.42);
}


.artifact-label,
.small-label {

    display:
        block;

    margin-bottom:
        0.3rem;

    color:
        var(--colibri-teal);

    font-size:
        0.7rem;

    font-weight:
        800;

    letter-spacing:
        0.06em;

    line-height:
        1.2;

    text-transform:
        uppercase;
}


.hypothesis-box {

    border-color:
        rgba(255, 209, 102, 0.25);

    background:
        rgba(255, 209, 102, 0.045);
}


.evidence-box {

    border-color:
        rgba(0, 153, 117, 0.35);

    background:
        rgba(0, 153, 117, 0.045);
}


.support-box {

    border-color:
        rgba(0, 207, 207, 0.25);

    background:
        rgba(0, 207, 207, 0.045);
}
/* =========================================================
   18. INSTRUCCIONES
   ========================================================= */

.instruction-list {

    display:
        grid;

    gap:
        0.65rem;

    margin:
        0;

    padding:
        0;

    list-style:
        none;

    counter-reset:
        instruction;
}


.instruction-item {

    position:
        relative;

    padding:
        0.75rem
        0.75rem
        0.75rem
        2.75rem;

    border:
        1px solid
        rgba(255, 255, 255, 0.10);

    border-radius:
        14px;

    background:
        rgba(7, 20, 38, 0.44);

    counter-increment:
        instruction;
}


.instruction-item::before {

    content:
        counter(instruction);

    position:
        absolute;

    top:
        0.72rem;

    left:
        0.72rem;

    display:
        grid;

    width:
        1.45rem;

    height:
        1.45rem;

    place-items:
        center;

    border-radius:
        50%;

    color:
        var(--colibri-teal);

    background:
        rgba(0, 207, 207, 0.12);

    font-size:
        0.7rem;

    font-weight:
        800;
}


.instruction-title {

    margin:
        0
        0.2rem;

    color:
        var(--neutral-900);

    font-size:
        0.92rem;

    font-weight:
        800;

    line-height:
        1.35;
}


/* =========================================================
   19. CHECKLIST
   ========================================================= */

.checklist {

    display:
        grid;

    gap:
        0.55rem;

    margin:
        0;

    padding:
        0;

    list-style:
        none;
}


.checklist-item {

    display:
        flex;

    align-items:
        flex-start;

    gap:
        0.65rem;

    min-height:
        48px;

    padding:
        0.65rem
        0.7rem;

    border:
        1px solid
        rgba(255, 255, 255, 0.10);

    border-radius:
        12px;

    background:
        rgba(7, 20, 38, 0.4);
}


.checklist-item input {

    width:
        1.2rem;

    height:
        1.2rem;

    margin-top:
        0.12rem;

    flex:
        0 0 auto;

    accent-color:
        var(--colibri-teal);
}


.checklist-item label {

    color:
        var(--neutral-650);

    cursor:
        pointer;

    line-height:
        1.45;
}


.checklist-item:has(input:checked) {

    border-color:
        rgba(0, 153, 117, 0.5);

    background:
        rgba(0, 153, 117, 0.07);
}


.checklist-item input:focus-visible {

    outline:
        var(--focus-ring)
        solid
        var(--focus-color);

    outline-offset:
        2px;

    box-shadow:
        var(--focus-shadow);
}


/* =========================================================
   20. TABLA DE HIPÓTESIS
   ========================================================= */

.manual-table {

    width:
        100%;

    margin:
        0;

    border-collapse:
        collapse;

    color:
        var(--neutral-650);
}


.manual-table th,
.manual-table td {

    padding:
        0.7rem
        0.55rem;

    border-bottom:
        1px solid
        rgba(255, 255, 255, 0.10);

    text-align:
        left;

    vertical-align:
        top;
}


.manual-table th {

    color:
        var(--neutral-900);

    font-size:
        0.78rem;

    font-weight:
        800;
}


.manual-table td strong {

    color:
        var(--neutral-900);
}


/* =========================================================
   21. CÁPSULAS
   ========================================================= */

.capsule-grid {

    display:
        grid;

    gap:
        0.65rem;
}


.capsule-card {

    display:
        grid;

    grid-template-columns:
        auto 1fr;

    gap:
        0.75rem;

    padding:
        0.8rem;

    border:
        1px solid
        rgba(255, 255, 255, 0.10);

    border-radius:
        14px;

    background:
        rgba(7, 20, 38, 0.44);
}


.capsule-id {

    display:
        grid;

    width:
        2rem;

    height:
        2rem;

    place-items:
        center;

    border-radius:
        50%;

    color:
        var(--colibri-teal);

    background:
        rgba(0, 207, 207, 0.12);

    font-size:
        0.72rem;

    font-weight:
        800;
}


.capsule-title {

    margin:
        0
        0.2rem;

    color:
        var(--neutral-900);

    font-size:
        0.92rem;

    font-weight:
        800;

    line-height:
        1.35;
}


/* =========================================================
   22. PRÓXIMO VUELO
   ========================================================= */

.next-step {

    text-align:
        center;
}


.next-step h3 {

    color:
        var(--neutral-900);
}


.next-step-code {

    display:
        inline-block;

    margin-top:
        0.5rem;

    padding:
        0.35rem
        0.7rem;

    border:
        1px solid
        rgba(0, 207, 207, 0.22);

    border-radius:
        999px;

    color:
        var(--colibri-teal);

    background:
        rgba(0, 207, 207, 0.10);

    font-size:
        0.78rem;

    font-weight:
        800;
}


/* =========================================================
   23. ESTADOS DE CARGA Y ERROR
   ========================================================= */

.manual-empty,
.manual-error {

    padding:
        1rem;

    border:
        1px dashed
        rgba(255, 255, 255, 0.16);

    border-radius:
        var(--manual-radius);

    color:
        var(--manual-muted);

    background:
        rgba(7, 20, 38, 0.42);
}


.manual-error {

    border-color:
        rgba(255, 77, 109, 0.45);
}


/* =========================================================
   24. ENLACES DEL MANUAL
   ========================================================= */

.student-manual a {

    color:
        var(--colibri-teal);
}


.student-manual a:hover {

    color:
        var(--neutral-900);
}


.student-manual a:focus-visible {

    outline:
        var(--focus-ring)
        solid
        var(--focus-color);

    outline-offset:
        2px;

    box-shadow:
        var(--focus-shadow);
}


/* =========================================================
   25. RESPONSIVE DEL MANUAL
   ========================================================= */

@media (max-width: 767.98px) {

    body:has(#student-manual) #content-area {

        padding:
            0.9rem
            0.85rem
            calc(
                96px +
                env(safe-area-inset-bottom)
            );
    }


    .manual-card {

        padding:
            0.9rem;

        box-shadow:
            0 8px 22px
            rgba(0, 0, 0, 0.18);
    }


    .microaction-header {

        margin:
            -0.9rem
            -0.9rem
            0.9rem;

        padding:
            0.9rem;
    }


    .manual-section {

        margin-bottom:
            1rem;
    }


    .manual-table {

        display:
            block;

        overflow-x:
            auto;

        -webkit-overflow-scrolling:
            touch;
    }


    .capsule-grid {

        grid-template-columns:
            1fr;
    }

}


@media (min-width: 768px) {

    body:has(#student-manual) #content-area {

        padding-right:
            1.25rem;

        padding-left:
            1.25rem;
    }


    .manual-card {

        padding:
            1.25rem;
    }


    .microaction-header {

        margin:
            -1.25rem
            -1.25rem
            1.25rem;

        padding:
            1.25rem;
    }


    .capsule-grid {

        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

}


/* =========================================================
   26. MOVIMIENTO REDUCIDO — MANUAL
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .manual-details summary::after,
    .checklist-item,
    .student-manual a {

        transition:
            none !important;
    }

}


/* =========================================================
   FIN DE STYLE PAC COMPACT
   ========================================================= */