:root {
    --cream: #f4f1ea;
    --cream-dark: #ebe6db;
    --card: #fbfaf7;
    --sage: #5e846d;       /* verde del logo */
    --sage-dark: #4b6b58;
    --sage-soft: #e3ebe4;
    --ink: #33403a;
    --muted: #6f7a73;
    --line: #dcd8ce;
    --gold: #d4a017;
    --serif: "EB Garamond", Georgia, "Times New Roman", serif;
    --sans: "DM Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--sans);
    color: var(--ink);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
}

.wrap {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
    padding: 0 16px;
    text-align: center;
}

h1, h2 {
    font-family: var(--serif);
    font-weight: 500;
    color: var(--ink);
    line-height: 1.15;
    letter-spacing: -.01em;
}

/* Portada */
.hero { position: relative; overflow: hidden; padding: 28px 0 48px; }
.hero::before, .hero::after {
    content: "";
    position: absolute;
    width: 190px;
    height: 190px;
    background: url(/img/hojas.svg) no-repeat center / contain;
    pointer-events: none;
}
.hero::before { top: -36px; left: -40px; transform: rotate(160deg); }
.hero::after { bottom: 0; right: -36px; transform: rotate(-12deg); }
.hero .wrap { z-index: 1; }
.hero h1 { font-size: clamp(36px, 10vw, 54px); max-width: 9em; margin: 10px auto 14px; text-wrap: balance; }
.hero.booking { min-height: 70vh; }
.hero.booking h1 { font-size: clamp(30px, 7vw, 44px); }
.logo { width: 136px; height: auto; }
.lead-text { color: var(--muted); font-size: 16px; line-height: 1.5; max-width: 360px; margin: 0 auto 28px; }

.eyebrow { margin: 18px 0 0; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--sage-dark); }
.hero h1 .price { color: var(--sage-dark); }
.hero .btn { max-width: 420px; margin-left: auto; margin-right: auto; }
.call-row { margin: 14px 0 0; font-size: 15px; color: var(--muted); }
.call-row a { color: var(--ink); font-weight: 500; }

.card {
    background: var(--card);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(51, 64, 58, .08), 0 1px 3px rgba(51, 64, 58, .06);
    padding: 24px;
    text-align: left;
    margin: 0 auto;
    max-width: 480px;
}

.lead-form label { display: block; font-size: 14px; font-weight: 500; margin: 16px 0 6px; }
.lead-form label:first-of-type { margin-top: 0; }
.lead-form input {
    width: 100%;
    padding: 13px 14px;
    font: inherit;
    font-size: 16px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
}
.lead-form input::placeholder { color: #a7ada7; }
.lead-form input:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px var(--sage-soft); }
.field-error, .form-error { color: #b03a2e; font-size: 13px; }
.field-error { display: block; margin-top: 4px; }
.form-error:not(:empty) { background: #fbeae7; padding: 10px 12px; border-radius: 8px; margin-bottom: 14px; }
.form-error ul { margin: 0; padding-left: 18px; }
.form-note { margin: 12px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn {
    display: block;
    width: 100%;
    margin-top: 22px;
    padding: 14px 18px;
    font: inherit;
    font-weight: 500;
    font-size: 16px;
    color: #fff;
    background: var(--sage);
    border: 1px solid var(--sage);
    border-radius: 999px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s;
}
.btn:hover:not(:disabled) { background: var(--sage-dark); }
.btn:focus-visible { outline: 3px solid var(--sage-soft); outline-offset: 2px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--sage-dark); }
.btn-ghost:hover:not(:disabled) { background: var(--sage-soft); }

/* Oferta */
.offer { padding: 8px 0 40px; }
.offer h2 { font-size: clamp(28px, 6.5vw, 38px); margin: 0 0 28px; }
.offer ul { list-style: none; padding: 0; margin: 0 auto; display: inline-block; text-align: left; font-size: clamp(16px, 4vw, 18px); }
.offer li { position: relative; padding: 8px 0 8px 36px; line-height: 1.45; }
.offer li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--sage) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12.5l3.2 3.2L17 9' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 24px no-repeat;
}

.offer .btn { max-width: 420px; margin: 24px auto 0; }
.offer-total { margin: 20px 0 0; font-size: 18px; }
.offer-total strong { font-family: var(--serif); font-size: 34px; font-weight: 500; color: var(--sage-dark); }
.offer-total s { color: var(--muted); }

/* Doctores */
.doctors { padding: 8px 0 40px; }
.doctors h2 { font-size: clamp(28px, 6.5vw, 38px); margin: 0 0 24px; }
.doctor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.doctor { margin: 0; }
.doctor img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 14px; box-shadow: 0 10px 30px rgba(51, 64, 58, .08); }
.doctor figcaption { margin-top: 10px; font-size: 15px; line-height: 1.3; }
.doctor figcaption strong { display: block; font-weight: 600; }
.doctor figcaption span { color: var(--muted); font-size: 13px; }
.doctors-note { color: var(--muted); margin: 16px 0 0; }

/* Barra fija y formulario emergente */
/* Solo las páginas con barra fija (la portada) dejan espacio abajo para que no tape el pie. */
body:has(.sticky-bar) { padding-bottom: 84px; }
.sticky-bar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 5;
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(251, 250, 247, .96);
    border-top: 1px solid var(--line);
}
.sticky-bar .btn { margin-top: 0; padding: 14px 18px; flex: 1 1 auto; max-width: 320px; }
.sticky-bar .btn-ghost { flex: 0 0 auto; width: auto; }
.sticky-bar .btn { white-space: nowrap; }

