/* ==========================================================================
   ACADEMIA GALENO - PÁGINA DE INICIO
   Tipografía: Newsreader (titulares, tono de texto médico) + Figtree (cuerpo)
   Paleta: azul clínico del logo, azul profundo, blanco frío y celeste de acento
   ========================================================================== */

:root {
    --ink: #0a2540;          /* azul profundo: titulares, fondos oscuros */
    --ink-2: #0f3258;
    --brand: #1b4f72;        /* azul del logo */
    --sky: #0284c7;          /* acento principal */
    --pulse: #38bdf8;        /* celeste: línea de electrocardiograma */
    --paper: #f4f7fb;        /* blanco frío */
    --white: #ffffff;
    --line: #dbe4ee;
    --text: #2e4259;
    --muted: #5b6e84;
    --green: #059669;
    --green-dark: #047857;
    --wa: #16a34a;
    --wa-dark: #15803d;

    --font-head: "Newsreader", Georgia, "Times New Roman", serif;
    --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

    --gutter: max(24px, calc((100vw - 1200px) / 2));
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--white);
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

section[id] {
    scroll-margin-top: 72px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 3px solid var(--pulse);
    outline-offset: 2px;
}

/* --- CABECERA PRINCIPAL --- */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px var(--gutter);
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.header-logo-img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 10px;
}

.header-titles {
    display: flex;
    flex-direction: column;
}

.header-main-title {
    font-family: var(--font-head);
    font-size: 21px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.1;
    letter-spacing: -0.2px;
}

.header-sub-title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--sky);
    letter-spacing: 0.2px;
}

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

.nav-menu {
    display: flex;
    gap: 26px;
    font-size: 15px;
    font-weight: 500;
}

.nav-link {
    position: relative;
    color: var(--text);
    text-decoration: none;
    padding: 6px 0;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: var(--sky);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--sky);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.btn-nav-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--sky);
    color: var(--white);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 22px;
    border-radius: 999px;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-nav-action:hover {
    background: #0369a1;
}

.btn-nav-intranet {
    background: var(--green);
}

.btn-nav-intranet:hover {
    background: var(--green-dark);
}

/* Botón Hamburguesa Móvil */
.mobile-menu-btn {
    display: none;
    background: none;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 22px;
    line-height: 1;
    color: var(--ink);
    cursor: pointer;
    padding: 8px 12px;
}

/* --- HERO + CARRUSEL --- */
.hero-slider-wrapper {
    position: relative;
    width: 100%;
    min-height: 700px;
    background:
        radial-gradient(1000px 500px at 85% 10%, rgba(2, 132, 199, 0.35), transparent 60%),
        linear-gradient(135deg, #071a30 0%, var(--ink) 45%, var(--ink-2) 100%);
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.9s ease-in-out;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(105deg, rgba(7, 26, 48, 0.92) 0%, rgba(7, 26, 48, 0.78) 42%, rgba(7, 26, 48, 0.38) 100%),
        linear-gradient(0deg, rgba(7, 26, 48, 0.55) 0%, transparent 35%);
    z-index: 2;
}

/* Electrocardiograma: único movimiento de la página, se dibuja una vez */
.hero-ecg {
    position: absolute;
    left: 0;
    bottom: 34px;
    width: 100%;
    height: 90px;
    z-index: 3;
    pointer-events: none;
}

.hero-ecg path {
    fill: none;
    stroke: url(#ecgFade);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: ecg-draw 3.2s cubic-bezier(0.45, 0, 0.2, 1) 0.4s forwards;
}

@keyframes ecg-draw {
    to {
        stroke-dashoffset: 0;
    }
}

.hero-slider-content {
    position: relative;
    z-index: 4;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 72px 24px 110px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 56px;
    align-items: center;
}

.hero-left-content {
    color: var(--white);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(56, 189, 248, 0.12);
    color: #bae6fd;
    border: 1px solid rgba(56, 189, 248, 0.35);
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 22px 0;
}

.hero-main-title {
    font-family: var(--font-head);
    font-size: clamp(38px, 4.6vw, 62px);
    font-weight: 600;
    line-height: 1.06;
    letter-spacing: -1px;
    color: var(--white);
    margin: 0 0 22px 0;
    max-width: 14em;
}

.hero-description {
    font-size: 18px;
    line-height: 1.6;
    color: #d6e2ef;
    margin: 0 0 30px 0;
    max-width: 34em;
}

.hero-pills-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hero-pill-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 16px;
    color: #eaf1f8;
}

.check-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: var(--sky);
    color: var(--white);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 900;
    flex-shrink: 0;
    margin-top: 2px;
}

