/* =============================================
   GASTROSONDAS - VARIABLES Y BASE GLOBAL
   ============================================= */

:root {
  --gs-azul-oscuro:  #023047;
  --gs-azul-medico:  #0077B6;
  --gs-turquesa:     #00B4D8;
  --gs-celeste-bg:   #EAF6FF;
  --gs-fondo:        #F5FAFC;
  --gs-blanco:       #FFFFFF;
  --gs-gris-texto:   #4A5568;
  --gs-gris-light:   #E2E8F0;
  --gs-whatsapp:     #25D366;
  --gs-whatsapp-d:   #1DA851;

  --gs-radius-card:  20px;
  --gs-radius-btn:   999px;
  --gs-radius-sm:    10px;

  --gs-shadow-card:  0 4px 24px rgba(2, 48, 71, 0.08);
  --gs-shadow-btn:   0 4px 16px rgba(0, 119, 182, 0.3);

  --gs-font-titulo:  'Poppins', sans-serif;
  --gs-font-cuerpo:  'Open Sans', sans-serif;

  --gs-container:    1200px;
  --gs-gap:          32px;
}

/* Reset base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--gs-font-cuerpo);
  color: var(--gs-gris-texto);
  background: var(--gs-fondo);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: color 0.2s; }
ul { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--gs-font-titulo);
  color: var(--gs-azul-oscuro);
  line-height: 1.25;
  font-weight: 700;
}

h1 { font-size: clamp(34px, 5vw, 54px); }
h2 { font-size: clamp(28px, 3.5vw, 40px); }
h3 { font-size: clamp(20px, 2.5vw, 26px); }
h4 { font-size: 18px; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* Contenedor */
.gs-container {
  max-width: var(--gs-container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Secciones */
.gs-section { padding: 90px 0; }
.gs-section--light  { background: var(--gs-celeste-bg); }
.gs-section--fondo  { background: var(--gs-fondo); }
.gs-section--white  { background: var(--gs-blanco); }
.gs-section--dark   { background: var(--gs-azul-oscuro); color: var(--gs-blanco); }
.gs-section--dark h2,
.gs-section--dark h3,
.gs-section--dark h4 { color: var(--gs-blanco); }
.gs-section--gradient {
  background: linear-gradient(135deg, var(--gs-azul-oscuro) 0%, var(--gs-turquesa) 100%);
  color: var(--gs-blanco);
}
.gs-section--gradient h2,
.gs-section--gradient h3 { color: var(--gs-blanco); }

/* Label de sección */
.gs-section-label {
  display: inline-block;
  font-family: var(--gs-font-titulo);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gs-azul-medico);
  background: rgba(0, 119, 182, 0.1);
  padding: 6px 16px;
  border-radius: var(--gs-radius-btn);
  margin-bottom: 16px;
}
.gs-section--dark .gs-section-label { background: rgba(255,255,255,0.12); color: var(--gs-turquesa); }
.gs-section--gradient .gs-section-label { background: rgba(255,255,255,0.2); color: var(--gs-blanco); }

/* Título de sección centrado */
.gs-section-title { text-align: center; margin-bottom: 16px; }
.gs-section-subtitle { text-align: center; max-width: 680px; margin: 0 auto 56px; font-size: 17px; }

/* Separador decorativo */
.gs-divider {
  width: 56px; height: 4px;
  background: linear-gradient(90deg, var(--gs-azul-medico), var(--gs-turquesa));
  border-radius: 2px;
  margin: 16px auto 40px;
}

/* =============================================
   BOTONES
   ============================================= */
.gs-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--gs-font-titulo);
  font-weight: 600;
  font-size: 16px;
  padding: 14px 28px;
  border-radius: var(--gs-radius-btn);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  text-decoration: none;
}

.gs-btn--primary {
  background: var(--gs-azul-medico);
  color: var(--gs-blanco);
  box-shadow: var(--gs-shadow-btn);
}
.gs-btn--primary:hover { background: var(--gs-azul-oscuro); transform: translateY(-2px); }

.gs-btn--outline {
  background: transparent;
  color: var(--gs-azul-medico);
  border-color: var(--gs-azul-medico);
}
.gs-btn--outline:hover { background: var(--gs-azul-medico); color: var(--gs-blanco); }

.gs-btn--outline-white {
  background: transparent;
  color: var(--gs-blanco);
  border-color: rgba(255,255,255,0.6);
}
.gs-btn--outline-white:hover { background: rgba(255,255,255,0.15); border-color: var(--gs-blanco); }

