/* Home OTEC — estilos exclusivos de la portada.
   Se encola solo en is_front_page(). Bloques R3: chips, cómo funciona,
   respaldo institucional y CTA final. */

body.home .otec-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 1100px;
  margin: 24px auto 0;
  padding: 0 20px;
  box-sizing: border-box;
}

body.home .otec-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid rgba(15, 32, 55, 0.14);
  border-radius: 999px;
  background: #fbfbfb;
  color: #0f2037;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

body.home .otec-chip:hover {
  border-color: #0f2037;
  background: #0f2037;
  color: #fbfbfb;
}

body.home .otec-chip:focus-visible {
  outline: 3px solid #ff9817;
  outline-offset: 3px;
}

body.home .otec-como,
body.home .otec-confianza,
body.home .otec-cta-final {
  box-sizing: border-box;
  width: 100%;
}

body.home .otec-como {
  background: #ebebed;
}

body.home .otec-como__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 20px;
  box-sizing: border-box;
}

body.home .otec-como__title,
body.home .otec-confianza__title,
body.home .otec-cta-final__title {
  margin: 0 0 12px;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.15;
  color: #0f2037;
  text-align: center;
}

body.home .otec-como__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

body.home .otec-como__step {
  padding: 28px 24px;
  border: 1px solid rgba(15, 32, 55, 0.12);
  border-radius: 24px;
  background: #fbfbfb;
}

body.home .otec-como__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: #ff9817;
  color: #0f2037;
  font-size: 18px;
  font-weight: 700;
}

body.home .otec-como__step-title {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.3;
  color: #0f2037;
}

body.home .otec-como__step-text {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(15, 32, 55, 0.82);
}

body.home .otec-confianza {
  border-top: 1px solid rgba(15, 32, 55, 0.1);
  border-bottom: 1px solid rgba(15, 32, 55, 0.1);
  background: #fbfbfb;
}

body.home .otec-confianza__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 20px;
  box-sizing: border-box;
}

body.home .otec-confianza__text {
  margin: 0 0 28px;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(15, 32, 55, 0.75);
  text-align: center;
}

body.home .otec-confianza__seals {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 24px 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.home .otec-confianza__seal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 110px;
}

body.home .otec-confianza__img {
  display: block;
  width: auto;
  max-width: 140px;
  height: 64px;
  object-fit: contain;
}

body.home .otec-confianza__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(15, 32, 55, 0.65);
  text-align: center;
}

body.home .otec-cta-final {
  background: #0f2037;
  color: #fbfbfb;
}

body.home .otec-cta-final__inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 72px 20px;
  box-sizing: border-box;
  text-align: center;
}

body.home .otec-cta-final__title {
  color: #fbfbfb;
}

body.home .otec-cta-final__text {
  margin: 0 auto 28px;
  max-width: 620px;
  font-size: 18px;
  line-height: 1.6;
  color: rgba(251, 251, 251, 0.82);
}

body.home .otec-cta-final__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

body.home .otec-cta-final__primary,
body.home .otec-cta-final__secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}

body.home .otec-cta-final__primary {
  background: #ff9817;
  color: #0f2037;
}

body.home .otec-cta-final__primary:hover {
  background: #fbfbfb;
  color: #0f2037;
}

body.home .otec-cta-final__secondary {
  border: 1px solid rgba(251, 251, 251, 0.45);
  color: #fbfbfb;
}

body.home .otec-cta-final__secondary:hover {
  border-color: #fbfbfb;
  background: #fbfbfb;
  color: #0f2037;
}

body.home .otec-cta-final__primary:focus-visible,
body.home .otec-cta-final__secondary:focus-visible {
  outline: 3px solid #ff9817;
  outline-offset: 3px;
}

@media (max-width: 1023px) {
  body.home .otec-como__steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 689px) {
  body.home .otec-como__inner,
  body.home .otec-confianza__inner,
  body.home .otec-cta-final__inner {
    padding-left: 20px;
    padding-right: 20px;
  }

  body.home .otec-como__steps {
    grid-template-columns: 1fr;
  }

  body.home .otec-confianza__seals {
    gap: 20px 28px;
  }

  body.home .otec-confianza__seal {
    min-width: 90px;
  }

  body.home .otec-cta-final__actions {
    flex-direction: column;
  }
}

/* R3b — carrusel de cursos destacados. */

body.home #block-otec-home-cursos .divi-filter-archive-loop .loop-grid,
body.home #block-otec-home-cursos .divi-filter-archive-loop .grid-posts,
body.home #block-otec-home-cursos .divi-filter-loop-container > :not(.no-results-layout) {
  display: flex !important;
}

