/* ======================================================
   Ortodent — Clínica dental y de ortodoncia
   Temática blanca + acento turquesa dental
   Tipografía: Poppins (títulos) + Inter (texto)
   ====================================================== */

:root {
  --primary: #0ea5b7;      /* turquesa dental */
  --primary-dark: #0a8696;
  --primary-soft: #e6f7f9;
  --primary-tint: #f3fbfc;
  --accent: #19c3cf;

  --ink: #16303b;          /* texto fuerte */
  --slate: #4a5d68;        /* texto medio */
  --muted: #7d8c96;        /* texto tenue */

  --white: #ffffff;
  --bg: #ffffff;
  --bg-soft: #f4fafb;      /* secciones alternas */
  --line: #e7eef1;

  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 10px 30px -18px rgba(16, 48, 59, .25);
  --shadow: 0 26px 60px -30px rgba(14, 120, 134, .40);
  --max: 1180px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--slate);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { font-family: 'Poppins', sans-serif; color: var(--ink); line-height: 1.15; font-weight: 700; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 22px; }

/* Encabezados de sección */
.section-head { max-width: 640px; margin-bottom: 2.8rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.kicker { display: inline-block; color: var(--primary-dark); font-weight: 600; font-size: .8rem; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: .7rem; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin-bottom: .7rem; }
.section-lead { color: var(--muted); font-size: 1.05rem; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: 'Poppins', sans-serif; font-weight: 600; font-size: .95rem;
  padding: .85rem 1.7rem; border-radius: 999px; border: 2px solid transparent; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s, background .25s, color .25s, border-color .25s;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 14px 30px -12px rgba(14, 165, 183, .6); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-soft { background: var(--primary-soft); color: var(--primary-dark); }
.btn-soft:hover { background: #d6f0f3; transform: translateY(-2px); }
.btn-whatsapp { background: #1fab54; color: #fff; }
.btn-whatsapp:hover { background: #178f45; transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(23,143,69,.6); }
.btn-block { width: 100%; margin-top: .3rem; }

/* Topbar */
.topbar { background: var(--primary); color: #fff; font-size: .82rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; padding-block: .5rem; gap: 1rem; }
.topbar i { margin-right: .35rem; opacity: .9; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); transition: box-shadow .3s; }
.site-header.scrolled { box-shadow: 0 10px 30px -20px rgba(16,48,59,.35); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; padding-block: .75rem; }

.brand { display: flex; align-items: center; gap: .6rem; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 1.15rem; box-shadow: 0 10px 20px -10px rgba(14,165,183,.6); }
.brand-name { font-family: 'Poppins', sans-serif; font-weight: 500; font-size: 1.35rem; color: var(--ink); letter-spacing: -.5px; }
.brand-name strong { font-weight: 800; color: var(--primary); }

.nav-links { display: flex; align-items: center; gap: 1.7rem; }
.nav-links a { color: var(--slate); font-weight: 500; font-size: .95rem; position: relative; transition: color .25s; }
.nav-links a:not(.nav-cta):hover { color: var(--primary-dark); }
.nav-links a:not(.nav-cta)::after { content: ""; position: absolute; left: 0; bottom: -5px; height: 2px; width: 0; background: var(--primary); transition: width .3s var(--ease); }
.nav-links a:not(.nav-cta):hover::after { width: 100%; }
.nav-cta { background: var(--primary); color: #fff !important; padding: .55rem 1.2rem; border-radius: 999px; font-weight: 600; transition: transform .25s var(--ease), background .25s; }
.nav-cta:hover { background: var(--primary-dark); transform: translateY(-2px); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; z-index: 101; }
.nav-toggle span { width: 26px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
.nav-backdrop { display: none; }

/* Hero */
.hero { background: linear-gradient(180deg, var(--primary-tint), #fff); padding-block: clamp(3rem, 7vw, 5rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; }
.hero-pill { display: inline-flex; align-items: center; gap: .5rem; background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; font-size: .82rem; padding: .45rem 1rem; border-radius: 999px; margin-bottom: 1.3rem; }
.hero h1 { font-size: clamp(2.5rem, 5.5vw, 4rem); font-weight: 800; letter-spacing: -1px; margin-bottom: 1.1rem; }
.hero h1 .accent { color: var(--primary); }
.hero-sub { font-size: clamp(1.02rem, 2vw, 1.18rem); color: var(--slate); max-width: 52ch; margin-bottom: 1.9rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 1.2rem 1.8rem; }
.hero-trust li { display: flex; align-items: center; gap: .5rem; font-weight: 500; color: var(--ink); font-size: .92rem; }
.hero-trust i { color: var(--primary); }

.hero-media { position: relative; }
.hero-media > img { border-radius: var(--radius-lg); box-shadow: var(--shadow); aspect-ratio: 4/4.2; object-fit: cover; width: 100%; }
.hero-float { position: absolute; bottom: 22px; left: -18px; background: #fff; border-radius: var(--radius); padding: .9rem 1.2rem; box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: .8rem; border: 1px solid var(--line); }
.hero-float i { color: #f4b740; font-size: 1.3rem; }
.hero-float strong { display: block; color: var(--ink); font-family: 'Poppins', sans-serif; font-size: .95rem; }
.hero-float span { font-size: .78rem; color: var(--muted); }

/* Stats */
.stats { background: var(--primary); color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding-block: 2.2rem; text-align: center; }
.stat strong { display: block; font-family: 'Poppins', sans-serif; font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 800; }
.stat span { font-size: .85rem; opacity: .9; }

/* Secciones */
section { padding-block: clamp(3.5rem, 8vw, 6rem); }

/* Servicios */
.services { background: var(--bg); }
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.service { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.9rem 1.5rem; transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; }
.service:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--primary-soft); }
.service i { font-size: 1.5rem; color: var(--primary); background: var(--primary-soft); width: 58px; height: 58px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 1.1rem; }
.service h3 { font-size: 1.2rem; margin-bottom: .45rem; }
.service p { font-size: .93rem; color: var(--muted); }

/* Ortodoncia */
.ortho { background: var(--bg-soft); }
.ortho-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 3.2rem; align-items: center; }
.ortho-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow); aspect-ratio: 5/4; object-fit: cover; width: 100%; }
.ortho-text h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 1rem; }
.ortho-text > p { color: var(--slate); margin-bottom: 1.6rem; max-width: 50ch; }
.ortho-options { display: grid; gap: 1rem; margin-bottom: 1.9rem; }
.ortho-opt { display: flex; gap: .9rem; align-items: flex-start; }
.ortho-opt i { color: #fff; background: var(--primary); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; flex-shrink: 0; margin-top: 3px; }
.ortho-opt strong { display: block; color: var(--ink); font-family: 'Poppins', sans-serif; }
.ortho-opt span { font-size: .92rem; color: var(--muted); }

/* Doctor */
.doctor { background: var(--bg); }
.doctor-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 3.2rem; align-items: center; }
.doctor-media { position: relative; }
.doctor-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow); aspect-ratio: 4/4.4; object-fit: cover; width: 100%; }
.doctor-badge { position: absolute; bottom: -18px; right: -14px; background: #fff; border-radius: var(--radius); padding: .85rem 1.2rem; box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: .8rem; border: 1px solid var(--line); }
.doctor-badge i { color: var(--primary); font-size: 1.4rem; }
.doctor-badge strong { display: block; font-family: 'Poppins', sans-serif; color: var(--ink); font-size: .92rem; }
.doctor-badge span { font-size: .78rem; color: var(--muted); }
.doctor-text h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 1rem; }
.doctor-text > p { color: var(--slate); margin-bottom: 1.7rem; max-width: 52ch; }
.doctor-points { display: grid; gap: 1rem; }
.dp { display: flex; align-items: center; gap: .9rem; font-weight: 500; color: var(--ink); }
.dp i { color: var(--primary); background: var(--primary-soft); width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }

/* Por qué */
.why { background: var(--bg-soft); }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.why-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.9rem 1.5rem; text-align: center; transition: transform .3s var(--ease), box-shadow .3s; }
.why-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.why-card i { font-size: 1.6rem; color: var(--primary); background: var(--primary-soft); width: 62px; height: 62px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 1.1rem; }
.why-card h4 { font-size: 1.1rem; margin-bottom: .4rem; }
.why-card p { font-size: .9rem; color: var(--muted); }

/* Proceso */
.process { background: var(--bg); }
.process-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem; counter-reset: step; }
.pstep { position: relative; background: var(--primary-tint); border: 1px solid var(--primary-soft); border-radius: var(--radius); padding: 2.2rem 1.6rem 1.7rem; text-align: center; }
.pnum { width: 50px; height: 50px; border-radius: 50%; background: var(--primary); color: #fff; font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.3rem; display: grid; place-items: center; margin: 0 auto .9rem; box-shadow: 0 12px 24px -10px rgba(14,165,183,.6); }
.pstep h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.pstep p { font-size: .9rem; color: var(--muted); }

/* Testimonios */
.testimonials { background: var(--bg-soft); }
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.testi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.9rem; box-shadow: var(--shadow-sm); }
.stars { color: #f4b740; margin-bottom: 1rem; display: flex; gap: .2rem; font-size: .9rem; }
.testi blockquote { color: var(--slate); margin-bottom: 1.2rem; font-size: .98rem; }
.testi figcaption strong { display: block; font-family: 'Poppins', sans-serif; color: var(--ink); }
.testi figcaption span { font-size: .85rem; color: var(--primary-dark); }

/* FAQ */
.faq { background: var(--bg); }
.faq-wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: 3rem; align-items: start; }
.faq-head { margin-bottom: 0; position: sticky; top: 110px; }
.faq-list { display: grid; gap: .9rem; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.faq-item summary { list-style: none; cursor: pointer; padding: 1.15rem 1.4rem; font-family: 'Poppins', sans-serif; font-weight: 600; color: var(--ink); font-size: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary i { color: var(--primary); transition: transform .3s var(--ease); flex-shrink: 0; }
.faq-item[open] summary i { transform: rotate(45deg); }
.faq-item p { padding: 0 1.4rem 1.3rem; color: var(--muted); font-size: .95rem; }

/* Contacto */
.contact { background: linear-gradient(180deg, var(--bg-soft), #fff); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.contact-info h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 1rem; }
.contact-info > p { color: var(--slate); margin-bottom: 2rem; max-width: 46ch; }
.contact-list { display: grid; gap: 1.1rem; }
.contact-list li { display: flex; align-items: center; gap: 1rem; }
.contact-list i { font-size: 1.25rem; color: var(--primary); background: var(--primary-soft); width: 50px; height: 50px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.contact-list span { display: block; font-size: .76rem; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.contact-list a { font-weight: 600; color: var(--ink); }
.contact-list a[href^="tel"]:hover { color: var(--primary-dark); }

.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 2.4rem; box-shadow: var(--shadow); }
.contact-card h3 { font-size: 1.5rem; margin-bottom: .4rem; }
.card-sub { color: var(--muted); font-size: .92rem; margin-bottom: 1.3rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.form-row > div { min-width: 0; }
@media (max-width: 420px) { .form-row { grid-template-columns: 1fr; gap: 0; } }
.contact-card label { display: block; font-family: 'Poppins', sans-serif; font-weight: 500; font-size: .9rem; margin-bottom: .4rem; color: var(--ink); }
.contact-card input, .contact-card select { width: 100%; padding: .85rem 1rem; border: 1.5px solid var(--line); border-radius: 12px; font-family: 'Inter', sans-serif; font-size: 1rem; margin-bottom: 1.2rem; background: var(--primary-tint); color: var(--ink); transition: border-color .25s, box-shadow .25s, background .25s; }
.contact-card input:focus, .contact-card select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(14,165,183,.15); background: #fff; }
.contact-card input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.5) sepia(1) saturate(5) hue-rotate(140deg); cursor: pointer; opacity: .8; }
.form-hint { font-size: .82rem; color: var(--muted); text-align: center; margin-top: .9rem; }
.form-hint.error { color: #c0392b; font-weight: 600; }

/* Ubicación / mapa */
.location { background: var(--bg); }
.map-wrap { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); aspect-ratio: 16/7; }
.map-wrap iframe { width: 100%; height: 100%; border: 0; display: block; filter: saturate(1.05); }
.map-cta { text-align: center; margin-top: 1.6rem; }
@media (max-width: 760px) { .map-wrap { aspect-ratio: 4/5; } }

/* Footer */
.site-footer { background: var(--ink); color: #b9c6ce; padding-top: 3.2rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2.4rem; }
.brand-light .brand-name { color: #fff; }
.brand-light .brand-name strong { color: var(--accent); }
.footer-brand .brand { margin-bottom: 1rem; }
.footer-desc { font-size: .92rem; max-width: 320px; line-height: 1.7; }
.footer-col h4 { color: #fff; font-family: 'Poppins', sans-serif; font-size: 1rem; margin-bottom: 1rem; }
.footer-col a { display: block; margin-bottom: .6rem; font-size: .92rem; transition: color .25s, padding-left .25s; }
.footer-col a:hover { color: #fff; padding-left: 4px; }
.footer-col a i { width: 20px; color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); text-align: center; padding-block: 1.3rem; font-size: .84rem; }

/* WhatsApp flotante */
.float-whats { position: fixed; bottom: 24px; right: 24px; z-index: 90; width: 58px; height: 58px; border-radius: 50%; background: #1fab54; color: #fff; display: grid; place-items: center; font-size: 1.7rem; box-shadow: 0 12px 28px -8px rgba(23,143,69,.6); transition: transform .3s var(--ease); }
.float-whats:hover { transform: scale(1.08); }

/* Reveal sutil */
.section-head, .hero-content { opacity: 0; transform: translateY(18px); animation: rise .8s var(--ease) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
/* Reveal por scroll (aditivo). El contenido es visible por defecto;
   solo se oculta cuando el JS marca .reveal-up, y siempre vuelve con .in. */
.reveal-up { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal-up.in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1000px) {
  .services-grid, .why-grid { grid-template-columns: repeat(2, 1fr); }
  .process-row { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1.6rem; }
}
@media (max-width: 880px) {
  .hero-grid, .ortho-grid, .doctor-grid, .contact-grid, .faq-wrap { grid-template-columns: 1fr; }
  .hero-media { max-width: 460px; margin-inline: auto; order: -1; }
  .ortho-media, .doctor-media { max-width: 460px; margin-inline: auto; }
  .faq-head { position: static; }
  .testi-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .topbar-hours { display: none; }
}
@media (max-width: 760px) {
  .nav-links { position: fixed; top: 0; right: 0; bottom: 0; height: 100vh; height: 100dvh; width: min(82%, 320px); background: #fff; flex-direction: column; align-items: flex-start; justify-content: flex-start; padding: 5.5rem 2rem 2rem; gap: 1.4rem; transform: translateX(105%); transition: transform .4s var(--ease); box-shadow: -24px 0 60px rgba(16,48,59,.2); z-index: 200; overflow-y: auto; }
  .nav-links a { width: 100%; font-size: 1.05rem; }
  .nav-links .nav-cta { text-align: center; }
  .nav-links.open { transform: translateX(0); }
  .nav-toggle { display: flex; z-index: 201; }
  .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(16,48,59,.45); opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s; z-index: 150; }
  .nav-backdrop.show { opacity: 1; visibility: visible; }
}
@media (max-width: 520px) {
  .services-grid, .why-grid, .process-row, .footer-grid, .stats-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .topbar-inner { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .section-head, .hero-content { opacity: 1; transform: none; }
}
