/* 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: 1.2 !important;
    word-wrap: normal !important;
    margin-top: 218px !important;
    margin-bottom: 0;
}

@media (max-width: 768px) {
h1{
    font-size: 2.7rem !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
===============================*/

.hero-section p{
   margin-top: 0;
   margin-bottom: 42px;
}


@media (max-width: 768px) {
   .dynamicform:has(> .hero-section) .row .col > div{

    }
}



/* --------------------------------------------------
CARDS - COLOR
------------------------------------------------------ */


.dynamicform:has(.color-card) {
    display: flex !important;
    flex-wrap: wrap;
    height: 100% !important;
    padding: 36px 0;
}



.dynamicform:has(.color-card) .row, 
.dynamicform:has(.color-card) .col {
    min-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end;
    margin: 0;
    padding: 0;
}

/* Contenedor de la imagen */
.color-card .center {
    margin-top: auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
}

.color-card img.responsive-img {
    display: block;
    margin-bottom: 0 !important;
    position: relative;
    z-index: 2; /* Por encima del fondo redondeado */
    max-width: 360px !important;
}

.color-card-text p{
   margin:0;
}

/* --- ESTILOS PARA PC (Escritorio) --- */
@media (min-width: 993px) {
    
    /* Aplicamos el fondo y el redondeo directamente a la columna de la imagen */
    .color-card {
        border-radius: 42px; 
        position: relative;
        overflow: hidden; 
    }

/* Asignación de colores por clase en PC */
.dynamicform:has(.color-card.left2) .color-card{
    position:relative;
}

.dynamicform:has(.color-card) .color-card::after{
    width: 70%;
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: -1;
    content: "";
    border-radius: 42px;
    background-color: #E6E7E9;
}


    /* Centrado vertical del texto de descripción */
    .dynamicform:has(.color-card) > .col:not(.color-card) {
        justify-content: center !important;
        padding: 0 5% !important;
    }

.color-card .row .col.s12 img{
     align-self: start;
}


    /* Título H3 */
    .dynamicform:has(.color-card) h3 {
        margin: 0 !important;
        font-weight: bold;
        position: relative;
        z-index: 2;
    }

    .color-card img {
        margin-top: auto !important;
        margin-bottom: -2px !important; 
        max-width: 100% !important;
        align-self: center;
    }
}

/* --- ESTILOS PARA MÓVIL Y TABLET --- */
@media (max-width: 992px) {
    .dynamicform:has(.color-card) {
        flex-direction: column !important;
        padding: 0 0 24px 0 !important;
    }

    .color-card {
        width: 100% !important;
        order: 1 !important; 
        border-radius: 42px;
        padding-top: 0 !important;
        overflow: hidden;
    }

    .dynamicform:has(.color-card) h3 {
        text-align: center !important;
        width: 100% !important;
        padding: 20px !important;
    }

    .color-card img {
        display: none !important;
    }

    .dynamicform:has(.color-card) > .col:not(.color-card) {
        width: 100% !important;
        order: 2 !important;
        padding: 0 !important;
        text-align: center;

    }
}



/* ==========================================================
    icons block grey
   ========================================================== */


.dynamicform:has(.icons-block-grey) {
   display: flex;
   flex-direction: row;
   background-color: #E6E7E9;
   border-radius: 24px;
   padding: 32px;
   gap: 24px;
}

.icons-block-grey {
   display: flex;
   flex-direction: row;
   align-items: center;
   justify-content: center;
}

.icons-block-grey .row .col > div{
    display: flex;
    justify-content: flex-end;
}

.icons-block-grey p {
   font-size: 32px;
}

.icons-block-grey img {
  max-width: 86px!important;
  min-width: 86px!important;
}

/*-------------------------------------------------------------------------------
 Los estilos aquí solo se aplicarán si la pantalla 
     mide entre 600px y 1280px (inclusive) 
-----------------------------------------------------------------------------------*/
@media screen and (min-width: 600px) and (max-width: 1280px) {
     .icons-block-grey {
        flex-direction: column-reverse;
        align-items: center;
        justify-content: start;
    }

     .icons-block-grey p {
        font-size: 24px;
        text-align: center;
    }
}



@media (max-width: 768px) {

   .dynamicform:has(.icons-block-grey),
   .icons-block-grey {
        flex-direction: column-reverse;
        margin: auto;
   }

     .icons-block-grey p {
        text-align: center;
    }

}