.gs-btn--whatsapp {
  background: var(--gs-whatsapp);
  color: var(--gs-blanco);
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
}
.gs-btn--whatsapp:hover { background: var(--gs-whatsapp-d); transform: translateY(-2px); }

.gs-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

/* =============================================
   TARJETAS
   ============================================= */
.gs-card {
  background: var(--gs-blanco);
  border-radius: var(--gs-radius-card);
  padding: 32px 28px;
  box-shadow: var(--gs-shadow-card);
  border: 1px solid rgba(0, 119, 182, 0.07);
  transition: transform 0.25s, box-shadow 0.25s;
}
.gs-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(2, 48, 71, 0.14); }

.gs-card__icon {
  width: 52px; height: 52px;
  background: rgba(0, 119, 182, 0.1);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  color: var(--gs-azul-medico);
}
.gs-card__icon svg { width: 28px; height: 28px; }

.gs-card__title { font-size: 17px; font-weight: 700; margin-bottom: 10px; color: var(--gs-azul-oscuro); }
.gs-card__text  { font-size: 15px; line-height: 1.6; }

/* =============================================
   CHECKLIST
   ============================================= */
.gs-checklist { list-style: none; }
.gs-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  font-size: 16px;
  border-bottom: 1px solid var(--gs-gris-light);
}
.gs-checklist li:last-child { border-bottom: none; }
.gs-checklist li::before {
  content: '';
  flex-shrink: 0;
  width: 22px; height: 22px;
  background: var(--gs-azul-medico);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  margin-top: 2px;
}

/* =============================================
   BADGES
   ============================================= */
.gs-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.gs-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--gs-font-titulo);
  color: var(--gs-azul-medico);
  background: var(--gs-celeste-bg);
  border: 1px solid rgba(0, 119, 182, 0.2);
  border-radius: var(--gs-radius-btn);
  padding: 6px 14px;
}
.gs-badge svg { width: 14px; height: 14px; }

/* =============================================
   BOTÓN FLOTANTE WHATSAPP
   ============================================= */
#gs-whatsapp-float {
  position: fixed;
  bottom: 28px; right: 28px;
  z-index: 9999;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--gs-whatsapp);
  color: var(--gs-blanco);
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
  transition: transform 0.2s, box-shadow 0.2s;
}
#gs-whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(37, 211, 102, 0.65); }

/* =============================================
   ELEMENTOR — CORRECCIONES GLOBALES DE LAYOUT
   ============================================= */

/* Prevenir overflow en contenedores flex/grid de Elementor */
.e-con,
.e-con-inner,
.elementor-section,
.elementor-container,
.elementor-widget-container { min-width: 0; }

/* Imágenes dentro de Elementor siempre responsivas */
.elementor-widget-image img,
.elementor-widget-container img { max-width: 100%; height: auto; }

/* Texto largo no rompe el layout */
.elementor-heading-title,
.elementor-widget-text-editor p,
.elementor-widget-text-editor li { overflow-wrap: break-word; word-break: break-word; }

/* Ocultar el H1 que el tema inserta antes del contenido de Elementor */
.page .entry-title,
.hentry .entry-title { display: none !important; }

/* =============================================
   RESPONSIVE GENERAL
   ============================================= */
@media (max-width: 768px) {
  .gs-section { padding: 60px 0; }
  .gs-section-subtitle { margin-bottom: 36px; }
  .gs-btn-group { flex-direction: column; align-items: flex-start; }
  .gs-btn-group .gs-btn { width: 100%; justify-content: center; }
}

/* =============================================
   TIPOGRAFÍA RESPONSIVA — OVERRIDE ELEMENTOR
   Elementor fija tamaños sin breakpoint mobile;
   estos overrides aseguran legibilidad en 360–430px
   ============================================= */
@media (max-width: 767px) {
  /* H1 hero: Elementor lo fija en 44px — reducir a ~32px en móvil */
  .elementor-heading-title.elementor-size-default { font-size: clamp(26px, 8vw, 34px); }

  /* H2 de sección: Elementor lo fija en 34px — reducir levemente */
  h2.elementor-heading-title { font-size: clamp(22px, 6.5vw, 28px); }

  /* Botones en hero — ancho completo para mejor tap target */
  .elementor-widget-button .elementor-button { width: 100%; justify-content: center; }

  /* Padding lateral mínimo en secciones que llegan al borde */
  .elementor-49 .e-con-inner { padding-left: 16px; padding-right: 16px; }
}
