/* =========================================================
   PUBLIC.CSS — TSS Ciberseguridad · Páginas públicas
   Mobile-first · Variables CSS · Sin frameworks
   ========================================================= */

/* ---------- Design Tokens ---------- */
:root {
    --color-bg:           #0b0f19;
    --color-bg-alt:       #111827;
    --color-surface:      #1a2332;
    --color-surface-hover:#1f2b3d;
    --color-border:       #2a3548;
    --color-text:         #e2e8f0;
    --color-text-muted:   #94a3b8;
    --color-heading:      #f1f5f9;
    --color-accent:       #38bdf8;
    --color-accent-hover: #22d3ee;
    --color-accent-glow:  rgba(56, 189, 248, 0.15);
    --color-primary:      #2563eb;
    --color-primary-hover:#3b82f6;
    --color-success:      #22c55e;
    --color-cta-bg:       #0f1729;

    --font-family:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-base:     1rem;

    --radius-sm:          0.375rem;
    --radius-md:          0.625rem;
    --radius-lg:          1rem;
    --radius-xl:          1.5rem;

    --shadow-card:        0 1px 3px rgba(0,0,0,.3), 0 4px 20px rgba(0,0,0,.2);
    --shadow-lg:          0 10px 40px rgba(0,0,0,.35);

    --container-max:      1200px;
    --header-height:      72px;

    --transition:         0.2s ease;
}

/* ---------- Reset mínimo ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-accent-hover); }
ul { list-style: none; }
h1, h2, h3, h4 { color: var(--color-heading); line-height: 1.2; font-weight: 700; }

/* ---------- Accesibilidad ---------- */
.skip-link {
    position: absolute; top: -100%; left: 50%; transform: translateX(-50%);
    background: var(--color-accent); color: #000; padding: .5rem 1rem;
    border-radius: var(--radius-sm); z-index: 9999; font-weight: 600;
}
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* ---------- Container ---------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ---------- BTN ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: .625rem 1.5rem;
    font-family: var(--font-family); font-weight: 600; font-size: .9375rem;
    border-radius: var(--radius-md); border: 2px solid transparent;
    cursor: pointer; transition: all var(--transition); text-decoration: none;
    white-space: nowrap;
}
.btn-primary {
    background: var(--color-primary); color: #fff; border-color: var(--color-primary);
}
.btn-primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); color: #fff; }
.btn-outline {
    background: transparent; color: var(--color-accent); border-color: var(--color-accent);
}
.btn-outline:hover { background: var(--color-accent-glow); color: var(--color-accent-hover); border-color: var(--color-accent-hover); }
.btn-ghost {
    background: transparent; color: var(--color-text); border-color: var(--color-border);
}
.btn-ghost:hover { border-color: var(--color-text-muted); color: #fff; }
.btn-nav {
    background: var(--color-primary); color: #fff; border-color: var(--color-primary);
    padding: .5rem 1.25rem; font-size: .875rem;
}
.btn-nav:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); color: #fff; }
.btn-lg { padding: .875rem 2rem; font-size: 1.0625rem; border-radius: var(--radius-lg); }

/* ========================================
   HEADER
   ======================================== */
.site-header {
    position: sticky; top: 0; z-index: 100;
    height: var(--header-height);
    background: rgba(11, 15, 25, .85);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
}
.site-nav {
    display: flex; align-items: center; justify-content: space-between;
    height: var(--header-height);
}
.site-logo { display: flex; align-items: center; gap: .5rem; }
.site-logo img { height: 36px; width: auto; }
.logo-text { font-size: 1.25rem; font-weight: 800; color: var(--color-heading); }

/* Nav Toggle (móvil) */
.nav-toggle {
    display: flex; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: .5rem; z-index: 110;
}
.nav-toggle-bar {
    display: block; width: 24px; height: 2px; background: var(--color-text);
    border-radius: 2px; transition: all var(--transition);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Menu móvil */
.nav-menu {
    display: none; flex-direction: column; gap: .5rem;
    position: absolute; top: 100%; left: 0; right: 0;
    height: calc(100vh - var(--header-height)); height: calc(100dvh - var(--header-height));
    background: var(--color-bg-alt); padding: 2rem 1.25rem;
    overflow-y: auto; z-index: 105;
}
.nav-menu.is-open { display: flex; }
.nav-menu .nav-link {
    display: block; padding: .75rem 0; font-size: 1.125rem;
    color: var(--color-text-muted); font-weight: 500; border-bottom: 1px solid var(--color-border);
}
.nav-menu .nav-link.is-active,
.nav-menu .nav-link:hover { color: var(--color-accent); }
.nav-cta { padding-top: 1rem; }
.nav-cta .btn-nav { width: 100%; text-align: center; }

/* ========================================
   HERO
   ======================================== */
.hero {
    padding: 5rem 0 4rem;
    text-align: center;
    background:
        radial-gradient(ellipse at 50% 0%, var(--color-accent-glow), transparent 60%),
        var(--color-bg);
}
.hero-content { max-width: 780px; margin: 0 auto; }
.hero-badge {
    display: inline-block; padding: .4rem 1.25rem;
    background: var(--color-accent-glow); color: var(--color-accent);
    border: 1px solid rgba(56, 189, 248, .25); border-radius: 999px;
    font-size: .8125rem; font-weight: 700; letter-spacing: .03em;
    text-transform: uppercase; margin-bottom: 1.5rem;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; margin-bottom: 1.25rem; }
.text-accent { color: var(--color-accent); }
.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem); color: var(--color-text-muted);
    max-width: 600px; margin: 0 auto 2rem; line-height: 1.7;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-bottom: 3rem; }
.hero-stats {
    display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap;
    padding-top: 2rem; border-top: 1px solid var(--color-border);
}
.hero-stat { text-align: center; min-width: 120px; }
.hero-stat-number { display: block; font-size: 1.5rem; font-weight: 800; color: var(--color-accent); }
.hero-stat-label { font-size: .8125rem; color: var(--color-text-muted); }

/* ========================================
   DIFFERENTIATOR
   ======================================== */
