/* Urología en Tulum. Paleta: piedra caliza, agua de cenote, selva. */
:root {
  --cal: #f3f6f5;
  --blanco: #ffffff;
  --tinta: #12302f;
  --piedra: #4b5f5c;
  --linea: #d3dedb;
  --cenote: #0d5c5a;
  --cenote-hondo: #0a4543;
  --agua: #bfe5e0;
  --selva: #17693f;
  --selva-hondo: #10522f;
  --sol: #f2c14e;

  --texto: "Atkinson Hyperlegible", system-ui, sans-serif;
  --titulos: "Bricolage Grotesque", "Atkinson Hyperlegible", system-ui, sans-serif;
  --ancho: 68rem;
  --margen: clamp(1rem, 4vw, 2.5rem);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--cal);
  color: var(--tinta);
  font: 1.0625rem/1.6 var(--texto);
}
body.con-barra { padding-bottom: 5.5rem; }
img, svg { display: block; }
a { color: var(--cenote); text-underline-offset: 0.18em; }
a:hover { color: var(--cenote-hondo); }
:focus-visible { outline: 3px solid var(--sol); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--titulos); line-height: 1.1; margin: 0 0 0.6em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 6.2vw, 3.6rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.45rem, 3.2vw, 1.9rem); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

/* Cabecera */
.cabecera {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 1rem var(--margen);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.marca {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font: 700 1.1rem/1 var(--titulos); color: var(--tinta); text-decoration: none;
}
.marca-u {
  display: grid; place-items: center;
  width: 2rem; height: 2rem; border-radius: 0.55rem;
  background: var(--cenote); color: var(--agua); font-weight: 800;
}
.cabecera-tel { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--tinta); font-weight: 700; text-decoration: none; white-space: nowrap; }
@media (max-width: 420px) {
  .cabecera-tel { width: 2.75rem; height: 2.75rem; justify-content: center; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--linea); }
  .cabecera-tel span { display: none; }
}

main { max-width: var(--ancho); margin: 0 auto; padding: 0 var(--margen); }

/* Portada: texto, boleto de la jornada y botones */
.portada {
  display: grid;
  gap: 1.5rem;
  padding: clamp(1rem, 4vw, 3.5rem) 0 clamp(2rem, 5vw, 4rem);
}
.entrada { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--piedra); max-width: 36em; }
.nota {
  border-left: 4px solid var(--sol);
  padding: 0.5rem 0 0.5rem 1rem;
  max-width: 40em;
}
@media (min-width: 860px) {
  .portada { grid-template-columns: 1.35fr 1fr; grid-template-rows: auto 1fr; column-gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
  .portada-texto { grid-column: 1; grid-row: 1; }
  .acciones { grid-column: 1; grid-row: 2; }
  .boleto { grid-column: 2; grid-row: 1 / span 2; }
}

/* El boleto: lo memorable de la página es la fecha */
.boleto {
  position: relative;
  overflow: hidden;
  background: var(--cenote);
  color: var(--blanco);
  border-radius: 1.4rem;
  --relleno: 1.75rem;
  padding: 1.6rem var(--relleno) 1.4rem;
}
@media (max-width: 420px) { .boleto { --relleno: 1.2rem; } }
.boleto p { margin: 0; }
.boleto-etiqueta { color: var(--agua); font-weight: 700; }
/* Número grande a la izquierda; día de la semana y mes apilados a su derecha */
.boleto-fecha {
  display: grid; grid-template-columns: auto 1fr; column-gap: 0.9rem; align-items: end;
  margin: 0.4rem 0 1.4rem !important;
}
.boleto-dia { grid-row: 1 / span 2; }
.boleto-semana { align-self: end; font: 700 1.35rem/1.2 var(--titulos); color: var(--agua); }
.boleto-mes { align-self: start; padding-bottom: 0.35em; }
.boleto-semana::first-letter { text-transform: uppercase; }
.boleto-dia {
  font: 800 clamp(5rem, 15vw, 7.5rem)/0.85 var(--titulos);
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}
.boleto-y { font-size: 0.32em; letter-spacing: 0; margin: 0 0.18em; color: var(--agua); vertical-align: 0.9em; }
.boleto-mes { font: 700 clamp(1.6rem, 4vw, 2.1rem)/1 var(--titulos); }
.boleto-sin-fecha { font: 800 clamp(1.8rem, 5vw, 2.4rem)/1.1 var(--titulos); margin: 0.6rem 0 1.4rem !important; }
.boleto-pie {
  position: relative;
  border-top: 2px dashed rgb(191 229 224 / 0.55);
  padding-top: 1rem;
  color: var(--agua);
}
/* Muescas de boleto a la altura de la línea punteada */
.boleto-pie::before, .boleto-pie::after {
  content: ""; position: absolute; top: -1.15rem;
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: var(--cal);
}
.boleto-pie::before { left: calc(-1 * var(--relleno) - 1.1rem); }
.boleto-pie::after { right: calc(-1 * var(--relleno) - 1.1rem); }

/* Botones */
.acciones { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 3.25rem; padding: 0.8rem 1.4rem;
  border-radius: 999px;
  font: 700 1.1rem/1.1 var(--texto);
  text-decoration: none;
}
.boton-wa { background: var(--selva); color: var(--blanco); }
.boton-wa:hover { background: var(--selva-hondo); color: var(--blanco); }
.boton-tel { background: var(--blanco); color: var(--tinta); box-shadow: inset 0 0 0 2px var(--linea); }
.boton-tel:hover { color: var(--tinta); box-shadow: inset 0 0 0 2px var(--cenote); }
@media (max-width: 520px) { .acciones .boton { width: 100%; } }

.barra {
  position: fixed; inset: auto 0 0 0; z-index: 10;
  padding: 0.75rem var(--margen) calc(0.75rem + env(safe-area-inset-bottom));
  background: rgb(243 246 245 / 0.94);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--linea);
}
.boton-barra { width: 100%; }
.barra { transition: transform 0.2s ease; }
body.tarjeta-visible .barra { transform: translateY(110%); }
@media (min-width: 860px) {
  body.con-barra { padding-bottom: 0; }
  .barra { display: none; }
}

