:root {
  --c-primary: #0D2B45;
  --c-primary-2: #1F4569;
  --c-primary-3: #0a1f33;
  --c-accent: #C8A45D;
  --c-accent-2: #d9b974;
  --c-bg: #FAFAF7;
  --c-bg-alt: #F1EEE6;
  --c-text: #1B1F23;
  --c-muted: #5B6470;
  --c-line: #E2DED3;
  --c-success: #1F7A52;
  --c-error: #B53A3A;
  --c-whatsapp: #25D366;
  --c-discount: #E03E2F;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 4px 18px rgba(13, 43, 69, .08);
  --shadow-lg: 0 14px 40px rgba(13, 43, 69, .14);
  --container: 1180px;
  --gap: 24px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--c-primary-2); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; color: var(--c-primary); margin: 0 0 .5em; line-height: 1.15; letter-spacing: -.01em; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 700; margin-bottom: .6em; }
h3 { font-size: 1.25rem; font-weight: 600; }

.eyebrow {
  text-transform: uppercase; letter-spacing: .18em; font-size: .78rem;
  color: var(--c-accent); font-weight: 700; margin: 0 0 14px;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  border: 0;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .18s ease, background .18s;
  font-family: 'Inter', sans-serif;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; box-shadow: var(--shadow); }