.differentiator { padding: 5rem 0; background: var(--color-bg-alt); }
.diff-grid {
    display: grid; gap: 1.5rem;
    grid-template-columns: 1fr;
}
.diff-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.diff-card--accent {
    border-color: var(--color-accent);
    background: linear-gradient(135deg, rgba(56, 189, 248, .06), transparent 60%);
}
.diff-icon { color: var(--color-accent); margin-bottom: 1rem; }
.diff-card h3 { font-size: 1.125rem; margin-bottom: .5rem; }
.diff-card p { color: var(--color-text-muted); font-size: .9375rem; line-height: 1.65; }

/* ========================================
   AREAS
   ======================================== */
.areas { padding: 5rem 0; }
.areas-grid {
    display: grid; gap: 1.25rem;
    grid-template-columns: 1fr;
}
.area-card {
    display: flex; align-items: center; gap: 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
    text-decoration: none; color: inherit;
}
.area-card:hover {
    border-color: var(--color-accent); box-shadow: var(--shadow-card);
    transform: translateY(-3px); color: inherit;
}
.area-icon {
    display: flex; align-items: center; justify-content: center;
    width: 56px; height: 56px; flex-shrink: 0;
    background: var(--color-accent-glow); color: var(--color-accent);
    border-radius: var(--radius-md);
}
.area-card h3 { font-size: 1rem; color: var(--color-heading); margin-bottom: .2rem; }
.area-count { font-size: .8125rem; color: var(--color-text-muted); }

/* ========================================
   TEAMS SECTION (Red / Blue / Purple)
   ======================================== */
.teams-section {
    padding: 5rem 0;
    background: var(--color-bg-alt);
    position: relative;
    overflow: hidden;
}
.teams-kicker {
    text-align: center;
    font-size: .8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: var(--color-accent);
    margin-bottom: .5rem;
}
.teams-headline {
    font-size: clamp(1.75rem, 4vw, 3rem);
    text-align: center;
    margin-bottom: .75rem;
    font-weight: 800;
    line-height: 1.15;
}
.teams-neon {
    background: linear-gradient(90deg, #ef4444 0%, #a855f7 50%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    position: relative;
}
.teams-neon::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    background: linear-gradient(90deg, #ef4444 0%, #a855f7 50%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: blur(12px);
    opacity: .5;
    pointer-events: none;
    z-index: -1;
}
.teams-subtitle {
    text-align: center;
    color: var(--color-text-muted);
    max-width: 620px;
    margin: 0 auto 3rem;
    font-size: 1.0625rem;
    line-height: 1.6;
}
.teams-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}
.team-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 420px;
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: #fff;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255, 255, 255, .08);
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.team-card:hover {
    transform: translateY(-6px);
    color: #fff;
}
.team-card-red:hover    { border-color: rgba(239, 68, 68, .5); box-shadow: 0 20px 50px -12px rgba(239, 68, 68, .25); }
.team-card-blue:hover   { border-color: rgba(59, 130, 246, .5); box-shadow: 0 20px 50px -12px rgba(59, 130, 246, .25); }
.team-card-purple:hover { border-color: rgba(168, 85, 247, .5); box-shadow: 0 20px 50px -12px rgba(168, 85, 247, .25); }

/* Dark overlay with team-color tint */
.team-card-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    transition: opacity .3s ease;
}
.team-card-red .team-card-overlay {
    background: linear-gradient(to bottom,
        rgba(15, 5, 5, .3) 0%,
        rgba(20, 5, 5, .7) 30%,
        rgba(10, 2, 2, .92) 60%,
        rgba(8, 1, 1, .97) 100%);
}
.team-card-purple .team-card-overlay {
    background: linear-gradient(to bottom,
        rgba(15, 5, 20, .3) 0%,
        rgba(15, 5, 20, .7) 30%,
        rgba(8, 2, 12, .92) 60%,
        rgba(6, 1, 10, .97) 100%);
}
.team-card-blue .team-card-overlay {
    background: linear-gradient(to bottom,
        rgba(5, 10, 20, .3) 0%,
        rgba(5, 10, 25, .7) 30%,
        rgba(2, 5, 15, .92) 60%,
        rgba(1, 3, 12, .97) 100%);
}
.team-card:hover .team-card-overlay { opacity: .85; }

.team-card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 2rem 1.75rem;
    justify-content: flex-end;
}

.team-card-name {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: .15rem;
    letter-spacing: -.01em;
    color: #fff;
}

.team-card-role {
    font-size: .8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 1rem;
}
.team-card-red .team-card-role    { color: rgba(239, 68, 68, .8); }
.team-card-purple .team-card-role { color: rgba(168, 85, 247, .8); }
.team-card-blue .team-card-role   { color: rgba(96, 165, 250, .8); }

.team-card-desc {
    color: rgba(255, 255, 255, .75);
    font-size: .9375rem;
    line-height: 1.65;
    margin-bottom: 1.25rem;
}
.team-card-count {
    display: inline-block;
    font-size: .75rem;
    font-weight: 700;
    padding: .25rem .75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .7);
    border: 1px solid rgba(255, 255, 255, .12);
    margin-bottom: 1rem;
    width: fit-content;
}
.team-card-cta {
    display: block;
    font-size: .875rem;
    font-weight: 700;
    margin-top: auto;
    color: #fff;
    transition: all .2s ease;
}
.team-card:hover .team-card-cta { text-decoration: underline; }

/* ========================================
   TEAM FILTER PILLS (Catalog)
   ======================================== */
.catalog-filters-team {
    margin-top: .75rem;
}
.filter-pill-team {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem 1rem;
    border-radius: 999px;
    font-size: .8125rem;
    font-weight: 600;
    background: var(--color-surface);
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}
.filter-pill-team:hover {
    background: var(--color-surface-hover);
    border-color: var(--team-color, var(--color-accent));
    color: var(--color-heading);
}
.filter-pill-team.active {
    background: var(--team-color, var(--color-accent));
    color: #fff;
    border-color: var(--team-color, var(--color-accent));
}
.filter-pill-team.active .filter-count {
    background: rgba(0, 0, 0, .2);
    color: inherit;
}