/* --- TARJETA DE ADMISIÓN / FORMULARIO --- */
.hero-card-form {
    position: relative;
    background: var(--white);
    border-radius: 18px;
    box-shadow: 0 40px 70px -25px rgba(0, 0, 0, 0.55);
    padding: 30px 28px 28px;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    overflow: hidden;
}

.hero-card-form::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--brand), var(--sky), var(--pulse));
}

.card-form-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.card-form-title {
    font-family: var(--font-head);
    font-size: 25px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.15;
    letter-spacing: -0.3px;
}

.card-form-badge {
    background: var(--ink);
    color: var(--white);
    padding: 5px 11px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.card-form-badge span {
    color: var(--pulse);
}

.lead-form-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group-full {
    width: 100%;
}

.form-row-dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.hero-input-field {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--ink);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hero-input-field::placeholder {
    color: #71839a;
}

.hero-input-field:hover {
    border-color: #b8c8da;
}

.hero-input-field:focus {
    background: var(--white);
    border-color: var(--sky);
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.16);
}

select.hero-input-field {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235b6e84' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.required-notice {
    font-size: 12.5px;
    color: var(--muted);
}

.form-terms-check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text);
}

.form-terms-check input {
    width: 17px;
    height: 17px;
    accent-color: var(--sky);
}

.form-terms-check a {
    color: var(--sky);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.btn-submit-whatsapp-hero {
    background: var(--wa);
    color: var(--white);
    border: none;
    height: 52px;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 20px -8px rgba(22, 163, 74, 0.7);
    transition: background 0.2s ease, transform 0.15s ease;
}

.btn-submit-whatsapp-hero:hover {
    background: var(--wa-dark);
}

.btn-submit-whatsapp-hero:active {
    transform: translateY(1px);
}

.slider-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.25s ease;
}

.slider-dot.active {
    background: var(--pulse);
    width: 26px;
    border-radius: 6px;
}

/* --- ENCABEZADOS DE SECCIÓN --- */
.section-badge {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    color: var(--sky);
    margin-bottom: 10px;
    padding-left: 14px;
    position: relative;
}

.section-badge::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 7px;
    height: 7px;
    margin-top: -3.5px;
    border-radius: 50%;
    background: var(--sky);
}

.section-heading {
    font-family: var(--font-head);
    font-size: clamp(30px, 3.4vw, 44px);
    font-weight: 600;
    color: var(--ink);
    line-height: 1.12;
    letter-spacing: -0.6px;
    margin: 0;
}

.section-lead {
    font-size: 18px;
    color: var(--muted);
    margin: 14px 0 0 0;
    max-width: 36em;
}

/* --- SOBRE NOSOTROS --- */
.about-section {
    padding: 104px 24px;
    background: var(--white);
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
}

.about-intro-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 72px;
    align-items: center;
}

.about-text .section-heading {
    margin-bottom: 24px;
}

.about-p {
    font-size: 17px;
    line-height: 1.75;
    color: var(--text);
    margin: 0 0 16px 0;
    max-width: 38em;
}

.about-p strong {
    color: var(--ink);
}

.about-list {
    list-style: none;
    margin: 26px 0 0 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.about-list li {
    position: relative;
    padding-left: 34px;
    font-weight: 600;
    color: var(--ink);
}

.about-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 1px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(2, 132, 199, 0.12);
    color: var(--sky);
    font-size: 12px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-image-frame {
    position: relative;
    border-radius: 16px;
}

/* Marco desplazado: da profundidad sin sombras genéricas */
.about-image-frame::before {
    content: "";
    position: absolute;
    inset: 18px -18px -18px 18px;
    border: 2px solid var(--pulse);
    border-radius: 16px;
    z-index: 0;
}

.about-image-frame img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 440px;
    object-fit: cover;
    display: block;
    border-radius: 16px;
}

