/* ============================================================
   Entrenaly - Design System base (landing, auth, componentes)
   ============================================================ */

:root {
    --primary: #1753A1;
    --primary-dark: #1B2D50;
    --primary-light: #E8EEF6;
    --accent: #00C48C;
    --accent-dark: #00A876;
    --icon-mark: #A8722E;

    --bg: #F7F8FB;
    --bg-card: #FFFFFF;
    --border: #E6E8EF;

    --text-primary: #14162B;
    --text-secondary: #5B5F76;
    --text-muted: #9296A8;

    --danger: #EF4444;
    --danger-bg: #FEF2F2;
    --warning: #F59E0B;
    --warning-bg: #FFFBEB;
    --success: #10B981;
    --success-bg: #ECFDF5;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgba(20, 22, 43, 0.06);
    --shadow-md: 0 8px 24px rgba(20, 22, 43, 0.08);
    --shadow-lg: 0 20px 45px rgba(20, 22, 43, 0.12);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -0.02em; }

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

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

/* ---------- Botones ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: var(--radius-sm);
    padding: 12px 22px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
    font-family: inherit;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(23,83,161,.30); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }

.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(0,196,140,.30); }
.btn-accent:hover { background: var(--accent-dark); color: #fff; }

.btn-outline { background: transparent; color: var(--text-primary); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--primary-light); color: var(--primary); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; }

.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-block { width: 100%; }

/* ---------- Cards ---------- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}
.card-pad { padding: 28px; }

/* ---------- Formularios ---------- */
.form-group { margin-bottom: 18px; }
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.form-control, select.form-control, textarea.form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    color: var(--text-primary);
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: 12.5px; color: var(--text-muted); margin-top: 5px; }

