/* ============================================================
   AMA Pediatrics — Componentes y Secciones
   ============================================================ */

/* ---------- BOTONES ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: 0.95rem 1.6rem;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--t), box-shadow var(--t), background var(--t), color var(--t);
  white-space: nowrap;
}
.btn svg { width: 1.15em; height: 1.15em; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--c-lila); color: #fff; box-shadow: var(--shadow-lila); }
.btn--primary:hover { background: var(--c-lila-d); }

.btn--coral { background: var(--c-coral); color: #fff; box-shadow: var(--shadow-coral); }
.btn--coral:hover { background: var(--c-coral-d); }

.btn--wa { background: var(--wa); color: #fff; box-shadow: 0 14px 30px rgba(37,211,102,0.32); }
.btn--wa:hover { background: var(--wa-d); }

.btn--ghost {
  background: transparent;
  color: var(--c-lila);
  border-color: color-mix(in srgb, var(--c-lila) 40%, transparent);
}
.btn--ghost:hover { background: var(--lila-soft); border-color: var(--c-lila); }

.btn--lg { padding: 1.1rem 2rem; font-size: 1.05rem; }
.btn--block { width: 100%; }

/* ---------- HEADER ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--t), border-color var(--t), height var(--t);
}
.header.is-scrolled {
  box-shadow: var(--shadow-sm);
  border-color: var(--border);
}
.header__inner {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--c-navy);
}
.brand img { height: 46px; width: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font-size: 1.15rem; letter-spacing: 0.02em; }
.brand__tag {
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--c-lila);
}

.nav { display: flex; align-items: center; gap: 0.4rem; }
.nav__list { display: flex; align-items: center; gap: 0.35rem; list-style: none; }
.nav__link {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--tx);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-pill);
  transition: background var(--t), color var(--t);
}
.nav__link:hover { background: var(--lila-soft); color: var(--c-lila-d); }
.nav__cta { margin-left: 0.4rem; }

.nav-toggle {
  display: none;
  width: 46px; height: 46px;
  border: none; background: var(--lila-soft);
  border-radius: 12px; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--c-navy); border-radius: 2px;
  position: relative; transition: transform var(--t), opacity var(--t);
}
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 22px; height: 2px;
  background: var(--c-navy); border-radius: 2px; transition: transform var(--t), top var(--t);
}
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after  { top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { top: 0; transform: rotate(-45deg); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(2rem, 6vw, 4.5rem));
  padding-bottom: clamp(3rem, 8vw, 6rem);
  background:
    radial-gradient(1100px 600px at 80% -10%, var(--lila-soft), transparent 60%),
    radial-gradient(900px 500px at 0% 20%, var(--verde-soft), transparent 55%),
    var(--bg);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}
.hero__title {
  font-size: var(--fs-hero);
  color: var(--c-navy);
  margin-block: 0.8rem 1.1rem;
}
.hero__title .accent { color: var(--c-lila); }
.hero__lead {
  font-size: 1.15rem;
  max-width: 46ch;
  margin-bottom: 1.8rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.hero__stats {
  display: flex; flex-wrap: wrap;
  gap: clamp(1.2rem, 4vw, 2.6rem);
  margin-top: 2.4rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--border);
}
.stat__num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--c-lila);
  line-height: 1;
}
.stat__label { font-size: 0.85rem; color: var(--tx-muted); margin-top: 0.3rem; }

/* Hero visual (logo + formas decorativas) */
.hero__visual { position: relative; display: grid; place-items: center; }
.hero__card {
  position: relative;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  z-index: 2;
}
.hero__card img { width: min(360px, 78vw); }
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(2px); opacity: 0.55; z-index: 1;
}
.blob--1 { width: 190px; height: 190px; background: var(--coral-soft); top: -30px; right: 0; }
.blob--2 { width: 150px; height: 150px; background: var(--verde-soft); bottom: -20px; left: -20px; }
.float-badge {
  position: absolute; z-index: 3;
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.7rem 1rem;
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-head); font-weight: 600; font-size: 0.9rem; color: var(--c-navy);
  animation: floaty 4s ease-in-out infinite;
}
.float-badge .dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; }
.float-badge--tl { top: 4%; left: -5%; }
.float-badge--br { bottom: -3%; right: -5%; animation-delay: 1.5s; }
@keyframes floaty { 0%,100% { transform: translateY(0);} 50% { transform: translateY(-10px);} }

