﻿:root {
    --study-bg: #06182e;
    --study-bg-soft: #09223d;
    --study-card: #0b2948;
    --study-card-hover: #10375d;
    --study-text: #f5f7fb;
    --study-muted: #b8c9dc;
    --study-green: #45e5cf;
    --study-yellow: #ffc957;
    --study-blue: #6db7ff;
    --study-border: rgba(103, 218, 232, .22);
}

/* -------------------------
   BASE
-------------------------- */

* {
    box-sizing: border-box;
}

html {
    background: var(--study-bg);
}

body.study-body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient( circle at 85% 10%, rgba(31, 133, 155, .15), transparent 32% ), var(--study-bg);
    color: var(--study-text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
}

/* -------------------------
   HEADER
-------------------------- */

.study-header {
    height: 92px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,.04);
}

.study-header-inner {
    width: min(1420px, calc(100% - 48px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.study-logo {
    color: var(--study-green);
    text-decoration: none;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -1px;
}

.study-nav {
    display: flex;
    gap: 32px;
}

    .study-nav a {
        color: #d7e6f6;
        text-decoration: none;
        font-size: 18px;
    }

        .study-nav a:hover {
            color: var(--study-green);
        }

/* -------------------------
   CONTENEDOR
-------------------------- */

.study-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 56px 0 100px;
}

/* -------------------------
   BREADCRUMBS
-------------------------- */

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 34px;
    color: var(--study-muted);
    font-size: 14px;
}

    .breadcrumbs a {
        color: var(--study-green);
        text-decoration: none;
    }

        .breadcrumbs a:hover {
            text-decoration: underline;
        }

/* -------------------------
   HERO
-------------------------- */

.study-hero {
    margin-bottom: 52px;
}

.study-eyebrow {
    display: block;
    margin-bottom: 15px;
    color: var(--study-green);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.study-hero h1 {
    max-width: 850px;
    margin: 0 0 16px;
    color: var(--study-text);
    font-size: clamp(42px, 6vw, 72px);
    line-height: .98;
    letter-spacing: -3px;
}

.study-hero p {
    max-width: 680px;
    margin: 0;
    color: var(--study-muted);
    font-size: 19px;
    line-height: 1.65;
}

.level-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    padding: 8px 14px;
    margin-bottom: 16px;
    border: 1px solid rgba(69, 229, 207, .35);
    border-radius: 999px;
    background: rgba(69, 229, 207, .10);
    color: var(--study-green);
    font-size: 14px;
    font-weight: 900;
}

/* -------------------------
   NIVELES / RAMAS
-------------------------- */

.level-grid,
.branch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.level-card,
.branch-card {
    position: relative;
    display: block;
    min-height: 170px;
    padding: 26px;
    overflow: hidden;
    border: 1px solid var(--study-border);
    border-radius: 22px;
    background: linear-gradient( 145deg, rgba(13, 47, 81, .95), rgba(7, 32, 58, .95) );
    color: var(--study-text);
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

    .level-card:hover,
    .branch-card:hover {
        transform: translateY(-4px);
        border-color: rgba(69, 229, 207, .65);
        background: linear-gradient( 145deg, rgba(16, 61, 101, .98), rgba(8, 39, 69, .98) );
    }

    .level-card h2,
    .branch-card h2 {
        margin: 8px 0 10px;
        font-size: 25px;
        line-height: 1.15;
    }

    .level-card p,
    .branch-card p {
        margin: 0;
        color: var(--study-muted);
    }

/* -------------------------
   TOPICS: CAMINO DE JUEGO
-------------------------- */

.topic-path {
    display: grid;
    gap: 14px;
    max-width: 800px;
}

.topic-node {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 25px;
    border: 1px solid var(--study-border);
    border-radius: 18px;
    background: rgba(10, 41, 72, .85);
    color: var(--study-text);
    text-decoration: none;
    transition: .18s ease;
}

    .topic-node:hover {
        transform: translateX(7px);
        border-color: var(--study-yellow);
        background: var(--study-card-hover);
    }

    .topic-node h2 {
        margin: 0;
        font-size: 20px;
    }

    .topic-node p {
        margin: 0;
        color: var(--study-muted);
        white-space: nowrap;
    }

/* -------------------------
   TOPIC
-------------------------- */

.topic-hero {
    max-width: 900px;
    padding: 42px;
    border: 1px solid var(--study-border);
    border-radius: 28px;
    background: linear-gradient( 145deg, rgba(12, 47, 81, .95), rgba(7, 29, 53, .95) );
}

    .topic-hero h1 {
        margin: 0 0 18px;
        font-size: clamp(38px, 5vw, 62px);
        line-height: 1;
        letter-spacing: -2px;
    }

    .topic-hero p {
        margin-bottom: 28px;
        color: var(--study-muted);
        font-size: 18px;
    }

/* -------------------------
   BOTONES
-------------------------- */

.study-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 22px;
    border-radius: 13px;
    background: var(--study-yellow);
    color: #082038;
    text-decoration: none;
    font-weight: 900;
    transition: transform .15s ease, filter .15s ease;
}

    .study-btn:hover {
        transform: translateY(-2px);
        filter: brightness(1.05);
    }

/* -------------------------
   MOBILE
-------------------------- */

@media (max-width: 700px) {

    .study-header {
        height: 72px;
    }

    .study-header-inner {
        width: calc(100% - 28px);
    }

    .study-logo {
        font-size: 23px;
    }

    .study-nav {
        gap: 16px;
    }

        .study-nav a {
            font-size: 15px;
        }

    .study-shell {
        width: calc(100% - 28px);
        padding-top: 35px;
    }

    .study-hero h1 {
        letter-spacing: -2px;
    }

    .topic-hero {
        padding: 26px;
    }

    .topic-node {
        align-items: flex-start;
        flex-direction: column;
    }
}
.study-shell-narrow {
    max-width: 980px;
}

.study-shell-topic {
    max-width: 1050px;
}


/* BRANCH / TOPICS */

.topic-list {
    display: grid;
    gap: 14px;
}

.topic-row {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 22px 25px;
    border: 1px solid var(--study-border);
    border-radius: 20px;
    background: rgba(10, 41, 72, .82);
    color: var(--study-text);
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

    .topic-row:hover {
        transform: translateX(7px);
        border-color: rgba(69, 229, 207, .7);
        background: var(--study-card-hover);
    }

.topic-index {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border-radius: 16px;
    background: rgba(69, 229, 207, .12);
    border: 1px solid rgba(69, 229, 207, .3);
    color: var(--study-green);
    font-weight: 900;
}

.topic-info {
    flex: 1;
}

.topic-label {
    display: block;
    margin-bottom: 5px;
    color: var(--study-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.topic-info h2 {
    margin: 0;
    font-size: 21px;
}

.topic-arrow {
    color: var(--study-yellow);
    font-size: 25px;
}


/* TOPIC HEADER */

.topic-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 55px;
}

    .topic-header h1 {
        max-width: 760px;
        margin: 0;
        font-size: clamp(42px, 6vw, 70px);
        line-height: 1;
        letter-spacing: -2.5px;
    }

.topic-intro {
    max-width: 680px;
    margin: 18px 0 0;
    color: var(--study-muted);
    font-size: 18px;
    line-height: 1.65;
}

.topic-stats {
    display: flex;
    gap: 10px;
}

    .topic-stats > div {
        min-width: 100px;
        padding: 15px 18px;
        border: 1px solid var(--study-border);
        border-radius: 16px;
        background: rgba(10, 41, 72, .75);
        text-align: center;
    }

    .topic-stats strong {
        display: block;
        color: var(--study-green);
        font-size: 22px;
    }

    .topic-stats span {
        color: var(--study-muted);
        font-size: 12px;
    }


/* LESSON */

.lesson-section {
    margin: 48px 0;
}

.lesson-section-title {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 15px;
}

    .lesson-section-title > span {
        font-size: 25px;
    }

    .lesson-section-title small {
        color: var(--study-green);
        font-size: 10px;
        font-weight: 900;
        letter-spacing: 1.8px;
    }

    .lesson-section-title h2 {
        margin: 2px 0 0;
        font-size: 24px;
    }

.lesson-card {
    padding: 27px;
    border: 1px solid var(--study-border);
    border-radius: 20px;
    background: linear-gradient( 145deg, rgba(11, 42, 73, .94), rgba(7, 31, 55, .94) );
}

.lesson-rule {
    border-left: 4px solid var(--study-green);
}

.lesson-copy {
    color: #e4edf6;
    font-size: 17px;
    line-height: 1.8;
    white-space: pre-line;
}

.lesson-muted {
    margin: 0;
    color: var(--study-muted);
}


/* PRACTICE CTA */

.practice-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 28px;
    border: 1px solid rgba(255, 201, 87, .35);
    border-radius: 22px;
    background: rgba(255, 201, 87, .07);
}

    .practice-card strong {
        font-size: 20px;
    }

    .practice-card p {
        margin: 7px 0 0;
        color: var(--study-muted);
    }


@media (max-width: 760px) {

    .topic-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .topic-stats {
        width: 100%;
    }

        .topic-stats > div {
            flex: 1;
        }

    .practice-card {
        align-items: stretch;
        flex-direction: column;
    }

        .practice-card .study-btn {
            width: 100%;
        }
}
/* =========================
   TABLE
========================= */

.table-wrapper {
    overflow-x: auto;
}

.study-table {
    width: 100%;
    border-collapse: collapse;
}

    .study-table th,
    .study-table td {
        padding: 16px 18px;
        text-align: left;
        border-bottom: 1px solid rgba(255, 255, 255, .08);
    }

    .study-table th {
        color: var(--study-green);
        font-size: 12px;
        font-weight: 900;
        letter-spacing: .8px;
        text-transform: uppercase;
    }

    .study-table td {
        color: #e3edf7;
    }


/* =========================
   EXAMPLES
========================= */

.example-list {
    display: grid;
    gap: 12px;
}

.example-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 22px;
    border: 1px solid var(--study-border);
    border-radius: 18px;
    background: rgba(10, 41, 72, .78);
}

.example-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.example-en {
    color: var(--study-text);
    font-size: 18px;
}

.example-es {
    color: var(--study-muted);
    font-size: 15px;
}


/* =========================
   AUDIO
========================= */

.audio-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 9px;
    border: 1px solid rgba(69, 229, 207, .35);
    border-radius: 13px;
    background: rgba(69, 229, 207, .10);
    color: var(--study-green);
    cursor: pointer;
}

    .audio-button:hover {
        background: rgba(69, 229, 207, .18);
    }