body.home .gsbp-6f6b8dd {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

body.home .gsbp-6f6b8dd .daf-block-root {
  width: 100% !important;
  max-width: 1200px !important;
  min-width: 0 !important;
  box-sizing: border-box;
}

body.home .gsbp-6f6b8dd .wpenajfi_ajax_filter_archive_loop,
body.home .gsbp-6f6b8dd .et_pb_module_inner,
body.home .gsbp-6f6b8dd .divi-filter-archive-loop,
body.home .gsbp-6f6b8dd .filtered-posts-cont,
body.home .gsbp-6f6b8dd .divi-filter-loop-container,
body.home .gsbp-6f6b8dd .grid-posts.loop-grid,
body.home .gsbp-6f6b8dd .loop-grid {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
}

body.home .gsbp-6f6b8dd .grid-posts.loop-grid,
body.home .gsbp-6f6b8dd .loop-grid {
  display: flex !important;
  gap: 24px !important;
  overflow-x: auto !important;
  scroll-snap-type: x mandatory;
  overscroll-behavior-inline: contain;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

body.home .gsbp-6f6b8dd .grid-posts.loop-grid > .dmach-grid-item,
body.home .gsbp-6f6b8dd .grid-posts.loop-grid > .grid-col,
body.home .gsbp-6f6b8dd .grid-posts.loop-grid > article.curso,
body.home .gsbp-6f6b8dd .loop-grid > .dmach-grid-item,
body.home .gsbp-6f6b8dd .loop-grid > .grid-col,
body.home .gsbp-6f6b8dd .loop-grid > article.curso {
  flex: 0 0 clamp(260px, 30vw, 360px);
  width: auto !important;
  max-width: none;
  scroll-snap-align: start;
}

body.home .gsbp-6f6b8dd .divi-filter-pagination,
body.home .gsbp-6f6b8dd .wpenajfi-pagination,
body.home .gsbp-6f6b8dd .ajax-filter-pagination {
  display: none !important;
}

body.home .gsbp-6f6b8dd .otec-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: auto;
  overflow: hidden;
  border: 1px solid rgba(15, 32, 55, 0.12);
  border-radius: 24px;
  background: #fbfbfb;
}

body.home .gsbp-6f6b8dd .otec-card__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

body.home .gsbp-6f6b8dd .otec-card__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.home .gsbp-6f6b8dd .otec-card__cat {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #0f2037;
  color: #fbfbfb;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

body.home .gsbp-6f6b8dd .otec-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
}

body.home .gsbp-6f6b8dd .otec-card__title {
  margin: 0;
  font-size: 19px;
  line-height: 1.3;
  color: #0f2037;
}

body.home .gsbp-6f6b8dd .otec-card__title a {
  color: inherit;
  text-decoration: none;
}

body.home .gsbp-6f6b8dd .otec-card__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  line-height: 1.4;
  color: rgba(15, 32, 55, 0.72);
}

body.home .gsbp-6f6b8dd .otec-card__price {
  margin: auto 0 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: #0f2037;
}

body.home .gsbp-6f6b8dd .otec-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.home .gsbp-6f6b8dd .otec-card__cta,
body.home .gsbp-6f6b8dd .otec-card__wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

body.home .gsbp-6f6b8dd .otec-card__cta {
  background: #ff9817;
  color: #0f2037;
}

body.home .gsbp-6f6b8dd .otec-card__wa {
  border: 1px solid rgba(15, 32, 55, 0.18);
  color: #0f2037;
}

body.home .gsbp-6f6b8dd .otec-card__cta:hover {
  background: #0f2037;
  color: #fbfbfb;
}

body.home .gsbp-6f6b8dd .otec-card__wa:hover {
  border-color: #0f2037;
  background: #0f2037;
  color: #fbfbfb;
}

body.home .gsbp-6f6b8dd .otec-card__cta:focus-visible,
body.home .gsbp-6f6b8dd .otec-card__wa:focus-visible {
  outline: 3px solid #0f2037;
  outline-offset: 3px;
}

@media (max-width: 689px) {
  body.home .gsbp-6f6b8dd .otec-card__body {
    padding: 16px;
  }
}

/* R3c ajustes — home 390/768. El 1440 no se toca. */

@media (max-width: 991.98px) {
  /* Hero: AOS deja el botón con opacity 0 en tablet/móvil. */
  body.home #gspb_button-id-gsbp-9ed007b > .gspb-buttonbox {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Clientes: logos acotados y carrusel más bajo. */
  body.home .gspb_slider-id-gsbp-b9a9a27 .swiper-slide img {
    max-height: 72px !important;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
  }

  body.home .gspb_slider-id-gsbp-b9a9a27 .swiper-slide-inner {
    min-height: 96px;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 999.98px) {
  /* Sobre nosotros: imagen, texto y botón en columna. */
  body.home #gspb_row-id-gsbp-7cb4aca > .gspb_row__content,
  body.home #gspb_row-id-gsbp-d58df6b > .gspb_row__content {
    flex-direction: column !important;
    align-items: center !important;
  }

  body.home #gspb_col-id-gsbp-28fb7f7,
  body.home #gspb_col-id-gsbp-b2f6593,
  body.home #gspb_col-id-gsbp-fc53ec9,
  body.home #gspb_col-id-gsbp-7167c54 {
    width: 100% !important;
  }

  body.home #gspb_image-id-gsbp-732727e img {
    width: 100%;
    height: auto;
  }

  /* Footer: reglas globales en site.css (R5). */
}

@media (max-width: 689.98px) {
  /* FAQ: preguntas una debajo de otra. */
  body.home .gsbp-4739a62 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }

  body.home .gsbp-4d3464a,
  body.home .gsbp-e4a997a {
    width: 100% !important;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
  }

  body.home .gsbp-e4a997a {
    margin-top: 24px;
  }
}