/* ---------- BIENVENIDA / FEATURES ---------- */
.welcome__grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.2rem, 3vw, 2rem);
}
.feature {
  text-align: center; padding: 1.5rem 1.2rem;
}
.feature__icon {
  width: 64px; height: 64px; border-radius: 20px;
  display: grid; place-items: center; margin: 0 auto 1rem;
}
.feature__icon svg { width: 30px; height: 30px; }
.feature h3 { font-size: var(--fs-h3); color: var(--c-navy); margin-bottom: 0.4rem; }

/* Rotación de color por tarjeta */
.tone-lila  { background: var(--lila-soft);  color: var(--c-lila-d); }
.tone-verde { background: var(--verde-soft); color: var(--c-verde-d); }
.tone-coral { background: var(--coral-soft); color: var(--c-coral-d); }

/* ---------- SERVICIOS ---------- */
.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1.1rem, 2.5vw, 1.6rem);
}
.service-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.7rem 1.5rem;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: transparent;
}
.service-card__icon {
  width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center; margin-bottom: 1.1rem;
}
.service-card__icon svg { width: 28px; height: 28px; }
.service-card h3 { font-size: 1.18rem; color: var(--c-navy); margin-bottom: 0.5rem; }
.service-card p { font-size: 0.98rem; }
.service-card__price {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--c-lila-d);
  line-height: 1.15;
}
.service-card__price span {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--tx-muted);
  letter-spacing: 0.02em;
}
.service-card__price small {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--tx-muted);
  margin-top: 0.15rem;
}
.services__note {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.92rem;
  color: var(--tx-muted);
}
.services__quote {
  text-align: center;
  margin-top: 0.6rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-style: italic;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--c-lila);
}

/* ---------- WHY US ---------- */
.why__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.why__media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, var(--lila-soft), var(--verde-soft));
  aspect-ratio: 4 / 3;
  display: grid; place-items: center;
  color: var(--tx-muted); text-align: center; padding: 2rem;
}
.check-list { list-style: none; display: grid; gap: 1rem; }
.check-list li { display: flex; gap: 0.8rem; align-items: flex-start; }
.check-list .tick {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--verde-soft); color: var(--c-verde-d);
  display: grid; place-items: center; margin-top: 2px;
}
.check-list .tick svg { width: 16px; height: 16px; }
.check-list strong { color: var(--c-navy); font-family: var(--font-head); display: block; }
.check-list p { font-size: 0.95rem; margin: 0; }

/* ---------- SOBRE NOSOTROS / EQUIPO ---------- */
.team__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.6rem;
}
.doctor-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; text-align: center;
  transition: transform var(--t), box-shadow var(--t);
}
.doctor-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.doctor-card__photo {
  aspect-ratio: 1; background: linear-gradient(135deg, var(--lila-soft), var(--coral-soft));
  display: grid; place-items: center; color: var(--c-lila);
}
.doctor-card__photo svg { width: 64px; height: 64px; opacity: 0.6; }
.doctor-card__body { padding: 1.3rem; }
.doctor-card h3 { color: var(--c-navy); font-size: 1.2rem; margin-bottom: 0.2rem; }
.doctor-card .role { color: var(--c-lila); font-weight: 600; font-family: var(--font-head); font-size: 0.9rem; }
.doctor-card p { font-size: 0.9rem; margin-top: 0.6rem; }

