/* 1. Importación de la fuente desde Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800&display=swap');

/* 2. Aplicación global a todo el sitio */
body, h1, h2, h3, h4, h5, h6, p, a, li, span, div {
    font-family: 'Inter', sans-serif !important;
}

.material-icons {
    font-family: 'Material Icons' !important;
}

.col .responsive-img,
.video-responsive{
border-radius: 24px;
}

.header img,
.footer img,
.icons img {
border-radius:0!important;
}

.dynamicform:has(> .margin-block) {
  overflow: hidden;
  margin: 120px auto;
}

/* ==========================================================================
   1. ESTILOS BASE Y TIPOGRAFÍA
========================================================================== */
body {
    background-color: #fff;
}

h1 {
    display: block !important;
    width: 100% !important;
    font-size: 4.5rem !important;
    font-weight: 700 !important;
    line-height: 0.95 !important;
    word-wrap: normal !important;
    margin-top: 218px !important;
}

@media (max-width: 768px) {
h1{
    font-size: 3.5rem !important;
    }
}

h2 { 
    font-size: 40px; 
    margin-top: 120px;
}

h3 { 
    color: #1C1D1F; 
    font-size: 28px; 
}

p { 
    font-size: 17px; 
    color: #1C1D1F; 
}

.button a {
    padding: 14px 46px;
    background-color: #1d1d1d;
    border-radius: 99px;
    color: #fff;
    font-size: 18px;
    display: inline-block;
    text-align: center;
    transition: 0.3s;
}

.button a:hover{
    box-shadow: 0 3px 7px rgb(0 0 0 / 47%);
}

/*---------------------------------
-- DOS BOTONES 
---Primario & secundario---
Meterlos en una lista en el editor de texto
---------------------------------------*/

.button ul li:nth-of-type(1) a {
    font-size: 22px;
    text-decoration: underline!important;
    font-weight: 800;
}

.button ul li:nth-of-type(2) a {
    color: #1d1d1d;
    background-color: #fff;
    border: 1px solid #1d1d1d;
    margin-top: 24px;
}

.button ul li:nth-of-type(2) a:hover{
    background-color: #f5f6f7;
    box-shadow: 0 3px 7px rgb(0 0 0 / 15%);
}

/*===============================
HERO SECTION
===============================*/
.dynamicform:has(> .center) {
    display: flex;
    align-items: center;
    padding: 56px 0;
    flex-wrap: wrap;
   }


@media (max-width: 768px) {
   .dynamicform:has(> .center) .row .col > div{

    display: flex;
    flex-direction: column;
    align-items: anchor-center;
    padding: 0 24px;
    text-align: center;
    }
}

/* ====================================================
   CARDS 
   ==================================================== */

/* Contenedor que solo afecta al bloque que tiene cards CMS */
.dynamicform:has(.card > div[id^="cms-module-"]){
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: stretch; /* <-- todas mismas alturas */
  padding: 24px;
}

/* Card base (independiente del grid l4/l6/etc) */
.dynamicform .card:has(> div[id^="cms-module-"]){
  background: #fff !important;
  border-radius: 18px !important;
  box-shadow: 0 10px 26px rgba(0,0,0,0.08) !important;
  padding: 24px !important;
  overflow: hidden;

  /* Layout interno */
  display: grid !important;
  grid-template-columns: 48px 1fr;
  grid-template-rows: auto 1fr auto; /* clave para altura uniforme */
  column-gap: 16px;
  row-gap: 6px;
  align-items: start;

  /* Altura consistente 
  min-height: 220px;*/

  /* Comportamiento flexible */
  flex: 1 1 320px;
}

/* Reset Materialize */
.dynamicform .card:has(> div[id^="cms-module-"]) .row{
  margin: 0 !important;
}
.dynamicform .card:has(> div[id^="cms-module-"]) .col.s12{
  padding: 0 !important;
}

/* =========================
   1) ICONO
   ========================= */
.dynamicform .card:has(> div[id^="cms-module-"])
> div[id^="cms-module-"]:nth-of-type(1){
  grid-column: 1;
  grid-row: 1;
}