/* Promotion badge on catalog card */
.catalog-card-promo {
    position: absolute;
    top: .5rem;
    right: .5rem;
    padding: .25rem .7rem;
    border-radius: var(--radius-sm);
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    background: rgba(245, 158, 11, .9);
    color: #fff;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(245, 158, 11, .4);
    box-shadow: 0 2px 8px rgba(245, 158, 11, .3);
}

/* ========================================
   SPECIAL PLANS
   ======================================== */
.special-plans { padding: 5rem 0; background: var(--color-bg-alt); }
.plans-grid {
    display: grid; gap: 1.5rem;
    grid-template-columns: 1fr;
}
.plan-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.plan-card:hover { border-color: var(--color-accent); box-shadow: var(--shadow-card); }
.plan-icon { color: var(--color-accent); margin-bottom: 1rem; }
.plan-card h3 { font-size: 1.125rem; margin-bottom: .5rem; }
.plan-card p { color: var(--color-text-muted); font-size: .9375rem; line-height: 1.65; margin-bottom: 1rem; }
.plan-link {
    display: inline-block; font-size: .875rem; font-weight: 600;
    color: var(--color-accent); transition: color var(--transition);
}
.plan-link:hover { color: var(--color-accent-hover); }

/* ========================================
   SECTION COMMON
   ======================================== */
.section-title {
    font-size: clamp(1.5rem, 3vw, 2.25rem); text-align: center; margin-bottom: .75rem;
}
.section-subtitle {
    text-align: center; color: var(--color-text-muted); max-width: 560px;
    margin: 0 auto 3rem; font-size: 1.0625rem;
}

/* ========================================
   FEATURES (legacy - kept for compat)
   ======================================== */
.features { padding: 5rem 0; background: var(--color-bg-alt); }
.features-grid {
    display: grid; gap: 1.5rem;
    grid-template-columns: 1fr;
}
.feature-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.feature-card:hover { border-color: var(--color-accent); box-shadow: var(--shadow-card); }
.feature-icon { font-size: 2rem; margin-bottom: 1rem; }
.feature-card h3 { font-size: 1.125rem; margin-bottom: .5rem; }
.feature-card p { color: var(--color-text-muted); font-size: .9375rem; }

/* ========================================
   COURSES PREVIEW
   ======================================== */
.courses-preview { padding: 5rem 0; }
.courses-grid {
    display: grid; gap: 1.5rem;
    grid-template-columns: 1fr;
}
.course-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    transition: transform var(--transition), box-shadow var(--transition);
}
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.course-tag {
    display: inline-block; padding: .25rem .75rem;
    background: var(--color-accent-glow); color: var(--color-accent);
    border-radius: var(--radius-sm); font-size: .8125rem; font-weight: 600;
    margin-bottom: 1rem;
}
.course-card h3 { font-size: 1.25rem; margin-bottom: .5rem; }
.course-card p { color: var(--color-text-muted); font-size: .9375rem; }

/* ========================================
   CTA
   ======================================== */
.cta {
    padding: 5rem 0;
    text-align: center;
    background:
        radial-gradient(ellipse at 50% 100%, var(--color-accent-glow), transparent 60%),
        var(--color-cta-bg);
}
.cta h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: .75rem; }
.cta p { color: var(--color-text-muted); margin-bottom: 2rem; max-width: 480px; margin-inline: auto; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
    padding: 3rem 0 1.5rem;
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
}
.footer-grid {
    display: grid; gap: 2rem;
    grid-template-columns: 1fr;
    margin-bottom: 2rem;
}
.footer-logo { font-weight: 700; font-size: 1.125rem; color: var(--color-heading); }
.footer-tagline { color: var(--color-text-muted); font-size: .875rem; margin-top: .25rem; }
.footer-links h3 { font-size: .875rem; font-weight: 600; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .75rem; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { color: var(--color-text-muted); font-size: .9375rem; }
.footer-links a:hover { color: var(--color-accent); }
.footer-bottom { border-top: 1px solid var(--color-border); padding-top: 1.5rem; text-align: center; }
.footer-bottom p { color: var(--color-text-muted); font-size: .8125rem; }

/* ========================================
   RESPONSIVE — Tablet (≥640px)
   ======================================== */
@media (min-width: 640px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .diff-grid     { grid-template-columns: repeat(2, 1fr); }
    .areas-grid    { grid-template-columns: repeat(2, 1fr); }
    .teams-grid    { grid-template-columns: repeat(3, 1fr); }
    .plans-grid    { grid-template-columns: repeat(3, 1fr); }
    .courses-grid  { grid-template-columns: repeat(2, 1fr); }
    .footer-grid   { grid-template-columns: 2fr 1fr 1fr; }
    .page-invitacion-webinar .footer-grid { grid-template-columns: 2fr 1fr; }
}

/* ========================================
   RESPONSIVE — Desktop (≥1024px)
   ======================================== */
@media (min-width: 1024px) {
    .container { padding: 0 2rem; }

    /* Nav desktop */
    .nav-toggle { display: none; }
    .nav-menu {
        display: flex; flex-direction: row; align-items: center; gap: .25rem;
        position: static; background: transparent; padding: 0;
        height: auto; overflow-y: visible; z-index: auto;
    }
    .nav-menu .nav-link {
        padding: .5rem .875rem; font-size: .9375rem; border-bottom: none;
        border-radius: var(--radius-sm);
    }
    .nav-menu .nav-link:hover { background: var(--color-accent-glow); }
    .nav-cta { padding-top: 0; margin-left: .75rem; }
    .nav-cta .btn-nav { width: auto; }

    /* Hero */
    .hero { padding: 7rem 0 5rem; }

    /* Differentiator */
    .diff-grid { grid-template-columns: repeat(4, 1fr); }

    /* Areas */
    .areas-grid { grid-template-columns: repeat(3, 1fr); }

    /* Features (legacy) */
    .features-grid { grid-template-columns: repeat(4, 1fr); }

    /* Courses */
    .courses-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ========================================
   CATALOG CARDS (shared: home + /catalogo)
   ======================================== */
.catalog-card {
    display: flex; flex-direction: column;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    text-decoration: none; color: inherit;
}
.catalog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent);
    color: inherit;
}
.catalog-card-img {
    position: relative;
    width: 100%; aspect-ratio: 16 / 9;
    overflow: hidden; background: var(--color-bg-alt);
}
.catalog-card-img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .35s ease;
}
.catalog-card:hover .catalog-card-img img { transform: scale(1.05); }
.catalog-card-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem; background: var(--color-bg-alt);
}
.catalog-card-body {
    flex: 1; padding: 1.25rem 1.25rem .75rem;
}
.catalog-card-body h3 {
    font-size: 1.1rem; margin-bottom: .5rem;
    color: var(--color-heading); line-height: 1.35;
}
.catalog-card-body p {
    color: var(--color-text-muted); font-size: .875rem; line-height: 1.55;
}
.catalog-card-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: .75rem 1.25rem 1.25rem; gap: .75rem;
}
.catalog-price {
    font-size: 1.25rem; font-weight: 700; color: var(--color-accent);
    white-space: nowrap; display: inline-flex; align-items: baseline; gap: .4rem;
}
.price-regular {
    font-size: .875em; font-weight: 500; color: var(--color-text-muted);
    text-decoration: line-through; opacity: .7;
}
.btn-sm { padding: .4rem 1rem; font-size: .8125rem; }
.section-cta { text-align: center; margin-top: 2.5rem; }