.btn-lg { padding: 16px 32px; font-size: 1.05rem; }
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-2); }
.btn-accent { background: var(--c-accent); color: var(--c-primary); }
.btn-accent:hover { background: var(--c-accent-2); }
.btn-whatsapp { background: var(--c-whatsapp); color: #fff; }
.btn-whatsapp:hover { background: #1ebd5b; }
.btn-link { background: transparent; color: var(--c-primary-2); padding: 8px 0; font-weight: 500; box-shadow: none !important; }
.btn-link:hover { background: transparent; text-decoration: underline; transform: none; }
.btn-block { display: block; width: 100%; margin-top: 8px; }

/* Header */
.site-header { position: sticky; top: 0; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-bottom: 1px solid var(--c-line); z-index: 50; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 24px; max-width: var(--container); margin: 0 auto; }
.brand img { height: 44px; width: auto; }
.nav { display: flex; gap: 28px; }
.nav a { color: var(--c-text); font-weight: 500; font-size: .95rem; position: relative; }
.nav a::after { content: ''; position: absolute; bottom: -6px; left: 0; right: 0; height: 2px; background: var(--c-accent); transform: scaleX(0); transition: transform .2s; transform-origin: center; }
.nav a:hover { text-decoration: none; }
.nav a:hover::after { transform: scaleX(1); }
.header-cta { padding: 10px 18px; }
@media (max-width: 980px) {
  .nav { display: none; }
  .header-cta { padding: 8px 14px; font-size: .9rem; }
}

/* Banner descuento */
.discount-banner {
  background: linear-gradient(90deg, var(--c-discount) 0%, #F35F4F 100%);
  color: #fff;
  padding: 14px 0;
  font-size: .95rem;
}
.discount-banner .container {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.discount-banner .badge {
  background: #fff; color: var(--c-discount); font-weight: 800; font-size: 1.2rem;
  padding: 4px 12px; border-radius: 999px; flex-shrink: 0;
}
.discount-banner .msg { flex: 1; min-width: 250px; }
.discount-banner a { color: #fff; text-decoration: underline; font-weight: 600; }

/* HERO con foto de fondo */
.hero-bg {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  background: url('/assets/img/consultorio-real_930bee2c.jpeg') center/cover no-repeat;
  background-attachment: fixed;
  color: #fff;
  padding: 100px 0;
  overflow: hidden;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(13,43,69,.92) 0%, rgba(13,43,69,.72) 50%, rgba(10,31,51,.85) 100%);
  z-index: 1;
}
.hero-content { position: relative; z-index: 2; max-width: 760px; }
.hero-eyebrow {
  display: inline-block; padding: 6px 16px; border: 1px solid rgba(200, 164, 93, .5);
  border-radius: 999px; color: var(--c-accent-2); font-size: .82rem;
  text-transform: uppercase; letter-spacing: .15em; font-weight: 600;
  margin: 0 0 24px;
}
.hero-bg h1 { color: #fff; margin-bottom: 24px; }
.hero-bg h1 span { color: var(--c-accent-2); font-style: italic; }
.hero-bg .lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: rgba(255,255,255,.88); margin: 0 0 36px; max-width: 620px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
@media (max-width: 820px) {
  .hero-bg { background-attachment: scroll; min-height: 68vh; padding: 70px 0; }
}

/* Stats */
.stats { background: var(--c-primary); color: #fff; padding: 40px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-num { font-family: 'Playfair Display', serif; font-size: clamp(2rem, 3.5vw, 2.8rem); font-weight: 700; color: var(--c-accent-2); line-height: 1; }
.stat-lbl { font-size: .9rem; color: rgba(255,255,255,.78); text-transform: uppercase; letter-spacing: .1em; }
@media (max-width: 640px) { .stats-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }

/* Sections */
.section { padding: 96px 0; }
.section-alt { background: var(--c-bg-alt); }
.section-dark { background: var(--c-primary-3); color: rgba(255,255,255,.92); }
.section-dark .eyebrow { color: var(--c-accent-2); }
.section-dark h2 { color: #fff; }
.section-dark .section-sub { color: rgba(255,255,255,.72); }
.section-sub { color: var(--c-muted); margin-top: 0; margin-bottom: 48px; font-size: 1.08rem; max-width: 720px; }

/* Cards de tratamientos */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.card {
  background: #fff; padding: 32px 26px; border-radius: var(--radius-lg);
  box-shadow: var(--shadow); border: 1px solid var(--c-line);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--c-accent); }
.card-icon { font-size: 2.2rem; margin-bottom: 14px; line-height: 1; }
.card h3 { color: var(--c-primary); margin-bottom: 8px; }
.card p { color: var(--c-muted); margin: 0; }
.card-badge { display: inline-block; background: var(--c-discount); color: #fff; font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }
@media (max-width: 820px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .cards { grid-template-columns: 1fr; } }

/* Proceso de diseño de sonrisa digital (10 pasos) */
.process-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}
.process-step {
  position: relative;
  margin: 0;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s, border-color .25s;
}
.process-step:hover { transform: translateY(-4px); border-color: var(--c-accent); }
.process-step img { aspect-ratio: 1/1; object-fit: cover; }
.process-step .step-num {
  position: absolute; top: 10px; left: 10px;
  font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 700;
  color: var(--c-accent-2);
  background: rgba(13,43,69,.85);
  padding: 4px 12px; border-radius: 999px; z-index: 2;
}
.process-step figcaption {
  padding: 14px 16px;
  font-size: .82rem;
  color: rgba(255,255,255,.78);
  background: rgba(0,0,0,.25);
}
.process-step figcaption strong { color: #fff; display: block; margin-bottom: 4px; font-size: .92rem; }
@media (max-width: 1100px) { .process-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 820px) { .process-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .process-grid { grid-template-columns: 1fr; } }

.cta-row { text-align: center; margin-top: 56px; }

/* Implantología guiada */
.implant-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.implant-step {
  margin: 0; background: #fff; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--c-line);
  transition: transform .25s, box-shadow .25s;
}
.implant-step:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.implant-step img { aspect-ratio: 4/3; object-fit: cover; }
.implant-step figcaption { padding: 18px 22px; font-size: .92rem; color: var(--c-muted); }
.implant-step figcaption strong { display: block; color: var(--c-primary); font-size: 1.05rem; margin-bottom: 6px; font-family: 'Playfair Display', serif; }
@media (max-width: 820px) { .implant-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .implant-grid { grid-template-columns: 1fr; } }

/* Sección equipo */
.team { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.team-card {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-lg);
  padding: 28px 22px; text-align: center; box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
}
.team-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.team-card .avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-accent) 100%);
  color: #fff; font-weight: 700; font-size: 2rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  font-family: 'Playfair Display', serif;
}
.team-card h3 { color: var(--c-primary); margin-bottom: 4px; }
.team-clinic { color: var(--c-accent); font-weight: 600; font-size: .9rem; margin: 0 0 6px; text-transform: uppercase; letter-spacing: .08em; }
.team-hours { color: var(--c-muted); font-size: .9rem; margin: 0; }
@media (max-width: 820px) { .team { grid-template-columns: repeat(2, 1fr); } }

/* Galería con tabs */
.gallery-tabs {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 32px; justify-content: center;
}
.tab {
  background: transparent; color: var(--c-muted);
  border: 1px solid var(--c-line);
  padding: 10px 20px; border-radius: 999px;
  cursor: pointer; font: inherit; font-weight: 500;
  transition: all .2s;
}
.tab:hover { border-color: var(--c-primary-2); color: var(--c-primary); }
.tab.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery-grid.hidden { display: none; }
.gallery-grid figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); position: relative; }
.gallery-grid img { aspect-ratio: 1/1; object-fit: cover; transition: transform .4s; }
.gallery-grid figure:hover img { transform: scale(1.05); }
.gallery-grid figcaption {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 8px 12px; font-size: .8rem; color: #fff;
  background: linear-gradient(to top, rgba(13,43,69,.85), transparent);
  font-weight: 600;
}
@media (max-width: 820px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }

/* Video section */
.video-section {
  position: relative; min-height: 60vh;
  display: flex; align-items: center;
  overflow: hidden;
  color: #fff;
}
.video-section video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}
.video-overlay {
  position: relative; z-index: 1; width: 100%;
  background: linear-gradient(135deg, rgba(13,43,69,.92) 0%, rgba(13,43,69,.55) 100%);
  padding: 100px 0;
}
.video-overlay h2 { color: #fff; max-width: 720px; }
.video-overlay p { color: rgba(255,255,255,.85); font-size: 1.1rem; max-width: 620px; }

/* Forms generales */
.form { background: #fff; padding: 32px; border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid var(--c-line); display: grid; gap: 16px; max-width: 720px; margin: 0 auto; }
.form .label, .form label { display: block; font-weight: 500; color: var(--c-text); }
.form input, .form select, .form textarea {
  width: 100%; margin-top: 4px; padding: 11px 14px;
  font: inherit; color: inherit;
  border: 1px solid var(--c-line); border-radius: 8px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--c-primary-2);
  box-shadow: 0 0 0 3px rgba(31, 69, 105, .15);
}
.form textarea { resize: vertical; min-height: 80px; }
.form-row.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 540px) { .form-row.two-col { grid-template-columns: 1fr; } }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--c-muted); font-size: .92rem; }
.form .check input { width: auto; margin: 4px 0 0; }
.legal { font-size: .82rem; color: var(--c-muted); margin: 0; line-height: 1.5; }

