/*
 * Divi Child Landing - Header Home sobre video
 * Home: header transparente superpuesto al hero/video.
 * Resto del sitio: fondo negro #090909.
 */

/* =========================
   Fondo general del sitio
   ========================= */
html,
body,
#page-container,
#main-content,
.entry-content,
.et-l,
.et_builder_inner_content {
  background: #090909 !important;
}

/* En Home no forzamos fondo negro global para que el video/hero se pueda ver detrás del header. */
body.home,
body.front-page,
body.home #page-container,
body.home #main-content,
body.home .entry-content,
body.home .et-l,
body.home .et_builder_inner_content,
body.front-page #page-container,
body.front-page #main-content,
body.front-page .entry-content,
body.front-page .et-l,
body.front-page .et_builder_inner_content {
  background: transparent !important;
  background-color: transparent !important;
}

/* =========================
   Header del Theme Builder en Home
   Tu header real usa .oa-menu-header.
   También cubrimos .oa-topbar por compatibilidad con landings anteriores.
   ========================= */
body.home .oa-menu-header,
body.front-page .oa-menu-header,
body.home header.oa-menu-header,
body.front-page header.oa-menu-header,
body.home .oa-topbar,
body.front-page .oa-topbar,
body.home header.oa-topbar,
body.front-page header.oa-topbar {
  background: transparent !important;
  background-color: transparent !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 999999 !important;
  box-shadow: none !important;
}

