/* estilos base del constructor de header */

.bh-shell {
  width: 100%;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0px;
  overflow: hidden;
}

.bh-row {
  display: grid;
  gap: 0;
  align-items: stretch;
}

.bh-cell {
  min-width: 0;
}

.bh-block {
  height: 100%;
  padding: 16px 18px;
}

.bh-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
}

.bh-logo--left {
  justify-content: flex-start;
  text-align: left;
}

.bh-logo--center {
  justify-content: center;
  text-align: center;
}

.bh-logo--right {
  justify-content: flex-end;
  text-align: right;
}

.bh-logo__media {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.bh-logo__media img {
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

.bh-logo__secondary {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #64748b;
}

.bh-menu {
  display: flex;
  align-items: center;
  min-height: 72px;
}

.bh-menu--left {
  justify-content: flex-start;
}

.bh-menu--center {
  justify-content: center;
}

.bh-menu--right {
  justify-content: flex-end;
}

.bh-menu__list {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* drawer head + backdrop: ocultos por defecto, solo activos en movil */
.bh-drawer-head  { display: none; }
.bh-menu__backdrop { display: none; }

/* scroll lock del body cuando el drawer esta abierto */
body.bh-noscroll { overflow: hidden; }

.bh-menu__link {
  text-decoration: none;
  color: var(--bh-text, #1f2937);
  background-color: var(--bh-item-bg, transparent);
  padding: var(--bh-py, 0px) var(--bh-px, 0px);
  border: var(--bh-border-width, 0px) solid var(--bh-border-color, transparent);
  border-radius: var(--bh-radius, 0px);
  position: relative;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease, opacity .2s ease;
}

.bh-menu .bh-menu__link:hover {
  color: var(--bh-hover, #5b53ff);
}

/* hover: underline */
.bh-menu[data-bh-hover="underline"] .bh-menu__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--bh-hover, #5b53ff);
  border-radius: 1px;
  transform: scaleX(0);
  transition: transform .2s ease;
}
.bh-menu[data-bh-hover="underline"] .bh-menu__link:hover::after,
.bh-menu[data-bh-hover="underline"] .bh-menu__link.is-active::after {
  transform: scaleX(1);
}

/* hover: background */
.bh-menu[data-bh-hover="background"] .bh-menu__link:hover {
  background-color: var(--bh-hover-bg, rgba(0,0,0,.07));
}

/* hover: scale */
.bh-menu[data-bh-hover="scale"] .bh-menu__link:hover {
  transform: scale(1.08);
}

/* hover: border */
.bh-menu[data-bh-hover="border"] .bh-menu__link:hover {
  border-color: var(--bh-hover, #5b53ff) !important;
}

/* ──── Hamburguesa ──── */
.bh-menu__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
  border-radius: 8px;
  margin-left: auto;
  flex-shrink: 0;
  z-index: 1;
}

/* ──── Desktop: drawer es un flex container inline ──── */
.bh-menu__drawer {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.bh-menu__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--bh-text, #1f2937);
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}

.bh-menu--open > .bh-menu__hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.bh-menu--open > .bh-menu__hamburger span:nth-child(2) {
  opacity: 0;
}
.bh-menu--open > .bh-menu__hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.bh-social {
  display: flex;
  align-items: center;
  min-height: 72px;
}

.bh-social__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.bh-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  color: #1f2937;
  text-transform: uppercase;
}

.bh-social__link:hover {
  border-color: rgba(91, 83, 255, 0.5);
  color: #5b53ff;
}

.bh-empty {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(148, 163, 184, 0.45);
  border-radius: 10px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
}

@media (max-width: 900px) {
  .bh-row {
    grid-template-columns: 1fr !important;
  }

  .bh-menu,
  .bh-logo,
  .bh-social,
  .bh-logo--left,
  .bh-logo--right,
  .bh-menu--left,
  .bh-menu--right {
    justify-content: center;
    text-align: center;
  }

  .bh-menu__list {
    justify-content: center;
  }

  .bh-social__list {
    justify-content: center;
  }
}

@media (max-width: 768px) {

  /* ── hamburguesa ── */
  .bh-menu__hamburger {
    display: flex;
  }

  .bh-menu {
    flex-wrap: nowrap;
    min-height: 0;
    justify-content: flex-end !important;
  }

  /* ── backdrop oscuro ── */
  .bh-menu__backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
  }
  .bh-menu--open .bh-menu__backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  /* ── panel drawer (slide desde la derecha) ── */
  .bh-menu__drawer {
    position: fixed;
    top: 0;
    right: -100%;
    bottom: 0;
    width: min(280px, 80vw);
    background: var(--fp-header-bg, #ffffff);
    color: var(--fp-header-text, #1f2937);
    border-left: 1px solid var(--fp-header-border, rgba(0,0,0,.08));
    box-shadow: -6px 0 32px rgba(0,0,0,.18);
    z-index: 201;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transition: right .3s cubic-bezier(.4,0,.2,1);
  }
  .bh-menu--open .bh-menu__drawer {
    right: 0;
  }

  /* ── cabecera del drawer con boton cerrar ── */
  .bh-drawer-head {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 12px 16px;
    border-bottom: 1px solid var(--fp-header-border, rgba(0,0,0,.07));
    flex-shrink: 0;
  }
  .bh-drawer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: rgba(128,128,128,.12);
    cursor: pointer;
    color: var(--fp-header-text, #374151);
    flex-shrink: 0;
    transition: background .2s;
  }
  .bh-drawer-close:hover {
    background: rgba(128,128,128,.22);
  }

  /* ── lista de enlaces dentro del drawer ── */
  .bh-menu__list {
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    padding: 8px 0 !important;
    flex: 1;
  }
  .bh-menu .bh-menu__link {
    width: 100%;
    padding: 13px 20px !important;
    border-radius: 0 !important;
    font-size: 15px;
    border-bottom: 1px solid var(--fp-header-border, rgba(0,0,0,.05)) !important;
  }
  .bh-menu li:last-child .bh-menu__link {
    border-bottom: none !important;
  }
  .bh-menu .bh-menu__link:hover {
    background: rgba(128,128,128,.08) !important;
  }

}