/* Identidad: azul marino y dorado, igual que el recetario personal */
:root {
    --navy: #1f3a5f;
    --navy-dark: #152a45;
    --gold: #b08d57;
    --gold-soft: #f4ede2;
    --ink: #1d2329;
    --muted: #5b6670;
    --surface: #ffffff;
    --tint: #f5f7fa;
    --line: #dde3ea;
    --whatsapp: #128c4a;
    --radius: 10px;
    --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
    margin: 0;
    font-family: "Source Sans 3", "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 1.125rem;          /* 18 px: legible para pacientes mayores */
    line-height: 1.6;
    color: var(--ink);
    background: var(--surface);
}
h1, h2, h3 { font-family: "Lora", Georgia, serif; color: var(--navy); line-height: 1.2; font-weight: 600; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin: .3em 0 .4em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 .6em; }
h3 { font-size: 1.25rem; margin: 0 0 .4em; }
a { color: var(--navy); }
.muted { color: var(--muted); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 10; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Encabezado */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 92px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
/* el nombre nunca se parte en dos líneas */
.brand-text strong { white-space: nowrap; font-family: "Lora", Georgia, serif; font-weight: 600; color: var(--navy); font-size: 1.45rem; letter-spacing: .01em; }
.brand-text small { color: var(--gold); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .74rem; margin-top: 3px; }
.brand-mark { width: 64px; height: 64px; flex: none; }
.footer-mark { width: 52px; height: 52px; flex: none; }
.menu { display: flex; align-items: center; gap: 18px; }
.menu a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: 1rem; white-space: nowrap; }
.menu a:hover { color: var(--navy); }
.menu-toggle { display: none; }

/* Botones */
.btn {
    display: inline-block; background: var(--navy); color: #fff !important; text-decoration: none;
    padding: 14px 24px; border-radius: var(--radius); font-weight: 700; border: 2px solid var(--navy);
}
.btn:hover { background: var(--navy-dark); }
.lang-switch { font-size: .9rem; font-weight: 700; color: var(--muted); white-space: nowrap; letter-spacing: .04em; }
.lang-movil { display: none; margin-left: auto; }
.lang-switch strong { color: var(--navy); }
.lang-switch a { color: var(--gold); text-decoration: none; }
.lang-switch a:hover { text-decoration: underline; }
.btn-small { padding: 8px 16px; }
.btn-ghost { background: transparent; color: var(--navy) !important; }
.btn-ghost:hover { background: var(--gold-soft); }
.btn-gold { background: #d9b97f; border-color: #d9b97f; color: var(--navy-dark) !important; }
.btn-gold:hover { background: #e6cb98; }
.btn-ghost-light { background: transparent; border-color: rgba(255, 255, 255, .6); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .1); }
.btn-whatsapp { background: var(--whatsapp); border-color: var(--whatsapp); font-size: 1.2rem; }
.btn-whatsapp:hover { background: #0e7339; }

/* Portada: foto de quirófano teñida de azul, como fondo */
.hero { position: relative; overflow: hidden; background: var(--navy-dark); color: #e8eef5; padding: 88px 0 96px; }
.hero-photo { position: absolute; inset: 0 0 0 auto; width: 52%; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; filter: grayscale(1) contrast(1.05); opacity: .9; }
.hero-photo::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, var(--navy-dark) 0%, rgba(21, 42, 69, .82) 28%, rgba(31, 58, 95, .55) 100%);
}
.hero-content { position: relative; }
.hero-content > * { max-width: 640px; }
.hero h1 { color: #fff; }
.hero .eyebrow { color: #d9b97f; }
.eyebrow { color: var(--gold); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .9rem; margin: 0; }
.center { text-align: center; }
.lead { font-size: 1.25rem; }
.hero .lead { color: #d3dde8; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.badges { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.badges li { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .18); border-left: 3px solid #d9b97f; padding: 6px 12px; border-radius: 6px; font-size: .95rem; color: #e8eef5; }
.portrait { margin: 0; max-width: 340px; justify-self: center; }
.portrait img {
    display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover;
    border-radius: 16px; box-shadow: 0 0 0 1px var(--line), 0 18px 40px rgba(21, 42, 69, .18);
    outline: 1px solid var(--gold); outline-offset: 10px;
}
.portrait-placeholder {
    aspect-ratio: 4 / 5; border-radius: 16px; border: 1px solid var(--line); background: #fff;
    display: grid; place-items: center; align-content: center; gap: 18px; color: var(--muted);
    outline: 1px solid var(--gold); outline-offset: -12px;
}

/* Secciones */
.section { padding: 64px 0; }
.section-tint { background: var(--tint); }
.section-lead { color: var(--muted); max-width: 760px; margin-top: -8px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
.card { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--navy); border-radius: var(--radius); padding: 22px; }
.card p { margin: 0 0 10px; }
details summary { cursor: pointer; font-weight: 700; color: var(--navy); }
details[open] summary { margin-bottom: 6px; }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.info-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; border-left: 4px solid var(--gold); }
.info-box ul { margin: 0; padding-left: 20px; }

.steps { counter-reset: step; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.steps li { counter-increment: step; background: var(--tint); border-radius: var(--radius); padding: 20px; position: relative; padding-top: 56px; }
.steps li::before {
    content: counter(step); position: absolute; top: 16px; left: 20px; width: 30px; height: 30px; border-radius: 50%;
    background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 1rem;
}

.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--gold); }
.timeline li { padding: 0 0 16px 20px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: .5em; width: 12px; height: 12px; border-radius: 50%; background: var(--navy); }
.timeline span { display: block; font-weight: 700; color: var(--gold); font-size: .95rem; }
.photo-feature { margin: 40px 0 0; max-width: 440px; }
.photo-feature img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); box-shadow: 0 14px 34px rgba(21, 42, 69, .18); }
.photo-feature figcaption { margin-top: 10px; font-size: .95rem; color: var(--muted); }
.pubs { padding-left: 20px; }
.pubs li { margin-bottom: 10px; }
.pubs a { word-break: break-all; }