/* Mantener el menú de escritorio horizontal y funcional. */
body.home .oa-menu-nav,
body.front-page .oa-menu-nav,
body.home .oa-nav,
body.front-page .oa-nav {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

@media (min-width: 761px) {
  body.home .oa-menu-nav,
  body.front-page .oa-menu-nav,
  body.home .oa-nav,
  body.front-page .oa-nav {
    flex-wrap: nowrap !important;
  }

  body.home .oa-menu-links,
  body.front-page .oa-menu-links,
  body.home .oa-menu,
  body.front-page .oa-menu {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
  }
}

/* Legibilidad sobre video/foto. */
body.home .oa-menu-header a,
body.home .oa-menu-header strong,
body.home .oa-menu-header span,
body.front-page .oa-menu-header a,
body.front-page .oa-menu-header strong,
body.front-page .oa-menu-header span,
body.home .oa-topbar a,
body.home .oa-topbar strong,
body.home .oa-topbar span,
body.front-page .oa-topbar a,
body.front-page .oa-topbar strong,
body.front-page .oa-topbar span {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
}

/* Resto del sitio: header negro normal. */
body:not(.home):not(.front-page) .oa-menu-header,
body:not(.home):not(.front-page) header.oa-menu-header,
body:not(.home):not(.front-page) .oa-topbar,
body:not(.home):not(.front-page) header.oa-topbar {
  background: #090909 !important;
  background-color: #090909 !important;
  position: relative !important;
  box-shadow: none !important;
}

/* =========================
   Quitar fondo negro del contenedor Divi del header en Home
   Esto corrige .et_pb_section { background:#030303!important; }.
   ========================= */
body.home .et_pb_section_0_tb_header,
body.front-page .et_pb_section_0_tb_header,
body.home .et_pb_section_0_tb_header .et_pb_row,
body.front-page .et_pb_section_0_tb_header .et_pb_row,
body.home .et_pb_section_0_tb_header .et_pb_column,
body.front-page .et_pb_section_0_tb_header .et_pb_column,
body.home .et_pb_section_0_tb_header .et_pb_module,
body.front-page .et_pb_section_0_tb_header .et_pb_module,
body.home .et_pb_section_0_tb_header .et_pb_code,
body.front-page .et_pb_section_0_tb_header .et_pb_code,
body.home .et_pb_section_0_tb_header .et_pb_code_inner,
body.front-page .et_pb_section_0_tb_header .et_pb_code_inner,
body.home .et_pb_section:has(.oa-menu-header),
body.front-page .et_pb_section:has(.oa-menu-header),
body.home .et_pb_row:has(.oa-menu-header),
body.front-page .et_pb_row:has(.oa-menu-header),
body.home .et_pb_column:has(.oa-menu-header),
body.front-page .et_pb_column:has(.oa-menu-header),
body.home .et_pb_module:has(.oa-menu-header),
body.front-page .et_pb_module:has(.oa-menu-header),
body.home .et_pb_code:has(.oa-menu-header),
body.front-page .et_pb_code:has(.oa-menu-header),
body.home .et_pb_code_inner:has(.oa-menu-header),
body.front-page .et_pb_code_inner:has(.oa-menu-header),
body.home .et_pb_section:has(.oa-topbar),
body.front-page .et_pb_section:has(.oa-topbar),
body.home .et_pb_row:has(.oa-topbar),
body.front-page .et_pb_row:has(.oa-topbar),
body.home .et_pb_column:has(.oa-topbar),
body.front-page .et_pb_column:has(.oa-topbar),
body.home .et_pb_module:has(.oa-topbar),
body.front-page .et_pb_module:has(.oa-topbar),
body.home .et_pb_code:has(.oa-topbar),
body.front-page .et_pb_code:has(.oa-topbar),
body.home .et_pb_code_inner:has(.oa-topbar),
body.front-page .et_pb_code_inner:has(.oa-topbar),
body.home .oa-header-holder,
body.front-page .oa-header-holder {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

/* Hero empieza arriba debajo del header superpuesto. */
body.home .oa-hero,
body.front-page .oa-hero {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body.home .oa-hero-content,
body.front-page .oa-hero-content {
  padding-top: 120px !important;
}


/* FIX VISIBILIDAD: el Theme Builder header completo debe estar encima del hero, no solo el <header>. */
body.home .et-l--header,
body.front-page .et-l--header,
body.home #et-boc .et-l--header,
body.front-page #et-boc .et-l--header,
body.home .et_pb_section_0_tb_header,
body.front-page .et_pb_section_0_tb_header,
body.home .et_pb_section:has(.oa-menu-header),
body.front-page .et_pb_section:has(.oa-menu-header),
body.home .et_pb_section:has(.oa-topbar),
body.front-page .et_pb_section:has(.oa-topbar) {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 999999 !important;
  background: transparent !important;
  background-color: transparent !important;
  overflow: visible !important;
  pointer-events: auto !important;
}

body.home .et-l--header *,
body.front-page .et-l--header * {
  pointer-events: auto !important;
}

/* Evita que el hero tape el header por z-index. */
body.home .oa-hero,
body.front-page .oa-hero {
  position: relative !important;
  z-index: 1 !important;
}

body.home .oa-menu-header,
body.front-page .oa-menu-header,
body.home .oa-topbar,
body.front-page .oa-topbar {
  position: relative !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* =========================
   Fixes de layout para landings Divi importadas
   ========================= */
.divi-child-landing-page #main-content,
.divi-child-landing-page .entry-content {
  overflow-x: hidden;
}

.divi-child-landing-page .et_pb_section,
.divi-child-landing-page .et_pb_row,
.divi-child-landing-page .et_pb_column,
.divi-child-landing-page .et_pb_module,
.divi-child-landing-page .et_pb_code,
.divi-child-landing-page .et_pb_code_inner {
  box-shadow: none;
}

.divi-child-landing-page .et_pb_section {
  padding: 0 !important;
}

.divi-child-landing-page .et_pb_row {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 auto !important;
}

.divi-child-landing-page .et_pb_column,
.divi-child-landing-page .et_pb_module,
.divi-child-landing-page .et_pb_code,
.divi-child-landing-page .et_pb_code_inner {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.divi-child-landing-page [class$='-container'],
.divi-child-landing-page [class*='-container '] {
  width: min(1120px, calc(100% - 42px));
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}

.divi-child-landing-page footer {
  background-color: #090909;
}

@media (max-width: 760px) {
  body.home .oa-hero-content,
  body.front-page .oa-hero-content {
    padding-top: 145px !important;
  }
}

@media (max-width: 560px) {
  .divi-child-landing-page [class$='-container'],
  .divi-child-landing-page [class*='-container '] {
    width: min(100% - 28px, 1120px);
  }
}