.audio-button-large {
    width: auto;
    margin: 10px 0 20px;
    padding: 11px 16px;
}


/* =========================
   PRACTICE
========================= */

.practice-question {
    padding: 28px;
    border: 1px solid var(--study-border);
    border-radius: 22px;
    background: linear-gradient( 145deg, rgba(11, 42, 73, .95), rgba(7, 31, 55, .95) );
}

.practice-instruction {
    display: block;
    margin-bottom: 10px;
    color: var(--study-green);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.practice-question h3 {
    margin: 0;
    font-size: 25px;
}

.practice-translation {
    margin: 8px 0 20px;
    color: var(--study-muted);
}

.practice-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.practice-option {
    padding: 15px 18px;
    border: 1px solid var(--study-border);
    border-radius: 14px;
    background: rgba(255, 255, 255, .035);
    color: var(--study-text);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

    .practice-option:hover {
        transform: translateY(-2px);
        border-color: var(--study-green);
    }

    .practice-option.is-correct {
        border-color: var(--study-green);
        background: rgba(69, 229, 207, .16);
    }

    .practice-option.is-wrong {
        border-color: #ff7184;
        background: rgba(255, 113, 132, .12);
    }

.practice-tip {
    margin-top: 18px;
    color: var(--study-yellow);
    font-size: 14px;
}

.practice-result {
    margin-top: 18px;
    color: var(--study-green);
    font-weight: 900;
}


/* =========================
   FINAL CTA
========================= */

.topic-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
    margin-top: 70px;
    padding: 34px;
    border: 1px solid rgba(255, 201, 87, .35);
    border-radius: 25px;
    background: linear-gradient( 120deg, rgba(255, 201, 87, .09), rgba(69, 229, 207, .05) );
}

    .topic-cta h2 {
        margin: 3px 0 8px;
        font-size: 28px;
    }

    .topic-cta p {
        margin: 0;
        color: var(--study-muted);
    }


@media (max-width: 700px) {

    .topic-cta {
        align-items: stretch;
        flex-direction: column;
    }

        .topic-cta .study-btn {
            width: 100%;
        }

    .example-card {
        align-items: flex-start;
    }
}
.study-trail { width: min(1180px, calc(100% - 40px)); margin: 28px auto 0; }
.study-skip { position: absolute; top: -100px; padding: 12px; background: var(--study-bg); z-index: 10; }
.study-skip:focus { top: 4px; }
:focus-visible { outline: 3px solid var(--study-yellow); outline-offset: 4px; }
.study-pending { border-left: 4px solid var(--study-yellow); padding: 16px; background: var(--study-bg-soft); }
.study-siblings { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; margin-top: 40px; }
.shadow-controls { padding: 20px; border: 1px solid var(--study-border); border-radius: 18px; }
.shadow-controls button { padding: 12px 16px; margin: 4px; color: var(--study-text); background: var(--study-card); border: 1px solid var(--study-border); border-radius: 8px; cursor: pointer; font: inherit; }
.shadow-transcript { padding-left: 32px; line-height: 1.7; }
.shadow-transcript li { padding: 12px; margin: 8px 0; }
.shadow-transcript [aria-current] { outline: 2px solid var(--study-green); border-radius: 8px; }
[hidden] { display: none !important; }
.lesson-section li, .branch-card li { margin-block: 10px; }
.lesson-copy { line-height: 1.8; }
h1, h2, a, p, li { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .study-nav { gap: 16px; }
  .study-nav a { font-size: 15px; }
  .study-logo { font-size: 22px; }
  .study-shell { padding-top: 28px; }
  .topic-header { flex-direction: column; }
  .shadow-controls button { min-height: 44px; }
}