.faq { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 10px; }
.contact-line { margin-top: 18px; }

/* Sobre mí */
.about { display: grid; grid-template-columns: 1fr 1.6fr; gap: 64px; align-items: center; }
.link-arrow { font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--gold); padding-bottom: 2px; }
.link-arrow::after { content: " →"; }
.link-arrow.light { color: #fff; }

/* Especialidades: bloques de imagen y texto alternados */
.spec { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; margin-top: 56px; }
.spec-reverse .spec-media { order: 2; }
.spec-media { margin: 0; }
.spec-media img { display: block; width: 100%; height: auto; max-width: 420px; margin: 0 auto; aspect-ratio: 1 / 1; object-fit: cover; object-position: center 25%; border-radius: var(--radius); box-shadow: 0 14px 34px rgba(21, 42, 69, .18); }
.spec-body h3 { font-size: 1.6rem; }

/* Galería de fotos */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
.gallery figure { margin: 0; }
.gallery img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 5; object-fit: cover; border-radius: var(--radius); box-shadow: 0 10px 26px rgba(21, 42, 69, .15); }

/* Visor 3D (reconstrucción) */
.lista-simple { margin: 0 0 8px; padding-left: 20px; }
.lista-simple li { margin-bottom: 6px; }
.visor-3d { background: #000; border-radius: var(--radius); overflow: hidden; box-shadow: 0 14px 34px rgba(21, 42, 69, .18); max-width: 440px; margin: 0 auto; }
.visor-3d-escena { aspect-ratio: 1 / 1; background: #000 no-repeat 0 0 / 100% 100%; cursor: grab; touch-action: pan-y; user-select: none; }
.visor-3d-escena:active { cursor: grabbing; }
.visor-3d figcaption { margin-top: 0; text-align: left; padding: 10px 14px 12px; font-size: .85rem; line-height: 1.45; color: #c7d2de; background: var(--navy-dark); }
.visor-3d-casos { display: flex; gap: 6px; padding: 10px 12px 0; background: #000; }
.visor-3d-casos button { font: inherit; font-size: .85rem; font-weight: 700; padding: 5px 14px; border-radius: 999px; cursor: pointer;
    border: 1px solid rgba(217, 185, 127, .6); background: transparent; color: #d9b97f; }
.visor-3d-casos button[aria-selected="true"] { background: #d9b97f; color: var(--navy-dark); }
.spec-media:not(.visor-3d) figcaption, .gallery figcaption { margin-top: 10px; font-size: .9rem; line-height: 1.45; color: var(--muted); text-align: center; }
.spec-media img + figcaption { max-width: 420px; margin-left: auto; margin-right: auto; }
.visor-3d-ayuda { display: block; color: #d9b97f; font-weight: 700; margin-bottom: 2px; }

/* Franja final para pedir turno */
.cta-band { background: var(--gold-soft); padding: 44px 0; border-top: 1px solid #e8dcc7; }
.cta-band-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 .2em; font-size: 1.6rem; }
.cta-band p { margin: 0; color: var(--muted); }
.cta-band .cta-row { margin: 0; }

/* Pie de página */
.site-footer { background: var(--navy-dark); color: #dfe6ee; padding: 48px 0 28px; font-size: 1rem; }
.site-footer .muted { color: #aeb9c6; }
.site-footer h3 { color: #d9b97f; font-family: "Source Sans 3", Arial, sans-serif; font-size: .9rem; text-transform: uppercase; letter-spacing: .1em; margin-top: 8px; }
.site-footer a { color: #dfe6ee; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-brand { display: flex; align-items: center; gap: 12px; font-family: "Lora", Georgia, serif; font-size: 1.15rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.social { display: flex; gap: 16px; }
.social a { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%; }
.social a:hover { border-color: #d9b97f; color: #d9b97f; text-decoration: none; }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 32px; padding-top: 20px; font-size: .92rem; }
.footer-legal p { margin: 0 0 6px; }

/* Celular */
@media (max-width: 900px) {
    .two-col, .about, .spec, .footer-cols { grid-template-columns: 1fr; }
    .about, .spec { gap: 28px; }
    .spec-reverse .spec-media { order: 0; }
    .portrait { max-width: 260px; }
    .hero-photo { width: 100%; }
    .hero-photo::after { background: linear-gradient(90deg, rgba(21, 42, 69, .94), rgba(21, 42, 69, .8)); }
    .cards { grid-template-columns: 1fr 1fr; }
    .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1240px) {
    .menu-toggle { display: block; background: none; border: 2px solid var(--navy); color: var(--navy); border-radius: 8px; padding: 8px 14px; font: inherit; font-weight: 700; }
    .menu { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; padding: 12px 20px 20px; border-bottom: 1px solid var(--line); gap: 4px; }
    .menu.open { display: flex; }
    .lang-movil { display: inline; }
    .menu .lang-switch { display: none; }
    .menu a { padding: 10px 0; }
}
@media (max-width: 760px) {
    .header-row { gap: 10px; }
    .lang-switch { font-size: .8rem; }
    .header-row { min-height: 76px; }
    .brand { gap: 10px; }
    .brand-mark { width: 42px; height: 42px; }
    .brand-text strong { font-size: 1rem; }
    .brand-text small { font-size: .58rem; letter-spacing: .02em; max-width: 165px; }
    .menu-toggle { padding: 6px 10px; }
    .cards, .steps { grid-template-columns: 1fr; }
    .gallery { grid-template-columns: 1fr 1fr; gap: 12px; }
    .gallery figure:last-child { display: none; }
    .hero { padding: 48px 0 56px; }
    .section { padding: 48px 0; }
}
@media (max-width: 390px) {
    .wrap { padding: 0 14px; }
    .brand-mark { width: 36px; height: 36px; }
    .brand-text strong { font-size: .92rem; }
    .brand-text small { display: none; }
}
