/* ==========================================================================
   custom3.css — Normalizacion tipografica (cargado al final)
   Objetivo: una escala de titulos consistente y profesional en todo el sitio.
   Solo ajusta tamano, peso, interlineado y espaciado de letras.
   NO modifica colores (se respetan los de cada seccion clara/oscura).
   ========================================================================== */

:root {
  --t-title-weight: 800;
  --t-sub-weight: 700;
  --t-track-tight: -0.015em;
}

/* --- Titulos principales de seccion (H2) -------------------------------- */
/* Todos quedan al mismo tamano fluido y mismo peso, sin importar la seccion. */
#root section h2:not(.gate-title) {
  font-size: clamp(2rem, 1.3rem + 2.4vw, 2.75rem) !important;
  font-weight: var(--t-title-weight) !important;
  line-height: 1.15 !important;
  letter-spacing: var(--t-track-tight) !important;
}

/* --- Subtitulos / titulos de tarjeta (H3) ------------------------------ */
/* Unifica los H3 (incluye los que estaban encogidos a 13-16px). */
#root section h3 {
  font-size: 1.25rem !important;      /* 20px */
  font-weight: var(--t-sub-weight) !important;
  line-height: 1.3 !important;
  letter-spacing: -0.01em !important;
}

/* Cabeceras de columna algo mas presentes (ej. "Horarios de Atencion"). */
#root #consulta h3,
#root .consultation-section h3 {
  font-size: 1.375rem !important;     /* 22px */
}

/* --- Titulos de columnas del footer (H4) ------------------------------- */
#root footer h4 {
  font-size: 1rem !important;         /* 16px */
  font-weight: var(--t-sub-weight) !important;
  letter-spacing: 0.01em !important;
}

/* --- Hero (H1) --------------------------------------------------------- */
/* Se mantiene como el elemento mas grande, con peso e interlineado limpios. */
#root section h1:not(.gate-title) {
  font-size: clamp(2.25rem, 1.4rem + 4vw, 3.5rem) !important; /* siempre > que los H2 */
  font-weight: var(--t-title-weight) !important;
  line-height: 1.1 !important;
  letter-spacing: -0.02em !important;
}

/* ==========================================================================
   2) Ritmo vertical de secciones
   Antes: 28px - 64px sin criterio. Ahora: mismo respiro en cada seccion.
   ========================================================================== */
#root section.py-20,
#root section#servicios,
#root section#nosotros,
#root section#contacto,
#root section#mensaje,
#root section#consulta,
#root section.message-section,
#root section.consultation-section,
#root section.final-instagram-section {
  padding-top: clamp(3rem, 5vw, 4.5rem) !important;
  padding-bottom: clamp(3rem, 5vw, 4.5rem) !important;
}

/* El hero conserva su separacion superior (offset del navbar). */
#root section#hero {
  padding-bottom: clamp(3rem, 5vw, 4.5rem) !important;
}

/* ==========================================================================
   3) Botones consistentes
   Antes: pesos 650 / 800 / 850 / 950 mezclados. Ahora: un solo peso.
   ========================================================================== */
#root [class*="rounded-full"],
#root button[type="submit"] {
  font-weight: 700 !important;
}

/* ==========================================================================
   4) Tarjetas: radio, sombra y elevacion uniformes con hover sutil
   ========================================================================== */
#root .bg-card {
  border-radius: 1rem !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

#root .bg-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12) !important;
}

/* ==========================================================================
   5) Gate de bienvenida: retoque de legibilidad
   ========================================================================== */
.gate-subtitle {
  color: rgba(255, 255, 255, 0.62) !important;
}

/* ==========================================================================
   6) Bienvenida (welcome splash) — version minimalista
   Reemplaza el banner grande por un logo + nombre centrados y pequenos.
   ========================================================================== */
.welcome-splash {
  background: #ffffff !important;
}

/* Desactiva las decoraciones pesadas del splash anterior. */
.welcome-splash::before,
.welcome-splash::after {
  content: none !important;
  display: none !important;
}

.welcome-splash-inner.welcome-minimal {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  grid-template-columns: none !important;
  width: auto !important;
  max-width: 90vw !important;
  gap: 0.85rem !important;
  text-align: center !important;
}

.welcome-minimal .welcome-logo {
  width: clamp(64px, 12vw, 92px) !important;
  height: auto !important;
  animation: welcome-logo 0.7s ease both !important;
}

.welcome-minimal .welcome-name {
  margin: 0 !important;
  font-size: clamp(1.75rem, 5vw, 2.75rem) !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  letter-spacing: -0.02em !important;
  color: var(--ink) !important;
  white-space: nowrap !important;
  text-shadow: none !important;
}

.welcome-minimal .welcome-name span {
  color: var(--brand-red) !important;
}

.welcome-minimal .welcome-name::after {
  content: none !important;
}

.welcome-minimal .welcome-tagline {
  margin: 0 !important;
  font-size: clamp(0.85rem, 2.5vw, 1rem) !important;
  font-weight: 500 !important;
  letter-spacing: 0.01em !important;
  color: rgba(15, 23, 42, 0.55) !important;
}

/* ==========================================================================
   7) Menos ruido visual de fondo (look mas profesional)
   ========================================================================== */
/* Blobs borrosos de la portada */
#root section#hero [class*="blur-"] {
  display: none !important;
}
/* Rejilla de puntos e insignia flotante de la seccion Nosotros */
.about-dot-grid,
.about-floating-badge {
  display: none !important;
}

/* ==========================================================================
   8) Portada: menos negritas (mas limpia)
   ========================================================================== */
#root section#hero [class*="text-gray-700"] .text-base {
  font-weight: 500 !important;
}

/* ==========================================================================
   9) Tarjetas de servicio: clicables + detalle
   ========================================================================== */
