/* ==========================================================================
   CHMODX · Hub de contenido
   Tema oscuro, misma identidad que el curso (verde, cian y amarillo).
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
    --bg: #000000;
    --bg-soft: #070707;
    --bg-card: #0c0c0c;
    --bg-elevated: #111111;
    --border: #1e1e1e;
    --border-soft: #161616;

    --text: #f5f5f5;
    --text-muted: #a1a1a1;
    --text-dim: #6b6b6b;

    --brand: #00e676;
    --brand-2: #00e5ff;
    --brand-dark: #00a854;
    --py-blue: #4b8bbe;
    --py-yellow: #ffd43b;

    --telegram: #2aabee;
    --telegram-deep: #0088cc;
    --danger: #ff4d4d;

    --grad-brand: linear-gradient(135deg, #00e676 0%, #00e5ff 100%);
    --grad-brand-soft: linear-gradient(135deg, rgba(0, 230, 118, .15) 0%, rgba(0, 229, 255, .12) 100%);
    --grad-text: linear-gradient(120deg, #00e676 0%, #00e5ff 55%, #ffd43b 100%);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, .6);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, .7);
    --shadow-lg: 0 20px 45px rgba(0, 0, 0, .75);

    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 24px;
    --container: 1200px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
[hidden] { display: none !important; }

h1, h2, h3, h4 {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    line-height: 1.15;
    letter-spacing: -0.02em;
    font-weight: 700;
    margin: 0;
}

p { margin: 0; }
ul, ol { margin: 0; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    top: -60px;
    left: 16px;
    z-index: 200;
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--brand);
    color: #00130a;
    font-weight: 700;
    font-size: 13px;
    transition: top .2s ease;
}

.skip-link:focus { top: 12px; }

:focus-visible {
    outline: 2px solid var(--brand-2);
    outline-offset: 3px;
}

.grad {
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.highlight { color: var(--brand); font-weight: 700; }

/* ---------- Botones ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 22px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    transition: transform .22s ease, box-shadow .22s ease, background .22s ease,
                color .22s ease, border-color .22s ease;
}

.btn-primary {
    background: var(--grad-brand);
    color: #00130a;
    box-shadow: 0 6px 20px rgba(0, 230, 118, .18);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 230, 118, .28);
}

.btn-outline {
    border-color: var(--border);
    background: rgba(255, 255, 255, .02);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--brand);
    color: var(--brand);
    transform: translateY(-2px);
}

.btn-telegram {
    background: var(--telegram);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(42, 171, 238, .2);
}

.btn-telegram:hover {
    background: #3cb7f5;
    transform: translateY(-2px);
}

.btn-sm { padding: 9px 15px; font-size: 13px; border-radius: 9px; }
.btn-lg { padding: 15px 26px; font-size: 15.5px; }

/* ---------- Cabecera ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(0, 0, 0, .84);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-soft);
}

.navbar { padding: 12px 0; }

.nav-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.01em;
    flex-shrink: 0;
}

.brand-logo {
    width: auto;
    height: 40px;
    filter: drop-shadow(0 0 12px rgba(0, 230, 118, .35));
    transition: transform .25s ease;
}

.nav-logo:hover .brand-logo { transform: scale(1.05); }

.brand-name { color: var(--text); }

.brand-x {
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 26px;
    margin-left: auto;
    padding: 0;
    list-style: none;
}

.nav-links a {
    position: relative;
    display: inline-block;
    padding: 6px 0;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--text-muted);
    transition: color .2s ease;
}

.nav-links a:hover,
.nav-links a.is-active { color: var(--text); }

.nav-links a.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    border-radius: 2px;
    background: var(--grad-brand);
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-telegram-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--telegram);
    font-size: 16px;
    transition: border-color .2s ease, transform .2s ease;
}

.nav-telegram-link:hover {
    border-color: var(--telegram);
    transform: translateY(-2px);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    padding: 8px;
    font-size: 20px;
    color: var(--text);
}

.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 14px 24px 22px;
    border-top: 1px solid var(--border-soft);
    background: #050505;
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
    padding: 12px 4px;
    border-bottom: 1px solid var(--border-soft);
    font-weight: 600;
    color: var(--text-muted);
}

.mobile-menu a.btn {
    margin-top: 8px;
    border-bottom: none;
    color: #00130a;
}

.mobile-menu a.btn-telegram { color: #ffffff; }

/* ---------- Hero ---------- */
.hub-hero {
    position: relative;
    padding: 76px 0 46px;
    overflow: hidden;
}

.hub-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
}

.hub-glow-1 {
    top: -240px;
    left: -140px;
    width: 540px;
    height: 540px;
    background: #00e676;
    opacity: .28;
}

