/* ===== Doctores Malik de Tchara — paleta tomada del logo ===== */
:root {
  --navy: #0B3358;
  --blue: #1F6FA8;
  --sky: #5BB3DE;
  --green: #2F8A63;
  --green-soft: #E7F3EC;
  --sky-soft: #EAF5FB;
  --bg: #FFFFFF;
  --bg-tint: #F4F9FB;
  --text: #1B2B3A;
  --muted: #4E6274;
  --line: #D9E6EE;
  --radius: 18px;
  --shadow: 0 10px 30px -12px rgba(11, 51, 88, .18);
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3 { color: var(--navy); line-height: 1.2; margin: 0 0 .6em; }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { padding: 0; margin: 0; list-style: none; }

.container { width: min(1140px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(820px, 100% - 2.5rem); }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }

mark.todo { background: #FFF1B8; color: #6B4E00; padding: 0 .25em; border-radius: 4px; font-size: .92em; }

/* ===== Botones ===== */
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: .55rem; padding: .85rem 1.4rem; border-radius: 999px; font-weight: 600; font-size: 1rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background .2s, color .2s, transform .2s, box-shadow .2s; font-family: inherit; }
.btn svg { width: 1.25rem; height: 1.25rem; }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 8px 20px -10px rgba(47, 138, 99, .7); }
.btn-primary:hover { background: #26724F; transform: translateY(-1px); }
.btn-ghost { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-ghost:hover { background: var(--navy); color: #fff; }
.btn-sm { padding: .55rem 1.1rem; font-size: .95rem; }
.btn-block { width: 100%; }
@media (max-width: 420px) { .btn { white-space: normal; text-align: center; } }

/* ===== Header ===== */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.site-header.scrolled { border-color: var(--line); box-shadow: 0 4px 18px -12px rgba(11, 51, 88, .25); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--navy); }
.brand-mark { width: 48px; height: 48px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.05rem; }
.brand-text span { font-size: .82rem; color: var(--muted); }

.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; background: var(--navy); margin: 5px 0; border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav { display: flex; align-items: center; gap: 1.6rem; }
.site-nav ul { display: flex; gap: 1.4rem; }
.site-nav ul a { text-decoration: none; color: var(--text); font-weight: 500; padding: .3rem 0; border-bottom: 2px solid transparent; }
.site-nav ul a:hover { color: var(--blue); border-color: var(--sky); }

@media (max-width: 1100px) {
  .nav-toggle { display: block; }
  .site-nav { position: fixed; inset: 72px 0 auto 0; background: #fff; flex-direction: column; align-items: stretch; padding: 1rem 1.25rem 1.5rem; gap: 1rem; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); transform: translateY(-120%); visibility: hidden; transition: transform .3s, visibility .3s; }
  .site-nav.open { transform: none; visibility: visible; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: block; padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .brand-text span { display: none; }
}

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; background: radial-gradient(900px 500px at 85% 20%, var(--sky-soft), transparent 70%), radial-gradient(700px 420px at 10% 100%, var(--green-soft), transparent 70%); padding: clamp(2.5rem, 7vw, 5.5rem) 0; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700; color: var(--green); margin-bottom: .8rem; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 36rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.hero-media { position: relative; }
.hero-logo { background: #fff; border-radius: 28px; padding: clamp(1.2rem, 3vw, 2rem); box-shadow: var(--shadow); }
.rating-card { position: relative; margin: -1.6rem auto 0; width: max-content; display: grid; grid-template-columns: auto auto; column-gap: .5rem; align-items: center; background: #fff; border-radius: 16px; padding: .8rem 1rem; box-shadow: var(--shadow); text-decoration: none; color: var(--text); font-size: .9rem; }
.rating-card .stars { grid-column: 1 / -1; color: #F2B01E; letter-spacing: .1em; }
.rating-card strong { font-size: 1.5rem; color: var(--navy); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { max-width: 420px; margin-inline: auto; width: 100%; }
}

/* ===== Barra de confianza ===== */
.trust { background: var(--navy); color: #fff; padding: 1.4rem 0; }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.trust-item { display: flex; align-items: center; gap: .8rem; }
.trust-item strong { display: block; }
.trust-item span { font-size: .9rem; color: #C7DBEA; }
.trust-ic { flex: none; width: 42px; height: 42px; border-radius: 50%; background: rgba(91, 179, 222, .18); display: grid; place-items: center; color: var(--sky); font-size: 1.2rem; }
.trust-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 900px) { .trust-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .trust-grid { grid-template-columns: 1fr; } }

/* ===== Secciones ===== */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-tint { background: var(--bg-tint); }
.section-head { max-width: 680px; margin-bottom: 2.5rem; }
.section-head p:last-child { color: var(--muted); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Servicios */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; transition: transform .25s, box-shadow .25s, border-color .25s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card p { color: var(--muted); font-size: .98rem; margin: 0; }
.card-ic { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; background: linear-gradient(135deg, var(--sky-soft), var(--green-soft)); color: var(--blue); margin-bottom: 1rem; }
.card-ic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 1000px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }

/* Síntomas */
.symptoms { display: grid; gap: .7rem; }
.symptoms li { display: flex; gap: .8rem; align-items: flex-start; background: #fff; border-radius: 14px; padding: .9rem 1.1rem; border: 1px solid var(--line); }
.symptoms li span { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; font-weight: 700; font-size: .85rem; }

/* Profesionales */
.team { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.doc { display: grid; grid-template-columns: 200px 1fr; gap: 1.4rem; align-items: start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; align-items: start; }
.doc h3 { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; margin-bottom: .3rem; }
.doc .role { color: var(--green); font-weight: 600; font-size: .95rem; }
.doc p:last-child { color: var(--muted); margin: 0; }
@media (max-width: 900px) { .team { grid-template-columns: 1fr; } }

.img-placeholder { display: grid; place-items: center; text-align: center; border-radius: 16px; background: repeating-linear-gradient(135deg, var(--sky-soft) 0 14px, #F2F8FB 14px 28px); color: var(--muted); font-size: .9rem; border: 1px dashed #B9CFDD; }
.ratio-1-1 { aspect-ratio: 1 / 1; }
.ratio-4-5 { aspect-ratio: 4 / 5; }
.ratio-16-9 { aspect-ratio: 16 / 9; }
.team-photo { margin: 0 0 1.5rem; }
.team-photo img, .team-photo .img-placeholder { width: 100%; border-radius: var(--radius); object-fit: cover; aspect-ratio: 16 / 9; }
.team-photo figcaption { margin-top: .6rem; font-size: .9rem; color: var(--muted); text-align: center; }

/* Opiniones */
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.review { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: flex; flex-direction: column; gap: .9rem; }
.review-stars { color: #F2B01E; letter-spacing: .12em; font-size: 1.05rem; }
.review blockquote { margin: 0; flex: 1; }
.review blockquote p { margin: 0; font-size: 1.02rem; color: var(--text); }
.review figcaption { display: flex; align-items: center; gap: .7rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.review figcaption strong { display: block; color: var(--navy); font-size: .97rem; }
.review figcaption small { color: var(--muted); font-size: .85rem; }
.review-avatar { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--blue), var(--green)); }
.reviews-more { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; margin: 2rem 0 0; }
@media (max-width: 960px) { .reviews { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .reviews { grid-template-columns: 1fr; } }

/* Pasos */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; counter-reset: none; }
.steps li { position: relative; background: #fff; border-radius: var(--radius); padding: 1.5rem; border: 1px solid var(--line); }
.steps p { color: var(--muted); margin: 0; font-size: .98rem; }
.step-n { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; margin-bottom: .9rem; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.bring { margin-top: 2rem; background: var(--bg-tint); border-radius: var(--radius); padding: 1.6rem; border-left: 5px solid var(--green); }
.bring ul { display: grid; gap: .4rem; margin-bottom: 1rem; }
.bring li::before { content: "•"; color: var(--green); font-weight: 700; margin-right: .6rem; }
.note { background: var(--sky-soft); border-radius: 12px; padding: .9rem 1.1rem; margin: 0; font-size: .97rem; }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item h3 { margin: 0; font-family: var(--sans); }
.faq-item button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1rem; text-align: left; background: none; border: 0; padding: 1.2rem .2rem; font: 600 1.08rem/1.4 var(--sans); color: var(--navy); cursor: pointer; }
.faq-ic { flex: none; position: relative; width: 22px; height: 22px; border-radius: 50%; background: var(--green-soft); }
.faq-ic::before, .faq-ic::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 2px; background: var(--green); transform: translate(-50%, -50%); transition: transform .25s; }
.faq-ic::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item button[aria-expanded="true"] .faq-ic::after { transform: translate(-50%, -50%) rotate(0); }
.faq-panel { padding: 0 .2rem 1.2rem; color: var(--muted); }
.faq-panel p { margin: 0; }

/* Ubicación */
.info-list { display: grid; gap: 1rem; margin: 1.2rem 0 1.6rem; }
.info-list li { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.info-list strong { color: var(--navy); }
.map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 3; background: var(--sky-soft); }
.map { position: relative; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: var(--sky-soft); }
.map-fallback { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; text-align: center; text-decoration: none; color: var(--navy); background: radial-gradient(circle at 50% 40%, #fff, var(--sky-soft) 70%); }
.map-fallback svg { width: 44px; height: 44px; fill: none; stroke: var(--green); stroke-width: 1.6; margin-bottom: .4rem; }
.map-fallback span { color: var(--muted); }
.map-fallback .map-cta { color: var(--blue); font-weight: 600; margin-top: .5rem; }
@media (max-width: 480px) { .info-list li { grid-template-columns: 1fr; gap: .2rem; } }

.esquel { background: var(--bg-tint); border: 1px solid var(--line); border-left: 5px solid var(--sky); border-radius: 14px; padding: 1.2rem 1.3rem; margin: 1.8rem 0 0; }
.esquel h3 { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; margin-bottom: .4rem; }
.esquel p { margin-bottom: .6rem; }
.esquel a { font-weight: 600; text-decoration: none; }
.sedes { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.sede { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1rem; }
.sede h4 { margin: 0 0 .35rem; color: var(--navy); font-size: 1.05rem; }
.sede p { font-size: .95rem; margin-bottom: .6rem; }
.sede-wa { display: flex; flex-direction: column; gap: .3rem; margin: 0 !important; }
@media (max-width: 520px) { .sedes { grid-template-columns: 1fr; } }
.esquel-tag { text-transform: uppercase; letter-spacing: .1em; font-size: .75rem; font-weight: 700; color: var(--blue); margin-bottom: .3rem !important; }

/* Contacto */
.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.4rem 0; }
.small { font-size: .9rem; color: var(--muted); }
.form { background: #fff; border-radius: 22px; padding: clamp(1.4rem, 3vw, 2rem); border: 1px solid var(--line); }
.field { margin-bottom: 1rem; border: 0; padding: 0; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label, .field legend { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .35rem; color: var(--navy); padding: 0; }
.field input, .field select, .field textarea { width: 100%; padding: .8rem .95rem; border: 1.5px solid #C5D7E3; border-radius: 12px; font: inherit; background: #fff; color: var(--text); transition: border-color .2s, box-shadow .2s; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(91, 179, 222, .25); }
.radios { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; }
.radios label { display: flex; align-items: center; gap: .45rem; font-weight: 500; color: var(--text); margin: 0; }
.radios input { width: 18px; height: 18px; accent-color: var(--green); }
.hp { position: absolute; left: -9999px; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; gap: 0; } }

/* Footer */
.site-footer { background: var(--navy); color: #D5E3EE; padding: 3rem 0 1.5rem; font-size: .97rem; }
.site-footer a { color: #fff; }
.site-footer strong { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2rem; }
.footer-logo { width: 56px; height: 56px; background: #fff; border-radius: 50%; padding: 4px; margin-bottom: .8rem; }
.footer-brand { font-family: var(--serif); font-size: 1.3rem; color: #fff; margin-bottom: .4rem; }
.legal { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 2rem; padding-top: 1.4rem; font-size: .88rem; color: #A9C1D4; }
.legal p:last-child { margin: 0; }
.legal-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.legal-bottom p { margin: 0; }
.credit { display: inline-flex; align-items: center; gap: .6rem; color: #C7DBEA !important; text-decoration: none; font-size: .9rem; }
.credit:hover { color: #fff !important; }
.credit-logo { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; }
.credit-logo img { width: 22px; height: auto; }
@media (max-width: 600px) { .legal-bottom { flex-direction: column; align-items: flex-start; padding-right: 70px; } }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 1rem; } }

/* WhatsApp flotante */
.wa-float { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 60; width: 58px; height: 58px; border-radius: 50%; background: #25D366; color: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .35); transition: transform .2s; }
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 30px; height: 30px; }

/* Animaciones */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition: none !important; }
}

/* Páginas simples (gracias / 404) */
.simple-page { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 2rem; background: radial-gradient(800px 400px at 50% 0%, var(--sky-soft), transparent 70%); }
.simple-page .box { max-width: 520px; }
.simple-page img { width: 120px; margin: 0 auto 1.5rem; }
.simple-page .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; margin-top: 1.5rem; }
#ubicacion .split { align-items: start; } #ubicacion .map { margin-top: 2.6rem; }
@media (max-width: 860px) { #ubicacion .map { margin-top: 0; } }

.form-status { margin: 1rem 0 0; padding: .9rem 1rem; border-radius: 12px; background: #FDECEA; color: #8A1F11; font-size: .95rem; }
.form-status a { color: #8A1F11; font-weight: 600; }
.form-hint { margin: .7rem 0 0; font-size: .88rem; color: var(--muted); text-align: center; }

.doc-photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 14px; }
@media (max-width: 1100px) and (min-width: 901px) { .doc { grid-template-columns: 1fr; } .doc-photo { max-width: 260px; } }
@media (max-width: 520px) { .doc { grid-template-columns: 1fr; } .doc-photo { max-width: 100%; } }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 2rem; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 40%; border-radius: var(--radius); box-shadow: var(--shadow); }
.gallery figcaption { margin-top: .6rem; font-size: .92rem; color: var(--muted); }
@media (max-width: 600px) { .gallery { grid-template-columns: 1fr; } }
