/* Sitio de ejemplo (Dr. Daniel Ortega · Medicina General): portada con foto, servicios, doctor, opiniones y consultorio */
body { background: #fff; }
.doctor__foto, .consultorio__foto { height: auto; }

.demo-bar { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 4px 16px; background: var(--teal); color: #cfe0f0; font-size: 14px; padding: 8px 16px; text-align: center; }
.demo-bar strong { color: #fff; }
.demo-bar a { color: #fff; font-weight: 700; background: var(--orange); padding: 3px 12px; border-radius: 999px; text-decoration: none; white-space: nowrap; }
.demo-bar a:hover { background: var(--orange-dark); }

.logo__txt { display: flex; flex-direction: column; line-height: 1.05; }
.logo__txt small { font: 700 11.5px var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--orange); margin-top: 4px; }
.btn--big { min-height: 52px; padding: 12px 26px; font-size: 17px; }
.btn--blanco { background: #fff; color: var(--teal); }
.btn--blanco:hover { background: var(--orange-soft); }

/* Portada */
.portada { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--sky) 0%, #fff 100%); }
.portada::before { content: ""; position: absolute; inset: 0; background: url("../assets/arte/fondo-hero.svg") center / cover no-repeat; opacity: .55; }
.portada__grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; padding: clamp(40px, 6vw, 84px) 0 clamp(56px, 7vw, 96px); }
.portada__sello { display: inline-flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 6px 16px 6px 12px; font-weight: 700; font-size: 14.5px; color: var(--orange-dark); box-shadow: var(--shadow); margin-bottom: 22px; }
.pulso { width: 10px; height: 10px; border-radius: 50%; background: #1fb57a; box-shadow: 0 0 0 0 rgba(31,181,122,.6); }
@media (prefers-reduced-motion: no-preference) { .pulso { animation: pulso 2s infinite; } }
@keyframes pulso { 70% { box-shadow: 0 0 0 10px rgba(31,181,122,0); } 100% { box-shadow: 0 0 0 0 rgba(31,181,122,0); } }
.portada h1 { font-size: clamp(36px, 5.2vw, 60px); color: var(--teal); letter-spacing: -.01em; }
.portada__lead { font-size: clamp(17px, 1.8vw, 20px); color: var(--muted); max-width: 33em; margin-bottom: 28px; }
.portada__cta { display: flex; gap: 12px; flex-wrap: wrap; }
.datos { list-style: none; padding: 0; margin: 36px 0 0; display: flex; gap: 0; flex-wrap: wrap; }
.datos li { display: flex; flex-direction: column; padding: 0 28px; border-left: 1px solid var(--border); }
.datos li:first-child { padding-left: 0; border-left: 0; }
.datos b { font: 700 24px var(--display); color: var(--teal); }
.datos span { font-size: 14px; color: var(--muted); }

.portada__foto { position: relative; margin: 0; justify-self: center; width: min(440px, 100%); }
.portada__foto::before { content: ""; position: absolute; inset: 22px -22px -22px 22px; border-radius: 32px; background: linear-gradient(160deg, var(--orange), var(--sea)); }
.portada__marco { position: relative; border-radius: 32px; overflow: hidden; aspect-ratio: 62 / 72; box-shadow: 0 30px 60px -28px rgba(14,47,79,.5); background: #dfe7ee; }
.portada__img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.flotante { position: absolute; z-index: 2; display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 16px; padding: 12px 18px 12px 12px; box-shadow: 0 16px 34px -14px rgba(14,47,79,.4); text-decoration: none; color: var(--text); }
.flotante small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.flotante b { display: block; font-size: 15.5px; color: var(--teal); }
.flotante__icono { width: 42px; height: 42px; border-radius: 12px; flex: none; background: var(--orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'%3E%3Crect x='4' y='5' width='16' height='15' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4M4 10h16M9 15l2 2 4-4'/%3E%3C/svg%3E") center / 24px no-repeat; }
.flotante__icono--wa { background-color: #1f9e57; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v10H9l-5 4z'/%3E%3C/svg%3E"); }
.flotante--cita { left: -48px; bottom: 56px; }
.flotante--cita:hover { transform: translateY(-2px); }
.flotante--wa { right: -36px; top: 40px; }
@media (prefers-reduced-motion: no-preference) {
  .flotante { animation: flotar .7s cubic-bezier(.2,.8,.2,1) both; transition: transform .15s; }
  .flotante--wa { animation-delay: .5s; }
  .flotante--cita { animation-delay: .25s; }
}
@keyframes flotar { from { opacity: 0; transform: translateY(14px); } }

/* Cómo agendar */
.tres { background: var(--teal); color: #d4e3f1; }
.tres__in { display: flex; align-items: center; gap: 24px 48px; flex-wrap: wrap; padding: 26px 0; }
.tres__titulo { margin: 0; font: 700 21px var(--display); color: #fff; }
.tres__pasos { list-style: none; padding: 0; margin: 0 0 0 auto; display: flex; gap: 32px; flex-wrap: wrap; counter-reset: p; }
.tres__pasos li { counter-increment: p; display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; }
.tres__pasos li::before { content: counter(p); grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--orange); color: #fff; font-weight: 800; }
.tres__pasos b { color: #fff; font-size: 15.5px; }
.tres__pasos span { font-size: 13.5px; }

/* Servicios */
.servicios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.servicio { background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 28px 26px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.servicio:hover { border-color: var(--orange); box-shadow: var(--shadow); transform: translateY(-3px); }
.servicio__icono { width: 54px; height: 54px; padding: 13px; border-radius: 16px; background: var(--orange-soft); stroke: var(--orange-dark); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 18px; }
.servicio h3 { font-size: 22px; color: var(--teal); }
.servicio p { color: var(--muted); margin: 0; }

/* Doctor */
.doctor { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.doctor__fotos { position: relative; }
.doctor__foto { border-radius: 24px; object-fit: cover; box-shadow: var(--shadow); }
.doctor__foto--a { width: 100%; aspect-ratio: 3 / 2; }
.doctor__foto--b { position: absolute; right: -16px; bottom: 0; width: 40%; aspect-ratio: 36 / 30; border: 6px solid #fff; }
.doctor h2 { font-size: clamp(30px, 4vw, 44px); color: var(--teal); }
.doctor__intro { font-size: 18.5px; color: var(--muted); }
.credenciales { list-style: none; padding: 0; margin: 22px 0 28px; display: grid; gap: 0; border-top: 1px solid var(--border); }
.credenciales li { display: grid; grid-template-columns: 170px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.credenciales b { color: var(--teal); }
.credenciales span { color: var(--muted); }
.doctor__nota { font-size: 13.5px; color: var(--muted); font-style: italic; margin-top: 14px; }

/* Agenda */
.seccion-agenda { background: linear-gradient(180deg, #fff, var(--sky)); }
.booking { border-radius: 24px; border: 0; box-shadow: 0 30px 60px -30px rgba(14,47,79,.35), 0 0 0 1px var(--border); }
.steps { background: var(--sky); }
.day { border-radius: 14px; }
.day[aria-checked="true"] { background: var(--orange); border-color: var(--orange); }
.day:hover:not([disabled]) { border-color: var(--orange); }
.done__icon { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; background: #1fa36b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 34px no-repeat; }

/* Opiniones */
.opiniones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.opinion { margin: 0; background: #fff; border-radius: 20px; padding: 26px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.opinion__estrellas { color: #f2a71b; letter-spacing: 2px; font-size: 18px; margin: 0 0 10px; }
.opinion blockquote { margin: 0 0 20px; font-size: 16.5px; color: var(--text); flex: 1; }
.opinion figcaption { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; }
.opinion__inicial { grid-row: span 2; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--orange-soft); color: var(--orange-dark); font-weight: 800; }
.opinion small { color: var(--muted); font-size: 13px; }

/* Consultorio */
.consultorio { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.consultorio__foto { width: 100%; aspect-ratio: 64 / 46; object-fit: cover; border-radius: 24px; box-shadow: var(--shadow); }
.consultorio h2 { font-size: clamp(28px, 3.6vw, 40px); color: var(--teal); }
.horario { width: 100%; border-collapse: collapse; margin: 10px 0 20px; }
.horario th, .horario td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--border); }
.horario th { color: var(--teal); font-weight: 700; padding-right: 16px; }
.horario td { color: var(--muted); }
.consultorio__datos { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 8px; color: var(--muted); }
.consultorio__datos li { padding-left: 26px; position: relative; }
.consultorio__datos li::before { content: ""; position: absolute; left: 0; top: .35em; width: 16px; height: 16px; border-radius: 50%; background: var(--orange-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-6.5' fill='none' stroke='%230b7d72' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }

/* Preguntas */
.preguntas { max-width: 820px; }
.preguntas .section__title { margin-bottom: 28px; }
.preguntas details { background: #fff; border-radius: 16px; margin-bottom: 10px; padding: 0 22px; box-shadow: 0 1px 2px rgba(14,47,79,.06); }
.preguntas summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; position: relative; font-weight: 700; color: var(--teal); }
.preguntas summary::-webkit-details-marker { display: none; }
.preguntas summary::after { content: "+"; position: absolute; right: 0; top: 13px; width: 28px; height: 28px; border-radius: 50%; background: var(--orange-soft); color: var(--orange-dark); font: 700 20px/28px var(--font); text-align: center; }
.preguntas details[open] summary::after { content: "−"; }
.preguntas details p { color: var(--muted); }

/* Cierre */
.cierre { background: linear-gradient(120deg, var(--orange) 0%, var(--sea) 100%); }
.cierre__in { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 44px 0; }
.cierre h2 { color: #fff; font-size: clamp(26px, 3.4vw, 38px); margin: 0; }

.foot { background: var(--teal-dark); }
.foot__sea { display: none; }
.foot__in { color: #9fb6cf; padding: 22px 0; }
.foot__in a, .foot__staff { color: #cfe0f0; }

/* Botón flotante en celular */
.agendar-flotante { display: none; }

@media (max-width: 960px) {
  .portada__grid, .doctor, .consultorio { grid-template-columns: 1fr; }
  .portada__foto { width: min(380px, 84%); margin-top: 8px; }
  .flotante--cita { left: -28px; }
  .flotante--wa { right: -22px; }
  .servicios, .opiniones { grid-template-columns: 1fr 1fr; }
  .tres__pasos { margin-left: 0; }
}
@media (max-width: 640px) {
  .demo-bar { font-size: 13px; }
  .portada__cta .btn { flex: 1 1 100%; }
  .datos li { padding: 0 16px; }
  .datos b { font-size: 20px; }
  .flotante { padding: 9px 12px 9px 9px; gap: 9px; }
  .flotante__icono { width: 34px; height: 34px; background-size: 19px; }
  .flotante b { font-size: 14px; }
  .flotante--cita { left: -16px; bottom: 30px; }
  .flotante--wa { right: -14px; top: 22px; }
  .servicios, .opiniones { grid-template-columns: 1fr; }
  .tres__pasos { gap: 14px; flex-direction: column; }
  .credenciales li { grid-template-columns: 1fr; gap: 2px; }
  .agendar-flotante { display: flex; position: fixed; left: 16px; right: 16px; bottom: 14px; z-index: 40; justify-content: center; align-items: center; min-height: 52px; border-radius: 999px; background: var(--orange); color: #fff; font-weight: 800; text-decoration: none; box-shadow: 0 14px 30px -10px rgba(14,47,79,.55); }
  .foot { padding-bottom: 76px; }
}
main { overflow-x: clip; }
.agendar-flotante { transition: opacity .2s, transform .2s; }
.agendar-flotante.is-oculto { opacity: 0; transform: translateY(20px); pointer-events: none; }
.doctor__fotos::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; border-radius: 24px; background: linear-gradient(160deg, var(--orange), var(--sea)); }
.doctor__foto--a { position: relative; display: block; }