/* --- MISIÓN, VISIÓN Y VALORES --- */
.mv-band {
    background:
        radial-gradient(900px 400px at 0% 0%, rgba(2, 132, 199, 0.25), transparent 60%),
        var(--ink);
    padding: 88px 24px;
    color: var(--white);
}

.mv-container {
    max-width: 1200px;
    margin: 0 auto;
}

.mv-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.mv-card {
    padding: 8px 40px;
    border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.mv-card:first-child {
    padding-left: 0;
    border-left: none;
}

.mv-card:last-child {
    padding-right: 0;
}

.mv-card-icon {
    color: var(--pulse);
    margin-bottom: 18px;
}

.mv-card-title {
    font-family: var(--font-head);
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.3px;
    color: var(--white);
    margin: 0 0 12px 0;
}

.mv-card-text {
    font-size: 16px;
    line-height: 1.7;
    color: #c5d5e6;
    margin: 0;
}

/* --- ASÍ SE ESTUDIA --- */
.method-section {
    background: var(--paper);
    padding: 104px 24px;
}

.method-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 72px;
    align-items: start;
}

.method-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 40px;
}

.method-item {
    display: flex;
    gap: 18px;
    padding: 28px 0;
    border-top: 1px solid var(--line);
}

.method-item svg {
    flex-shrink: 0;
    color: var(--sky);
    margin-top: 2px;
}

.method-item h3 {
    font-family: var(--font-head);
    font-size: 22px;
    font-weight: 600;
    color: var(--ink);
    margin: 0 0 6px 0;
}

.method-item p {
    font-size: 15.5px;
    line-height: 1.65;
    color: var(--muted);
    margin: 0;
}

/* --- CURSOS --- */
.courses-section {
    background: var(--white);
    padding: 104px 24px;
}

.courses-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 48px;
}

.info-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

.info-course-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.info-course-card:hover {
    border-color: #9fc4de;
    box-shadow: 0 24px 40px -24px rgba(10, 37, 64, 0.35);
    transform: translateY(-3px);
}

.info-course-header {
    position: relative;
    height: 190px;
    background: linear-gradient(135deg, var(--ink) 0%, var(--brand) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.info-course-placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.info-course-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.info-course-card:hover .info-course-img {
    transform: scale(1.04);
}

.info-course-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(10, 37, 64, 0.88);
    color: var(--white);
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
}

.info-course-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.info-course-title {
    font-family: var(--font-head);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.3px;
    line-height: 1.2;
    color: var(--ink);
    margin: 0 0 10px 0;
}

.info-course-desc {
    font-size: 15.5px;
    line-height: 1.65;
    color: var(--muted);
    margin: 0 0 18px 0;
    flex: 1;
}

.info-course-meta {
    border-top: 1px solid var(--line);
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 20px;
}

.info-course-meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-course-meta-item svg {
    color: var(--sky);
    flex-shrink: 0;
}

.info-course-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    border: 1.5px solid var(--ink);
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    color: var(--ink);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.info-course-cta:hover {
    background: var(--ink);
    color: var(--white);
}

.courses-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 56px 24px;
    background: var(--paper);
    border-radius: 14px;
    border: 1px dashed #b8c8da;
    color: var(--muted);
}

.courses-empty p {
    margin: 0;
    font-size: 16px;
}

/* --- LLAMADO FINAL --- */
.cta-band {
    background: linear-gradient(100deg, var(--brand) 0%, var(--sky) 100%);
    padding: 64px 24px;
}

.cta-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.cta-title {
    font-family: var(--font-head);
    font-size: clamp(28px, 3vw, 38px);
    font-weight: 600;
    letter-spacing: -0.4px;
    color: var(--white);
    margin: 0 0 8px 0;
}