/* ========================================
   CATALOG PAGE (/catalogo)
   ======================================== */
.catalog-hero {
    padding: 4rem 0 2.5rem;
    text-align: center;
    background:
        radial-gradient(ellipse at 50% 0%, var(--color-accent-glow), transparent 60%),
        var(--color-bg);
}
.catalog-hero h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 800; }
.catalog-section { padding: 2rem 0 5rem; }
.catalog-count {
    color: var(--color-text-muted); font-size: .9375rem; margin-bottom: 1.5rem;
}
.catalog-grid {
    display: grid; gap: 1.5rem;
    grid-template-columns: 1fr;
}
.catalog-empty { text-align: center; padding: 4rem 0; color: var(--color-text-muted); }

/* Category filter pills */
.catalog-filters {
    display: flex; flex-wrap: nowrap; gap: .5rem;
    margin-bottom: 1.25rem;
    position: relative; z-index: 10;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding-bottom: .25rem;
    scrollbar-width: none;
}
.catalog-filters::-webkit-scrollbar { display: none; }
@media (min-width: 640px) {
    .catalog-filters { flex-wrap: wrap; overflow-x: visible; }
}
.filter-pill {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .45rem 1rem; border-radius: 999px;
    font-size: .8125rem; font-weight: 600;
    background: var(--color-surface); color: var(--color-text-muted);
    border: 1px solid var(--color-border); cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap; flex-shrink: 0;
}
.filter-pill:hover {
    background: var(--color-surface-hover); border-color: var(--color-accent); color: var(--color-heading);
}
.filter-pill.active {
    background: var(--color-accent); color: var(--color-bg);
    border-color: var(--color-accent);
}
.filter-pill.active .filter-count { background: rgba(0,0,0,.2); color: inherit; }
.filter-count {
    font-size: .6875rem; font-weight: 700;
    padding: .1rem .4rem; border-radius: 999px;
    background: var(--color-bg-alt); color: var(--color-text-muted);
    line-height: 1;
}

/* Category badge on card image */
.catalog-card-badge {
    position: absolute; bottom: .5rem; left: .5rem;
    padding: .2rem .6rem; border-radius: var(--radius-sm);
    font-size: .6875rem; font-weight: 700; letter-spacing: .02em;
    background: rgba(11, 15, 25, .75); color: var(--color-accent);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(56, 189, 248, .2);
}

/* Tag pills on cards */
.catalog-card-tags {
    display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .5rem;
}
.catalog-tag {
    font-size: .6875rem; padding: .15rem .5rem; border-radius: 999px;
    background: var(--color-bg-alt); color: var(--color-text-muted);
    border: 1px solid var(--color-border); line-height: 1.4;
    cursor: pointer; transition: all var(--transition); position: relative; z-index: 2;
}
.catalog-tag:hover {
    border-color: var(--color-accent); color: var(--color-heading);
    background: rgba(56, 189, 248, .08);
}
.catalog-tag.active {
    background: var(--color-accent); color: var(--color-bg);
    border-color: var(--color-accent);
}

@media (min-width: 640px) {
    .catalog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .catalog-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ========================================
   COURSE DETAIL (/catalogo/{slug})
   ======================================== */

/* Breadcrumb */
.breadcrumb {
    padding: 1rem 0; background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
}
.breadcrumb ol {
    display: flex; gap: .5rem; flex-wrap: wrap; align-items: center;
    font-size: .8125rem; color: var(--color-text-muted);
}
.breadcrumb li { display: flex; align-items: center; gap: .5rem; }
.breadcrumb li + li::before { content: '›'; color: var(--color-border); }
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-accent); }
.breadcrumb [aria-current] { color: var(--color-text); font-weight: 500; }

/* Layout */
.course-detail-section { padding: 2.5rem 0 4rem; }
.course-detail-layout {
    display: grid; gap: 2rem;
    grid-template-columns: 1fr;
}

/* Main content */
.course-detail-main h1 {
    font-size: clamp(1.5rem, 3.5vw, 2.25rem); margin-bottom: 1rem;
}
.course-detail-excerpt {
    font-size: 1.0625rem; color: var(--color-text-muted);
    margin-bottom: 1.5rem; line-height: 1.65;
}
.course-detail-hero-img {
    position: relative;
    border-radius: var(--radius-lg); overflow: hidden;
    margin-bottom: 2rem; aspect-ratio: 16 / 9;
}
.course-detail-hero-img img {
    width: 100%; height: 100%; object-fit: cover;
}