/* ---------- DOCTORA DESTACADA ---------- */
.doctor-feature {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  max-width: 980px;
  margin-inline: auto;
}
.doctor-feature__card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-align: center;
}
.doctor-feature__photo {
  aspect-ratio: 4 / 5;
  background: linear-gradient(150deg, var(--lila-soft), var(--coral-soft) 60%, var(--verde-soft));
  display: grid;
  place-items: center;
  color: var(--c-lila);
}
.doctor-feature__photo svg { width: 88px; height: 88px; opacity: 0.55; }
.doctor-feature__name { padding: 1.4rem 1.2rem 1.8rem; }
.doctor-feature__name h3 { color: var(--c-navy); font-size: 1.4rem; margin-bottom: 0.3rem; }
.doctor-feature__name .role {
  color: var(--c-lila); font-family: var(--font-head); font-weight: 600; font-size: 0.92rem;
}
.doctor-feature__message blockquote { margin: 0.4rem 0 0; }
.doctor-feature__message blockquote p { font-size: 1.08rem; color: var(--tx-body); margin-bottom: 0.9rem; }
.doctor-feature__message blockquote p em { color: var(--c-lila-d); font-weight: 500; }
.doctor-feature__sign {
  font-family: var(--font-head); font-weight: 700; color: var(--c-navy);
  margin: 0.4rem 0 1.4rem;
}

/* ---------- TESTIMONIOS ---------- */
.testi__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.testi-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.7rem;
  display: flex; flex-direction: column; gap: 1rem;
}
.testi-card .stars { color: #F6B93B; letter-spacing: 2px; }
.testi-card blockquote { font-size: 1rem; color: var(--tx-body); font-style: italic; }
.testi-card .who { display: flex; align-items: center; gap: 0.7rem; margin-top: auto; }
.testi-card .avatar {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-head);
  font-weight: 700; color: #fff; background: var(--c-lila);
}
.testi-card .who strong { color: var(--c-navy); font-family: var(--font-head); font-size: 0.95rem; }
.testi-card .who span { font-size: 0.82rem; color: var(--tx-muted); display: block; }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin-inline: auto; display: grid; gap: 0.8rem; }
.faq-item {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
  transition: box-shadow var(--t), border-color var(--t);
}
.faq-item[open] { box-shadow: var(--shadow-sm); border-color: color-mix(in srgb, var(--c-lila) 30%, transparent); }
.faq-item summary {
  list-style: none; cursor: pointer;
  padding: 1.15rem 1.3rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-family: var(--font-head); font-weight: 600; color: var(--c-navy);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chev {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--lila-soft); color: var(--c-lila-d);
  display: grid; place-items: center; transition: transform var(--t), background var(--t);
}
.faq-item[open] summary .chev { transform: rotate(45deg); background: var(--c-lila); color: #fff; }
.faq-item .faq-body { padding: 0 1.3rem 1.2rem; }
.faq-item .faq-body p { font-size: 0.98rem; }

/* ---------- CONTACTO ---------- */
.contact__grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}
.contact-info { display: grid; gap: 1.2rem; }
.contact-row { display: flex; gap: 0.9rem; align-items: flex-start; }
.contact-row .ci {
  flex: none; width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center;
}
.contact-row .ci svg { width: 22px; height: 22px; }
.contact-row strong { color: var(--c-navy); font-family: var(--font-head); display: block; }
.contact-row a, .contact-row span { color: var(--tx-body); }
.contact-row a:hover { color: var(--c-lila-d); }

.contact-form {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2.2rem);
  box-shadow: var(--shadow-sm);
}
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-family: var(--font-head); font-weight: 500; font-size: 0.9rem; color: var(--c-navy); margin-bottom: 0.4rem; }
.field input, .field textarea {
  width: 100%; padding: 0.85rem 1rem;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-alt); transition: border-color var(--t), background var(--t);
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--c-lila); background: #fff;
}
.field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.8rem; color: var(--tx-muted); margin-top: 0.4rem; }

.map-wrap {
  margin-top: 1.6rem; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); aspect-ratio: 16/9;
  background: var(--bg-alt); display: grid; place-items: center;
  color: var(--tx-muted); text-align: center; padding: 1rem;
}
.map-wrap iframe { width: 100%; height: 100%; border: 0; }
.map-wrap--coverage {
  background: linear-gradient(135deg, var(--lila-soft), var(--verde-soft));
  color: var(--c-navy);
  line-height: 1.6;
}
.map-wrap--coverage strong { color: var(--c-lila-d); }