/* Booking multi-paso */
.booking-form { max-width: 880px; }
.step-indicator { color: var(--c-accent); font-size: .8rem; margin: 0 0 12px; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.step.hidden { display: none; }
.step h3 { color: var(--c-primary); margin-bottom: 18px; font-size: 1.4rem; }

/* Tarjetas de tratamiento (paso 1) */
.treatment-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 820px) { .treatment-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .treatment-grid { grid-template-columns: 1fr; } }
.treatment-card {
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
  background: #fff; border: 2px solid var(--c-line); border-radius: var(--radius);
  padding: 18px; text-align: left; cursor: pointer;
  transition: border-color .15s, transform .08s, box-shadow .15s;
  position: relative; min-height: 110px;
  font: inherit; color: inherit;
}
.treatment-card:hover { border-color: var(--c-primary-2); transform: translateY(-2px); box-shadow: var(--shadow); }
.treatment-card .t-name { font-weight: 700; color: var(--c-primary); font-size: 1.05rem; }
.treatment-card .t-hint { font-size: .8rem; color: var(--c-muted); margin-top: auto; }
.treatment-card.online .t-hint { color: var(--c-success); font-weight: 600; }
.treatment-card.whatsapp .t-hint { color: var(--c-whatsapp); font-weight: 600; }
.treatment-card .t-badge {
  background: var(--c-discount); color: #fff; font-size: .7rem; font-weight: 700;
  padding: 3px 8px; border-radius: 999px;
  position: absolute; top: 10px; right: 10px;
}