.hub-glow-2 {
    top: -200px;
    right: -160px;
    width: 500px;
    height: 500px;
    background: #00e5ff;
    opacity: .16;
}

.hub-hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.12fr .88fr;
    gap: 56px;
    align-items: center;
}

.hub-hero-grid > * { min-width: 0; }

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 7px 13px;
    border: 1px solid rgba(0, 230, 118, .3);
    border-radius: 999px;
    background: rgba(0, 230, 118, .07);
    color: var(--brand);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.hub-title {
    font-size: clamp(2.15rem, 4.2vw, 3.2rem);
    line-height: 1.08;
    letter-spacing: -.035em;
    text-wrap: balance;
}

.hub-sub {
    max-width: 610px;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 16.5px;
    line-height: 1.7;
}

.hub-sub strong { color: var(--text); }
.hub-sub a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

.hero-search {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 590px;
    margin: 26px 0 20px;
    padding: 7px 7px 7px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg-card);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.hero-search:focus-within {
    border-color: rgba(0, 230, 118, .5);
    box-shadow: 0 0 0 3px rgba(0, 230, 118, .08);
}

.hero-search > i { color: var(--text-dim); font-size: 14px; }

.hero-search input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: none;
    color: var(--text);
    font-family: inherit;
    font-size: 14.5px;
}

.hero-search input::placeholder { color: var(--text-dim); }

.hub-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hub-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 22px;
    margin-top: 24px;
    padding: 0;
    list-style: none;
    font-size: 13.5px;
    color: var(--text-muted);
}

.hub-checks i { margin-right: 6px; color: var(--brand); }

/* ---------- Ventana de terminal ---------- */
.hub-visual { position: relative; }

.term-window {
    overflow: hidden;
    max-width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(180deg, #0d0d0d, #070707);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(0, 230, 118, .08);
}

.term-head {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-soft);
    background: #0a0a0a;
}

.window-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.term-title {
    margin-left: 8px;
    color: var(--text-dim);
    font-family: 'Fira Code', monospace;
    font-size: 11.5px;
}

.term-body {
    padding: 22px 20px;
    overflow-x: auto;
    color: var(--text-muted);
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    line-height: 2;
}

.term-body p { margin: 0; }
.term-prompt { color: var(--brand); }
.term-out { color: var(--text-dim); }
.term-accent { color: var(--brand-2); }

.term-cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    vertical-align: middle;
    background: var(--brand);
    animation: blink 1s steps(1) infinite;
}

.float-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(12, 12, 12, .95);
    box-shadow: var(--shadow-md);
    animation: floaty 6s ease-in-out infinite;
}

.float-card i { color: var(--brand); font-size: 18px; }
.float-card div { display: flex; flex-direction: column; line-height: 1.25; }
.float-card strong { font-size: 15px; }
.float-card span { color: var(--text-dim); font-size: 10.5px; }

.float-card-1 { top: -16px; right: -14px; }
.float-card-2 { bottom: -16px; left: -58px; animation-delay: -2.5s; }

/* ---------- Franja de datos ---------- */
.stat-strip {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 50px;
    padding: 18px 20px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    background: rgba(8, 8, 8, .72);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 13px;
}

.stat-item i { color: var(--brand); font-size: 15px; }
.stat-item strong { color: var(--text); }

/* ---------- Secciones ---------- */
.hub-section { padding: 84px 0; }

.hub-section-soft {
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
    background: linear-gradient(180deg, rgba(255, 255, 255, .016), transparent);
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 34px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--brand);
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.section-title { font-size: clamp(1.7rem, 3vw, 2.4rem); }

.section-sub {
    max-width: 650px;
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 15px;
}

.section-link {
    flex-shrink: 0;
    padding-bottom: 4px;
    color: var(--brand);
    font-size: 13.5px;
    font-weight: 700;
    white-space: nowrap;
}

.section-link i { margin-left: 5px; transition: transform .2s ease; }
.section-link:hover i { transform: translateX(3px); }

