:root {
    --navy: #1E293B;
    --navy-soft: #334155;
    --teal: #177374;
    --teal-dark: #105A5B;
    --teal-pale: #E1EEEE;
    --cream: #F2F7F7;
    --white: #ffffff;
    --line: #D5E5E5;
    --muted: #5B6B7B;
    --shadow: 0 18px 45px rgba(30, 41, 59, 0.09);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--navy);
    background: var(--cream);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

button, input, select { font: inherit; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.nav-wrap, .container { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }

.nav-wrap { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: .02em; }

.brand-mark { display: block; width: 43px; height: 43px; border-radius: 13px; object-fit: cover; background: var(--teal-pale); }

.brand-word { font-size: 1.1rem; }

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

.nav-links a { padding: 10px 14px; border-radius: 999px; color: var(--navy-soft); font-size: .95rem; font-weight: 650; }

.nav-links a:hover, .nav-links a.active { color: var(--teal-dark); background: var(--teal-pale); }

.menu-button { display: none; border: 0; background: transparent; color: var(--navy); font-size: 1.5rem; }

.hero { position: relative; isolation: isolate; overflow: hidden; padding: 84px 0 78px; color: var(--white); }

.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 70px; }

.eyebrow { margin: 0 0 12px; color: var(--teal-dark); text-transform: uppercase; letter-spacing: .13em; font-size: .76rem; font-weight: 800; }

h1, h2, h3 { margin: 0 0 16px; line-height: 1.12; }

h1 { max-width: 680px; font-size: clamp(2.7rem, 6vw, 5rem); letter-spacing: -.055em; }
h2 { font-size: clamp(1.75rem, 3vw, 2.55rem); letter-spacing: -.035em; }
h3 { font-size: 1.2rem; }

.lead { max-width: 620px; color: var(--navy-soft); font-size: 1.15rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 19px; border: 1px solid transparent; border-radius: 13px; cursor: pointer; font-weight: 750; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(30, 41, 59, .11); }
.button-primary { color: var(--white); background: var(--teal); }
.button-secondary { color: var(--teal-dark); border-color: var(--teal); background: transparent; }
.button-quiet { color: var(--navy-soft); border-color: var(--line); background: var(--white); }

.hero-card { position: relative; padding: 22px; border-radius: 30px; background: var(--white); box-shadow: var(--shadow); }
.hero-card img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 21px; }
.hero-card-badge { position: absolute; right: 38px; bottom: 38px; padding: 11px 14px; border-radius: 13px; color: var(--white); background: var(--navy); font-size: .82rem; font-weight: 750; }

.section { padding: 45px 0 80px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.section-heading p { max-width: 570px; margin: 0; color: var(--muted); }

.feature-grid, .routine-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-card, .routine-card, .panel { padding: 25px; border: 1px solid var(--line); border-radius: 22px; background: var(--white); box-shadow: 0 9px 27px rgba(30, 41, 59, .045); }
.feature-icon { display: grid; place-items: center; width: 43px; height: 43px; margin-bottom: 22px; border-radius: 13px; color: var(--teal-dark); background: var(--teal-pale); font-size: 1.3rem; }
.feature-card p, .routine-card p { margin: 0; color: var(--muted); }
.routine-title-row { display: flex; align-items: center; gap: 11px; min-height: 58px; margin-bottom: 10px; }
.routine-title-row h3 { margin: 0; }
.routine-icon { width: 55px; height: 55px; flex: 0 0 55px; object-fit: contain; }
.routine-icon-placeholder { display: grid; place-items: center; border-radius: 15px; color: var(--white); background: var(--teal); font-size: .85rem; font-weight: 850; }

.page-intro { padding: 57px 0 32px; }
.page-intro p { max-width: 700px; color: var(--muted); }

.filters { display: grid; grid-template-columns: 1.5fr .8fr auto; gap: 12px; align-items: end; margin-bottom: 28px; }
.field { display: grid; gap: 7px; }
.field label { color: var(--navy-soft); font-size: .84rem; font-weight: 750; }
.field input, .field select { width: 100%; min-height: 46px; padding: 0 13px; border: 1px solid var(--line); border-radius: 12px; color: var(--navy); background: var(--white); outline: none; }
.field input:focus, .field select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(23, 115, 116, .14); }