/* Long description (HTML from WP) */
.course-detail-content {
    color: var(--color-text); line-height: 1.75; font-size: .9375rem;
}
.course-detail-content p {
    margin-bottom: 1rem;
}
.course-detail-content h2 {
    font-size: 1.5rem; margin: 2rem 0 .75rem; color: var(--color-accent);
}
.course-detail-content h3 {
    font-size: 1.2rem; margin: 1.75rem 0 .5rem;
}
.course-detail-content ul {
    list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem;
}
.course-detail-content li {
    margin-bottom: .5rem; color: var(--color-text-muted);
}
.course-detail-content li strong { color: var(--color-text); }
.course-detail-content a { color: var(--color-accent); text-decoration: underline; }
.course-detail-content a:hover { color: var(--color-accent-hover); }
.course-detail-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 12px 0; }

/* Sidebar */
.course-sidebar-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.sidebar-thumb {
    width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
}
.sidebar-price {
    font-size: 2rem; font-weight: 800; color: var(--color-heading);
    padding: 1.25rem 1.25rem .5rem; text-align: center;
    display: flex; align-items: baseline; justify-content: center; gap: .5rem;
}
.sidebar-price .price-regular {
    font-size: 1.25rem; font-weight: 500; color: var(--color-text-muted);
    text-decoration: line-through; opacity: .7;
}
.sidebar-price .price-current { color: var(--color-accent); }
.btn-block { width: calc(100% - 2.5rem); margin: .75rem 1.25rem; }
.sidebar-payment-note {
    text-align: center; font-size: .75rem; color: var(--color-text-muted);
    padding: 0 1.25rem .75rem; line-height: 1.4;
}
/* Contenido del curso - accordion wrapper */
.sidebar-modules-accordion {
    border-top: 1px solid var(--color-border);
}
.sidebar-modules-toggle {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 1rem 1.25rem; cursor: pointer; user-select: none;
    background: none; border: none; font: inherit; color: inherit;
    -webkit-appearance: none; appearance: none;
}
.sidebar-modules-toggle span {
    font-size: .875rem; font-weight: 600; color: var(--color-text-muted);
    text-transform: uppercase; letter-spacing: .05em;
}
.accordion-chevron {
    flex-shrink: 0; color: var(--color-text-muted);
    transition: transform .2s ease;
}
.sidebar-modules-toggle[aria-expanded="true"] .accordion-chevron {
    transform: rotate(180deg);
}
.sidebar-modules-body {
    padding: 0 1.25rem 1rem;
}
/* Module blocks inside accordion */
.course-module-block {
    margin-bottom: .75rem;
}
.course-module-block:last-child { margin-bottom: 0; }
.module-header {
    display: flex; align-items: center; gap: .5rem; margin-bottom: .25rem;
}
.module-num {
    display: flex; align-items: center; justify-content: center;
    width: 1.5rem; height: 1.5rem; flex-shrink: 0;
    background: var(--color-accent-glow); color: var(--color-accent);
    border-radius: 50%; font-size: .7rem; font-weight: 700;
}
.module-title {
    font-size: .8125rem; font-weight: 600; color: var(--color-text); line-height: 1.3;
}
.module-lessons {
    list-style: none; padding: 0; margin: .125rem 0 0 2.25rem;
}
.module-lessons li {
    padding: .15rem 0; font-size: .75rem; color: var(--color-text-muted);
    line-height: 1.35; position: relative; padding-left: .75rem;
}
.module-lessons li::before {
    content: ''; position: absolute; left: 0; top: .55em;
    width: 4px; height: 4px; border-radius: 50%;
    background: var(--color-border);
}
.sidebar-features {
    padding: 1rem 1.25rem; border-top: 1px solid var(--color-border);
}
.sidebar-features ul { list-style: none; }
.sidebar-features li {
    padding: .375rem 0; font-size: .8125rem; color: var(--color-text-muted);
}

/* Desktop: 2 columnas */
@media (min-width: 1024px) {
    .course-detail-layout {
        grid-template-columns: 1fr 360px;
    }
    .course-detail-hero-img { display: none; } /* se ve en sidebar */
}

/* ==== Legal Pages ==== */
.legal-hero {
    background: linear-gradient(135deg, var(--color-surface), var(--color-bg-alt));
    padding: 3rem 0 2rem;
    border-bottom: 1px solid var(--color-border);
}
.legal-hero h1 {
    font-size: 2rem; font-weight: 700; color: #fff; margin: 0;
}
.legal-content {
    padding: 3rem 0 4rem;
}
.legal-body {
    max-width: 800px; color: var(--color-text); line-height: 1.8;
}
.legal-body h2 {
    font-size: 1.35rem; font-weight: 600; color: #fff;
    margin: 2.5rem 0 .75rem; padding-bottom: .5rem;
    border-bottom: 1px solid var(--color-border);
}
.legal-body h3 {
    font-size: 1.1rem; font-weight: 600; color: var(--color-text);
    margin: 1.5rem 0 .5rem;
}
.legal-body p { margin: 0 0 1rem; }
.legal-body ul, .legal-body ol {
    margin: 0 0 1rem 1.5rem; padding: 0;
}
.legal-body li { margin-bottom: .35rem; }
.legal-body a {
    color: var(--color-accent); text-decoration: underline;
}
.legal-body a:hover { color: #7dd3fc; }
.legal-body strong { color: #fff; }
@media (max-width: 640px) {
    .legal-hero { padding: 2rem 0 1.5rem; }
    .legal-hero h1 { font-size: 1.5rem; }
    .legal-content { padding: 2rem 0 3rem; }
}

/* ==== Cookie Banner ==== */
.cookie-banner {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
    background: var(--color-surface); border-top: 1px solid var(--color-border);
    padding: 1rem 1.5rem; display: flex; align-items: center;
    justify-content: center; gap: 1rem; flex-wrap: wrap;
    box-shadow: 0 -4px 24px rgba(0,0,0,.4);
    animation: cookieSlide .35s ease-out;
}
@keyframes cookieSlide {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}
.cookie-banner p {
    margin: 0; font-size: .875rem; color: var(--color-text-muted); flex: 1 1 300px;
}
.cookie-banner a {
    color: var(--color-accent); text-decoration: underline;
}
.cookie-banner-actions {
    display: flex; gap: .5rem; flex-shrink: 0;
}
.cookie-btn {
    padding: .5rem 1.25rem; border-radius: .375rem; font-size: .8125rem;
    font-weight: 600; cursor: pointer; border: none; transition: background .2s;
}
.cookie-btn-accept {
    background: var(--color-accent); color: #0b0f19;
}
.cookie-btn-accept:hover { background: #7dd3fc; }
.cookie-btn-reject {
    background: transparent; color: var(--color-text-muted);
    border: 1px solid var(--color-border);
}
.cookie-btn-reject:hover {
    background: rgba(255,255,255,.05); color: var(--color-text);
}

/* ====================================================
   TSS Chat — Widget flotante
   ==================================================== */

/* FAB (botón flotante) — chat */
.tc-fab {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--color-accent) 0%, #0ea5e9 100%);
    color: #0b0f19;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(56, 189, 248, .35), 0 0 30px rgba(56, 189, 248, .15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s, box-shadow .2s, opacity .3s;
    animation: tcPulse 3s ease-in-out infinite;
}
.tc-fab--contact {
    right: calc(1.5rem + 56px + .75rem);
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    box-shadow: 0 4px 16px rgba(14, 165, 233, .35), 0 0 24px rgba(6, 182, 212, .15);
    animation: tcPulseContact 3s ease-in-out infinite;
    bottom: calc(1.5rem + 4px);
}
.tc-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(56, 189, 248, .5), 0 0 40px rgba(14, 165, 233, .3);
}
.tc-fab--contact:hover {
    box-shadow: 0 6px 24px rgba(14, 165, 233, .5), 0 0 32px rgba(6, 182, 212, .3);
}
.tc-fab--hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(.5);
}
@keyframes tcPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(56, 189, 248, .35), 0 0 30px rgba(56, 189, 248, .15); }
    50% { box-shadow: 0 4px 25px rgba(14, 165, 233, .45), 0 0 40px rgba(6, 182, 212, .2); }
}
@keyframes tcPulseContact {
    0%, 100% { box-shadow: 0 4px 16px rgba(14, 165, 233, .35), 0 0 24px rgba(6, 182, 212, .15); }
    50% { box-shadow: 0 4px 20px rgba(56, 189, 248, .45), 0 0 32px rgba(14, 165, 233, .2); }
}

