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

/* --- 1. HÉROE DE LA MATERIA --- */
.materia-hero {
  background: radial-gradient(circle at 50% 0%, #e0f2fe 0%, #ffffff 70%);
  padding: 40px 16px;
  text-align: center;
}

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

.materia-hero h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--brand-dark, #0f172a);
  margin-top: 16px;
  margin-bottom: 20px;
  line-height: 1.2;
  letter-spacing: normal;
}

/* --- 2. MAQUETACIÓN Y LAYOUT DIVIDIDO --- */
main.materia-container {
  margin-bottom: 40px;
  padding: 0 16px; /* Margen de seguridad lateral en móviles */
}

.interactive-split.materia-split {
  display: flex;
  flex-direction: column; /* Apilado vertical en móvil */
  gap: 30px;
  background: #ffffff;
  padding: 0;
  border: none;
  margin-top: 30px;
}

.materia-split .tools-side,
.materia-split .premium-side {
  flex: 1;
}

.materia-split .premium-side {
  position: static; /* Estático en móvil para que fluya en el scroll */
}

.materia-split .premium-side .text-notice-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: -10px;
  margin-bottom: 20px;
}

/* --- 3. BLOQUES DE INFORMACIÓN Y TIPOGRAFÍA --- */
.info-block {
  margin-bottom: 35px;
}

.info-block h3 {
  color: var(--brand-dark, #0f172a);
  font-size: 20px;
  margin-top: 20px;
  margin-bottom: 12px;
  border-left: 4px solid var(--brand);
  padding-left: 12px;
}

.info-block h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--brand-dark, #0f172a);
  margin-top: 20px;
  margin-bottom: 8px;
}

.info-block p {
  color: var(--text-primary, #1e293b);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 15px;
}

/* --- 4. CAJA DE DESTACADOS (FUNDAMENTO LEGAL) --- */
.highlight-box {
  background-color: var(--bg-light, #f8fafc);
  border-left: 4px solid var(--brand, #0284c7);
  padding: 16px;
  border-radius: 8px;
  margin: 20px 0;
}

.highlight-box p {
  margin-bottom: 0;
  font-size: 14px;
  color: var(--text-primary, #1e293b);
  line-height: 1.6;
}

/* --- 5. REJILLA DE CASOS LEGALES (✓) --- */
.legal-cases-list {
  list-style: none !important;
  padding-left: 0 !important;
  margin: 20px 0 30px 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px 20px;
}

.legal-cases-list li {
  font-size: 14px !important;
  color: var(--text-primary, #1e293b);
  position: relative;
  padding-left: 28px;
  line-height: 1.5;
  margin-bottom: 0 !important;
}

.legal-cases-list li::before {
  content: "✓";
  color: var(--premium, #10b981);
  position: absolute;
  left: 0;
  font-weight: bold;
  font-size: 16px;
}

/* --- 6. LLAMADA A LA ACCIÓN FINAL (CTA) --- */
.mx-final-cta {
  background-color: var(--brand-dark, #0f172a);
  color: white;
  padding: 30px 20px;
  border-radius: 12px;
  text-align: center;
  margin-top: 40px;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.15);
}

.mx-final-cta h3 {
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
}

.mx-final-cta p {
  font-size: 14px;
  color: #cbd5e1;
  max-width: 600px;
  margin: 0 auto 24px auto;
  line-height: 1.5;
}

.btn-mx-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: var(--premium, #10b981);
  color: white;
  padding: 12px 24px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  max-width: 100%;
  box-sizing: border-box;
  transition:
    transform 0.2s,
    background-color 0.2s;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.btn-mx-whatsapp:hover {
  background-color: #059669;
  transform: translateY(-2px);
  color: white;
}

/* ==========================================================================
   VISTA DE ESCRITORIO: A partir de 768px (Ampliaciones del diseño)
   ========================================================================== */

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

  .materia-hero h1 {
    font-size: 36px;
  }

  main.materia-container {
    margin-bottom: 80px;
    padding: 0; /* Se alinea fluidamente con el contenedor global grid */
  }

  .interactive-split.materia-split {
    flex-direction: row; /* Diseño de doble columna */
    gap: 40px;
    margin-top: 40px;
  }

  .materia-split .tools-side {
    flex: 1.3;
  }

  .materia-split .premium-side {
    flex: 0.7;
    position: sticky; /* Columna premium flotante fija en scroll de escritorio */
    top: 100px;
    align-self: flex-start;
  }

  .materia-split .premium-side .text-notice-sub {
    margin-top: -15px;
  }

  .info-block h3 {
    font-size: 22px;
  }

  .highlight-box {
    padding: 20px;
  }

  .highlight-box p {
    line-height: 1.7;
  }

  .legal-cases-list {
    margin: 25px 0 35px 0;
    gap: 15px 30px;
  }

  .legal-cases-list li {
    line-height: 1.6;
  }

  .mx-final-cta {
    padding: 50px;
    margin-top: 60px;
  }

  .mx-final-cta h3 {
    font-size: 24px;
    margin-bottom: 15px;
  }

  .mx-final-cta p {
    font-size: 15px;
    margin-bottom: 30px;
    line-height: 1.6;
  }

  .btn-mx-whatsapp {
    padding: 14px 30px;
    font-size: 16px;
  }
}