.svc-card-clickable {
  cursor: pointer;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.svc-card-clickable:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(31, 43, 68, 0.16);
}
.svc-card-clickable:focus-visible {
  outline: 2px solid var(--brand-red);
  outline-offset: 3px;
}
/* Pista "Ver mas" visible para indicar que la tarjeta es clicable. */
.svc-card-hint {
  display: inline-flex !important;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.85rem;
  color: var(--brand-red);
  font-weight: 700;
  font-size: 0.9rem;
  transition: gap 0.18s ease;
}
.svc-card-clickable:hover .svc-card-hint {
  gap: 0.6rem;
}

/* ==========================================================================
   9b) Tarjetas de servicio — rediseno premium (estilo referencia)
   Sin foto: linea roja superior, circulo rosado + icono lineal, capsula
   "Servicio tecnico", titulo, descripcion y CTA "Ver mas".
   ========================================================================== */
#root #servicios .svc-premium {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  height: 100% !important;
  padding: 2rem 1.6rem 2rem !important;
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: 20px !important;
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.05) !important;
  overflow: hidden !important;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease !important;
}
#root #servicios .svc-premium:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12) !important;
  border-color: rgba(217, 68, 82, 0.22) !important;
}

/* Defensa: oculta cualquier resto del render nativo de React (foto/icono
   superior) que pudiera quedar dentro de la tarjeta. Solo se muestran los
   elementos de nuestro diseno. */
#root #servicios .svc-premium > *:not(.svcp-img):not(.svcp-tag):not(.svcp-title):not(.svcp-desc):not(.svcp-cta) {
  display: none !important;
}

/* Defensa fuerte: dentro de la tarjeta NO se ve ningun svg/imagen ajeno
   (icono nativo de React o sobrante). Solo nuestra imagen y la flecha del CTA. */
#root #servicios .svc-premium img:not(.svcp-img),
#root #servicios .svc-premium picture,
#root #servicios .svc-premium svg {
  display: none !important;
}
#root #servicios .svc-premium .svcp-cta svg {
  display: inline-block !important;
}

/* Grafico superior: solo el circulo rosado con el icono lineal
   (la antigua linea roja superior fue eliminada del PNG). */
#root #servicios .svc-premium .svcp-img {
  display: block;
  width: 132px;
  height: auto;
  margin: 0 auto 1.1rem;
  object-fit: contain;
  user-select: none;
}

/* Capsula "Servicio tecnico" */
#root #servicios .svc-premium .svcp-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.85rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  color: rgba(15, 23, 42, 0.6);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 1.1rem;
}

/* Titulo */
#root #servicios .svc-premium .svcp-title {
  margin: 0 0 0.7rem !important;
  color: var(--ink) !important;
  font-size: 1.3rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em !important;
  line-height: 1.25 !important;
}

/* Descripcion */
#root #servicios .svc-premium .svcp-desc {
  margin: 0 0 1.5rem !important;
  color: #556274 !important;
  font-size: 0.95rem !important;
  line-height: 1.6 !important;
  max-width: 24ch;
}

/* CTA "Ver mas" — empuja al fondo para alinear en todas las tarjetas */
#root #servicios .svc-premium .svcp-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: auto;
  padding-bottom: 0.35rem;
  color: var(--brand-red);
  font-weight: 700;
  font-size: 0.95rem;
  position: relative;
}
#root #servicios .svc-premium .svcp-cta svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}
#root #servicios .svc-premium .svcp-cta::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 28px;
  height: 2px;
  border-radius: 999px;
  background: var(--brand-red);
  transition: width 0.22s ease;
}
#root #servicios .svc-premium:hover .svcp-cta svg {
  transform: translateX(4px);
}
#root #servicios .svc-premium:hover .svcp-cta::after {
  width: 100%;
}

/* ---- Modal de detalle ---- */
html.svc-modal-open {
  overflow: hidden;
}
.svc-modal {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}
.svc-modal.is-open {
  visibility: visible;
  opacity: 1;
}
.svc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 12, 24, 0.55);
  backdrop-filter: blur(3px);
}
.svc-modal-card {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 1.1rem;
  padding: 1.9rem 1.7rem 1.7rem;
  box-shadow: 0 24px 60px rgba(7, 12, 24, 0.28);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.24s ease;
}
.svc-modal.is-open .svc-modal-card {
  transform: translateY(0) scale(1);
}
.svc-modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.9rem;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease;
}
.svc-modal-close:hover {
  background: rgba(217, 68, 82, 0.14);
  color: var(--brand-red);
}
.svc-modal-title {
  margin: 0 0 0.5rem !important;
  font-size: 1.5rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em !important;
  color: var(--ink) !important;
}
.svc-modal-intro {
  margin: 0 0 1.1rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(15, 23, 42, 0.7);
}
.svc-modal-label {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-red);
}
.svc-modal-list {
  list-style: none;
  margin: 0 0 1.1rem;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.svc-modal-list li {
  position: relative;
  padding-left: 1.6rem;
  font-size: 0.92rem;
  line-height: 1.4;
  color: rgba(15, 23, 42, 0.82);
}
.svc-modal-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 0.7rem no-repeat,
    var(--brand-red);
}
.svc-modal-ideal {
  margin: 0 0 1.3rem;
  padding: 0.7rem 0.9rem;
  border-radius: 0.7rem;
  background: rgba(217, 68, 82, 0.07);
  font-size: 0.86rem;
  line-height: 1.45;
  color: rgba(15, 23, 42, 0.72);
}
.svc-modal-cta {
  display: block;
  text-align: center;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  background: var(--brand-red);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.18s ease;
}
.svc-modal-cta:hover {
  background: var(--brand-red-dark);
  transform: translateY(-2px);
}