/* ---------- Alertas ---------- */
.alert {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 18px;
    border: 1px solid transparent;
}
.alert-danger { background: var(--danger-bg); color: #B91C1C; border-color: #FCA5A5; }
.alert-warning { background: var(--warning-bg); color: #92400E; border-color: #FCD34D; }
.alert-success { background: var(--success-bg); color: #065F46; border-color: #6EE7B7; }

/* ---------- Badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.badge-success { background: var(--success-bg); color: #047857; }
.badge-warning { background: var(--warning-bg); color: #B45309; }
.badge-danger { background: var(--danger-bg); color: #B91C1C; }
.badge-muted { background: #F1F2F6; color: var(--text-secondary); }
.badge-primary { background: var(--primary-light); color: var(--primary-dark); }

/* ---------- Utilidades ---------- */
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-center { text-align: center; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.mt-0 { margin-top: 0; }

/* ============================================================
   Landing page
   ============================================================ */
.nav-landing {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(247,248,251,.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.nav-landing .container { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.promo-ticker {
    width: 100%;
    overflow: hidden;
    background: linear-gradient(90deg, var(--primary), #5D87BD);
    padding: 10px 0;
}
.promo-ticker-track {
    display: inline-flex;
    width: max-content;
    animation: promo-ticker-scroll 24s linear infinite;
    will-change: transform;
}
.promo-ticker:hover .promo-ticker-track { animation-play-state: paused; }
.promo-ticker-group { display: inline-flex; align-items: center; flex-shrink: 0; }
.promo-ticker-item {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 0 10px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
}
.promo-ticker-item strong { font-weight: 800; }
.promo-ticker-icon { width: 16px; height: 16px; margin-right: 6px; flex-shrink: 0; }
.promo-ticker-sep { color: rgba(255,255,255,.55); }
.promo-ticker-link { text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }
.promo-ticker-link:hover { opacity: .85; }

@keyframes promo-ticker-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@media (max-width: 640px) {
    .promo-ticker-item { font-size: 12.5px; padding: 0 8px; }
}
@media (prefers-reduced-motion: reduce) {
    .promo-ticker-track { animation: none; }
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--text-primary); }
.brand-mark {
    width: 36px; height: 36px; border-radius: 10px;
    background: #1B2D50;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--text-secondary); font-weight: 500; font-size: 14.5px; }
.nav-links a:hover { color: var(--text-primary); }
.nav-link-login { display: none; }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle {
    display: none; flex-direction: column; justify-content: center; gap: 5px;
    width: 36px; height: 36px; padding: 0; margin: 0; flex-shrink: 0;
    border: none; background: transparent; cursor: pointer;
}
.nav-toggle span { display: block; width: 22px; height: 2px; margin: 0 auto; background: var(--text-primary); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Selector de idioma (landing, auth, panel entrenador, panel cliente, admin) */
.lang-switcher { position: relative; }
.lang-switcher-toggle {
    display: flex; align-items: center; gap: 5px;
    padding: 7px 10px; font-size: 13px; font-weight: 600; color: var(--text-secondary);
    background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm);
    cursor: pointer; line-height: 1;
}
.lang-switcher-toggle:hover { color: var(--text-primary); border-color: var(--text-muted); }
.lang-switcher-menu {
    display: none; position: absolute; top: calc(100% + 6px); right: 0; z-index: 50;
    min-width: 170px; padding: 6px; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
}
.lang-switcher.open .lang-switcher-menu { display: block; }
.lang-switcher-item {
    display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px;
    font-size: 13.5px; color: var(--text-secondary); white-space: nowrap;
}
.lang-switcher-item:hover { background: var(--primary-light); color: var(--text-primary); }
.lang-switcher-item.active { color: var(--primary); font-weight: 600; }
.lang-switcher-code { display: inline-block; width: 24px; font-weight: 700; color: var(--text-muted); }
.lang-switcher-item.active .lang-switcher-code { color: var(--primary); }

.hero { padding: 88px 0 80px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: 46px; margin: 0 0 20px; overflow-wrap: break-word; }
.hero h1 span { color: var(--primary); }
.hero p.lead { font-size: 18px; color: var(--text-secondary); max-width: 480px; margin: 0 0 32px; }
.hero-cta { display: flex; gap: 14px; margin-bottom: 20px; }
.hero-note { font-size: 13.5px; color: var(--text-muted); }
.hero-cta-mobile { display: none; }

.hero-visual-counter { font-size: 13px; font-weight: 700; color: var(--text-muted); margin-bottom: 14px; }
.hero-visual-counter strong { color: var(--primary); font-size: 15px; }
.hero-visual-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 640 / 460;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    background: #fff;
}
.hero-visual-img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: contain;
    opacity: 0;
    transform: translateY(14px) scale(.98);
    transition: opacity .5s ease, transform .5s ease;
}
.hero-visual-img.active { opacity: 1; transform: translateY(0) scale(1); }
.hero-visual-dots { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }
.hero-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); border: none; padding: 0; cursor: pointer; transition: background .2s ease, transform .2s ease; }
.hero-dot.active { background: var(--primary); transform: scale(1.3); }

.hero-shot {
    margin-top: 64px; border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-lg); border: 1px solid var(--border);
}

.section { padding: 88px 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 56px; }
.eyebrow { color: var(--primary); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; display: block; }
.section-head h2 { font-size: 36px; }
.section-head p { color: var(--text-secondary); font-size: 16.5px; }

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card { padding: 30px; }
.feature-icon {
    width: 48px; height: 48px; border-radius: 4px;
    background: var(--primary-light); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 18px;
    position: relative;
}
.feature-icon::after {
    content: "";
    position: absolute; top: 6px; right: 6px;
    width: 4px; height: 4px;
    background: var(--icon-mark);
}
.feature-icon svg { width: 24px; height: 24px; }
.feature-card h3 { font-size: 17.5px; margin-bottom: 8px; }
.feature-card p { color: var(--text-secondary); font-size: 14.5px; margin: 0; }

.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; position: relative; }
.steps-grid::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 16.666%; right: 16.666%;
    height: 2px;
    background: repeating-linear-gradient(to right, var(--border) 0 8px, transparent 8px 16px);
    z-index: 0;
}
.step-item { position: relative; z-index: 1; text-align: center; }
.step-marker { position: relative; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 22px; }
.step-num-badge {
    position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
    font-size: 54px; font-weight: 800; line-height: 1;
    color: var(--primary-light);
    z-index: 0;
    user-select: none;
}
.step-icon {
    position: relative; z-index: 1;
    width: 60px; height: 60px; border-radius: 50%;
    background: var(--bg-card); border: 2px solid var(--primary); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 6px var(--bg-card);
}
.step-icon::after {
    content: "";
    position: absolute; top: 8px; right: 8px;
    width: 4px; height: 4px;
    background: var(--icon-mark);
}
.step-icon svg { width: 26px; height: 26px; }
.step-item h3 { font-size: 17px; margin-bottom: 8px; }
.step-item p { color: var(--text-secondary); font-size: 14.5px; margin: 0 auto; max-width: 260px; }

/* ---------- Showcase (sección fija del alto de la imagen; el texto se desplaza por dentro) ---------- */
.showcase-scroll-space { position: relative; }

.showcase-pin {
    position: sticky;
    top: 88px;
    height: 520px;
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 60px;
    /* sin align-items: los hijos deben estirarse (stretch, el valor por defecto) para heredar
       los 520px de alto; si no, .showcase-steps-viewport no tiene una altura real que recortar. */
}

.showcase-steps-viewport { position: relative; height: 100%; overflow: hidden; }
.showcase-steps-track { position: absolute; top: 0; left: 0; width: 100%; will-change: transform; }

.showcase-step {
    min-height: 520px;
    padding: 28px 0 28px 28px;
    border-left: 3px solid var(--border);
    opacity: .35;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: opacity .3s ease, border-color .3s ease;
    box-sizing: border-box;
}
.showcase-step.active { opacity: 1; border-left-color: var(--primary); }
.showcase-num { font-size: 13px; font-weight: 800; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 12px; transition: color .3s ease; }
.showcase-step.active .showcase-num { color: var(--primary); }
.showcase-step h3 { font-size: 22px; margin-bottom: 10px; }
.showcase-step p { color: var(--text-secondary); font-size: 15px; max-width: 440px; margin: 0; }
.showcase-step ul { list-style: none; padding: 0; margin: 14px 0 0; max-width: 440px; }
.showcase-step ul li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--text-secondary); padding: 4px 0; }
.showcase-step ul li::before { content: '✓'; color: var(--accent); font-weight: 700; flex-shrink: 0; }
.showcase-step-mobile-img { display: none; }

