/* ============================================================
   RESTYLING
   Capa visual que se carga después del resto de hojas.
   Mantiene la paleta original (rosa #d98388, lila #e5e0fa,
   crema #fff3e2, gris #333) y la tipografía Lato; solo suaviza
   sombras, unifica radios y espaciados y mejora la jerarquía.
   ============================================================ */

:root {
    --rs-bg: #fffaf8;
    --rs-text: #3a3335;
    --rs-muted: #6b5f61;
    --rs-lilac: #e5e0fa;
    --rs-lilac-soft: #f3f0fd;
    --rs-cream: #fff3e2;
    --rs-radius: 16px;
    --rs-radius-sm: 10px;
    --rs-shadow: 0 6px 24px rgba(109, 66, 68, 0.08);
    --rs-shadow-hover: 0 12px 32px rgba(109, 66, 68, 0.14);
    --rs-border: 1px solid rgba(109, 66, 68, 0.08);
}

/* ---------- Base ---------- */
html, body {
    background-color: var(--rs-bg);
    color-scheme: light;
}
body {
    color: var(--rs-text);
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
    color: var(--rs-text);
    line-height: 1.25;
}

/* Títulos de sección: centrados, más presencia y un detalle rosa */
.section-center-cards > h2,
.section-reviews > h2,
.section-center > h2,
.subsection-modalidades > h2,
.subsection-areas > h2 {
    font-size: 1.9em;
    text-align: center;
    margin: 0 0 8px;
}
.section-center-cards > h2::after,
.section-reviews > h2::after,
.section-center > h2::after,
.subsection-modalidades > h2::after,
.subsection-areas > h2::after {
    content: "";
    display: block;
    width: 56px;
    height: 4px;
    margin: 14px auto 0;
    border-radius: 4px;
    background: var(--color1);
}

/* ---------- Cabecera ---------- */
header {
    background-color: rgba(255, 255, 255, 0.96);
    box-shadow: 0 1px 0 rgba(109, 66, 68, 0.08);
    padding: 16px 32px 10px;
}
@supports (backdrop-filter: blur(8px)) {
    header {
        background-color: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(8px);
    }
}
.header-shadow {
    box-shadow: 0 6px 20px rgba(109, 66, 68, 0.10);
}
.header-left blockquote {
    color: var(--rs-muted);
}
header .nav-links a {
    border-radius: 999px;
    border-bottom: 0;
    padding: 8px 14px;
    margin: 0 2px;
    font-size: 17px;
}
header .nav-links a.active {
    border-bottom: 0;
    color: var(--color10);
    background-color: var(--color8);
}
/* Logo del header: enlace a la página principal */
.header-left a.logo-link {
    display: block;
    line-height: 0;
}
/* Botón "Página principal" en las páginas de terapia */
header .nav-links a.nav-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color10);
    border: 1px solid var(--color6);
    background-color: #fff;
    font-weight: 600;
}
header .nav-links a.nav-home svg {
    flex-shrink: 0;
}
@media (hover: hover) and (pointer: fine) {
    header .nav-links a:hover {
        border-bottom: 0;
        color: var(--color10);
        background-color: var(--color8);
    }
}

/* Botón principal (enlace a WhatsApp) */
header a.pide-cita,
.pide-cita {
    display: inline-block;
    color: #fff;
    font-size: 16px;
    line-height: 1.4;
    text-decoration: none;
    text-align: center;
    border-bottom: 0;
    background-color: var(--color1);
}
@media (hover: hover) and (pointer: fine) {
    header a.pide-cita:hover {
        color: #fff;
        border-bottom: 0;
        background-color: #c4727a;
    }
}
.pide-cita {
    border-radius: 999px;
    padding: 10px 24px;
    font-weight: bold;
    letter-spacing: 0.02em;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(217, 131, 136, 0.35);
}

/* ---------- Sobre mí (hero) ---------- */
.section-right {
    background: linear-gradient(135deg, var(--rs-lilac) 0%, var(--rs-lilac-soft) 100%);
    padding: 56px 80px;
    gap: 56px;
}
.section-right img {
    /* Proporción fija: evita que Safari estire la foto dentro del flex */
    height: auto;
    aspect-ratio: 650 / 488;
    object-fit: cover;
    flex-shrink: 0;
    align-self: center;
    margin-right: 0;
    border-radius: 24px;
    box-shadow: 18px 18px 0 var(--color6), var(--rs-shadow-hover);
}
.section-right .info {
    text-align: left;
    max-width: 680px;
}
.section-right h1 {
    font-size: 2em;
    margin-top: 0;
}
.section-right h3 {
    color: var(--color10);
    font-weight: normal;
    font-style: italic;
    font-size: 1.2em;
}

/* ---------- Modalidades ---------- */
.subsection-modalidades {
    margin-top: 0;
    padding: 64px 24px 24px;
}
.cards-modalidades {
    gap: 24px;
}
.card-modalidad {
    border: var(--rs-border);
    border-radius: var(--rs-radius);
    box-shadow: var(--rs-shadow);
    padding: 8px 28px 20px;
}
.card-modalidad h3 img {
    width: 40px;
    height: 40px;
    padding: 14px;
    margin-bottom: 4px;
    border-radius: 50%;
    background-color: var(--color8);
}
.card-modalidad hr,
.card-tarifa hr {
    background: var(--color5);
    height: 2px;
    width: 40px;
    border-radius: 2px;
}