/* ==========================================================
    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: #b1c5e1;
    border-radius: 24px;
    margin-top: 120px;
}

/* Título siempre arriba */
.dynamicform > .col.zig-zag-block > div:first-child {
    flex: 0 0 45% !important;
    max-width: 45% !important;
    margin: 0 auto !important;
    order: -1 !important;
    text-align: center !important;
}

.col.zig-zag-block h2 {
    margin-top: 32px;
}

/* ==========================================================
      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),
.dynamicform > .col.zig-zag-block > div:nth-child(8) {
    flex: 0 0 calc(60% - 40px) !important;
    max-width: calc(60% - 40px) !important;
    padding: 60px !important;
    background-color: #3368b0;
    border-radius: 24px;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !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,
.dynamicform > .col.zig-zag-block > div:nth-child(8) h3, .dynamicform > .col.zig-zag-block > div:nth-child(8) 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),
.dynamicform > .col.zig-zag-block > div:nth-child(9) {
    flex: 0 0 calc(40% - 40px) !important;
    max-width: calc(40% - 40px) !important;
    position: relative !important;
    min-height: 216px; 
}

.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;
}

/* ==========================================================
     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; }

    /* Fila 4: Texto (8) Derecha, Imagen (9) Izquierda -> ZIG-ZAG */
    .dynamicform > .col.zig-zag-block > div:nth-child(8) { order: 8 !important; }
    .dynamicform > .col.zig-zag-block > div:nth-child(9) { order: 7 !important; }
}

/* ==========================================================
     MOBILE
   ========================================================== */
@media only screen and (max-width: 992px) {

    .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 */
        padding: 24px !important;
    }
    .dynamicform > .col.zig-zag-block div.col.center .responsive-img {
        position: relative !important;
        max-height: 380px;
    }
   .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),
   .dynamicform > .col.zig-zag-block > div:nth-child(9),
.dynamicform > .col.zig-zag-block > div:nth-child(3) .row .col,
.dynamicform > .col.zig-zag-block > div:nth-child(5) .row .col,
.dynamicform > .col.zig-zag-block > div:nth-child(7) .row .col,
.dynamicform > .col.zig-zag-block > div:nth-child(9) .row .col{
       padding: 0 !important;
   }
}


/* ======================================================
CARDS
   ====================================================== */
.dynamicform:has(.card) {
   display: flex;
   gap: 24px;
}

.dynamicform:has(.card.margin-bottom) {
margin-bottom: 82px;
}



.dynamicform div.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    padding: 12px !important;
    min-height: 160px !important;
    border-radius: 20px !important;
    position: relative !important;
    cursor: pointer;
    overflow: hidden !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important;
}


.dynamicform div.card div[id^="cms-module-"] {
    grid-column: auto !important;
    grid-row: auto !important;
    display: block !important;
    width: 100% !important;
    margin: 0 auto !important;
}

.dynamicform .card div[id^="cms-module-"]:nth-of-type(1) img {
    width: 48px !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
    float: none !important;
    border-radius: 0 !important;
}



/*-------------------------------------------------------------------------------
 Los estilos aquí solo se aplicarán si la pantalla 
     mide entre 600px y 1280px (inclusive) 
-----------------------------------------------------------------------------------*/
@media screen and (min-width: 600px) and (max-width: 1280px) {
    .dynamicform div.card {
       min-width: calc(50% - 64px);
       margin: 24px auto;
    }
}



@media (max-width: 768px) {
   .dynamicform:has(.card) {
    padding: 0 24px;
    flex-direction: column;
    gap: 0;
}

.dynamicform .card:has(> div[id^="cms-module-"]) {
    grid-template-columns: 48px 1fr!important;
  }
}


/*------------------------------------------
CONTACT FORM
-----------------------------------------*/
.dynamicform:has(> .contact-form) {
    display: flex;
    justify-content: center;
    gap: 10px;
    background-color: #EEEEEE;
    border-radius: 32px;
    padding: 62px;
    margin-top: 0px!important;
    margin-bottom: 120px!important;
    padding: 42px !important;
    max-width: 1024px;
}


.contact-form.card {
    grid-template-columns: auto !important;
    text-align: left !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;
     }
}