.showcase-visual { height: 100%; display: flex; flex-direction: column; justify-content: center; }
.showcase-counter { font-size: 13px; font-weight: 700; color: var(--text-muted); margin-bottom: 14px; }
.showcase-counter strong { color: var(--primary); font-size: 15px; }
.showcase-image-wrap {
    position: relative;
    width: 100%;
    max-height: 100%;
    aspect-ratio: 640 / 460;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    background: #fff;
}
.showcase-img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: contain;
    opacity: 0;
    transform: translateY(18px) scale(.98);
    transition: opacity .5s ease, transform .5s ease;
}
.showcase-img.active { opacity: 1; transform: translateY(0) scale(1); }

@media (max-width: 960px) {
    .showcase-scroll-space { height: auto !important; }
    .showcase-pin { position: static; height: auto; display: block; }
    .showcase-steps-viewport { height: auto; overflow: visible; }
    .showcase-steps-track { position: static; transform: none !important; width: auto; }
    .showcase-step { opacity: 1; border-left-color: var(--border); padding: 0 0 40px; }
    .showcase-visual { display: none; }
    .showcase-step-mobile-img { display: block; width: 100%; border-radius: var(--radius-md); box-shadow: var(--shadow-md); border: 1px solid var(--border); margin-bottom: 18px; }
}