.exercise-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.exercise-card { overflow: hidden; border: 1px solid var(--line); border-radius: 19px; background: var(--white); box-shadow: 0 8px 24px rgba(30, 41, 59, .05); }
.exercise-image { display: block; width: 100%; aspect-ratio: 1.18 / 1; object-fit: cover; background: var(--teal-pale); }
.exercise-content { padding: 16px; }
.exercise-content h3 { margin-bottom: 6px; font-size: 1.05rem; }
.exercise-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 15px; color: var(--muted); font-size: .8rem; }
.tag { padding: 4px 8px; border-radius: 999px; background: var(--teal-pale); color: var(--teal-dark); font-weight: 700; }
.empty-state { grid-column: 1 / -1; padding: 45px 20px; border: 1px dashed var(--line); border-radius: 18px; color: var(--muted); text-align: center; background: var(--white); }

.routine-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 20px; align-items: start; }
.routine-list { display: grid; gap: 12px; }
.routine-option { width: 100%; padding: 18px; border: 1px solid var(--line); border-radius: 16px; color: inherit; text-align: left; background: var(--white); cursor: pointer; }
.routine-option:hover, .routine-option.selected { border-color: var(--teal); background: var(--teal-pale); }
.routine-option strong { display: block; margin-bottom: 4px; }
.routine-option span { color: var(--muted); font-size: .9rem; }
.builder-exercises { display: grid; gap: 10px; max-height: 410px; overflow: auto; padding-right: 3px; }
.builder-exercise { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.builder-exercise img { width: 45px; height: 45px; border-radius: 9px; object-fit: cover; }
.builder-exercise label { flex: 1; font-weight: 650; }
.builder-exercise input[type=checkbox] { accent-color: var(--teal); }
.builder-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0; }
.saved-routines { display: grid; gap: 10px; margin-top: 20px; }
.saved-routine { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; border-radius: 12px; background: var(--teal-pale); }
.saved-routine small { display: block; color: var(--muted); }
.text-button { padding: 4px; border: 0; color: #a04545; background: transparent; cursor: pointer; font-weight: 700; }
.add-routine-button { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: var(--white); background: var(--teal); box-shadow: 0 8px 18px rgba(23, 115, 116, .25); font-size: 1.8rem; line-height: 1; }
.add-routine-button:hover { background: var(--teal-dark); transform: translateY(-2px); }
.custom-routines { display: grid; gap: 14px; }
.custom-routine-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 25px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); box-shadow: 0 9px 27px rgba(30, 41, 59, .045); }
.custom-routine-card h3, .custom-routine-card p { margin-bottom: 6px; }
.custom-routine-card > div > p:last-child { color: var(--muted); }
.custom-routine-actions { display: flex; align-items: center; gap: 12px; }
.empty-custom-routines { padding: 32px 20px; border: 1px dashed var(--line); border-radius: 18px; color: var(--muted); text-align: center; background: var(--white); }
.empty-custom-routines[hidden] { display: none; }
.creation-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 20px; align-items: start; padding-bottom: 70px; }
.creation-total { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 25px 0 8px; padding: 16px; border-radius: 14px; color: var(--teal-dark); background: var(--teal-pale); }
.creation-total small { color: var(--navy-soft); }
.creation-total strong { font-size: 1.35rem; }
.creation-filters { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.creation-exercise-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.creation-exercise { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 13px; cursor: pointer; }
.creation-exercise:hover { border-color: var(--teal); background: var(--teal-pale); }
.creation-exercise.selected { border-color: #9CCFCF; background: #E8F4F4; }
.creation-exercise input { accent-color: var(--teal); }
.creation-exercise img { width: 47px; height: 47px; border-radius: 9px; object-fit: cover; }
.creation-exercise strong, .creation-exercise small { display: block; }
.creation-exercise small { color: var(--muted); font-size: .78rem; }
.creation-settings { position: sticky; top: 96px; }
.creation-settings .button { margin-right: 8px; margin-top: 12px; }
.routine-preview { margin-top: 22px; scroll-margin-top: 95px; }
.routine-preview[hidden] { display: none; }
.preview-total { color: var(--teal-dark); font-weight: 800; }
.attention-button { animation: attention-pulse 2s ease-in-out infinite; }
@keyframes attention-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(23, 115, 116, .15); }
    50% { box-shadow: 0 0 0 9px rgba(23, 115, 116, .18), 0 10px 24px rgba(23, 115, 116, .2); }
}
@media (prefers-reduced-motion: reduce) { .attention-button { animation: none; } }
.preview-exercises { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 18px; margin: 0; padding: 0; list-style: none; }
.preview-exercises li { display: flex; align-items: center; gap: 10px; padding: 9px; border-bottom: 1px solid var(--line); }
.preview-video-button { flex: 0 0 auto; padding: 0; border: 0; border-radius: 10px; background: transparent; cursor: pointer; }
.preview-video-button:hover img, .preview-video-button:focus-visible img { outline: 3px solid var(--teal); outline-offset: 2px; }
.preview-exercises img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; background: var(--teal-pale); }
.preview-exercises strong, .preview-exercises small { display: block; }
.preview-exercises small { color: var(--muted); font-size: .8rem; }
.session-runner { margin-top: 24px; padding: 25px; border-radius: 18px; text-align: center; background: var(--navy); color: var(--white); }
.session-runner[hidden] { display: none; }
.session-runner .eyebrow, .session-runner p { color: #BFDADA; }
.session-time { margin: 10px 0; font-size: clamp(3.5rem, 10vw, 6rem); font-weight: 800; letter-spacing: -.06em; }
.session-runner .button-secondary { color: var(--white); border-color: rgba(255,255,255,.65); }
.workout-page { min-height: 100vh; background: var(--navy); color: var(--white); }
.workout-page .site-header { background: rgba(30, 41, 59, .95); border-color: rgba(255,255,255,.12); }
.workout-page .brand { color: var(--white); }
.workout-page .button-quiet { color: var(--white); border-color: rgba(255,255,255,.35); background: transparent; }
.workout-container { padding: 42px 0 70px; }
.workout-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 0; }
.workout-controls { display: flex; align-items: center; gap: 8px; }
.sound-toggle { position: relative; min-width: 46px; padding: 0 12px; }
.sound-icon { display: inline-flex; width: 20px; height: 20px; line-height: 1; }
.sound-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.sound-toggle.muted .sound-icon { opacity: .62; }
.sound-toggle.muted::after { position: absolute; width: 23px; height: 2px; border-radius: 2px; background: currentColor; content: ""; transform: rotate(-45deg); }
.workout-heading h1 { margin-bottom: 8px; font-size: clamp(1.35rem, 2.5vw, 1.9rem); }
.workout-heading p:not(.eyebrow), #workout-progress { margin: 0; color: #BFDADA; }
.routine-progress { width: 100%; height: 8px; margin: 10px 0 10px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.16); }
.routine-progress-bar { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #5FB3B3 0%, #3E9A9A 55%, var(--teal) 100%); transition: width .35s linear; }
.workout-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 20px; align-items: stretch; }
.workout-video-card { position: relative; min-height: 450px; overflow: hidden; border-radius: 25px; background: #fff; box-shadow: 0 20px 55px rgba(0,0,0,.25); }
.workout-video-card video { display: block; width: 100%; height: 100%; min-height: 450px; object-fit: contain; background: #fff; }
.workout-video-card .preload-video { position: absolute; top: 0; left: 0; width: 1px; height: 1px; min-height: 0; opacity: 0; pointer-events: none; }
.video-label { position: absolute; left: 18px; bottom: 18px; padding: 8px 12px; border-radius: 999px; color: var(--white); background: rgba(30,41,59,.78); font-size: .82rem; font-weight: 750; }
.workout-side { display: grid; gap: 20px; }
.timer-card, .next-card { padding: 25px; border: 1px solid rgba(255,255,255,.12); border-radius: 22px; background: rgba(255,255,255,.07); }
.timer-card { display: grid; place-items: center; text-align: center; }
.timer-card p { margin: 18px 0 0; color: #BFDADA; }
.progress-ring { --progress: 100%; display: grid; place-items: center; width: min(280px, 75vw); aspect-ratio: 1; border-radius: 50%; background: conic-gradient(var(--teal) var(--progress), rgba(255,255,255,.12) 0); }
.progress-ring-inner { display: grid; place-items: center; width: 82%; height: 82%; border-radius: 50%; background: var(--navy); }
.progress-ring-inner span { font-size: clamp(2.8rem, 6vw, 4.5rem); font-weight: 800; letter-spacing: -.06em; }
.progress-ring-inner small { margin-top: -10px; color: #BFDADA; }
.next-card .eyebrow { color: #BFDADA; }
.next-exercise-content { display: flex; align-items: center; gap: 14px; }
.next-exercise-content img { width: 82px; height: 82px; border-radius: 14px; object-fit: cover; background: rgba(255,255,255,.1); }
.next-exercise-content h3 { margin-bottom: 5px; }
.next-exercise-content p { margin: 0; color: #BFDADA; }
.workout-actions { display: flex; justify-content: center; gap: 12px; margin-top: 22px; }
.workout-actions .button-secondary { color: var(--white); border-color: rgba(255,255,255,.55); }
.workout-empty { margin-top: 50px; color: var(--navy); }

.video-modal { display: none; position: fixed; inset: 0; z-index: 30; place-items: center; padding: 20px; background: rgba(15, 23, 42, .75); }
.video-modal.open { display: grid; }
.modal-content { position: relative; width: min(850px, 100%); padding: 14px; border-radius: 20px; background: var(--white); }
.modal-content video { display: block; width: 100%; max-height: 75vh; border-radius: 12px; background: #000; }
.modal-title { margin: 7px 4px 0; font-weight: 750; }
.modal-close { position: absolute; top: -13px; right: -13px; display: grid; place-items: center; width: 35px; height: 35px; border: 0; border-radius: 50%; color: var(--white); background: var(--navy); cursor: pointer; font-size: 1.25rem; }

.site-footer { padding: 32px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.footer-wrap { display: flex; justify-content: space-between; gap: 15px; }
.error-box { margin: 18px 0; padding: 14px 16px; border: 1px solid #e8caca; border-radius: 12px; color: #833e3e; background: #fff5f5; }

@media (max-width: 900px) {
    .hero-grid, .routine-layout { grid-template-columns: 1fr; }
    .exercise-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 650px) {
    .nav-wrap, .container { width: min(100% - 28px, 1160px); }
    .nav-wrap { min-height: 67px; }
    .menu-button { display: block; }
    .nav-links { display: none; position: absolute; top: 67px; right: 14px; left: 14px; padding: 10px; border: 1px solid var(--line); border-radius: 15px; background: var(--white); box-shadow: var(--shadow); }
    .nav-links.open { display: grid; }
    .nav-links a { padding: 12px; }
    .hero { padding: 45px 0 30px; }
    .section { padding-bottom: 55px; }
    .feature-grid, .routine-grid, .exercise-grid { grid-template-columns: 1fr; }
    .filters, .builder-grid { grid-template-columns: 1fr; }
    .preview-exercises { grid-template-columns: 1fr; }
    .creation-layout { grid-template-columns: 1fr; }
    .creation-filters { grid-template-columns: 1fr; }
    .creation-exercise-list { grid-template-columns: 1fr; max-height: none; }
    .creation-settings { position: static; }
    .custom-routine-card { align-items: flex-start; flex-direction: column; }
    .workout-container { width: calc(100% - 20px); padding: 18px 0 24px; }
    .workout-heading { align-items: center; gap: 8px; }
    .workout-heading h1 { margin-bottom: 3px; font-size: 1.2rem; }
    .workout-heading .eyebrow { margin-bottom: 4px; font-size: .63rem; }
    .workout-controls { gap: 4px; }
    .workout-controls .button { min-height: 34px; padding: 0 9px; border-radius: 9px; font-size: .75rem; }
    .sound-toggle { min-width: 34px !important; padding: 0 8px !important; }
    .sound-icon { width: 16px; height: 16px; }
    .workout-grid { grid-template-columns: 1fr; gap: 8px; }
    .workout-video-card, .workout-video-card video { min-height: 0; aspect-ratio: 16 / 9; }
    .workout-video-card video { aspect-ratio: 16 / 9; }
    .video-label { left: 6px; bottom: 6px; padding: 4px 6px; font-size: .6rem; }
    .workout-side { grid-template-columns: 1fr 1fr; gap: 8px; }
    .timer-card, .next-card { padding: 9px 7px; border-radius: 12px; }
    .progress-ring { width: min(105px, 27vw); }
    .progress-ring-inner span { font-size: 1.45rem; }
    .progress-ring-inner small { margin-top: -4px; font-size: .55rem; }
    .timer-card p { margin: 7px 0 0; font-size: .62rem; line-height: 1.2; }
    .next-card .eyebrow { margin-bottom: 6px; font-size: .6rem; }
    .next-exercise-content { display: block; text-align: center; }
    .next-exercise-content img { width: 100%; height: 70px; margin-bottom: 6px; border-radius: 8px; object-fit: contain; background: #fff; }
    .next-exercise-content h3 { margin-bottom: 2px; font-size: .72rem; line-height: 1.15; }
    .next-exercise-content p { font-size: .6rem; line-height: 1.15; }
    .workout-actions { gap: 7px; margin-top: 10px; }
    .workout-actions .button { min-height: 34px; padding: 0 11px; border-radius: 9px; font-size: .72rem; }
    .section-heading, .footer-wrap { align-items: flex-start; flex-direction: column; }
    h1 { font-size: 2.8rem; }
}

/* ===== Portada: fondo con foto, botones de descarga y secciones nuevas ===== */
.hero-bg, .hero-overlay { position: absolute; inset: 0; z-index: -1; }
.hero-bg { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.hero-overlay { background: linear-gradient(115deg, rgba(16, 90, 91, .85) 0%, rgba(23, 115, 116, .78) 100%); }
.hero .eyebrow { color: #CFE8E7; }
.hero h1 { color: var(--white); }
.hero .lead { color: #F2F7F7; }
.hero .button-secondary { color: var(--white); border-color: rgba(255, 255, 255, .75); background: rgba(255, 255, 255, .08); }
.hero .button-secondary:hover { background: rgba(255, 255, 255, .18); }
.hero .hero-card { background: rgba(255, 255, 255, .96); }
.hero .hero-card-badge { background: var(--teal-dark); }
.hero-actions { align-items: center; }
.hero-note { margin: 18px 0 0; color: #E1EEEE; font-size: .92rem; }

.store-button { display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 22px 8px 18px; border: 1px solid rgba(30, 41, 59, .15); border-radius: 14px; color: var(--navy); background: var(--white); box-shadow: 0 10px 26px rgba(16, 90, 91, .28); transition: transform .2s ease, box-shadow .2s ease; }
.store-button:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(16, 90, 91, .38); }
.store-button:focus-visible, .button:focus-visible, .nav-links a:focus-visible { outline: 3px solid #CFE8E7; outline-offset: 3px; }
.store-button svg { width: 28px; height: 28px; flex: 0 0 28px; fill: currentColor; }
.store-button span { display: grid; line-height: 1.1; text-align: left; }
.store-button small { font-size: .72rem; font-weight: 600; letter-spacing: .02em; }
.store-button strong { font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; }
.store-button-dark { color: var(--white); background: var(--navy); border-color: var(--navy); box-shadow: 0 10px 22px rgba(30, 41, 59, .22); }
.hero .store-button { color: var(--navy); }

.nav-links a.nav-cta { margin-left: 6px; padding: 10px 18px; color: var(--white); background: var(--teal); }
.nav-links a.nav-cta:hover { color: var(--white); background: var(--teal-dark); }

.why-band { padding: 72px 0; color: var(--white); background: linear-gradient(135deg, var(--teal-dark) 0%, var(--teal) 100%); }
.why-band .eyebrow { color: #CFE8E7; }
.why-band h2 { max-width: 760px; color: var(--white); }
.why-intro { max-width: 680px; margin: 0 0 32px; color: #E1EEEE; }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.why-item { padding: 24px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 20px; background: rgba(255, 255, 255, .1); }
.why-item h3 { margin-bottom: 8px; font-size: 1.1rem; color: var(--white); }
.why-item p { margin: 0; color: #E1EEEE; font-size: .96rem; }
.why-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 18px; border-radius: 14px; color: var(--teal-dark); background: var(--white); }
.why-icon svg, .feature-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.feature-icon svg { width: 22px; height: 22px; }

.cta-band { padding: 0 0 80px; }
.cta-box { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 44px 48px; border-radius: 28px; color: var(--white); background: linear-gradient(120deg, var(--teal-dark) 0%, var(--teal) 100%); box-shadow: var(--shadow); }
.cta-box h2 { margin-bottom: 10px; color: var(--white); }
.cta-box p { max-width: 560px; margin: 0; color: #E1EEEE; }
.cta-actions { display: grid; justify-items: start; gap: 14px; flex: 0 0 auto; }
.cta-link { color: var(--white); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.cta-link:hover { color: #CFE8E7; }

.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: start; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-links a { color: var(--teal-dark); font-weight: 700; }
.footer-links a:hover { text-decoration: underline; }
.footer-credit { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .8rem; }
.footer-credit a { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1000px) {
    .why-grid { grid-template-columns: repeat(2, 1fr); }
    .cta-box { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 650px) {
    .hero { padding: 48px 0 44px; }
    .why-band { padding: 52px 0; }
    .why-grid { grid-template-columns: 1fr; }
    .cta-box { padding: 32px 24px; }
    .footer-grid { grid-template-columns: 1fr; }
    .store-button { width: 100%; justify-content: center; }
    .hero-actions .button { flex: 1 1 140px; }
    .nav-links a.nav-cta { margin: 4px 0 0; text-align: center; }
}
.hero-actions .button { text-align: center; line-height: 1.2; }

/* ===== Cabecera de Rutinas (rutina.php) ===== */
.page-hero { position: relative; isolation: isolate; overflow: hidden; padding: 88px 0 80px; color: var(--white); }
.page-hero-bg, .page-hero-overlay { position: absolute; inset: 0; z-index: -1; }
.page-hero-bg { width: 100%; height: 100%; object-fit: cover; object-position: 78% 80%; }
.page-hero-overlay { background: linear-gradient(105deg, rgba(16, 90, 91, .84) 0%, rgba(16, 90, 91, .72) 42%, rgba(23, 115, 116, .5) 100%); }
.page-hero-inner { position: relative; }
.page-hero + main { padding-top: 56px; }
.page-hero .eyebrow { color: #CFE8E7; }
.page-hero h1 { margin-bottom: 14px; color: var(--white); }
.page-hero-lead { max-width: 640px; margin: 0; color: var(--cream); font-size: 1.15rem; }
.page-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.page-hero .button-primary { color: var(--teal-dark); background: var(--white); }
.page-hero .button-secondary { color: var(--white); border-color: rgba(255, 255, 255, .75); background: rgba(255, 255, 255, .08); }
.page-hero .button-secondary:hover { background: rgba(255, 255, 255, .18); }
.page-hero .button:focus-visible, .page-hero-app a:focus-visible { outline: 3px solid #CFE8E7; outline-offset: 3px; }
.page-hero-app { margin: 20px 0 0; color: var(--teal-pale); font-size: .95rem; }
.page-hero-app a { color: var(--white); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.page-hero-app a:hover { color: #CFE8E7; }

@media (max-width: 650px) {
    .page-hero { padding: 48px 0 44px; }
    .page-hero + main { padding-top: 36px; }
    .page-hero-lead { font-size: 1.05rem; }
    .page-hero-actions .button { flex: 1 1 150px; text-align: center; line-height: 1.2; }
}

/* ===== Tarjetas de rutinas (rutina.php) ===== */
.rt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.rt-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--white); box-shadow: 0 8px 24px rgba(30, 41, 59, .07); transition: transform .2s ease, box-shadow .2s ease; }
.rt-card:hover { transform: translateY(-4px); box-shadow: 0 18px 38px rgba(16, 90, 91, .2); }
.rt-card-head { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 34px; min-height: 160px; padding: 16px 18px 18px; color: var(--white); background: linear-gradient(180deg, rgba(16, 90, 91, .38) 0%, rgba(16, 90, 91, .55) 45%, rgba(16, 90, 91, .90) 100%), var(--rt-image, none) center / cover no-repeat, var(--teal); }
.rt-type-fuerza { --rt-image: url("../imagenes/rutinas/fuerza.jpg"); }
.rt-type-cardio { --rt-image: url("../imagenes/rutinas/cardio.jpg"); }
.rt-type-core { --rt-image: url("../imagenes/rutinas/core.jpg"); }
.rt-type-movilidad { --rt-image: url("../imagenes/rutinas/movilidad.jpg"); }
.rt-type-personalizada { --rt-image: url("../imagenes/rutinas/personalizada.jpg"); }
.rt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rt-chip { display: inline-flex; align-items: center; padding: 4px 11px; border: 1px solid rgba(255, 255, 255, .45); border-radius: 999px; color: var(--white); background: rgba(255, 255, 255, .16); font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.rt-chip-level { color: var(--teal-dark); border-color: var(--white); background: var(--white); }
.rt-title-row { display: flex; align-items: center; gap: 12px; }
.rt-title { margin: 0; color: var(--white); font-size: 1.4rem; letter-spacing: -.02em; text-shadow: 0 2px 10px rgba(16, 90, 91, .45); }
.rt-icon { display: block; width: 46px; height: 46px; flex: 0 0 46px; border: 2px solid rgba(255, 255, 255, .9); border-radius: 13px; object-fit: cover; background: var(--teal); }
.rt-icon-placeholder { display: grid; place-items: center; color: var(--white); font-size: .85rem; font-weight: 850; }
.rt-card-body { display: flex; flex: 1; flex-direction: column; gap: 18px; padding: 18px; }
.rt-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 12px; margin: 0; padding: 0; list-style: none; }
.rt-stats li { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rt-stat-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 11px; color: var(--teal-dark); background: var(--teal-pale); }
.rt-i { width: 20px; height: 20px; }
.rt-stat-text { display: grid; line-height: 1.2; min-width: 0; }
.rt-stat-text strong { color: var(--navy); font-size: 1rem; }
.rt-stat-text small { color: var(--muted); font-size: .8rem; }
.rt-button { width: 100%; margin-top: auto; }
.rt-actions { display: flex; align-items: center; gap: 10px; margin-top: auto; }
.rt-actions .rt-button { flex: 1; width: auto; }
.rt-delete { padding: 10px 12px; border-radius: 10px; }
.rt-delete:hover { background: #fdf0f0; }
.rt-button:focus-visible, .rt-delete:focus-visible { outline: 3px solid rgba(23, 115, 116, .35); outline-offset: 2px; }

.rt-empty { display: grid; justify-items: center; gap: 10px; padding: 40px 22px; border: 2px dashed #9CCFCF; border-radius: 22px; background: linear-gradient(180deg, var(--white) 0%, var(--teal-pale) 100%); }
.rt-empty[hidden] { display: none; }
.rt-empty-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; color: var(--white); background: linear-gradient(135deg, var(--teal-dark), var(--teal)); box-shadow: 0 10px 22px rgba(23, 115, 116, .28); }
.rt-empty-icon .rt-i { width: 30px; height: 30px; }
.rt-empty h3 { margin: 6px 0 0; color: var(--navy); }
.rt-empty p { max-width: 460px; margin: 0 0 8px; color: var(--muted); }

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

@media (max-width: 650px) {
    .rt-grid { grid-template-columns: 1fr; gap: 16px; }
    .rt-card-head { min-height: 140px; gap: 26px; }
    .rt-empty { padding: 32px 18px; }
}

/* Foto propia para la rutina "Pierna potente" */
.rt-photo-piernas { --rt-image: url("../imagenes/rutinas/piernas.jpg"); }

/* ===== Orden de secciones de la portada: hero > ejercicios > por qué > descarga ===== */
.hero + .section { padding-top: 64px; }
.why-band + .cta-band { padding-top: 72px; }

@media (max-width: 650px) {
    .hero + .section { padding-top: 40px; }
    .why-band + .cta-band { padding-top: 44px; }
}

/* ===== Catálogo de ejercicios (catalogo.php) ===== */
.page-hero-ejercicios { padding-bottom: 116px; }
.page-hero-ejercicios .page-hero-bg { object-position: 63% 22%; }
.page-hero-ejercicios + .cat-main { padding-top: 0; }
.cat-stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; padding: 0; list-style: none; }
.cat-stats li { display: inline-flex; align-items: center; padding: 6px 14px; border: 1px solid rgba(255, 255, 255, .45); border-radius: 999px; color: var(--white); background: rgba(255, 255, 255, .14); font-size: .86rem; font-weight: 750; }

.cat-main { padding-bottom: 80px; }
.cat-filter-card { position: relative; z-index: 2; display: grid; grid-template-columns: 1.6fr 1fr auto; gap: 16px; align-items: end; margin: -58px 0 30px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 22px; background: var(--white); box-shadow: 0 18px 45px rgba(16, 90, 91, .16); }
.cat-filter-actions { display: flex; align-items: center; gap: 14px; }
.cat-filter-actions .button { min-width: 120px; }
.cat-clear { color: var(--teal-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.cat-clear:hover { color: var(--teal); }
.cat-results { margin: 0 0 18px; color: var(--muted); }
.cat-results strong { color: var(--navy); font-size: 1.1rem; }

.ex-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.ex-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--white); box-shadow: 0 8px 24px rgba(30, 41, 59, .07); transition: transform .2s ease, box-shadow .2s ease; }
.ex-card:hover { transform: translateY(-4px); box-shadow: 0 18px 38px rgba(16, 90, 91, .2); }
.ex-media { position: relative; display: block; width: 100%; padding: 0; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; background: linear-gradient(180deg, var(--cream) 0%, var(--white) 100%); aspect-ratio: 16 / 9; }
.ex-img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ex-play { position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--white); background: var(--teal); box-shadow: 0 6px 14px rgba(16, 90, 91, .35); transition: transform .2s ease, background .2s ease; }
.ex-media:hover .ex-play, .ex-media:focus-visible .ex-play { background: var(--teal-dark); transform: scale(1.1); }
.ex-media:focus-visible, .ex-button:focus-visible, .cat-clear:focus-visible { outline: 3px solid rgba(23, 115, 116, .4); outline-offset: 2px; }
.ex-i { width: 18px; height: 18px; flex: 0 0 18px; }
.ex-play .ex-i { margin-left: 2px; }
.ex-body { display: flex; flex: 1; flex-direction: column; gap: 12px; padding: 16px; }
.ex-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ex-chip { padding: 3px 10px; border-radius: 999px; color: var(--navy-soft); background: var(--cream); border: 1px solid var(--line); font-size: .74rem; font-weight: 700; }
.ex-chip-zone { color: var(--white); background: var(--teal); border-color: var(--teal); }
.ex-chip-level { color: var(--teal-dark); background: var(--teal-pale); border-color: var(--teal-pale); }
.ex-title { margin: 0; color: var(--navy); font-size: 1.05rem; line-height: 1.25; }
.ex-button { width: 100%; margin-top: auto; }

.ex-empty { display: grid; grid-column: 1 / -1; justify-items: center; gap: 10px; padding: 48px 22px; border: 2px dashed #9CCFCF; border-radius: 22px; text-align: center; background: linear-gradient(180deg, var(--white) 0%, var(--teal-pale) 100%); }
.ex-empty-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; color: var(--white); background: linear-gradient(135deg, var(--teal-dark), var(--teal)); box-shadow: 0 10px 22px rgba(23, 115, 116, .28); }
.ex-empty-icon .ex-i { width: 30px; height: 30px; }
.ex-empty h3 { margin: 6px 0 0; color: var(--navy); }
.ex-empty p { max-width: 440px; margin: 0 0 8px; color: var(--muted); }

.video-modal .modal-close { background: var(--teal-dark); }
.video-modal .modal-title { color: var(--navy); }

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

@media (max-width: 900px) {
    .ex-grid { grid-template-columns: repeat(2, 1fr); }
    .cat-filter-card { grid-template-columns: 1fr 1fr; }
    .cat-filter-actions { grid-column: 1 / -1; }
}

@media (max-width: 650px) {
    .page-hero-ejercicios { padding-bottom: 84px; }
    .cat-filter-card { grid-template-columns: 1fr; margin: -46px 0 24px; padding: 18px; }
    .cat-filter-actions .button { flex: 1; }
    .ex-grid { grid-template-columns: 1fr; gap: 16px; }
    .ex-empty { padding: 36px 18px; }
}

/* ===== Portada: captura de la app en el hero ===== */
.hero-phone { position: relative; z-index: 0; display: flex; justify-content: center; align-self: start; margin-bottom: -170px; }
.hero-phone-glow { position: absolute; z-index: -1; top: 42%; left: 50%; width: min(470px, 118%); aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); background: radial-gradient(circle at 32% 26%, rgba(207, 236, 235, .7) 0%, rgba(110, 190, 190, .55) 45%, rgba(40, 140, 141, .4) 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), 0 0 80px 10px rgba(143, 208, 207, .18); }
.hero-phone-glow::after { content: ""; position: absolute; inset: -26px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); }
.hero-phone-img { display: block; width: min(300px, 100%); height: auto; filter: drop-shadow(0 26px 34px rgba(6, 40, 41, .5)); }
.hero-phone-chip { position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 10px 15px; border-radius: 999px; color: var(--teal-dark); background: var(--white); box-shadow: 0 12px 28px rgba(6, 40, 41, .3); font-size: .85rem; font-weight: 750; line-height: 1.2; white-space: nowrap; }
.hero-phone-chip::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--teal); }
.hero-phone-chip-a { top: 30%; right: calc(50% + 108px); }
.hero-phone-chip-b { top: 50%; right: calc(50% + 124px); }
@media (min-width: 901px) and (max-width: 1100px) {
    .hero-phone-chip-b { display: none; }
}
@media (max-width: 900px) {
    .hero-phone { align-self: center; margin-bottom: -120px; padding-top: 0; }
}
@media (max-width: 650px) {
    .hero-phone { margin-bottom: -90px; }
    .hero-phone-img { width: min(250px, 72%); }
    .hero-phone-glow { width: min(340px, 92%); }
    .hero-phone-chip { display: none; }
}

/* ===== Aviso de privacidad en el pie ===== */
.footer-legal { margin-top: 18px; font-size: .8rem; line-height: 1.5; }
.footer-legal a { color: var(--teal-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.footer-legal + .footer-credit { margin-top: 12px; }