/* ---------- Tarjetas de contenido ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.content-card {
    display: flex;
    flex-direction: column;
    gap: 11px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--bg-card), #080808);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.content-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 230, 118, .4);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .55);
}

.card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.badge-ciberseguridad {
    border-color: rgba(255, 212, 59, .32);
    background: rgba(255, 212, 59, .08);
    color: var(--py-yellow);
}

.badge-python {
    border-color: rgba(0, 229, 255, .3);
    background: rgba(0, 229, 255, .07);
    color: var(--brand-2);
}

.badge-termux {
    border-color: rgba(0, 230, 118, .3);
    background: rgba(0, 230, 118, .07);
    color: var(--brand);
}

.badge-automatizacion {
    border-color: rgba(0, 230, 118, .24);
    background: rgba(0, 230, 118, .05);
    color: #7dffc0;
}

.card-level {
    flex-shrink: 0;
    color: var(--text-dim);
    font-size: 11px;
    white-space: nowrap;
}

.card-title { font-size: 18px; line-height: 1.3; }

.card-summary {
    color: var(--text-muted);
    font-size: 13.8px;
    line-height: 1.6;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.tag {
    padding: 3px 7px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-dim);
    font-family: 'Fira Code', monospace;
    font-size: 10.5px;
}

.card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 13px;
    border-top: 1px solid var(--border-soft);
    color: var(--text-dim);
    font-size: 11.5px;
}

.card-foot i { margin-right: 4px; color: var(--brand); }

.card-cta {
    color: var(--brand);
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
}

.card-cta i { transition: transform .2s ease; }
.content-card:hover .card-cta i { transform: translateX(3px); }

/* ---------- Categorías ---------- */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.cat-card {
    display: flex;
    flex-direction: column;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    transition: transform .25s ease, border-color .25s ease;
}

.cat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 229, 255, .4);
}

.cat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(0, 230, 118, .25);
    border-radius: 11px;
    background: var(--grad-brand-soft);
    color: var(--brand);
    font-size: 17px;
}

.cat-card h3 { margin: 14px 0 6px; font-size: 17px; }

.cat-card p {
    min-height: 60px;
    color: var(--text-muted);
    font-size: 13.5px;
    line-height: 1.55;
}

.cat-count {
    margin-top: 14px;
    color: var(--brand);
    font-size: 11.5px;
    font-weight: 700;
}

/* ---------- Ruta de aprendizaje ---------- */
.path-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    padding: 0;
    list-style: none;
    counter-reset: path;
}

.path-step {
    position: relative;
    padding: 26px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--bg-card), #080808);
}

.path-num {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--brand);
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
}

.path-step h3 { font-size: 18px; margin-bottom: 8px; }

.path-step p {
    color: var(--text-muted);
    font-size: 13.8px;
    line-height: 1.6;
}

.path-step a {
    display: inline-block;
    margin-top: 16px;
    color: var(--brand);
    font-size: 12.5px;
    font-weight: 700;
}

.path-step a i { margin-left: 5px; transition: transform .2s ease; }
.path-step a:hover i { transform: translateX(3px); }

/* ---------- Banda del curso ---------- */
.academy-band {
    position: relative;
    padding: 84px 0;
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
    background:
        radial-gradient(600px 300px at 12% 20%, rgba(0, 230, 118, .08), transparent 70%),
        radial-gradient(500px 300px at 90% 80%, rgba(0, 229, 255, .06), transparent 70%);
    overflow: hidden;
}

.academy-band-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: 44px;
    align-items: center;
}

.academy-band-copy p {
    max-width: 620px;
    margin-top: 14px;
    color: var(--text-muted);
    font-size: 15.5px;
}

.academy-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 18px;
    padding: 0;
    list-style: none;
    color: var(--text-muted);
    font-size: 14px;
}

.academy-list i { margin-right: 8px; color: var(--brand); }

.academy-offer {
    padding: 28px;
    border: 1px solid rgba(0, 230, 118, .3);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(0, 230, 118, .08), rgba(0, 0, 0, .45));
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
}

.academy-offer-label {
    color: var(--text-dim);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.academy-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 12px;
    margin: 10px 0 4px;
}

.academy-old {
    color: var(--text-dim);
    font-size: 22px;
    text-decoration: line-through;
    text-decoration-color: var(--danger);
}

.academy-new {
    color: var(--brand);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 50px;
    font-weight: 800;
    line-height: 1;
}

.academy-save {
    display: block;
    color: var(--py-yellow);
    font-size: 12px;
    font-weight: 700;
}

.academy-offer .btn { width: 100%; margin-top: 18px; }

.academy-note {
    display: block;
    margin-top: 10px;
    color: var(--text-dim);
    font-size: 10.5px;
}

.academy-note i { margin-right: 4px; color: var(--brand); }

/* ---------- Banda de Telegram ---------- */
.tg-band { padding: 0 0 84px; }

.tg-band-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 26px 30px;
    border: 1px solid rgba(42, 171, 238, .28);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(42, 171, 238, .09), rgba(0, 0, 0, .3));
}

.tg-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: var(--telegram);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.tg-band-copy h2 { font-size: 1.35rem; }

.tg-band-copy p {
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 13.5px;
}

/* ---------- Listados ---------- */
.listing-hero {
    position: relative;
    padding: 62px 0 40px;
    border-bottom: 1px solid var(--border-soft);
    overflow: hidden;
}

.listing-glow {
    position: absolute;
    top: -220px;
    right: -120px;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    background: #00e676;
    opacity: .12;
    filter: blur(90px);
    pointer-events: none;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin-bottom: 18px;
    color: var(--text-dim);
    font-size: 12.5px;
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--brand); }