/* Tarjetas de clínica (paso 2) */
.clinic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 12px; }
@media (max-width: 540px) { .clinic-grid { grid-template-columns: 1fr; } }
.clinic-card {
  background: #fff; border: 2px solid var(--c-line); border-radius: var(--radius);
  padding: 22px; text-align: left; cursor: pointer; font: inherit; color: inherit;
  transition: border-color .15s, transform .08s, box-shadow .15s;
}
.clinic-card:hover { border-color: var(--c-primary-2); transform: translateY(-2px); box-shadow: var(--shadow); }
.clinic-card .c-name { display: block; font-weight: 700; color: var(--c-primary); font-size: 1.15rem; margin-bottom: 6px; }
.clinic-card .c-addr { display: block; color: var(--c-muted); font-size: .9rem; }

/* Slots agrupados (paso 3) */
.slot-group { margin-bottom: 18px; }
.slot-group h4 { color: var(--c-accent); margin: 0 0 8px; font-family: 'Playfair Display', serif; font-size: 1rem; }
.slot-row { display: flex; flex-wrap: wrap; gap: 8px; }
.slots { min-height: 60px; }
.slot-btn { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--c-line); background: #fff; cursor: pointer; font: inherit; }
.slot-btn:hover { border-color: var(--c-primary-2); }
.slot-btn.selected { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.hint { color: var(--c-muted); font-size: .92rem; margin: 0; }
.hint.error { color: var(--c-error); }

.status { margin: 0; min-height: 1.4em; font-size: .92rem; }
.status[data-kind="error"] { color: var(--c-error); }
.status[data-kind="success"] { color: var(--c-success); }

/* Two-col contacto */
.two-col-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 820px) { .two-col-grid { grid-template-columns: 1fr; } }

.contact-card { background: #fff; padding: 32px; border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid var(--c-line); }
.contact-card h3 { color: var(--c-primary); margin-bottom: 18px; font-size: 1.4rem; }
.contact-card .clinic-block { margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--c-line); }
.contact-card .clinic-block:last-of-type { border-bottom: none; }
.contact-card .clinic-block strong { display: block; color: var(--c-primary); font-size: 1.05rem; margin-bottom: 4px; font-family: 'Playfair Display', serif; }
.contact-card .clinic-block p { margin: 0; color: var(--c-muted); }
.contact-card p { margin: 8px 0; }

/* Footer */
.site-footer {
  background: var(--c-primary-3); color: #cdd5df;
  padding: 50px 0 30px; margin-top: 0;
  font-size: .92rem; text-align: center;
}
.site-footer p { margin: 8px 0; }
.site-footer a { color: var(--c-accent-2); }
.site-footer strong { color: #fff; font-family: 'Playfair Display', serif; }

/* Floating WhatsApp */
.whatsapp-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  background: var(--c-whatsapp); color: #fff;
  width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(37, 211, 102, .5);
  transition: transform .12s ease;
  animation: pulse 2.5s infinite;
}
.whatsapp-fab:hover { transform: scale(1.08); text-decoration: none; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 8px 22px rgba(37, 211, 102, .5); }
  50% { box-shadow: 0 8px 22px rgba(37, 211, 102, .5), 0 0 0 14px rgba(37, 211, 102, 0); }
}

/* Animaciones reveal al scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Thanks / 404 */
.thanks { padding: 100px 20px; text-align: center; max-width: 640px; margin: 0 auto; }
.thanks h1 { font-size: clamp(2.4rem, 5vw, 3.4rem); }
.thanks .btn { margin: 8px 6px; }