/* Secciones */
.seccion { padding: clamp(1.75rem, 4vw, 3rem) 0; border-top: 1px solid var(--linea); max-width: 46rem; }
.seccion > p { max-width: 38em; }

.servicios { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; }
@media (min-width: 640px) { .servicios { grid-template-columns: 1fr 1fr; column-gap: 2rem; } }
.servicios a, .servicios span {
  display: block; padding: 0.7rem 0;
  border-bottom: 1px solid var(--linea);
  font-weight: 700;
}
.servicios a { color: var(--tinta); text-decoration-color: var(--agua); text-decoration-thickness: 3px; }
.servicios a:hover { color: var(--cenote); text-decoration-color: var(--cenote); }
.servicios span { color: var(--piedra); font-weight: 400; }

.lista { padding-left: 1.2rem; }
.lista li { margin-bottom: 0.5rem; }
.lista li::marker { color: var(--cenote); }

.pasos { list-style: none; counter-reset: paso; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.pasos li { counter-increment: paso; display: grid; grid-template-columns: 2.6rem 1fr; gap: 0.9rem; align-items: start; }
.pasos li::before {
  content: counter(paso);
  display: grid; place-items: center;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: var(--agua); color: var(--cenote-hondo);
  font: 800 1.2rem/1 var(--titulos);
}
.pasos p { margin: 0.35rem 0 0; }
.pasos strong { display: block; }

.precio { font: 700 clamp(1.25rem, 3vw, 1.5rem)/1.3 var(--titulos); }
address { font-style: normal; margin-bottom: 1rem; }
.enlace-icono { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 700; }

details { border-bottom: 1px solid var(--linea); }
summary {
  cursor: pointer; list-style: none;
  padding: 0.9rem 2rem 0.9rem 0; position: relative;
  font-weight: 700;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; position: absolute; right: 0.25rem; top: 0.65rem;
  font: 700 1.5rem/1 var(--titulos); color: var(--cenote);
}
details[open] summary::after { content: "–"; }
details p { color: var(--piedra); max-width: 38em; }

.cierre { padding: 1rem 0 3rem; }

/* Aviso de privacidad */
.aviso { max-width: 46rem; padding: 2rem 0 3rem; }
.aviso h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); }
.aviso h2 { font-size: 1.35rem; margin-top: 2rem; }
.aviso h3 { margin-top: 1.5rem; }
.tabla { overflow-x: auto; margin: 0 0 1.25rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--linea); }
th { background: var(--blanco); }

/* Pie */
.pie {
  max-width: var(--ancho); margin: 0 auto;
  padding: 2rem var(--margen) 2.5rem;
  border-top: 1px solid var(--linea);
  color: var(--piedra); font-size: 0.95rem;
}
.pie p { max-width: 46em; margin-bottom: 0.5rem; }

@media (prefers-reduced-motion: no-preference) {
  .boleto { animation: llega 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  @keyframes llega { from { opacity: 0; transform: translateY(0.75rem) rotate(-1.5deg); } }
}

/* Tarjeta de cita: día y horario se eligen aquí y van en el mensaje de WhatsApp */
.opciones { border: 0; margin: 0 0 1rem; padding: 0; min-width: 0; }
.opciones legend { padding: 0; margin-bottom: 0.5rem; font-weight: 700; color: var(--blanco); }
.opciones { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center;
  min-height: 2.75rem; padding: 0.45rem 0.85rem;
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px rgb(191 229 224 / 0.5);
  color: var(--blanco); font-weight: 700;
}
.chip:hover span { box-shadow: inset 0 0 0 2px var(--agua); }
.chip input:checked + span { background: var(--agua); color: var(--cenote-hondo); box-shadow: none; }
.chip input:focus-visible + span { outline: 3px solid var(--sol); outline-offset: 2px; }
.boton-cita {
  width: 100%; margin: 0.5rem 0 0.9rem;
  background: var(--blanco); color: var(--tinta);
}
.boton-cita svg { color: var(--selva); }
.boton-cita:hover { background: var(--agua); color: var(--tinta); }
.boleto-pie .boleto-nota { color: var(--agua); font-size: 0.98rem; }