.cta-text {
    font-size: 17px;
    color: #e0f2fe;
    margin: 0;
}

.cta-button {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    padding: 0 32px;
    background: var(--white);
    color: var(--ink);
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    border-radius: 12px;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.cta-button:hover {
    box-shadow: 0 16px 28px -12px rgba(0, 0, 0, 0.45);
    transform: translateY(-2px);
}

/* --- FOOTER --- */
.main-footer {
    background: #071a30;
    color: #9fb2c8;
    padding: 72px 24px 24px;
    font-size: 15px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.2fr;
    gap: 56px;
    margin-bottom: 52px;
}

.footer-brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-brand-row strong {
    font-family: var(--font-head);
    font-size: 24px;
    font-weight: 600;
    color: var(--white);
}

.footer-logo {
    height: 40px;
    width: 40px;
    object-fit: cover;
    border-radius: 8px;
}

.footer-brand p {
    line-height: 1.7;
    margin: 0;
    max-width: 24em;
}

.footer-col h4 {
    font-family: var(--font-head);
    color: var(--white);
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 18px 0;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: #9fb2c8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--pulse);
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.footer-contact svg {
    flex-shrink: 0;
    margin-top: 3px;
    color: var(--pulse);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13.5px;
    color: #7389a3;
}

/* --- BOTÓN FLOTANTE WHATSAPP --- */
.btn-whatsapp-flotante {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 58px;
    height: 58px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px -6px rgba(37, 211, 102, 0.6);
    z-index: 1000;
    transition: transform 0.2s ease;
}

.btn-whatsapp-flotante:hover {
    transform: scale(1.08);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1080px) {
    .method-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* Tablets (< 992px) */
@media (max-width: 992px) {
    .hero-slider-wrapper {
        min-height: 0;
    }

    .hero-slider-content {
        grid-template-columns: 1fr;
        padding: 56px 20px 100px;
        gap: 40px;
    }

    .hero-overlay {
        background: linear-gradient(180deg, rgba(7, 26, 48, 0.9) 0%, rgba(7, 26, 48, 0.8) 100%);
    }

    .hero-card-form {
        max-width: 560px;
        margin: 0;
    }

    .about-section,
    .method-section,
    .courses-section {
        padding: 72px 20px;
    }

    .about-intro-grid {
        grid-template-columns: 1fr;
        gap: 56px;
    }

    .about-image-frame {
        margin-right: 18px;
    }

    .about-image-frame img {
        height: 320px;
    }

    .mv-band {
        padding: 64px 20px;
    }

    .mv-grid {
        grid-template-columns: 1fr;
    }

    .mv-card,
    .mv-card:first-child,
    .mv-card:last-child {
        padding: 28px 0;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.16);
    }

    .mv-card:first-child {
        border-top: none;
        padding-top: 0;
    }

    .cta-container {
        flex-direction: column;
        align-items: flex-start;
    }

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

/* Celulares (< 768px) */
@media (max-width: 768px) {
    .main-header {
        padding: 10px 16px;
    }

    .mobile-menu-btn {
        display: block;
    }

    /* Menú móvil desplegable */
    .nav-links-area {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        border-bottom: 1px solid var(--line);
        flex-direction: column;
        align-items: stretch;
        padding: 18px 16px 20px;
        gap: 16px;
        display: none;
        box-shadow: 0 18px 30px -12px rgba(10, 37, 64, 0.25);
    }

    .nav-links-area.menu-open {
        display: flex;
    }

    .nav-menu {
        flex-direction: column;
        gap: 4px;
    }

    .nav-link {
        font-size: 16px;
        padding: 10px 0;
    }

    .nav-link::after {
        display: none;
    }

    .btn-nav-action {
        width: 100%;
        height: 48px;
    }

    .header-main-title {
        font-size: 19px;
    }

    .hero-description {
        font-size: 16px;
    }

    .hero-pill-item {
        font-size: 15px;
    }

    .hero-ecg {
        bottom: 30px;
        height: 70px;
    }

    .form-row-dual {
        grid-template-columns: 1fr;
    }

    .hero-card-form {
        padding: 26px 20px 22px;
    }

    .card-form-title {
        font-size: 22px;
    }

    /* Evitar zoom automático en Safari iOS */
    .hero-input-field {
        font-size: 16px;
    }

    .method-grid {
        grid-template-columns: 1fr;
    }

    .info-courses-grid {
        grid-template-columns: 1fr;
    }

    .cta-button {
        width: 100%;
    }

    .btn-whatsapp-flotante {
        bottom: 18px;
        right: 18px;
        width: 54px;
        height: 54px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .hero-ecg path {
        animation: none;
        stroke-dashoffset: 0;
    }

    * {
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   EXPLORADOR DEL CUERPO HUMANO
   ========================================================================== */
.explorer-section {
    background: var(--paper);
    padding: 104px 24px;
}

.explorer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.explorer-header {
    margin-bottom: 48px;
}

.explorer-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 72px;
    align-items: center;
}

.explorer-figure {
    position: relative;
    margin: 0;
    text-align: center;
}

.explorer-figure::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 46%;
    width: 330px;
    height: 330px;
    max-width: 100%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: #e6f1fa;
    border: 1px solid #cfe2f3;
}

.explorer-figure figcaption {
    position: relative;
    margin-top: 10px;
    font-size: 13px;
    color: var(--muted);
}

.body-svg {
    position: relative;
    display: block;
    width: 100%;
    max-width: 340px;
    height: auto;
    margin: 0 auto;
}

.body-outline * {
    fill: rgba(255, 255, 255, 0.78);
    stroke: #a9c0d8;
    stroke-width: 1.6;
}

.organ {
    cursor: pointer;
}

.organ path,
.organ ellipse {
    fill: rgba(2, 132, 199, 0.14);
    stroke: #5f8fb8;
    stroke-width: 1.8;
    stroke-linejoin: round;
    transition: fill 0.25s ease, stroke 0.25s ease;
}

.organ .organ-line {
    fill: none;
    stroke-linecap: round;
    stroke-width: 1.6;
    pointer-events: none;
}

.organ:hover path:not(.organ-line),
.organ:hover ellipse {
    fill: rgba(56, 189, 248, 0.3);
}

.organ.is-active path:not(.organ-line),
.organ.is-active ellipse {
    fill: rgba(56, 189, 248, 0.48);
    stroke: var(--sky);
    stroke-width: 2.4;
}

.organ.is-active .organ-line {
    stroke: var(--sky);
}

/* El corazón late y los pulmones se expanden solo cuando se seleccionan */
.organ.organ-heart.is-active path:not(.organ-line) {
    fill: rgba(220, 38, 38, 0.6);
    stroke: #b91c1c;
    transform-box: fill-box;
    transform-origin: center;
    animation: heartbeat 1.1s ease-in-out infinite;
}

.organ-lungs.is-active path:not(.organ-line) {
    transform-box: fill-box;
    transform-origin: center;
    animation: breathe 4s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    14% { transform: scale(1.14); }
    28% { transform: scale(1); }
    42% { transform: scale(1.09); }
    70% { transform: scale(1); }
}

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

.explorer-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.explorer-chip {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    background: var(--white);
    border: 1.5px solid var(--line);
    border-radius: 999px;
    padding: 10px 18px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.explorer-chip:hover {
    border-color: var(--sky);
}

.explorer-chip[aria-pressed="true"] {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--white);
}

.explorer-panel {
    background: var(--white);
    border: 1px solid var(--line);
    border-left: 4px solid var(--sky);
    border-radius: 14px;
    padding: 32px;
}

.explorer-title {
    font-family: var(--font-head);
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.4px;
    color: var(--ink);
    margin: 0 0 12px 0;
}

.explorer-text {
    font-size: 17px;
    line-height: 1.7;
    color: var(--text);
    margin: 0 0 14px 0;
    max-width: 38em;
}

.explorer-fact {
    font-size: 15.5px;
    color: var(--muted);
    margin: 0 0 24px 0;
}

.explorer-fact strong {
    color: var(--ink);
}

.explorer-topics-label {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 10px 0;
}

.explorer-topics {
    list-style: none;
    padding: 0;
    margin: 0 0 28px 0;
    display: grid;
    gap: 9px;
}

.explorer-topics li {
    position: relative;
    padding-left: 24px;
    font-size: 16px;
    color: var(--text);
}

.explorer-topics li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 0.62em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sky);
}

.explorer-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    padding: 0 26px;
    background: var(--wa);
    color: var(--white);
    font-weight: 700;
    font-size: 15.5px;
    text-decoration: none;
    border-radius: 12px;
    box-shadow: 0 10px 20px -10px rgba(22, 163, 74, 0.7);
    transition: background 0.2s ease;
}

.explorer-cta:hover {
    background: var(--wa-dark);
}

/* ==========================================================================
   PÁGINA LEGAL (POLÍTICA DE PRIVACIDAD)
   ========================================================================== */
.legal-back {
    padding: 10px 22px;
}

.legal-hero {
    background:
        radial-gradient(900px 400px at 90% 0%, rgba(2, 132, 199, 0.3), transparent 60%),
        var(--ink);
    color: var(--white);
    padding: 72px 24px 56px;
}

.legal-hero-inner {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px;
}

.legal-hero h1 {
    font-family: var(--font-head);
    font-size: clamp(34px, 4vw, 50px);
    font-weight: 600;
    letter-spacing: -0.8px;
    line-height: 1.1;
    margin: 0 0 14px 0;
    color: var(--white);
}

.legal-hero p {
    font-size: 18px;
    color: #c5d5e6;
    margin: 0 0 8px 0;
}

.legal-hero .legal-updated {
    font-size: 14px;
    color: #9fb2c8;
}

.legal-container {
    max-width: 760px;
    margin: 0 auto;
    padding: 56px 24px 96px;
}

.legal-intro {
    font-size: 18px;
    line-height: 1.75;
    margin: 0;
}

.legal-toc {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 22px 28px;
    margin: 36px 0 12px;
}

.legal-toc p {
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 8px 0;
}

.legal-toc ol {
    margin: 0;
    padding-left: 22px;
    columns: 2;
    column-gap: 36px;
}

.legal-toc li {
    margin-bottom: 4px;
    break-inside: avoid;
}

.legal-container h2 {
    font-family: var(--font-head);
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -0.4px;
    color: var(--ink);
    margin: 52px 0 14px 0;
    scroll-margin-top: 90px;
}

.legal-container h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--ink);
    margin: 26px 0 8px 0;
}