.listing-title {
    max-width: 920px;
    font-size: clamp(2rem, 4vw, 3rem);
}

.listing-intro {
    max-width: 720px;
    margin-top: 14px;
    color: var(--text-muted);
    font-size: 16px;
}

.listing-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-top: 20px;
    color: var(--text-dim);
    font-size: 12.5px;
}

.listing-meta i { margin-right: 5px; color: var(--brand); }

.listing-body { padding: 42px 0 76px; }

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 20px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg-card);
}

.search-box {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 9px;
    min-width: 240px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #070707;
}

.search-box i { color: var(--text-dim); font-size: 13px; }

.search-box input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: none;
    color: var(--text);
    font-family: inherit;
    font-size: 13.5px;
}

.search-box input::placeholder { color: var(--text-dim); }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 600;
    transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.chip span {
    color: var(--text-dim);
    font-family: 'Fira Code', monospace;
    font-size: 10.5px;
}

.chip:hover { border-color: var(--brand); color: var(--text); }

.chip.is-active {
    border-color: rgba(0, 230, 118, .45);
    background: var(--grad-brand-soft);
    color: var(--brand);
}

.chip.is-active span { color: var(--brand); }

.result-count {
    margin-bottom: 18px;
    color: var(--text-dim);
    font-size: 12.5px;
}

.empty-state {
    padding: 60px 20px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    text-align: center;
}

.empty-state > i {
    margin-bottom: 14px;
    color: var(--text-dim);
    font-size: 30px;
}

.empty-state h2 { font-size: 1.4rem; margin-bottom: 6px; }

.empty-state p {
    margin-bottom: 18px;
    color: var(--text-muted);
    font-size: 14px;
}

/* ---------- Banda CTA ---------- */
.cta-band { padding: 0 0 84px; }

.cta-band-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(0, 230, 118, .08), rgba(0, 229, 255, .04));
}

.cta-band-inner h2 { max-width: 640px; font-size: 1.5rem; }

.cta-band-inner p {
    max-width: 620px;
    margin-top: 7px;
    color: var(--text-muted);
    font-size: 14px;
}

/* ---------- Artículos y repositorios ---------- */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 60;
    height: 3px;
    pointer-events: none;
}

#readingProgress {
    display: block;
    width: 0;
    height: 100%;
    background: var(--grad-brand);
    transition: width .1s linear;
}

.article-breadcrumb { padding-top: 30px; margin-bottom: 0; }

.article-hero {
    padding: 22px 0 34px;
    border-bottom: 1px solid var(--border-soft);
}

.article-title {
    max-width: 920px;
    margin: 12px 0 14px;
    font-size: clamp(2rem, 4vw, 3.1rem);
}

.article-summary {
    max-width: 780px;
    color: var(--text-muted);
    font-size: 17px;
    line-height: 1.65;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin-top: 20px;
    color: var(--text-dim);
    font-size: 12.5px;
}

.article-meta i { margin-right: 5px; color: var(--brand); }

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}

.article-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 44px;
    align-items: start;
    padding-top: 42px;
    padding-bottom: 84px;
}

.article-main { min-width: 0; }

.article-body {
    color: #d7d7d7;
    font-size: 16px;
    line-height: 1.75;
}

.article-body h2 {
    margin: 46px 0 14px;
    color: var(--text);
    font-size: 1.65rem;
    scroll-margin-top: 100px;
}

.article-body h3 {
    margin: 30px 0 10px;
    color: var(--text);
    font-size: 1.25rem;
    scroll-margin-top: 100px;
}

.article-body h2:first-child { margin-top: 0; }
.article-body p { margin: 0 0 16px; }

.article-body ul,
.article-body ol {
    margin: 0 0 18px;
    padding-left: 22px;
    color: #d7d7d7;
}

.article-body li { margin-bottom: 8px; }