.pricing-toggle { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 48px; }
.switch { position: relative; width: 52px; height: 28px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-track {
    position: absolute; inset: 0; background: var(--border); border-radius: 999px; cursor: pointer; transition: background .2s;
}
.switch-track::before {
    content: ''; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px;
    background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: var(--shadow-sm);
}
.switch input:checked + .switch-track { background: var(--primary); }
.switch input:checked + .switch-track::before { transform: translateX(24px); }
.save-badge { background: var(--success-bg); color: #047857; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }

.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: stretch; }
.price-card { padding: 26px; display: flex; flex-direction: column; }
.price-card.featured { border: 2px solid var(--primary); box-shadow: var(--shadow-md); position: relative; }
.price-card.featured::before {
    content: 'Más popular'; position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
    background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 14px; border-radius: 999px;
}
.price-name { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.price-desc { color: var(--text-secondary); font-size: 13.5px; margin-bottom: 20px; }
.price-amount { font-size: 34px; font-weight: 800; margin-bottom: 4px; }
.price-amount small { font-size: 15px; font-weight: 500; color: var(--text-muted); }
.price-period { color: var(--text-muted); font-size: 13px; margin-bottom: 24px; }
.price-features { list-style: none; padding: 0; margin: 0 0 28px; flex: 1; }
.price-features li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; font-size: 14px; color: var(--text-secondary); }
.price-features li::before { content: '✓'; color: var(--accent); font-weight: 700; }

.role-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.role-card { padding: 26px; }
.role-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.role-head-icon {
    width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
    background: var(--primary-light); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
}
.role-head-icon svg { width: 19px; height: 19px; }
.role-head h3 { font-size: 18px; margin: 0 0 2px; }
.role-head p { margin: 0; color: var(--text-secondary); font-size: 13px; }
.role-list { list-style: none; padding: 0; margin: 0; }
.role-list li {
    display: grid; grid-template-columns: 20px 1fr; column-gap: 12px; row-gap: 2px;
    padding: 11px 0; border-top: 1px solid var(--border);
}
.role-list li:first-child { border-top: none; padding-top: 0; }
.role-check {
    grid-column: 1; grid-row: 1 / span 2; margin-top: 1px;
    width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
    background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.role-list li strong { grid-column: 2; grid-row: 1; font-size: 13.5px; color: var(--text-primary); line-height: 1.4; }
.role-list li .role-desc { grid-column: 2; grid-row: 2; font-size: 12.5px; color: var(--text-secondary); line-height: 1.5; }

/* ---------- Slider interno de "todas las funciones" (mismo mecanismo que #producto) ---------- */
.role-scroll-space { position: relative; }
.role-pin { position: sticky; top: 88px; }
.role-list-viewport { position: relative; overflow: hidden; height: 360px; }
.role-list.role-track { position: absolute; top: 0; left: 0; width: 100%; margin: 0; will-change: transform; }

@media (max-width: 900px) {
    .role-columns { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
    .role-scroll-space { height: auto !important; }
    .role-pin { position: static; }
    .role-list-viewport { height: auto; overflow: visible; }
    .role-list.role-track { position: static; transform: none !important; width: auto; }
}

.cta-band {
    background: linear-gradient(135deg, var(--primary), #5D87BD);
    border-radius: var(--radius-lg);
    padding: 64px 40px;
    text-align: center;
    color: #fff;
}
.cta-band h2 { color: #fff; font-size: 32px; }
.cta-band p { color: rgba(255,255,255,.85); margin-bottom: 30px; font-size: 16px; }
.cta-band .btn-primary { background: #fff; color: var(--primary); box-shadow: none; }
.cta-band .btn-primary:hover { background: #f2f2ff; }

footer.site-footer { border-top: 1px solid var(--border); padding: 48px 0 32px; margin-top: 40px; }
.footer-grid { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 24px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--text-secondary); font-size: 14px; }
.footer-bottom { text-align: center; color: var(--text-muted); font-size: 13px; margin-top: 32px; }

/* ---------- Auth (login/registro) ---------- */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}
.auth-box { width: 100%; max-width: 440px; }
.auth-box .brand { justify-content: center; margin-bottom: 24px; }
.auth-box .brand-mark { width: 44px; height: 44px; }
.auth-box .brand { font-size: 22px; }
.auth-box h1 { font-size: 24px; text-align: center; margin-bottom: 6px; }
.auth-box p.sub { text-align: center; color: var(--text-secondary); margin-bottom: 28px; font-size: 14.5px; }
.auth-switch { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-secondary); }

@media (max-width: 1100px) {
    .pricing-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
    .nav-toggle { display: flex; }
    .nav-links {
        display: none;
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--bg-card); border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md); padding: 8px 0;
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 14px 24px; text-align: center; }
    .nav-links a.nav-link-login {
        display: block; margin: 10px 24px 4px; padding: 10px 16px;
        border: 1.5px solid var(--primary); border-radius: var(--radius-sm);
        color: var(--primary); font-weight: 700;
    }
    .nav-links a.nav-link-login:hover { background: var(--primary-light); }
    .nav-cta-login { display: none; }
    .hero h1 { font-size: 36px; }
    .hero-grid { grid-template-columns: 1fr; gap: 24px; }
    .hero-copy { text-align: center; }
    .hero p.lead { max-width: none; margin-left: auto; margin-right: auto; margin-bottom: 12px; }
    .hero-cta { justify-content: center; }
    .hero-visual { max-width: none; width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); padding: 0 8px; }
    .hero-cta-desktop, .hero-note-desktop { display: none; }
    .hero-cta-mobile { display: block; text-align: center; margin-top: 32px; }
    .hero-cta-mobile .hero-note { margin-top: 4px; }
    .features-grid, .steps-grid, .pricing-grid { grid-template-columns: 1fr; }
    .steps-grid::before { display: none; }
    .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 28px; }
    .hero p.lead { font-size: 16px; }
    .hero-cta { flex-direction: column; }
    .nav-landing .container { padding: 0 16px; }
    .nav-cta { gap: 8px; }
}