/* Panel del chat */
.tc-panel {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1001;
    width: min(380px, calc(100vw - 2rem));
    max-height: min(520px, calc(100vh - 3rem));
    background: rgba(11, 15, 25, .95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(56, 189, 248, .2);
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .5), 0 0 50px rgba(56, 189, 248, .08), inset 0 1px 0 rgba(56, 189, 248, .1);
    opacity: 0;
    transform: translateY(20px) scale(.95);
    pointer-events: none;
    transition: opacity .3s, transform .3s;
}
.tc-panel.tc-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Header */
.tc-header {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1rem;
    background: linear-gradient(135deg, rgba(56, 189, 248, .1) 0%, rgba(14, 165, 233, .1) 100%);
    border-bottom: 1px solid rgba(56, 189, 248, .15);
}
.tc-avatar { font-size: 1.3rem; line-height: 1; }
.tc-title {
    flex: 1;
    font-weight: 600;
    font-size: .95rem;
    color: var(--color-accent);
    letter-spacing: .03em;
}
.tc-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, .5);
    font-size: 1.4rem;
    cursor: pointer;
    padding: .25rem;
    line-height: 1;
    transition: color .2s;
}
.tc-close:hover { color: #f87171; }

/* Mensajes */
.tc-messages {
    flex: 1;
    overflow-y: auto;
    padding: .75rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    min-height: 200px;
    max-height: 340px;
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, .2) transparent;
}
.tc-messages::-webkit-scrollbar { width: 5px; }
.tc-messages::-webkit-scrollbar-track { background: transparent; }
.tc-messages::-webkit-scrollbar-thumb { background: rgba(56, 189, 248, .2); border-radius: 3px; }

.tc-msg { display: flex; }
.tc-msg--bot { justify-content: flex-start; }
.tc-msg--user { justify-content: flex-end; }

.tc-bubble {
    max-width: 85%;
    padding: .55rem .8rem;
    border-radius: .75rem;
    font-size: .85rem;
    line-height: 1.45;
    word-break: break-word;
}
.tc-msg--bot .tc-bubble {
    background: rgba(56, 189, 248, .08);
    border: 1px solid rgba(56, 189, 248, .15);
    color: var(--color-text);
    border-bottom-left-radius: .2rem;
}
.tc-msg--user .tc-bubble {
    background: linear-gradient(135deg, rgba(14, 165, 233, .25), rgba(56, 189, 248, .2));
    border: 1px solid rgba(14, 165, 233, .25);
    color: var(--color-text);
    border-bottom-right-radius: .2rem;
}

.tc-link {
    display: inline-block;
    color: #38bdf8;
    text-decoration: none;
    border-bottom: 1px dashed rgba(56, 189, 248, .5);
    padding-bottom: 1px;
    transition: color .2s, border-color .2s;
}

.tc-link:hover {
    color: #7dd3fc;
    border-bottom-color: #7dd3fc;
}

/* Typing indicator */
.tc-typing .tc-bubble {
    display: flex;
    gap: .3rem;
    padding: .7rem 1rem;
}
.tc-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-accent);
    animation: tcBounce .6s ease-in-out infinite;
}
.tc-dot:nth-child(2) { animation-delay: .15s; }
.tc-dot:nth-child(3) { animation-delay: .3s; }
@keyframes tcBounce {
    0%, 80%, 100% { transform: scale(.6); opacity: .4; }
    40% { transform: scale(1); opacity: 1; }
}

/* Input */
.tc-input-wrap {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .6rem .75rem;
    border-top: 1px solid rgba(56, 189, 248, .12);
    background: rgba(11, 15, 25, .6);
}
.tc-input-wrap.tc-disabled { opacity: .5; pointer-events: none; }

.tc-input {
    flex: 1;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(56, 189, 248, .15);
    border-radius: .5rem;
    padding: .45rem .65rem;
    color: var(--color-text);
    font-size: .85rem;
    outline: none;
    transition: border-color .2s;
    font-family: inherit;
}
.tc-input::placeholder { color: rgba(255, 255, 255, .3); }
.tc-input:focus { border-color: rgba(56, 189, 248, .4); }

