/* Header */

.archive.et-db #et-boc .et-l--header {
  & .et_pb_menu_0_tb_header.et_pb_menu ul li ul.sub-menu a {
    font-size: clamp(0.688rem, 0.6204rem + 0.2885vw, 0.88rem);
    font-weight: 500;
  }

  & .nav li li {
    padding: 0;
  }
}

/* Main content */

.archive.et-db #et-boc .et-l--body {
  & .et_pb_module:has(.fuente-h1) {
    margin-top: clamp(3.25rem, 2.5458rem + 3.0047vw, 5.25rem) !important;
  }

  & .et_pb_module:has(.fuente-h2) {
    margin-top: clamp(2.75rem, 2.1338rem + 2.6291vw, 4.5rem) !important;
  }

  & .et_pb_module:has(.fuente-h3) {
    margin-top: clamp(1.75rem, 1.2218rem + 2.2535vw, 3.25rem) !important;
  }

  & .et_pb_module:has(.fuente-h4) {
    margin-top: clamp(1.5rem, 1.3239rem + 0.7512vw, 2rem) !important;
  }
}

/* Margenes usando clases */

.archive.et-db #et-boc .et-l--body {
  & .m-0:is(.et_pb_module, .et_pb_row),
  & .et_pb_module:has(.m-0) {
    margin: 0 !important;
  }

  & .m-1:is(.et_pb_module, .et_pb_row),
  & .et_pb_module:has(.m-1) {
    margin: 1rem !important;
  }

  & .mt-0:is(.et_pb_module, .et_pb_row),
  & .et_pb_module:has(.mt-0) {
    margin-top: 0 !important;
  }

  & .mt-1:is(.et_pb_module, .et_pb_row),
  & .et_pb_module:has(.mt-1) {
    margin-top: clamp(0.5rem, 0.3239rem + 0.7512vw, 1rem) !important;
  }

  & .mt-15:is(.et_pb_module, .et_pb_row),
  & .et_pb_module:has(.mt-15) {
    margin-top: clamp(0.75rem, 0.4859rem + 1.1268vw, 1.5rem) !important;
  }

  & .mt-2:is(.et_pb_module, .et_pb_row),
  & .et_pb_module:has(.mt-2) {
    margin-top: clamp(1rem, 0.6479rem + 1.5023vw, 2rem) !important;
  }

  & .mt-3:is(.et_pb_module, .et_pb_row),
  & .et_pb_module:has(.mt-3) {
    margin-top: clamp(1.5rem, 0.9718rem + 2.2535vw, 3rem) !important;
  }

  & .mt-4:is(.et_pb_module, .et_pb_row),
  & .et_pb_module:has(.mt-4) {
    margin-top: clamp(2rem, 1.2958rem + 3.0047vw, 4rem) !important;
  }

  & .mt-5:is(.et_pb_module, .et_pb_row),
  & .et_pb_module:has(.mt-5) {
    margin-top: clamp(2.5rem, 1.6197rem + 3.7559vw, 5rem) !important;
  }

  & .mt-6:is(.et_pb_module, .et_pb_row),
  & .et_pb_module:has(.mt-6) {
    margin-top: clamp(3rem, 1.9437rem + 4.507vw, 6rem) !important;
  }

  & .mt-h1:is(.et_pb_module, .et_pb_row),
  & .et_pb_module:has(.mt-h1) {
    margin-top: clamp(3.25rem, 2.5458rem + 3.0047vw, 5.25rem) !important;
  }

  & .mt-h2:is(.et_pb_module, .et_pb_row),
  & .et_pb_module:has(.mt-h2) {
    margin-top: clamp(2.75rem, 2.1338rem + 2.6291vw, 4.5rem) !important;
  }

  & .mt-h25:is(.et_pb_module, .et_pb_row),
  & .et_pb_module:has(.mt-h25) {
    margin-top: clamp(2.25rem, 1.7218rem + 2.2535vw, 3.75rem) !important;
  }

  & .mt-h3:is(.et_pb_module, .et_pb_row),
  & .et_pb_module:has(.mt-h3) {
    margin-top: clamp(1.75rem, 1.2218rem + 2.2535vw, 3.25rem) !important;
  }

  & .mt-h4:is(.et_pb_module, .et_pb_row),
  & .et_pb_module:has(.mt-h4) {
    margin-top: clamp(1.5rem, 1.3239rem + 0.7512vw, 2rem) !important;
  }

  & .my-e1:is(.et_pb_module, .et_pb_row),
  & .et_pb_module:has(.my-e1) {
    margin-block: clamp(1.75rem, 1.3099rem + 1.8779vw, 3rem) !important;
  }

  @media (width < 768px) {
    & .mt-05-sm:is(.et_pb_module, .et_pb_row),
    & .et_pb_module:has(.mt-05-sm) {
      margin-top: 0.5rem !important;
    }

    & .mt-1-sm:is(.et_pb_module, .et_pb_row),
    & .et_pb_module:has(.mt-1-sm) {
      margin-top: 1rem !important;
    }

    & .mt-15-sm:is(.et_pb_module, .et_pb_row),
    & .et_pb_module:has(.mt-15-sm) {
      margin-top: 1.5rem !important;
    }

    & .mt-2-sm:is(.et_pb_module, .et_pb_row),
    & .et_pb_module:has(.mt-2-sm) {
      margin-top: 2rem !important;
    }

    & .mt-25-sm:is(.et_pb_module, .et_pb_row),
    & .et_pb_module:has(.mt-25-sm) {
      margin-top: 2.5rem !important;
    }

    & .mt-3-sm:is(.et_pb_module, .et_pb_row),
    & .et_pb_module:has(.mt-3-sm) {
      margin-top: 3rem !important;
    }

    & .mt-35-sm:is(.et_pb_module, .et_pb_row),
    & .et_pb_module:has(.mt-35-sm) {
      margin-top: 3.5rem !important;
    }

    & .my-05-sm:is(.et_pb_module, .et_pb_row),
    & .et_pb_module:has(.my-05-sm) {
      margin-block: 0.5rem !important;
    }

    & .my-1-sm:is(.et_pb_module, .et_pb_row),
    & .et_pb_module:has(.my-1-sm) {
      margin-block: 1rem !important;
    }

    & .my-15-sm:is(.et_pb_module, .et_pb_row),
    & .et_pb_module:has(.my-15-sm) {
      margin-block: 1.5rem !important;
    }

    & .my-2-sm:is(.et_pb_module, .et_pb_row),
    & .et_pb_module:has(.my-2-sm) {
      margin-block: 2rem !important;
    }

    & .my-25-sm:is(.et_pb_module, .et_pb_row),
    & .et_pb_module:has(.my-25-sm) {
      margin-block: 2.5rem !important;
    }

    & .my-3-sm:is(.et_pb_module, .et_pb_row),
    & .et_pb_module:has(.my-3-sm) {
      margin-block: 3rem !important;
    }
  }
}