.legal-container p,
.legal-container li {
    font-size: 16.5px;
    line-height: 1.75;
}

.legal-container ul {
    padding-left: 22px;
    margin: 0 0 14px 0;
}

.legal-container li {
    margin-bottom: 6px;
}

.legal-container a {
    color: var(--sky);
    text-underline-offset: 2px;
}

.legal-container strong {
    color: var(--ink);
}

.legal-footer {
    padding: 28px 24px;
}

.legal-footer .footer-bottom {
    border-top: none;
    padding-top: 0;
}

.legal-footer a {
    color: var(--pulse);
    margin-left: 16px;
}

@media (max-width: 992px) {
    .explorer-section {
        padding: 72px 20px;
    }

    .explorer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .explorer-figure::before {
        width: 300px;
        height: 300px;
    }

    .body-svg {
        max-width: 290px;
    }
}

@media (max-width: 768px) {
    .explorer-panel {
        padding: 24px 20px;
    }

    .explorer-title {
        font-size: 27px;
    }

    .explorer-cta {
        width: 100%;
    }

    .btn-nav-action.legal-back {
        width: auto;
        height: auto;
        padding: 9px 16px;
        font-size: 13px;
    }

    .legal-hero {
        padding: 52px 20px 40px;
    }

    .legal-toc ol {
        columns: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .organ-heart.is-active path,
    .organ-lungs.is-active path:not(.organ-line) {
        animation: none;
    }
}