.tc-send {
    background: none;
    border: none;
    color: var(--color-accent);
    cursor: pointer;
    padding: .35rem;
    display: flex;
    align-items: center;
    transition: color .2s, transform .15s;
}
.tc-send:hover { color: #0ea5e9; transform: scale(1.1); }
.tc-send:disabled { opacity: .3; cursor: default; }

/* Lead Form (inline) */
.tc-lead-form {
    background: rgba(56, 189, 248, .06);
    border: 1px solid rgba(56, 189, 248, .2);
    border-radius: .75rem;
    padding: .75rem;
    display: flex;
    flex-direction: column;
    gap: .45rem;
    max-width: 95%;
}
.tc-lead-title {
    font-size: .85rem;
    font-weight: 600;
    color: var(--color-accent);
    margin: 0 0 .15rem;
}
.tc-lead-input {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(56, 189, 248, .18);
    border-radius: .4rem;
    padding: .4rem .6rem;
    color: var(--color-text);
    font-size: .8rem;
    outline: none;
    transition: border-color .2s;
    font-family: inherit;
}
.tc-lead-input::placeholder { color: rgba(255, 255, 255, .35); }
.tc-lead-input:focus { border-color: rgba(56, 189, 248, .45); }

.tc-lead-consent {
    display: flex;
    align-items: flex-start;
    gap: .4rem;
    font-size: .7rem;
    color: rgba(255, 255, 255, .55);
    cursor: pointer;
    line-height: 1.35;
}
.tc-lead-consent input[type="checkbox"] {
    margin-top: .15rem;
    accent-color: var(--color-accent);
    flex-shrink: 0;
}
.tc-lead-consent a { color: var(--color-accent); text-decoration: underline; }
.tc-lead-consent a:hover { color: #7dd3fc; }

.tc-lead-submit {
    background: linear-gradient(135deg, rgba(56, 189, 248, .15), rgba(14, 165, 233, .2));
    border: 1px solid rgba(56, 189, 248, .25);
    border-radius: .4rem;
    color: var(--color-accent);
    font-size: .8rem;
    font-weight: 600;
    padding: .45rem;
    cursor: pointer;
    transition: background .2s, border-color .2s, transform .1s;
    font-family: inherit;
}
.tc-lead-submit:hover {
    background: linear-gradient(135deg, rgba(56, 189, 248, .25), rgba(14, 165, 233, .3));
    border-color: rgba(56, 189, 248, .4);
}
.tc-lead-submit:active { transform: scale(.97); }
.tc-lead-submit:disabled { opacity: .5; cursor: wait; }

.tc-lead-note {
    font-size: .65rem;
    color: rgba(255, 255, 255, .4);
    text-align: center;
    margin: 0;
}
.tc-lead-error {
    font-size: .72rem;
    color: #f87171;
    margin: 0;
    padding: .15rem 0;
}
.tc-lead-success {
    font-size: .82rem;
    color: var(--color-accent);
    text-align: center;
    padding: .5rem 0;
    margin: 0;
}

/* Responsive */
@media (max-width: 640px) {
    .tc-fab { bottom: 1rem; right: 1rem; width: 50px; height: 50px; }
    .tc-fab--contact { right: calc(1rem + 50px + .5rem); width: 42px; height: 42px; bottom: calc(1rem + 4px); }
    .tc-panel { bottom: 0; right: 0; width: 100vw; max-height: 85vh; border-radius: 1rem 1rem 0 0; }
}

/* =========================================================
   CHECKOUT — Flujo de compra
   ========================================================= */

.checkout-heading {
    font-size: 1.75rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    align-items: flex-start;
}

/* Alertas */
.checkout-alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: .9rem;
    line-height: 1.5;
}
.checkout-alert-error {
    background: rgba(239, 68, 68, .12);
    border: 1px solid rgba(239, 68, 68, .3);
    color: #fca5a5;
}
.checkout-alert-success {
    background: rgba(34, 197, 94, .12);
    border: 1px solid rgba(34, 197, 94, .3);
    color: #86efac;
}

/* Steps */
.checkout-step {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin-bottom: 1.25rem;
    overflow: hidden;
}
.step-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
}
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
    flex-shrink: 0;
}
.step-header h2 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}
.step-body {
    padding: 1.25rem;
}

/* Auth inline */
.auth-tabs {
    display: flex;
    gap: .5rem;
    margin-bottom: 1.25rem;
}
.auth-tab {
    flex: 1;
    padding: .625rem 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--color-text-muted);
    font: inherit;
    font-weight: 600;
    font-size: .875rem;
    cursor: pointer;
    transition: all var(--transition);
}
.auth-tab.is-active {
    border-color: var(--color-primary);
    background: rgba(37, 99, 235, .1);
    color: var(--color-accent);
}
.auth-inline-form .btn {
    width: 100%;
    margin-top: .5rem;
}
.checkout-link-small {
    display: block;
    text-align: center;
    margin-top: .75rem;
    font-size: .8rem;
    color: var(--color-text-muted);
}

/* Form */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}
.form-group label {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--color-text-muted);
}
.form-input {
    padding: .625rem .875rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg);
    color: var(--color-text);
    font: inherit;
    font-size: .9rem;
    transition: border-color var(--transition);
}
.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}
.form-input::placeholder { color: var(--color-text-muted); opacity: .5; }
.required { color: #ef4444; }
.optional { color: var(--color-text-muted); font-weight: 400; font-size: .75rem; }

/* Disabled form */
.checkout-disabled {
    opacity: .45;
    pointer-events: none;
    user-select: none;
}

/* Payment Methods */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.payment-option {
    cursor: pointer;
    display: block;
}
.payment-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.payment-option-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all var(--transition);
}
.payment-option input:checked + .payment-option-content {
    border-color: var(--color-primary);
    background: rgba(37, 99, 235, .08);
}
.payment-option:hover .payment-option-content {
    border-color: var(--color-text-muted);
}
.payment-icon {
    font-size: 1.5rem;
    width: 36px;
    text-align: center;
    flex-shrink: 0;
    color: var(--color-accent);
}
.payment-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.payment-info strong {
    font-size: .9rem;
    color: var(--color-heading);
}
.payment-desc {
    font-size: .75rem;
    color: var(--color-text-muted);
    line-height: 1.3;
}
.payment-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-accent);
    white-space: nowrap;
    flex-shrink: 0;
}