.article-body a {
    color: var(--brand-2);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Los botones dentro del artículo conservan su propio color y no se subrayan */
.article-body .btn { text-decoration: none; }
.article-body .btn-primary { color: #00130a; }
.article-body .btn-outline { color: var(--text); }
.article-body .btn-outline:hover { color: var(--brand); }
.article-body .btn-telegram { color: #ffffff; }

.article-body strong { color: #ffffff; }

.article-body code {
    padding: 2px 5px;
    border: 1px solid rgba(0, 230, 118, .18);
    border-radius: 5px;
    background: rgba(0, 230, 118, .08);
    color: var(--brand);
    font-family: 'Fira Code', monospace;
    font-size: .88em;
}

.article-body blockquote {
    margin: 22px 0;
    padding: 16px 20px;
    border-left: 3px solid var(--brand);
    border-radius: 0 10px 10px 0;
    background: rgba(0, 230, 118, .05);
    color: var(--text-muted);
}

.article-body blockquote p:last-child { margin-bottom: 0; }

.article-body hr {
    margin: 32px 0;
    border: 0;
    border-top: 1px solid var(--border);
}

.article-body img { margin: 20px 0; border-radius: 12px; }

/* Bloques de código (editor) */
.code-block {
    margin: 22px 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #000000;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .35);
}

.code-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--border-soft);
    background: #0a0a0a;
}

.code-dots {
    display: inline-flex;
    gap: 6px;
}

.code-dots i {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
    background: #ff5f57;
}

.code-dots i:nth-child(2) { background: #febc2e; }
.code-dots i:nth-child(3) { background: #28c840; }

.code-lang {
    color: var(--text-dim);
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: lowercase;
    margin-right: auto;
}

.code-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 11.5px;
    font-weight: 600;
    background: transparent;
    cursor: pointer;
    transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.code-copy:hover { border-color: var(--brand); color: var(--brand); }

.code-copy.is-copied {
    border-color: var(--brand);
    background: var(--brand);
    color: #00130a;
}

.code-copy.is-error {
    border-color: var(--py-yellow);
    color: var(--py-yellow);
}

.code-block pre.line-numbers {
    margin: 0;
    padding: 14px 18px 14px 0;
    overflow-x: auto;
    color: #d7d7d7;
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    line-height: 1.7;
    tab-size: 4;
    background: #000000;
}

.code-block pre code,
.article-body .code-block pre code {
    padding: 0;
    border: none;
    background: none;
    color: inherit;
    font-size: inherit;
}

/* Prism line numbers */
.code-block .line-numbers-rows {
    border-right: 1px solid var(--border-soft);
    padding-top: 14px;
}

.code-block .line-numbers-rows > span::before {
    color: var(--text-dim);
    font-size: 12px;
    padding-right: 12px;
}

/* Prism tokens (hacker palette) */
.code-block .token.comment,
.code-block .token.prolog,
.code-block .token.doctype,
.code-block .token.cdata { color: #5c6b7a; font-style: italic; }

.code-block .token.punctuation { color: #abb2bf; }
.code-block .token.property,
.code-block .token.tag,
.code-block .token.boolean,
.code-block .token.number,
.code-block .token.constant,
.code-block .token.symbol,
.code-block .token.deleted { color: #ffd43b; }

.code-block .token.selector,
.code-block .token.attr-name,
.code-block .token.string,
.code-block .token.char,
.code-block .token.builtin,
.code-block .token.inserted { color: #00e676; }

.code-block .token.operator,
.code-block .token.entity,
.code-block .token.url { color: #00e5ff; }

.code-block .token.atrule,
.code-block .token.attr-value,
.code-block .token.keyword { color: #00e5ff; font-weight: 500; }

.code-block .token.function { color: #7dd3fc; }
.code-block .token.class-name { color: #ffd43b; font-weight: 600; }
.code-block .token.regex,
.code-block .token.important { color: #ff7b72; }

.code-block .token.important,
.code-block .token.bold { font-weight: 700; }
.code-block .token.italic { font-style: italic; }

.code-block ::selection { background: rgba(0, 230, 118, .25); }

/* scrollbar */
.code-block pre::-webkit-scrollbar { height: 8px; }
.code-block pre::-webkit-scrollbar-thumb { background: #1f2937; border-radius: 4px; }
.code-block pre::-webkit-scrollbar-track { background: transparent; }

/* Tablas */
.table-wrap {
    margin: 22px 0;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.article-body th,
.article-body td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-soft);
    text-align: left;
    vertical-align: top;
}

.article-body th {
    background: #0c0c0c;
    color: var(--text);
    font-size: 11.5px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.article-body tr:last-child td { border-bottom: none; }

/* Avisos */
.callout {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px 18px;
    border: 1px solid rgba(0, 229, 255, .25);
    border-radius: 12px;
    background: rgba(0, 229, 255, .06);
    color: var(--text-muted);
    font-size: 14px;
}

.callout > i { margin-top: 2px; color: var(--brand-2); font-size: 18px; }
.callout p { margin: 0; }

.callout-warn {
    border-color: rgba(255, 212, 59, .3);
    background: rgba(255, 212, 59, .06);
}

.callout-warn > i { color: var(--py-yellow); }

/* CTA dentro del artículo */
.cta-code {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin: 16px 0 28px;
    padding: 14px 16px;
    border: 1px solid rgba(0, 230, 118, .22);
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(0, 230, 118, .07), rgba(0, 229, 255, .04));
}

.cta-code-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(0, 230, 118, .28);
    border-radius: 9px;
    background: rgba(0, 230, 118, .1);
    color: var(--brand);
    font-size: 14px;
}

.cta-code p {
    flex: 1;
    min-width: 220px;
    margin: 0;
    color: var(--text-muted);
    font-size: 13.5px;
    line-height: 1.55;
}

.cta-code p strong { color: var(--text); }

.cta-end {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
    margin-top: 48px;
    padding: 30px;
    border: 1px solid rgba(0, 230, 118, .3);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(0, 230, 118, .09), rgba(0, 229, 255, .04));
}

.cta-end-copy h2 { margin-bottom: 8px; font-size: 1.5rem; }

.cta-end-copy p {
    color: var(--text-muted);
    font-size: 14px;
}

.cta-end-actions {
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-width: 220px;
}

/* Repositorio */
.repo-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg-card);
}

.repo-meta dt {
    margin-bottom: 4px;
    color: var(--text-dim);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.repo-meta dd {
    margin: 0;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}

.repo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

/* ---------- Barra lateral ---------- */
.article-side {
    position: sticky;
    top: 92px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.toc {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg-card);
}

.toc-title {
    margin-bottom: 10px;
    color: var(--text-dim);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.toc ol {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 0;
    list-style: none;
}

.toc a {
    display: block;
    padding-left: 9px;
    border-left: 2px solid transparent;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.4;
    transition: color .2s ease, border-color .2s ease;
}

.toc a:hover,
.toc a.is-active {
    border-left-color: var(--brand);
    color: var(--brand);
}

.toc-l3 a {
    padding-left: 20px;
    color: var(--text-dim);
    font-size: 12.5px;
}

.sidebar-card {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: linear-gradient(180deg, var(--bg-card), #080808);
}

.sidebar-kicker {
    display: inline-block;
    margin-bottom: 6px;
    color: var(--brand);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.sidebar-card h2 { margin-bottom: 8px; font-size: 17px; }

.sidebar-card p {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.55;
}

.sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 12px 0 16px;
    padding: 0;
    list-style: none;
    color: var(--text-muted);
    font-size: 12.5px;
}

.sidebar-list i { margin-right: 6px; color: var(--brand); }

.sidebar-card .btn { width: 100%; }

.sidebar-note {
    display: block;
    margin-top: 9px;
    color: var(--text-dim);
    font-size: 10.5px;
    text-align: center;
}

.sidebar-academy {
    border-color: rgba(0, 230, 118, .3);
    background: linear-gradient(180deg, rgba(0, 230, 118, .07), #080808);
}

.sidebar-tg {
    border-color: rgba(42, 171, 238, .3);
    background: linear-gradient(180deg, rgba(42, 171, 238, .07), #080808);
}

.sidebar-tg .sidebar-kicker { color: var(--telegram); }

.related {
    margin-top: 54px;
    padding-top: 34px;
    border-top: 1px solid var(--border-soft);
}

.related h2 { margin-bottom: 18px; font-size: 1.5rem; }

/* ---------- Captura de correo ---------- */
.lead-band { padding: 0 0 84px; }

.lead-band-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 30px;
    border: 1px solid rgba(0, 230, 118, .22);
    border-radius: 18px;
    background:
        radial-gradient(520px 220px at 8% 0%, rgba(0, 230, 118, .09), transparent 70%),
        linear-gradient(135deg, rgba(0, 230, 118, .05), rgba(0, 229, 255, .03));
}

.lead-copy { max-width: 560px; }
.lead-copy .section-title { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.lead-copy p { margin-top: 8px; color: var(--text-muted); font-size: 14px; }

.lead-form { flex-shrink: 0; width: min(430px, 100%); }

.lead-field {
    display: flex;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-card);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.lead-field:focus-within {
    border-color: rgba(0, 230, 118, .55);
    box-shadow: 0 0 0 3px rgba(0, 230, 118, .10);
}

.lead-field input[type="email"] {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: none;
    outline: none;
    background: none;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
}

.lead-field input[type="email"]::placeholder { color: var(--text-dim); }

.lead-field .btn {
    padding: 11px 18px;
    font-size: 13px;
    white-space: nowrap;
}

.lead-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.lead-status {
    min-height: 18px;
    margin-top: 8px;
    padding-left: 2px;
    font-size: 12px;
    line-height: 1.4;
}

.lead-status.is-ok { color: var(--brand); }
.lead-status.is-error { color: var(--danger); }
.lead-status.is-pending { color: var(--text-dim); }

.lead-form-wide {
    width: 100%;
    margin-top: 22px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg-card);
}

.lead-form-wide .lead-copy-inline {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 12px;
}

.lead-form-wide .lead-copy-inline strong { font-size: 14.5px; }
.lead-form-wide .lead-copy-inline span { font-size: 12.5px; color: var(--text-dim); }

@media (max-width: 900px) {
    .lead-band-inner { flex-direction: column; align-items: flex-start; }
    .lead-form { width: 100%; }
}

@media (max-width: 560px) {
    .lead-field { flex-direction: column; }
    .lead-field .btn { width: 100%; }
}

/* ---------- Pie ---------- */
.site-footer {
    padding: 60px 0 26px;
    border-top: 1px solid var(--border-soft);
    background: #030303;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 36px;
}

.footer-brand .nav-logo { margin-bottom: 14px; }
.brand-logo-footer { height: 46px; }

.footer-description {
    max-width: 380px;
    color: var(--text-muted);
    font-size: 13.5px;
}

.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 16px;
    transition: all .22s ease;
}

.footer-social a:hover {
    border-color: transparent;
    background: var(--grad-brand);
    color: #00130a;
    transform: translateY(-3px);
}

.footer-col h4 {
    margin-bottom: 14px;
    color: var(--text);
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.footer-col a {
    display: block;
    margin-bottom: 9px;
    color: var(--text-muted);
    font-size: 13.5px;
    transition: color .2s ease;
}

.footer-col a:hover { color: var(--brand); }

.footer-bottom {
    padding-top: 22px;
    border-top: 1px solid var(--border-soft);
    color: var(--text-dim);
    font-size: 12.5px;
    text-align: center;
}

/* ---------- Barra fija móvil ---------- */
.sticky-cta {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 80;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 16px;
    border-top: 1px solid var(--border);
    background: rgba(5, 5, 5, .97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transform: translateY(100%);
    transition: transform .3s ease;
}

.sticky-cta.visible { transform: translateY(0); }

.sticky-price {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border: 1px solid rgba(0, 230, 118, .25);
    border-radius: 11px;
    background: linear-gradient(135deg, rgba(0, 230, 118, .1), rgba(0, 229, 255, .05));
}

.sticky-old {
    color: var(--text-dim);
    font-size: 11px;
    text-decoration: line-through;
}

.sticky-new {
    color: var(--brand);
    font-size: 17px;
    font-weight: 800;
}

.sticky-off {
    color: var(--py-yellow);
    font-size: 9.5px;
    font-weight: 700;
}

.sticky-off i { margin-right: 3px; }

/* ---------- Volver arriba ---------- */
.back-to-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 70;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 15px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .25s ease, visibility .25s ease, transform .25s ease,
                color .2s ease, border-color .2s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.back-to-top:hover {
    border-color: var(--brand);
    color: var(--brand);
}

/* ---------- Aviso para WebViews ---------- */
.inapp-modal {
    position: fixed;
    inset: 0;
    z-index: 95;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}

.inapp-modal.open { opacity: 1; visibility: visible; }

.inapp-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .74);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
}

.inapp-card {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 30px 26px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
    transform: translateY(18px);
    transition: transform .3s ease;
}

.inapp-modal.open .inapp-card { transform: translateY(0); }

.inapp-close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg-elevated);
    color: var(--text-muted);
    font-size: 15px;
    transition: color .25s ease, border-color .25s ease;
}

.inapp-close:hover { border-color: var(--brand); color: var(--text); }

.inapp-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 14px;
    padding: 6px 12px;
    border: 1px solid rgba(42, 171, 238, .32);
    border-radius: 999px;
    background: rgba(42, 171, 238, .12);
    color: var(--telegram);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.inapp-title {
    margin: 0 40px 12px 0;
    color: var(--text);
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.02em;
}

.inapp-desc {
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 14.5px;
    line-height: 1.6;
}

.inapp-desc strong { color: var(--text); }

.inapp-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.inapp-btn {
    width: 100%;
    min-height: 48px;
    justify-content: center;
    padding: 13px 18px;
    font-size: 14.5px;
}

.inapp-status {
    margin-top: 14px;
    color: var(--py-yellow);
    font-size: 13px;
    line-height: 1.55;
}

.inapp-url-wrap {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-soft);
    font-size: 12px;
}

.inapp-url-label {
    flex-shrink: 0;
    color: var(--text-dim);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.inapp-url {
    color: var(--brand-2);
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    word-break: break-all;
}

.inapp-url.destacar {
    padding: 2px 6px;
    border: 1px solid var(--brand-2);
    border-radius: 6px;
    background-color: rgba(0, 229, 255, .12);
}

.inapp-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: inapp;
}

.inapp-steps li {
    position: relative;
    padding-left: 38px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
    counter-increment: inapp;
}

.inapp-steps li::before {
    content: counter(inapp);
    position: absolute;
    top: 0;
    left: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(0, 230, 118, .3);
    border-radius: 50%;
    background: var(--grad-brand-soft);
    color: var(--brand);
    font-size: 12px;
    font-weight: 800;
}

.inapp-steps li strong { color: var(--text); }

@media (min-width: 620px) {
    .inapp-modal { align-items: center; }
    .inapp-card { transform: translateY(18px) scale(.97); }
    .inapp-modal.open .inapp-card { transform: translateY(0) scale(1); }
}

/* ---------- Animaciones ---------- */
@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .6s ease;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1120px) {
    .nav-links { gap: 18px; }
    .nav-telegram-link { display: none; }
}

@media (max-width: 1024px) {
    .nav-links,
    .nav-cta { display: none; }
    .nav-toggle { display: inline-flex; }

    .hub-hero { padding-top: 58px; }
    .hub-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
    .hub-visual { max-width: 580px; width: 100%; }

    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .path-grid { grid-template-columns: 1fr; }

    .academy-band-inner { grid-template-columns: 1fr; gap: 32px; }
    .academy-offer { max-width: 460px; }

    .article-shell { grid-template-columns: 1fr; gap: 36px; }
    .article-side { position: static; display: grid; grid-template-columns: 1fr 1fr; }
    .toc { grid-column: 1 / -1; }

    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 900px) {
    .cta-end { flex-direction: column; align-items: flex-start; }
    .cta-end-actions { width: 100%; flex-direction: row; flex-wrap: wrap; }
    .cta-end-actions .btn { flex: 1; min-width: 180px; }

    .cta-band-inner,
    .tg-band-inner { flex-direction: column; align-items: flex-start; }
    .cta-band-inner .btn,
    .tg-band-inner .btn { width: 100%; }
}

@media (max-width: 768px) {
    .container { padding: 0 18px; }

    .hub-hero { padding: 48px 0 34px; }
    .hub-title { font-size: clamp(2rem, 9vw, 2.7rem); }
    .hub-sub { font-size: 15.5px; }
    .hub-actions { flex-direction: column; }
    .hub-actions .btn { width: 100%; }
    .hero-search { flex-wrap: wrap; padding: 12px; }
    .hero-search input { flex: 1 1 100%; padding: 4px 2px; }
    .hero-search .btn { width: 100%; }

    .float-card-1 { top: -12px; right: 6px; }
    .float-card-2 { display: none; }

    .stat-strip { grid-template-columns: 1fr 1fr; margin-top: 36px; }

    .hub-section { padding: 62px 0; }
    .section-head { flex-direction: column; align-items: flex-start; gap: 14px; }
    .card-grid { grid-template-columns: 1fr; }
    .cat-grid { grid-template-columns: 1fr; }
    .cat-card p { min-height: 0; }

    .academy-band { padding: 62px 0; }
    .academy-offer { padding: 24px 20px; }
    .academy-new { font-size: 44px; }

    .tg-band { padding-bottom: 62px; }

    .listing-hero { padding: 46px 0 32px; }
    .listing-body { padding: 34px 0 58px; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .search-box { min-width: 0; width: 100%; max-width: 100%; overflow: hidden; }
    .search-box input { min-width: 0; width: 100%; max-width: 100%; }
    .chips { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; max-width: 100%; }
    .chip { flex-shrink: 0; }

    .article-shell { padding-top: 32px; padding-bottom: 62px; }
    .article-title { font-size: clamp(1.85rem, 7vw, 2.5rem); }
    .article-summary { font-size: 15.5px; }
    .article-body { font-size: 15.5px; }
    .article-body h2 { font-size: 1.45rem; }
    .article-body h3 { font-size: 1.15rem; }
    .article-side { grid-template-columns: 1fr; }
    .toc { grid-column: auto; }

    .repo-meta { grid-template-columns: 1fr 1fr; }
    .repo-actions .btn { width: 100%; }

    .cta-code { align-items: flex-start; }
    .cta-code .btn { width: 100%; }

    .cta-end { padding: 24px 20px; }
    .cta-end-actions { flex-direction: column; }
    .cta-end-actions .btn { width: 100%; }

    .sticky-cta { display: flex; }
    .back-to-top { bottom: 84px; }
    .site-footer { padding-bottom: 100px; }

    .footer-grid { grid-template-columns: 1fr; gap: 26px; }
}

@media (max-width: 480px) {
    .hub-title { font-size: 1.95rem; }
    .term-body { font-size: 11.5px; line-height: 1.9; }
    .float-card { display: none; }
    .stat-strip { grid-template-columns: 1fr; }
    .academy-new { font-size: 40px; }
    .repo-meta { grid-template-columns: 1fr; }
    .breadcrumb { font-size: 11.5px; }
    .inapp-card { padding: 26px 20px 20px; }
    .inapp-title { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }

    .reveal-on-scroll {
        opacity: 1;
        transform: none;
    }
}