.dynamicform .card:has(> div[id^="cms-module-"])
> div[id^="cms-module-"]:nth-of-type(1) img{
  width: 36px !important;
  height: 36px !important;
  object-fit: contain;
  display: block;
}

/* =========================
   2) TEXTO
   ========================= */
.dynamicform .card:has(> div[id^="cms-module-"])
> div[id^="cms-module-"]:nth-of-type(2){
  grid-column: 2;
  grid-row: 1 / span 2; /* ocupa espacio central */
}

/* Título */
.dynamicform .card:has(> div[id^="cms-module-"])
> div[id^="cms-module-"]:nth-of-type(2) h3{
  margin: 0 0 6px 0 !important;
  font-size: 20px !important;
  line-height: 1.2 !important;
  font-weight: 800 !important;
  color: #111 !important;
}

/* Descripción */
.dynamicform .card:has(> div[id^="cms-module-"])
> div[id^="cms-module-"]:nth-of-type(2) p{
  margin: 0 !important;
  font-size: 20px !important;
  line-height: 1.45 !important;
  color: rgba(0,0,0,0.70) !important;
}

@media (max-width: 768px) {
  .dynamicform .card:has(> div[id^="cms-module-"])
> div[id^="cms-module-"]:nth-of-type(2) p {
      font-size: 14px !important;
   }
}

/* ==========================================================
    ZIG-ZAG BLOCK
   ========================================================== */
.dynamicform > .col.zig-zag-block {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    gap: 30px 80px; /* 30px vertical, 80px horizontal */
    justify-content: space-between !important;
    padding: 46px 52px !important;
    background-color: #e6e7e9;
    border-radius: 24px;
    margin-top: 120px;
}

/* Título siempre arriba */
.dynamicform > .col.zig-zag-block > div:first-child {
    flex: 0 0 85% !important;
    max-width: 85% !important;
    margin: 0 auto 0 auto !important;
    order: -1 !important;
    text-align: center !important;
}

.dynamicform > .col.zig-zag-block > div:first-child h3 {
    font-size: 2.5rem;
}

/* ==========================================================
      REGLAS PARA BLOQUES DE TEXTO (Cajas Azules)
   ========================================================== */
/* Seleccionamos 2, 4, 6 y 8 (que son tus módulos de texto) */
.dynamicform > .col.zig-zag-block > div:nth-child(2),
.dynamicform > .col.zig-zag-block > div:nth-child(4),
.dynamicform > .col.zig-zag-block > div:nth-child(6) {
    flex: 0 0 calc(70% - 40px) !important;
    max-width: calc(70% - 40px) !important;
    padding: 60px !important;
    background-color: #3368b0;
    border-radius: 24px;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    padding: 72px !important;
}

/* Recuperamos el color blanco para los textos */
.dynamicform > .col.zig-zag-block > div:nth-child(2) h3, .dynamicform > .col.zig-zag-block > div:nth-child(2) p,
.dynamicform > .col.zig-zag-block > div:nth-child(4) h3, .dynamicform > .col.zig-zag-block > div:nth-child(4) p,
.dynamicform > .col.zig-zag-block > div:nth-child(6) h3, .dynamicform > .col.zig-zag-block > div:nth-child(6) p {
    color: #ffffff !important;
}

/* ==========================================================
     REGLAS PARA BLOQUES DE IMAGEN
   ========================================================== */
/* Seleccionamos 3, 5, 7 y 9 (que son tus módulos de imagen) */
.dynamicform > .col.zig-zag-block > div:nth-child(3),
.dynamicform > .col.zig-zag-block > div:nth-child(5),
.dynamicform > .col.zig-zag-block > div:nth-child(7) {
    flex: 0 0 calc(30% - 40px) !important;
    max-width: calc(30% - 40px) !important;
    position: relative !important;
    min-height: 400px; /* Para asegurar que la imagen tenga presencia */
}

.dynamicform > .col.zig-zag-block div.col.center .responsive-img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 24px !important;
}