/* RGPD */
.rgpd-checkboxes {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.rgpd-check {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    font-size: .85rem;
    line-height: 1.4;
    cursor: pointer;
}
.rgpd-check input[type="checkbox"] {
    margin-top: .2rem;
    flex-shrink: 0;
    accent-color: var(--color-primary);
}
.rgpd-check a {
    text-decoration: underline;
}
.rgpd-info {
    margin-top: 1rem;
    font-size: .7rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    padding: .75rem;
    background: rgba(255, 255, 255, .03);
    border-radius: var(--radius-sm);
}

/* Checkout Submit */
.checkout-submit {
    margin-top: .5rem;
}
#btn-checkout-submit {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.05rem;
}
.btn-amount {
    background: rgba(255, 255, 255, .2);
    padding: .25rem .75rem;
    border-radius: var(--radius-sm);
    font-size: .95rem;
}
.checkout-secure-note {
    text-align: center;
    margin-top: .75rem;
    font-size: .75rem;
    color: var(--color-text-muted);
}

/* Checkout Sidebar */
.checkout-summary-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: sticky;
    top: calc(var(--header-height) + 1.5rem);
}
.summary-title {
    font-size: .875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--color-text-muted);
    padding: 1rem 1.25rem;
    margin: 0;
    border-bottom: 1px solid var(--color-border);
}
.summary-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.summary-course-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-heading);
    padding: 1rem 1.25rem .5rem;
    line-height: 1.3;
}
.summary-line-items {
    padding: .5rem 1.25rem;
}
.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .35rem 0;
    font-size: .85rem;
    color: var(--color-text-muted);
}
.summary-regular-price {
    text-decoration: line-through;
    opacity: .6;
    font-size: .8rem;
    margin-right: .5rem;
}
.summary-price {
    font-weight: 600;
    color: var(--color-text);
}
.summary-surcharge {
    font-size: .8rem;
}
.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .75rem 1.25rem;
    border-top: 1px solid var(--color-border);
    font-weight: 700;
    font-size: 1rem;
}
.summary-total-amount {
    font-size: 1.25rem;
    color: var(--color-accent);
}
.summary-savings {
    text-align: center;
    padding: .5rem 1.25rem;
    font-size: .8rem;
    color: var(--color-success);
    font-weight: 600;
}
.summary-features {
    padding: .75rem 1.25rem 1rem;
    border-top: 1px solid var(--color-border);
}
.summary-features ul {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}
.summary-features li {
    font-size: .8rem;
    color: var(--color-text-muted);
}

/* =========================================================
   ORDER CONFIRMATION
   ========================================================= */

.order-section {
    padding: 3rem 0;
}
.order-status-card {
    text-align: center;
    padding: 3rem 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}
.order-status-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}
.order-status-card h1 {
    font-size: 1.75rem;
    margin-bottom: .75rem;
}
.order-status-card p {
    font-size: .95rem;
    color: var(--color-text-muted);
    margin-bottom: .5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}
.order-status-card .btn {
    margin-top: 1.25rem;
}
.order-status-completed {
    background: rgba(34, 197, 94, .08);
    border: 1px solid rgba(34, 197, 94, .2);
}
.order-status-pending {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
}
.order-status-failed {
    background: rgba(239, 68, 68, .08);
    border: 1px solid rgba(239, 68, 68, .2);
}
.order-status-cancelled {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
}
.order-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

/* Bank Details */
.bank-details-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin: 1.5rem auto;
    max-width: 500px;
    text-align: left;
}
.bank-details-card h3 {
    font-size: .875rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}
.bank-details-grid {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.bank-detail {
    display: flex;
    align-items: center;
    gap: .75rem;
}
.bank-label {
    font-size: .8rem;
    color: var(--color-text-muted);
    min-width: 100px;
}
.bank-value {
    font-size: .9rem;
    font-weight: 600;
    color: var(--color-heading);
    font-family: 'Courier New', monospace;
}
.bank-value-amount {
    color: var(--color-accent);
    font-size: 1.1rem;
}
.btn-copy {
    background: none;
    border: none;
    cursor: pointer;
    font-size: .85rem;
    padding: .15rem .35rem;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}
.btn-copy:hover {
    background: rgba(255, 255, 255, .08);
}

.order-notice {
    margin: 1.5rem auto;
    max-width: 500px;
    padding: 1rem;
    background: rgba(251, 191, 36, .08);
    border: 1px solid rgba(251, 191, 36, .2);
    border-radius: var(--radius-md);
    font-size: .85rem;
    color: var(--color-text-muted);
    text-align: left;
}
.order-notice strong { color: var(--color-heading); }

/* Order Details */
.order-details-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.order-details-card h3 {
    font-size: .875rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}
.order-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem 2rem;
}
.order-detail {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}
.order-label {
    font-size: .75rem;
    color: var(--color-text-muted);
}
.order-value {
    font-size: .9rem;
    font-weight: 500;
    color: var(--color-heading);
}

.order-help {
    text-align: center;
    font-size: .85rem;
    color: var(--color-text-muted);
    padding: 1rem 0 2rem;
}

/* ── Responsive checkout ── */
@media (max-width: 900px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }
    .checkout-sidebar {
        order: -1;
    }
    .checkout-summary-card {
        position: static;
    }
}
@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    .payment-option-content {
        flex-wrap: wrap;
    }
    .payment-price {
        width: 100%;
        text-align: right;
        margin-top: .25rem;
    }
    .order-details-grid {
        grid-template-columns: 1fr;
    }
    .bank-detail {
        flex-direction: column;
        align-items: flex-start;
        gap: .15rem;
    }
    .bank-label {
        min-width: auto;
    }
}