/* ===== Landing: franja discreta para clientes sin entrenador (debajo de los precios) ===== */
.sin-entrenador-franja { display: flex; align-items: center; gap: 18px; max-width: 860px; margin: 36px auto 0; padding: 18px 22px; border: 1px dashed var(--border); border-radius: 16px; background: var(--bg-card, #fff); }
.sin-entrenador-icono { flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--primary-light, #E8F0FB); color: var(--primary); }
.sin-entrenador-icono svg { width: 22px; height: 22px; }
.sin-entrenador-texto { flex: 1; min-width: 0; }
.sin-entrenador-eyebrow { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 2px; }
.sin-entrenador-texto strong { display: block; font-size: 15.5px; margin-bottom: 4px; }
.sin-entrenador-texto p { margin: 0; font-size: 13.5px; color: var(--text-secondary); line-height: 1.5; }
.sin-entrenador-texto .sin-entrenador-precio { margin-top: 4px; font-size: 12.5px; color: var(--text-muted); }
.sin-entrenador-acciones { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; }
.sin-entrenador-login { font-size: 13px; color: var(--text-secondary); }
@media (max-width: 700px) {
    .sin-entrenador-franja { flex-direction: column; align-items: flex-start; text-align: left; }
    .sin-entrenador-acciones { flex-direction: row; align-items: center; gap: 14px; }
}

/* Acceso clientes: caja "¿Aún no tienes cuenta?" */
.sin-cuenta-caja { margin-top: 16px; text-align: left; }
.sin-cuenta-caja > strong { display: block; font-size: 15px; margin-bottom: 10px; }
.sin-cuenta-fila { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; }
.sin-cuenta-fila + .sin-cuenta-fila { border-top: 1px solid var(--border); padding-top: 12px; }
.sin-cuenta-fila p { margin: 0; font-size: 13.5px; color: var(--text-secondary); line-height: 1.5; }
.sin-cuenta-fila b { color: var(--text-primary, inherit); }
.sin-cuenta-icono { flex-shrink: 0; width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: var(--primary-light, #E8F0FB); color: var(--primary); }
.sin-cuenta-icono svg { width: 17px; height: 17px; }

/* Landing: tramos y ejemplo del programa de referidos */
.referidos-tramos { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 auto 16px; max-width: 640px; }
.referidos-tramos span { padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--border); font-size: 13px; color: var(--text-secondary); }
.referidos-tramos strong { color: var(--primary); font-weight: 800; }
.referidos-ejemplo { max-width: 600px; margin: 0 auto 26px; font-size: 14.5px; color: var(--text-primary); }
.referidos-ejemplo strong { color: var(--primary); font-size: 16px; }

/* Registro de entrenador: aviso discreto para quien no es entrenador */
.registro-cliente-aviso { margin: 18px auto 0; padding: 14px 16px; border: 1px dashed var(--border); border-radius: 12px; text-align: center; font-size: 13.5px; color: var(--text-secondary); line-height: 1.5; }
.registro-cliente-aviso strong { display: block; color: var(--text-primary); font-size: 14.5px; margin-bottom: 2px; }
.registro-cliente-aviso span { display: block; margin-bottom: 6px; }
.registro-cliente-aviso a { font-weight: 600; }

/* Landing: tarjeta "Facturas con Verifactu" (logo) */
.feature-verifactu { display: block; width: 120px; height: auto; margin-top: 14px; }

/* ============================================================
   Landing: clases que antes eran estilos en línea (mismos valores en PC)
   ============================================================ */
.nav-logo { height: 40px; width: auto; }
.footer-logo { height: 36px; width: auto; }
.referidos-card { position: relative; overflow: hidden; padding: 56px; text-align: center; }
.referidos-titulo { font-size: 32px; max-width: 640px; margin: 0 auto 14px; }
.referidos-texto { max-width: 600px; margin: 0 auto 18px; font-size: 16px; }
.role-tabs, .carrusel-dots { display: none; }

/* ============================================================
   Landing en móvil y tablet (solo body.landing; PC sin cambios)
   ============================================================ */
.landing { --gutter: 24px; }

@media (max-width: 960px) {
    /* Así es por dentro: carrusel deslizable de tarjetas (captura arriba, texto debajo) */
    .landing .showcase-steps-track {
        display: flex; gap: 14px;
        overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 14px;
        scroll-padding: 0 var(--gutter);
    }
    .landing .showcase-steps-track::-webkit-scrollbar { display: none; }
    .landing .showcase-step {
        flex: 0 0 min(86%, 520px); scroll-snap-align: center;
        min-height: 0; justify-content: flex-start;
        padding: 14px 16px 18px; border: 1px solid var(--border); border-radius: var(--radius-md);
        background: var(--bg-card); box-shadow: var(--shadow-sm);
    }
    .landing .showcase-step-mobile-img { order: -1; margin: 0 0 14px; box-shadow: none; border-radius: 10px; aspect-ratio: 640 / 460; object-fit: contain; background: #fff; }
    .landing .showcase-num { margin-bottom: 6px; color: var(--primary); }
    .landing .showcase-step h3 { font-size: 18px; margin-bottom: 6px; }
    .landing .showcase-step p { font-size: 14px; line-height: 1.5; }
    .landing .showcase-step ul { margin-top: 10px; }
    .landing .showcase-step ul li { font-size: 13.5px; padding: 3px 0; }

    /* Puntos de los carruseles */
    .landing .carrusel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 6px; }
    .landing .carrusel-dot { width: 8px; height: 8px; padding: 0; border: none; border-radius: 50%; background: var(--border); cursor: pointer; transition: background .2s ease, transform .2s ease; }
    .landing .carrusel-dot.activo { background: var(--primary); transform: scale(1.3); }

    /* Todas las funciones: pestañas Entrenador / Cliente */
    .landing .role-tabs {
        display: flex; gap: 4px; max-width: 420px; margin: -12px auto 18px; padding: 4px;
        background: var(--bg); border: 1px solid var(--border); border-radius: 999px;
    }
    .landing .role-tab {
        flex: 1; padding: 10px 12px; border: none; border-radius: 999px; background: transparent;
        font: inherit; font-size: 14px; font-weight: 600; color: var(--text-secondary); cursor: pointer;
    }
    .landing .role-tab.activa { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(23,83,161,.25); }
    .landing .role-columns { grid-template-columns: 1fr; }
    .landing .role-card:not(.activa) { display: none; }
}

@media (max-width: 860px) {
    /* Cabecera */
    .landing .nav-landing .container { height: 62px; }
    .landing .nav-logo { height: 32px; }
    .landing .nav-cta .btn-sm { white-space: nowrap; padding: 8px 12px; }
    .landing .nav-links { max-height: calc(100vh - 62px); overflow-y: auto; }

    /* Hero */
    .landing .hero { padding: 36px 0 44px; }
    .landing .hero-grid { gap: 20px; }
    .landing .hero h1 { font-size: 32px; letter-spacing: -0.025em; }
    .landing .hero p.lead { font-size: 16px; line-height: 1.55; max-width: 560px; }
    .landing .hero-visual-counter { display: none; }
    .landing .hero-visual { padding: 0 var(--gutter); }
    .landing .hero-visual-wrap { border-radius: var(--radius-md); }
    .landing .hero-visual-dots { margin-top: 14px; }
    .landing .hero-cta-mobile { margin-top: 22px; }
    .landing .hero-cta-mobile .hero-cta { flex-direction: column; gap: 10px; max-width: 420px; margin: 0 auto 14px; }
    .landing .hero-cta-mobile .btn { width: 100%; padding: 14px 22px; }
    .landing .hero-note { font-size: 13px; line-height: 1.5; margin: 0; }

    /* Secciones */
    .landing .section { padding: 56px 0; }
    .landing .section-head { margin-bottom: 32px; }
    .landing .section-head h2 { font-size: 28px; letter-spacing: -0.025em; }
    .landing .section-head p { font-size: 15px; line-height: 1.55; }
    .landing .eyebrow { font-size: 12px; }

    /* Funciones: filas compactas (icono a la izquierda) */
    .landing .features-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .landing .feature-card { padding: 18px 16px; display: grid; grid-template-columns: 42px 1fr; column-gap: 14px; align-items: start; align-content: start; }
    .landing .feature-icon { width: 42px; height: 42px; margin: 0; grid-row: 1 / span 3; }
    .landing .feature-icon svg { width: 21px; height: 21px; }
    .landing .feature-card h3 { font-size: 15.5px; margin: 1px 0 4px; }
    .landing .feature-card p { font-size: 13.5px; line-height: 1.5; }
    .landing .feature-verifactu { width: 96px; margin-top: 10px; }

    /* Cómo funciona: línea vertical con los pasos */
    .landing .steps-grid { grid-template-columns: 1fr; gap: 0; max-width: 520px; margin: 0 auto; }
    .landing .steps-grid::before { display: block; top: 28px; bottom: 28px; left: 27px; right: auto; width: 2px; height: auto; background: repeating-linear-gradient(to bottom, var(--border) 0 6px, transparent 6px 12px); }
    .landing .step-item { display: grid; grid-template-columns: 56px 1fr; column-gap: 16px; text-align: left; padding: 0 0 26px; }
    .landing .step-item:last-child { padding-bottom: 0; }
    .landing .step-marker { grid-row: 1 / span 2; align-self: start; margin: 0; }
    .landing .step-num-badge { display: none; }
    .landing .step-icon { width: 56px; height: 56px; box-shadow: 0 0 0 5px var(--bg-card); }
    .landing .step-icon svg { width: 24px; height: 24px; }
    .landing .step-item h3 { font-size: 16.5px; margin: 6px 0 4px; }
    .landing .step-item p { font-size: 14px; max-width: none; margin: 0; }

    /* Referidos */
    .landing .referidos-card { padding: 32px 20px; }
    .landing .referidos-titulo { font-size: 25px; }
    .landing .referidos-texto { font-size: 15px; line-height: 1.55; }
    .landing .referidos-tramos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .landing .referidos-tramos span { padding: 8px 10px; border-radius: 12px; font-size: 12.5px; line-height: 1.35; }
    .landing .referidos-tramos strong { display: block; font-size: 17px; }
    .landing .referidos-ejemplo { font-size: 14px; }
    .landing .referidos-card .btn { width: 100%; max-width: 420px; }

    /* Precios: carrusel deslizable que empieza en el plan destacado */
    .landing #precios .pricing-grid {
        display: flex; gap: 14px; align-items: stretch;
        overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        margin: 0 calc(-1 * var(--gutter)); padding: 18px var(--gutter) 14px;
        scroll-padding: 0 var(--gutter);
    }
    .landing #precios .pricing-grid::-webkit-scrollbar { display: none; }
    .landing #precios .price-card { flex: 0 0 min(82%, 340px); scroll-snap-align: center; padding: 22px 20px; }
    .landing #precios .price-desc { margin-bottom: 14px; }
    .landing #precios .price-amount { font-size: 32px; }
    .landing #precios .price-period { margin-bottom: 14px; }
    .landing #precios .price-features { margin-bottom: 20px; }
    .landing #precios .price-features li { padding: 5px 0; font-size: 13.5px; }
    .landing .sin-entrenador-franja { margin-top: 28px; padding: 18px; }
    .landing .sin-entrenador-icono { display: none; }

    /* Todas las funciones */
    .landing .role-card { padding: 20px 18px; }

    /* Franja final */
    .landing .cta-band { padding: 40px 22px; border-radius: var(--radius-md); }
    .landing .cta-band h2 { font-size: 25px; }
    .landing .cta-band p { font-size: 15px; margin-bottom: 22px; }
    .landing .cta-band .btn { width: 100%; max-width: 420px; }

    /* Pie */
    .landing footer.site-footer { margin-top: 0; padding: 36px 0 28px; }
    .landing .footer-grid { flex-direction: column; align-items: center; gap: 20px; }
    .landing .footer-logo { height: 30px; }
    .landing .footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; text-align: center; }
    .landing .footer-bottom { margin-top: 24px; }
}

@media (max-width: 600px) {
    .landing .features-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .landing { --gutter: 18px; }
    .landing .container { padding: 0 var(--gutter); }
    .landing .nav-landing .container { padding: 0 14px; }
    .landing .nav-cta { gap: 6px; }
    .landing .nav-logo { height: 28px; }
    .landing .hero { padding-top: 28px; }
    .landing .hero h1 { font-size: 29px; }
    .landing .hero p.lead { font-size: 15.5px; }
    .landing .hero-visual { padding: 0 10px; }
    .landing .section { padding: 48px 0; }
    .landing .section-head h2 { font-size: 25px; }
    .landing .referidos-titulo, .landing .cta-band h2 { font-size: 23px; }
}

@media (max-width: 360px) {
    .landing .nav-logo { height: 24px; }
    .landing .nav-cta .btn-sm { padding: 7px 10px; font-size: 12.5px; }
    .landing .lang-switcher-toggle { padding: 6px 7px; }
    .landing .hero h1 { font-size: 26px; }
}

/* Landing en móvil: lista "Todas las funciones" plegable y barra fija inferior */
.role-mas, .barra-cta { display: none; }
@media (max-width: 960px) {
    .landing .role-card:not(.expandida) .role-list li:nth-child(n+7) { display: none; }
    .landing .role-mas {
        display: block; width: 100%; margin-top: 14px; padding: 11px 14px;
        border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: transparent;
        font: inherit; font-size: 14px; font-weight: 600; color: var(--primary); cursor: pointer;
    }
    .landing .role-mas:hover { border-color: var(--primary); }
}
@media (max-width: 860px) {
    .landing .barra-cta {
        display: flex; align-items: center; gap: 12px;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
        padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
        background: rgba(255,255,255,.96); backdrop-filter: blur(10px);
        border-top: 1px solid var(--border); box-shadow: 0 -6px 20px rgba(20,22,43,.08);
        transform: translateY(110%); transition: transform .25s ease;
    }
    .landing .barra-cta.visible { transform: translateY(0); }
    /* Con la barra a la vista, el botón de la cabecera sobra (sería el mismo dos veces) */
    .landing.barra-cta-on .nav-cta > .btn-primary { display: none; }
    /* Que la cabecera fija no tape el título al saltar a una sección o al plegar una lista */
    .landing section[id], .landing .role-card { scroll-margin-top: 72px; }
    .landing .barra-cta-texto { flex: 1; min-width: 0; line-height: 1.25; }
    .landing .barra-cta-texto strong { display: block; font-size: 15px; color: var(--text-primary); }
    .landing .barra-cta-texto span { display: block; font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .landing .barra-cta .btn { flex-shrink: 0; white-space: nowrap; padding: 11px 18px; font-size: 14.5px; }
}
@media (max-width: 860px) and (prefers-reduced-motion: reduce) {
    .landing .barra-cta { transition: none; }
}

/* Acceso: etiqueta de la contraseña con "¿Olvidaste tu contraseña?" a la derecha */
.form-label-fila { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.form-label-fila .form-label { margin-bottom: 0; }
.form-label-fila a { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