/* Margenes por defecto */

.archive.et-db #et-boc #main-content .et_pb_section:not(.dudas, .seccion-hero, .menu-flotante) {
  /* texto */

  & .et_pb_text {
    margin-top: clamp(1.5rem, 1.3239rem + 0.7512vw, 2rem);
  }

  & .et_pb_text:has(.et_pb_text_inner > :is(h4, .fuente-h4)) {
    margin-top: clamp(1.5rem, 1.3239rem + 0.7512vw, 2rem);
  }

  & .et_pb_text:not(.enlace-subrayado):has(.et_pb_text_inner > :is(h3, .fuente-h3)) {
    margin-top: clamp(2.25rem, 1.8979rem + 1.5023vw, 3.25rem);
  }

  & .et_pb_text:has(.et_pb_text_inner > :is(h2, .fuente-h2)) {
    margin-top: clamp(2.75rem, 2.1338rem + 2.6291vw, 4.5rem);
  }

  /* Imagenes */

  & .et_pb_module.et_pb_image {
    margin-block: clamp(1.5rem, 1.3239rem + 0.7512vw, 2rem); /*  higher specificity */
  }

  /* Tablas */

  & :is(.et_pb_text:has(.tabla), .tabla-comparativa-de-precios) {
    margin-top: clamp(1.5rem, 1.3239rem + 0.7512vw, 2rem);
  }

  /* Botones */

  & .et_pb_button_module_wrapper:has(.boton-ancho-total, .boton-azul, .boton-verde) {
    margin-top: clamp(2rem, 1.7359rem + 1.1268vw, 2.75rem);
  }

  & .et_pb_button_module_wrapper:has(.boton-verde.boton-ancho-total) {
    margin-top: clamp(2.25rem, 1.7218rem + 2.2535vw, 3.75rem);
  }

  /* Enlaces */

  & .enlace-subrayado {
    margin-top: clamp(0.75rem, 0.4859rem + 1.1268vw, 1.5rem);
  }

  & .et_pb_text.enlace-subrayado.centrado {
    margin-top: clamp(2rem, 1.6479rem + 1.5023vw, 3rem);
  }

  /* Tarjetas */

  & .et_pb_row:has(.tarjeta-a1) {
    margin-top: clamp(1rem, 0.8239rem + 0.7512vw, 1.5rem);
  }

  & .et_pb_row:has(.tarjeta-b1, .tarjeta-d1, .tarjeta-c1) {
    margin-top: clamp(2rem, 1.7359rem + 1.1268vw, 2.75rem);
  }

  & .et_pb_row:has(.tarjeta-a4) {
    margin-top: clamp(0.75rem, 0.3099rem + 1.8779vw, 2rem);
  }

  & .tarjeta-a7 {
    margin-top: clamp(1.5rem, 1.3239rem + 0.7512vw, 2rem);
  }

  & .tarjeta-a6 {
    margin-top: clamp(2.25rem, 1.8979rem + 1.5023vw, 3.25rem);
  }

  /* Grid of A3 cards with H5 heading above card */

  & .et_pb_text:has(h5):has(+ .tarjeta-a3) {
    margin-top: clamp(2rem, 1.6479rem + 1.5023vw, 3rem);
  }

  & .et_pb_column:has(.et_pb_text + .tarjeta-a3):not(:last-child) {
    margin-bottom: 0;
  }

  /* Next-Sibling */

  & .et_pb_text:has(:is(ul, ol):last-child) {
    & + .et_pb_text:not(.enlace-subrayado):has(.et_pb_text_inner > :is(h4, .fuente-h4)) {
      margin-top: clamp(2rem, 1.6479rem + 1.5023vw, 3rem);
    }

    & + .et_pb_text:not(.enlace-subrayado):has(.et_pb_text_inner > :is(h3, .fuente-h3)) {
      margin-top: clamp(2.5rem, 2.0599rem + 1.8779vw, 3.75rem);
    }

    & + .et_pb_text:has(.et_pb_text_inner > :is(h2, .fuente-h2)) {
      margin-top: clamp(3rem, 2.2958rem + 3.0047vw, 5rem);
    }

    & + .et_pb_module.et_pb_image {
      margin-top: clamp(2rem, 1.4718rem + 2.2535vw, 3.5rem);
    }
  }

  & .enlace-subrayado {
    & + .et_pb_text:not(.enlace-subrayado):has(.et_pb_text_inner > :is(h4, .fuente-h4)) {
      margin-top: clamp(2.5rem, 1.9718rem + 2.2535vw, 4rem);
    }

    & + .et_pb_text:not(.enlace-subrayado):has(.et_pb_text_inner > :is(h3, .fuente-h3)) {
      margin-top: clamp(2.75rem, 2.1338rem + 2.6291vw, 4.5rem);
    }

    & + .et_pb_text:not(.enlace-subrayado):has(.et_pb_text_inner > :is(h2, .fuente-h2)) {
      margin-top: clamp(3.25rem, 2.5458rem + 3.0047vw, 5.25rem);
    }

    & + .et_pb_image {
      margin-top: clamp(2.75rem, 2.1338rem + 2.6291vw, 4.5rem);
    }
  }

  & .enlace-subrayado.centrado {
    & + .et_pb_text {
      margin-top: clamp(2rem, 1.6479rem + 1.5023vw, 3rem);
    }
  }

  & .et_pb_row:has(.enlace-subrayado.centrado:last-child) {
    & + .et_pb_row:has(.tarjeta-b1) {
      margin-top: clamp(3rem, 2.6479rem + 1.5023vw, 4rem);
    }
  }

  /* Todos los margenes de escritorio han sido reducidos 0.25rem cuando enlace esta dentro del modulo */

  & .et_pb_text:has(p + p .enlace-subrayado:last-child) + .et_pb_text:has(.et_pb_text_inner > :is(h4, .fuente-h4)) {
    margin-top: clamp(2.5rem, 1.9718rem + 2.2535vw, 3.75rem); /* usado cuando enlace subrayado esta dentro del modulo  */
  }

  & .et_pb_text:has(p + p .enlace-subrayado:last-child) + .et_pb_text:has(.et_pb_text_inner > :is(h3, .fuente-h3)) {
    margin-top: clamp(2.75rem, 2.1338rem + 2.6291vw, 4.25rem); /* usado cuando enlace subrayado esta dentro del modulo  */
  }

  & .et_pb_text:has(p + p .enlace-subrayado:last-child) + .et_pb_text:has(.et_pb_text_inner > :is(h2, .fuente-h2)) {
    margin-top: clamp(3.25rem, 2.5458rem + 3.0047vw, 5rem); /* usado cuando enlace subrayado esta dentro del modulo  */
  }

  & .et_pb_button_module_wrapper:has(.boton-ancho-total, .boton-azul) {
    & + .et_pb_text:not(.enlace-subrayado):has(.et_pb_text_inner > :is(h4, .fuente-h4)) {
      margin-top: clamp(2.5rem, 1.9718rem + 2.2535vw, 3.75rem);
    }

    & + .et_pb_text:not(.enlace-subrayado):has(.et_pb_text_inner > :is(h3, .fuente-h3)) {
      margin-top: clamp(2.75rem, 2.1338rem + 2.6291vw, 4.5rem);
    }
    & + .et_pb_text:has(.et_pb_text_inner > :is(h2, .fuente-h2)) {
      margin-top: clamp(3.25rem, 2.5458rem + 3.0047vw, 5.25rem);
    }
    & + .et_pb_text.enlace-subrayado.centrado {
      margin-top: clamp(0.75rem, 0.662rem + 0.3756vw, 1rem);
    }
  }

  & .et_pb_row:has(.et_pb_text.enlace-subrayado.centrado:last-child) {
    & + .et_pb_row:has(.tarjeta-b1) {
      margin-top: clamp(2rem, 1.2958rem + 3.0047vw, 4rem);
    }
    & + .et_pb_row .et_pb_text:not(:has(h2, h3, h4, h5):first-child) {
      margin-top: clamp(2rem, 1.6479rem + 1.5023vw, 3rem);
    }
  }

  & .et_pb_row:has(.enlace-subrayado:last-child) + .et_pb_row:has(.tarjeta-d1) {
    margin-top: clamp(2.75rem, 2.1338rem + 2.6291vw, 4.5rem);
  }

  & .et_pb_row:has([class*='tarjeta']) {
    & + .et_pb_row .et_pb_text:first-child:not(.enlace-subrayado):has(.et_pb_text_inner > :is(h4, .fuente-h4)) {
      margin-top: clamp(2.5rem, 2.0599rem + 1.8779vw, 3.75rem);
    }

    & + .et_pb_row .et_pb_text:first-child:not(.enlace-subrayado):has(.et_pb_text_inner > :is(h3, .fuente-h3)) {
      margin-top: clamp(2.75rem, 2.1338rem + 2.6291vw, 4.5rem);
    }

    & + .et_pb_row .et_pb_text:first-child:not(.enlace-subrayado):has(.et_pb_text_inner > :is(h2, .fuente-h2)) {
      margin-top: clamp(3.25rem, 2.5458rem + 3.0047vw, 5.25rem);
    }
  }

  & .et_pb_row:has(.tarjeta-b1) + .et_pb_row .et_pb_image:first-child {
    margin-top: clamp(2rem, 1.7359rem + 1.1268vw, 2.75rem);
  }

  & .et_pb_row:has(.tarjeta-a1) + .et_pb_row .enlace-subrayado:first-child {
    margin-top: 1rem;
    @media (width < 980px) {
      & {
        margin-top: 2rem;
      }
    }
  }

  & .et_pb_row:has(.tarjeta-a4) + .et_pb_row .et_pb_button_module_wrapper:first-child {
    margin-top: clamp(1.25rem, 0.7218rem + 2.2535vw, 2.75rem);
  }

  & .tarjeta-a7 + .et_pb_row .et_pb_text:first-child:not(.enlace-subrayado):has(.et_pb_text_inner > :is(h4, .fuente-h4)) {
    margin-top: clamp(2rem, 1.7359rem + 1.1268vw, 2.75rem);
  }

  & .tarjeta-a7 + .et_pb_row .et_pb_text:first-child:not(.enlace-subrayado):has(.et_pb_text_inner > :is(h3, .fuente-h3)) {
    margin-top: clamp(2.75rem, 2.1338rem + 2.6291vw, 4.5rem);
  }

  & .et_pb_row:has(.tabla:last-child) + .tarjeta-a8 {
    margin-top: clamp(2rem, 1.8239rem + 0.7512vw, 2.5rem);
  }

  & .et_pb_module.et_pb_image + .et_pb_text:has(.et_pb_text_inner > :is(h4, .fuente-h4)) {
    margin-top: clamp(2rem, 1.8239rem + 0.7512vw, 2.5rem);
  }

  & .et_pb_row:first-child .et_pb_text:first-child,
  .et_pb_row:first-child .et_pb_text:first-child:not(.enlace-subrayado):has(.et_pb_text_inner > h3),
  .et_pb_row:first-child .et_pb_text:first-child:has(.et_pb_text_inner > h2),
  .et_pb_row:first-child .et_pb_image:first-child {
    margin-top: 0;
  }
}

/* Enlaces en titulos H2 */

.archive.et-db #et-boc .et-l .et_pb_text h2 a {
  text-decoration: none;
}