/* ---------- CTA BANNER ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--c-lila), #B98AD6);
  color: #fff; border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.5rem);
  text-align: center; position: relative; overflow: hidden;
}
.cta-banner::before {
  content: ""; position: absolute; width: 260px; height: 260px;
  background: rgba(255,255,255,0.12); border-radius: 50%;
  top: -80px; right: -60px;
}
.cta-banner h2 { color: #fff; font-size: var(--fs-h2); margin-bottom: 0.7rem; position: relative; }
.cta-banner p { color: rgba(255,255,255,0.92); margin-bottom: 1.6rem; position: relative; }
.cta-banner .btn--wa { position: relative; }

/* ---------- FOOTER ---------- */
.footer {
  background: var(--c-navy); color: #C9CEE0;
  padding-block: clamp(2.5rem, 6vw, 4rem) 2rem;
}
.footer a { color: #C9CEE0; transition: color var(--t); }
.footer a:hover { color: #fff; }
.footer__grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem; margin-bottom: 2.5rem;
}
.footer .brand__name, .footer .brand__name * { color: #fff; }
.footer__brand p { color: #9AA1BC; font-size: 0.92rem; margin-top: 0.8rem; max-width: 34ch; }
.footer h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.footer ul { list-style: none; display: grid; gap: 0.6rem; font-size: 0.92rem; }
.footer .socials { display: flex; gap: 0.7rem; margin-top: 1rem; }
.footer .socials a {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.08); display: grid; place-items: center;
  transition: background var(--t), transform var(--t);
}
.footer .socials a:hover { background: var(--c-lila); transform: translateY(-3px); }
.footer .socials svg { width: 20px; height: 20px; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem; text-align: center;
  font-size: 0.85rem; color: #9AA1BC;
}

/* ---------- BOTÓN FLOTANTE WHATSAPP ---------- */
.wa-float {
  position: fixed;
  right: clamp(1rem, 3vw, 1.8rem);
  bottom: clamp(1rem, 3vw, 1.8rem);
  z-index: 900;
  width: 62px; height: 62px;
  border-radius: 50%;
  background: var(--wa);
  color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 12px 28px rgba(37,211,102,0.45);
  transition: transform var(--t), box-shadow var(--t);
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 32px; height: 32px; }
.wa-float::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--wa); animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.7); opacity: 0; }
}
.wa-float__label {
  position: absolute; right: 74px; top: 50%; transform: translateY(-50%);
  background: #fff; color: var(--c-navy); font-family: var(--font-head);
  font-weight: 600; font-size: 0.85rem; white-space: nowrap;
  padding: 0.5rem 0.9rem; border-radius: var(--radius-pill);
  box-shadow: var(--shadow); opacity: 0; pointer-events: none;
  transition: opacity var(--t), transform var(--t);
}
.wa-float:hover .wa-float__label { opacity: 1; transform: translateY(-50%) translateX(-4px); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; text-align: center; }
  .hero__lead { margin-inline: auto; }
  .hero__actions, .hero__stats { justify-content: center; }
  .hero__visual { order: -1; }
  .float-badge { display: none; }
  .why__grid, .contact__grid { grid-template-columns: 1fr; }
  .doctor-feature { grid-template-columns: 1fr; max-width: 560px; }
  .doctor-feature__photo { aspect-ratio: 16 / 10; }
  .welcome__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 780px) {
  .nav__list, .nav > .nav__cta { display: none; }
  .nav-toggle { display: flex; }

  /* Menú móvil desplegable */
  .nav.is-open .nav__list {
    display: flex; flex-direction: column; align-items: stretch;
    position: fixed; top: var(--header-h); left: 0; right: 0;
    background: #fff; padding: 1rem var(--gutter) 1.5rem;
    box-shadow: var(--shadow); gap: 0.2rem;
    border-bottom: 1px solid var(--border);
  }
  .nav.is-open .nav__link { padding: 0.9rem 1rem; border-radius: 12px; }
  .nav.is-open > .nav__cta { display: inline-flex; margin: 0.6rem var(--gutter) 0; }
}

@media (max-width: 520px) {
  .brand__text { display: none; }
  .btn { width: 100%; }
  .hero__actions .btn { width: auto; }
  .float-badge { display: none; }
}