/* ---------- Áreas de tratamiento ---------- */
.subsection-areas {
    margin-top: 48px;
    padding: 56px 0 48px;
}
.areas-container {
    max-width: 1200px;
    gap: 16px;
}
.area {
    border: 2px solid transparent;
    border-radius: var(--rs-radius);
    box-shadow: var(--rs-shadow);
    padding: 14px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.area div img {
    width: 110px;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 50%;
}
.area div .text-content h3 {
    font-size: 19px;
}
@media (hover: hover) and (pointer: fine) {
    .area:hover {
        border-color: var(--color5);
        box-shadow: var(--rs-shadow-hover);
    }
}

/* ---------- Tarifas ---------- */
.section-center-cards {
    margin-top: 0;
    padding: 64px 24px 32px;
    box-sizing: border-box;
}
.cards-tarifas {
    gap: 24px;
    margin-top: 24px;
}
.card-tarifa {
    border: var(--rs-border);
    border-radius: var(--rs-radius);
    box-shadow: var(--rs-shadow);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    flex: 1 1 240px;
    max-width: 280px;
    box-sizing: border-box;
}
.card-tarifa h3 {
    margin: 0;
    font-size: 1.1em;
    min-height: 2.5em;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-tarifa h4 {
    margin: 0;
    font-size: 2.4em;
    color: var(--color9);
}
.card-tarifa p {
    margin: 0;
    color: var(--rs-muted);
}
.section-center-cards > p em {
    margin-top: 24px;
    color: var(--rs-muted);
}

/* ---------- Preguntas frecuentes ---------- */
.section-faqs {
    box-sizing: border-box;
    width: 100%;
    padding-bottom: 32px;
}
.faq-card {
    border-radius: var(--rs-radius-sm);
    box-shadow: var(--rs-shadow);
    margin-bottom: 12px;
}
.faq-header {
    padding: 16px 20px;
    font-size: 1.05em;
}
.faq-header .arrow {
    border-top-color: var(--color1);
    border-left-width: 6px;
    border-right-width: 6px;
    border-top-width: 7px;
}
.faq-header.active {
    color: var(--color10);
}
.faq-content.show {
    padding: 4px 20px 20px;
}

/* ---------- Opiniones ---------- */
.section-reviews {
    padding: 48px 24px 0;
}
.reviews-container {
    gap: 24px;
    margin-top: 24px;
}
.review-card {
    position: relative;
    border: var(--rs-border);
    border-radius: var(--rs-radius);
    box-shadow: var(--rs-shadow);
    padding: 24px;
}
.review-card::before {
    content: "\201C";
    position: absolute;
    top: 4px;
    right: 18px;
    font-family: Georgia, serif;
    font-size: 64px;
    line-height: 1;
    color: var(--color6);
}
.review-text {
    max-height: none;
    overflow: visible;
}
.review-author {
    color: var(--rs-muted);
    font-weight: bold;
}
.indicator.active {
    background-color: var(--color1);
}

/* Carrusel de opiniones (solo móvil): una única tarjeta que contiene
   las opiniones, que se deslizan con desplazamiento nativo, y en su
   pie las flechas y los puntos. En escritorio el envoltorio no aplica
   ningún estilo y se ve la rejilla. */
.reviews-controls {
    display: none;
}
@media (max-width: 768px) {
    .reviews-slider {
        margin: 24px -8px 0;
        background-color: #fff;
        border: var(--rs-border);
        border-radius: var(--rs-radius);
        box-shadow: var(--rs-shadow);
        overflow: hidden;
    }
    .section-reviews .reviews-container {
        position: relative;
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 0;
        margin: 0;
        padding: 0;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        transition: none;
    }
    .section-reviews .reviews-container::-webkit-scrollbar {
        display: none;
    }
    .reviews-container .review-card,
    .reviews-container .review-card.active {
        display: block;
        flex: 0 0 100%;
        max-width: none;
        box-sizing: border-box;
        padding: 22px 20px 16px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }
    .reviews-controls {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin: 0;
        padding: 12px 14px 14px;
        border-top: 1px solid var(--color7);
        background-color: var(--color8);
    }
    .reviews-nav {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        width: 38px;
        height: 38px;
        padding: 0;
        border: 1px solid var(--color6);
        border-radius: 50%;
        background-color: #fff;
        color: var(--color10);
        cursor: pointer;
        transition: background-color 0.2s ease, transform 0.2s ease;
    }
    .reviews-nav:active {
        background-color: var(--color8);
        transform: scale(0.94);
    }
    .reviews-controls .carousel-indicators {
        display: flex;
        align-items: center;
        gap: 6px;
        margin: 0;
    }
    .reviews-controls .indicator {
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background-color: var(--color6);
        cursor: pointer;
        transition: width 0.25s ease, background-color 0.25s ease;
    }
    .reviews-controls .indicator.active {
        width: 22px;
        background-color: var(--color1);
    }
}
@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
    .reviews-controls .indicator,
    .reviews-nav {
        transition: none;
    }
}

/* ---------- Contacto ---------- */
.section-center {
    background: var(--rs-cream);
    box-shadow: none;
    padding: 64px 60px;
    text-align: left;
    box-sizing: border-box;
}
.section-center > h2 {
    text-align: left;
}
.section-center > h2::after {
    margin-left: 0;
}
.section-center > p {
    max-width: 640px;
}
.section-center .contact-info {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    margin: 14px 0;
}
.section-center .contact-info > a {
    min-width: 0;
    overflow-wrap: anywhere;
}
.section-center .social-links {
    justify-content: flex-start;
    margin-left: 0;
}
.section-center .contact-info > img {
    padding: 8px;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: var(--rs-shadow);
}
.social-links {
    margin-top: 28px;
    gap: 16px;
}
.social-links a {
    width: 52px;
    height: 52px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: var(--rs-shadow);
}
.section-center .social-links a:hover,
.section-center .social-links a:focus {
    padding: 0;
    background-color: #fff;
}

/* ---------- Pie ---------- */
footer {
    background-color: var(--color14);
    color: rgba(255, 255, 255, 0.85);
    padding: 28px 0;
    font-size: 0.92em;
}
.footer-links {
    flex-wrap: wrap;
    row-gap: 8px;
    margin: 0;
}
.footer-links a {
    font-weight: normal;
}
@media (hover: hover) and (pointer: fine) {
    .footer-links a:hover {
        color: #fff;
        text-decoration: underline;
    }
}

/* ---------- Banner de cookies ---------- */
.cookie-banner {
    font-family: Lato, Arial, sans-serif;
    background-color: #fff;
    box-shadow: 0 -6px 20px rgba(109, 66, 68, 0.10);
}
.cookie-banner a {
    color: var(--color10);
}
.cookie-banner button {
    background-color: var(--color1);
    border-radius: 999px;
    padding: 8px 18px;
    font-weight: bold;
}

/* ---------- Páginas de tratamiento ---------- */
.main .page-title {
    padding: 40px 20px 8px;
    font-size: 2em;
}
.main .page-title::after {
    content: "";
    display: block;
    width: 56px;
    height: 4px;
    margin: 14px auto 0;
    border-radius: 4px;
    background: var(--color1);
}
.sectionslist {
    padding: 24px 0 24px 24px;
}
.main .sectionslist .section-numbered {
    border: var(--rs-border);
    border-radius: var(--rs-radius);
    box-shadow: var(--rs-shadow);
    padding: 28px;
    margin-right: 24px;
    margin-bottom: 24px;
}
.main .sectionslist .section-numbered h2 {
    font-size: 1.45em;
}
.main .sectionslist .section-numbered li {
    margin-bottom: 4px;
}
.main .sectionslist .section-numbered li::marker {
    color: var(--color1);
}

/* ---------- Páginas legales ---------- */
.privacy-section, .cookies-policy, .legal-section {
    max-width: 860px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* ---------- Accesibilidad ---------- */
a:focus-visible,
button:focus-visible,
.faq-header:focus-visible {
    outline: 3px solid var(--color4);
    outline-offset: 2px;
    border-radius: 6px;
}

/* ---------- Móvil ---------- */
@media (max-width: 768px) {
    header {
        padding: 12px 12px 6px;
    }
    header .nav-links a {
        padding: 6px 4px;
        margin: 6px 0 0;
        font-size: 14px;
    }
    header .nav-links a.nav-home {
        flex: 0 0 auto;
        padding: 6px 14px;
        margin: 6px 6px 0;
    }
    .section-right {
        padding: 32px 20px 40px;
        gap: 28px;
        margin-bottom: 0;
    }
    .section-right img {
        width: 100%;
        max-width: 400px;
        border-radius: 20px;
        box-shadow: 10px 10px 0 var(--color6), var(--rs-shadow);
    }
    .section-right h1 {
        font-size: 1.6em;
    }
    .section-center-cards > h2,
    .section-reviews > h2,
    .section-center > h2,
    .subsection-modalidades > h2,
    .subsection-areas > h2 {
        font-size: 1.6em;
    }
    .subsection-modalidades,
    .section-center-cards,
    .section-center {
        padding-top: 48px;
        padding-bottom: 40px;
    }
    .section-center {
        padding-left: 24px;
        padding-right: 24px;
    }
    .section-center-cards {
        width: 100%;
    }
    .card-tarifa, .card-modalidad, .area {
        max-width: 340px;
        width: 100%;
        box-sizing: border-box;
    }
    .area {
        margin: 0 auto;
    }
    .area div img {
        width: 90px;
    }
    .main .page-title {
        font-size: 1.6em;
        padding-top: 28px;
    }
    .sectionslist {
        padding: 16px 0 16px 16px;
    }
    .main .sectionslist .section-numbered {
        margin-right: 16px;
        padding: 22px;
    }
}
