/* ==========================================================================
   ESTILOS BASE: MÓVIL (Por defecto)
   ========================================================================== */

/* --- HERO UNIFICADO MODERNO --- */
.hero-modern {
  position: relative;
  padding: 60px 16px;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, #e0f2fe 0%, #ffffff 70%);
}

.tag-line {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--brand);
  background: #e0f2fe;
  padding: 4px 12px;
  border-radius: 20px;
}

.hero-modern h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--brand-dark);
  margin-top: 20px;
  line-height: 1.2;
}

.hero-sub {
  max-width: 680px;
  margin: 20px auto 25px auto;
  font-size: 14px;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.hero-actions a {
  width: 100%;
  padding: 12px 28px;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.btn-main-citizen {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
}

.btn-main-saas {
  background: var(--brand-dark);
  color: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
}

/* --- SECCIÓN CIUDADANOS Y GRID --- */
.section-citizens {
  padding: 60px 0;
  background: #ffffff;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 15px;
  margin-top: 5px;
}

/* El grid empieza en 1 columna por defecto en móvil */
.grid-categories,
.grid-categories-mexico {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 40px;
}

.card-modern {
  background: #ffffff;
  padding: 24px 20px;
  border-radius: 12px;
  border: 1px solid #f1f5f9;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  transition:
    box-shadow 0.3s,
    transform 0.3s;
  position: relative;
}

.card-link::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
}

.card-modern:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.08);
}

.card-icon {
  font-size: 28px;
  margin-bottom: 15px;
}

.card-modern h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.card-modern p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 15px;
}

.card-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
}

/* --- INTERACTIVE SPLIT --- */
.interactive-split {
  display: flex;
  flex-direction: column;
  gap: 30px;
  background: #fafafa;
  border-radius: 16px;
  padding: 24px 16px;
  border: 1px solid #f1f5f9;
}

.tools-side,
.premium-side {
  flex: 1 1 100%;
  min-width: 0;
}

.tools-side h3 {
  font-size: 22px;
  margin-bottom: 20px;
}

.tools-side > p {
  color: var(--text-muted);
  margin-bottom: 25px;
  font-size: 14px;
}

.tool-item {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.tool-item-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.2s ease;
}

.tool-item-link:hover {
  transform: translateX(6px);
}

.tool-item-link:hover h4 {
  color: var(--brand);
}

.tool-emoji {
  font-size: 20px;
  background: #ffffff;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
  height: fit-content;
}

.tool-item h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--brand-dark);
}

.tool-item p {
  font-size: 13px;
  color: var(--text-muted);
}

.premium-side {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 35px;
  border-radius: 12px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.premium-badge {
  background: #ecfdf5;
  color: #059669;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  width: fit-content;
  margin-bottom: 15px;
}

.premium-side h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--brand-dark);
}

.premium-side p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 25px;
}

.btn-premium-modern {
  background: var(--premium);
  color: white;
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
  transition: background 0.2s;
}

.btn-premium-modern:hover {
  background: #059669;
}

/* --- SECCIÓN SAAS Y MOCKUP --- */
.section-saas-modern {
  padding: 60px 0;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
}

.saas-wrapper {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.saas-info,
.saas-visual-mockup {
  width: 100%;
}

.saas-tag {
  color: var(--brand);
  font-weight: 700;
  font-size: 13px;
}

.saas-info h2 {
  font-size: 26px;
  font-weight: 700;
  margin-top: 5px;
  margin-bottom: 15px;
}

.saas-info p {
  color: var(--text-muted);
  margin-bottom: 25px;
}

.saas-bullets {
  list-style: none;
  margin-bottom: 30px;
}

.saas-bullets li {
  font-size: 14px;
  margin-bottom: 10px;
  position: relative;
  padding-left: 20px;
}

.saas-bullets li::before {
  content: "✓";
  color: var(--brand);
  position: absolute;
  left: 0;
  font-weight: bold;
}

.btn-saas-cta {
  display: inline-block;
  background: var(--brand-dark);
  color: white;
  padding: 12px 28px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
}

.mockup-window {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.mockup-header {
  background: #f1f5f9;
  padding: 10px;
  display: flex;
  gap: 6px;
}

.mockup-header span {
  width: 8px;
  height: 8px;
  background: #cbd5e1;
  border-radius: 50%;
}

.mockup-body {
  padding: 25px;
  font-family: monospace;
  font-size: 13px;
}

.mockup-line {
  margin-bottom: 10px;
  color: #475569;
}

.font-bold {
  font-weight: bold;
  color: var(--brand-dark);
}

.text-alert {
  color: #df4747;
}

/* --- FOOTER Y MISC MÓVIL --- */
.footer-modern {
  text-align: center;
  padding: 30px;
  border-top: 1px solid #f1f5f9;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-modern a {
  color: var(--brand);
  text-decoration: none;
}

/* ==========================================================================
   VISTA DE ESCRITORIO: A partir de 768px (Estructuras avanzadas)
   ========================================================================== */

@media (min-width: 768px) {
  .hero-modern {
    padding: 100px 24px;
  }

  .hero-modern h1 {
    font-size: 42px;
    line-height: 1.15;
  }

  .hero-sub {
    font-size: 16px;
    margin-bottom: 35px;
  }

  .hero-actions {
    flex-direction: row;
    justify-content: center;
    gap: 32px;
  }

  .hero-actions a {
    width: auto;
  }

  .section-citizens {
    padding: 80px 0;
  }

  .section-header {
    margin-bottom: 50px;
  }

  .section-header h2 {
    font-size: 32px;
  }

  /* El grid pasa a 3 columnas estables en escritorio */
  .grid-categories {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 60px;
  }

  /* El grid secundario se adapta a 3 columnas también */
  .grid-categories-mexico {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  /* El split se vuelve horizontal */
  .interactive-split {
    flex-direction: row;
    padding: 40px;
    gap: 40px;
  }

  .tools-side {
    flex: 1.2;
  }

  .premium-side {
    flex: 0.8;
  }

  .section-saas-modern {
    padding: 100px 0;
  }

  /* La sección SaaS pasa a dos columnas alineadas */
  .saas-wrapper {
    flex-direction: row;
    align-items: center;
    gap: 50px;
  }

  .saas-info,
  .saas-visual-mockup {
    flex: 1;
  }

  .saas-info h2 {
    font-size: 32px;
  }
}

/* ==========================================================================
   AJUSTES ADICIONALES PARA PANTALLAS ESPECÍFICAS (Opcional y limpio)
   ========================================================================== */

@media (max-width: 900px) and (min-width: 768px) {
  /* Si la pantalla es mediana (tablet), el grid baja a 2 columnas antes del colapso móvil */
  .grid-categories-mexico {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 380px) {
  /* Teléfonos extremadamente pequeños */
  .hero-modern h1 {
    font-size: 24px;
  }
}