.form-dialog {
    border: 0;
    border-radius: 20px;
    padding: 0;
    width: min(440px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    background: var(--card);
    color: var(--ink);
    box-shadow: 0 20px 60px rgba(30, 40, 35, .25);
}
.form-dialog::backdrop { background: rgba(30, 40, 35, .45); }
.form-dialog .lead-form { position: relative; padding: 24px 22px; }
.form-dialog h2 { font-size: 28px; margin: 0 28px 6px 0; }
.dialog-sub { margin: 0 0 18px; color: var(--muted); font-size: 15px; }
.dialog-close { position: absolute; top: 12px; right: 12px; border: 0; background: transparent; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 10px; border-radius: 8px; }
.dialog-close:focus-visible { outline: 3px solid var(--sage-soft); }

/* Ubicación y reseñas */
.find-us { padding: 16px 0 48px; }
.find-us h2 { font-size: clamp(28px, 6.5vw, 38px); margin: 0 0 14px; }
.address { color: var(--muted); font-size: 15px; line-height: 1.5; margin: 0 auto 24px; max-width: 420px; }
.map { width: 100%; height: 340px; border: 0; display: block; margin: 0 auto; border-radius: 16px; background: var(--cream-dark); box-shadow: 0 10px 30px rgba(51, 64, 58, .08); }
.maps-link { display: inline-block; margin: 14px 0 0; color: var(--ink); font-size: 15px; }
.review { display: block; width: 100%; max-width: 400px; height: auto; margin: 24px auto 0; border-radius: 12px; box-shadow: 0 10px 30px rgba(51, 64, 58, .08); }

.reviews { margin-top: 32px; }
.reviews-head { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 16px; }
.reviews-score { font-family: var(--serif); font-size: 32px; line-height: 1; }
.reviews-source { color: var(--muted); font-size: 14px; }
.stars { color: var(--gold); letter-spacing: 2px; }
.stars-off { color: #d8d3c6; }

.carousel-track {
    position: relative;
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 4px 2px 14px;
    -webkit-overflow-scrolling: touch;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track:focus-visible { outline: 2px solid var(--sage); outline-offset: 4px; border-radius: 16px; }

.review-card {
    flex: 0 0 100%;
    scroll-snap-align: start;
    margin: 0;
    padding: 20px;
    background: var(--card);
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(51, 64, 58, .07), 0 1px 2px rgba(51, 64, 58, .06);
    text-align: left;
}
.review-author { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.review-author a { color: inherit; text-decoration: none; }
.review-author a:hover { text-decoration: underline; }
.review-author small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.avatar {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    display: grid;
    place-items: center;
    background: var(--sage);
    color: #fff;
    font-weight: 500;
}
.review-card .stars { margin: 12px 0 8px; font-size: 16px; }
.review-card blockquote {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 7;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.carousel-controls { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 6px; }
.carousel.static .carousel-controls { display: none; }
.carousel-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--card);
    color: var(--ink);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
.carousel-btn:hover { background: var(--sage-soft); }
.carousel-dots { display: flex; gap: 6px; }
.carousel-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: #cfcabd; cursor: pointer; }
.carousel-dots button.active { background: var(--sage); }
.reviews-attribution { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.reviews-attribution a { color: var(--ink); }

@media (min-width: 720px) {
    .find-us .wrap { max-width: 980px; }
    .find-us h2, .address { max-width: 640px; margin-left: auto; margin-right: auto; }
    .map { max-width: 640px; }
    .review-card { flex-basis: calc((100% - 32px) / 3); }
}

@media (min-width: 560px) and (max-width: 719px) {
    .review-card { flex-basis: calc((100% - 16px) / 2); }
}

@media (min-width: 900px) {
    .hero::before, .hero::after { width: 280px; height: 280px; }
}

/* Pie de página */
.site-footer { color: var(--muted); text-align: center; font-size: 13px; line-height: 1.6; padding: 24px 16px 32px; }
.site-footer p { max-width: 560px; margin: 0 auto 12px; }
.site-footer p:first-child { border-top: 1px solid var(--line); padding-top: 24px; }
.site-footer a { color: var(--ink); }

/* Agenda */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-head strong { font-size: 18px; font-weight: 500; }
.cal-nav { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: #fff; font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink); }
.cal-nav:disabled { opacity: .3; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-dow { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.cal-day { aspect-ratio: 1; border: 0; border-radius: 50%; font: inherit; font-size: 15px; font-weight: 600; background: var(--sage-soft); color: var(--sage-dark); cursor: pointer; }
.cal-day:hover:not(:disabled) { background: #d2dfd4; }
.cal-day:disabled { background: none; color: #c4c6bf; font-weight: 400; cursor: default; }
.cal-day.selected { background: var(--sage); color: #fff; }

#slots-box h2 { font-family: inherit; font-size: 16px; font-weight: 600; margin: 24px 0 12px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.slot { padding: 12px 8px; border: 1px solid var(--sage); border-radius: 10px; background: #fff; color: var(--sage-dark); font: inherit; font-weight: 600; cursor: pointer; }
.slot:hover { background: var(--sage-soft); }
.slot.selected { background: var(--sage); color: #fff; }
.hint { font-size: 13px; color: var(--muted); margin: 16px 0 0; }

.confirm-card { text-align: center; }
.confirm-when span { display: block; font-size: 18px; }
.confirm-when span::first-letter { text-transform: uppercase; }
.confirm-when strong { display: block; font-family: var(--serif); font-size: 48px; font-weight: 500; color: var(--sage-dark); }
.confirm-actions .btn { margin-top: 12px; }

/* Páginas legales */
.legal { background: #fff; }
.legal .wrap { text-align: left; max-width: 760px; padding-top: 32px; padding-bottom: 48px; line-height: 1.6; }
.legal h1 { font-size: 36px; }
.legal h2 { font-size: 24px; margin-top: 28px; }