.dynamicform > .col.zig-zag-block > div .row .col {
    padding: 0;
    margin: 0;
}


/* ==========================================================
     EL ZIG-ZAG (Control de Orden Visual)
   ========================================================== */
@media only screen and (min-width: 993px) {
    /* Fila 1: Texto (2) Izquierda, Imagen (3) Derecha */
    .dynamicform > .col.zig-zag-block > div:nth-child(2) { order: 1 !important; }
    .dynamicform > .col.zig-zag-block > div:nth-child(3) { order: 2 !important; }

    /* Fila 2: Texto (4) Derecha, Imagen (5) Izquierda -> ZIG-ZAG */
    .dynamicform > .col.zig-zag-block > div:nth-child(4) { order: 4 !important; }
    .dynamicform > .col.zig-zag-block > div:nth-child(5) { order: 3 !important; }

    /* Fila 3: Texto (6) Izquierda, Imagen (7) Derecha */
    .dynamicform > .col.zig-zag-block > div:nth-child(6) { order: 5 !important; }
    .dynamicform > .col.zig-zag-block > div:nth-child(7) { order: 6 !important; }

}

/* ==========================================================
     MOBILE
   ========================================================== */
@media only screen and (max-width: 992px) {

.dynamicform > .col.zig-zag-block > div:nth-child(2), 
.dynamicform > .col.zig-zag-block > div:nth-child(4), 
.dynamicform > .col.zig-zag-block > div:nth-child(6){
    padding: 24px !important;
}

    .dynamicform > .col.zig-zag-block{
       padding: 46px 32px !important;
     }

    .dynamicform > .col.zig-zag-block > div:first-child {
        flex: 0 0 100% !important;
        max-width: 100% !important;
     }
    .dynamicform > .col.zig-zag-block > div:not(:first-child) {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        order: initial !important; /* Orden natural en móvil */

    }

    .dynamicform > .col.zig-zag-block div.col.center .responsive-img {
        position: relative !important;
        height: 300px !important;
    }
}



/* ==========================================================================
  LIST CHECK
========================================================================== */

.dynamicform:has(.list-check) {
    margin-top: 120px !important;
    padding-top: 120px;
}

.list-check div[id^="cms-module-"] > .row > .col > div {
    display: grid !important;
    grid-template-columns: 4fr 6fr !important; 
    column-gap: 50px !important;
    row-gap: 0 !important;
    align-items: center !important; 
    margin-bottom: 80px !important;
    width: 100% !important;
}

.list-check h3 {
    grid-column: 1 !important;
    grid-row: 1 / span 4 !important;
    margin: 0 !important;
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    align-self: center !important;
}

.list-check p {
    grid-column: 2 !important;
    position: relative !important;
    padding-left: 35px !important;
    margin: 10px 0 !important;
    font-size: 1.05rem !important;
    line-height: 1.5 !important;
}

.list-check p::before {
    content: "✓" !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    font-weight: 900 !important;
    font-size: 20px;
}

@media (max-width: 992px) {
    .list-check div[id^="cms-module-"] > .row > .col > div {
        grid-template-columns: 1fr !important;
        row-gap: 20px !important;
        align-items: start !important;
    }
    .list-check p { grid-column: 1 !important; }
}





/*------------------------------------------
CONTACT FORM
-----------------------------------------*/
.dynamicform:has(> .contact-form) {
    display: flex;
    justify-content: center;
    gap: 10px;
    background-color: #EEEEEE;
    border-radius: 24px;
    padding: 62px;
    margin-top: 120px!important;
    margin-bottom: 120px!important;
    padding: 42px !important;
}


.contact-form.card {
    grid-template-columns: auto !important;
}


/* -------------------------------------
----------- VISTA MOVIL---------------
---------------------------------------*/
/* Ajuste específico para móvil */
@media (max-width: 768px) {


/*----  CONTACT FORM ------*/
    .dynamicform:has(> .contact-form){
        padding: 43px 12px 0 12px !important;
        flex-wrap: wrap;
     }
}