/* Ajustes para la versión estática (sin JS de Elementor/Astra) */
html { scroll-behavior: smooth; }

/* Vídeo de fondo: cubrir el contenedor (antes lo calculaba Elementor por JS) */
.elementor .elementor-background-video-container video.elementor-background-video-hosted {
  top: 0; left: 0; transform: none;
  width: 100%; height: 100%;
  max-width: none; object-fit: cover;
}

/* Lightbox de imágenes */
.apm-lightbox {
  position: fixed; inset: 0; z-index: 9999999;
  display: none; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .87); padding: 40px 16px; cursor: zoom-out;
}
.apm-lightbox.open { display: flex; }
.apm-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 10px 40px rgba(0,0,0,.5); cursor: default; }
.apm-lightbox-close {
  position: absolute; top: 10px; right: 16px;
  background: none; border: 0; color: #fff; font-size: 40px; line-height: 1; cursor: pointer; padding: 4px 10px;
}

/* Formulario: estado de envío */
.wpcf7-form.submitting .wpcf7-submit { opacity: .6; pointer-events: none; }

/* Selector de idioma */
.apm-lang {
  position: fixed; top: 18px; right: 18px; z-index: 9999998;
  display: inline-flex; gap: 2px; padding: 3px;
  background: #122745; border: 2px solid #122745; border-radius: 30px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
  font-family: "Lexend", "Bricolage Grotesque", Arial, sans-serif;
}
.apm-lang a {
  display: block; min-width: 40px; padding: 6px 10px;
  border-radius: 30px; text-align: center; text-decoration: none !important;
  font-size: 13px; font-weight: 600; letter-spacing: 1px; line-height: 1;
  color: #fff !important; background: transparent; transition: background .2s, color .2s;
}
.apm-lang a:hover { background: rgba(255, 255, 255, .15); color: #fff !important; }
.apm-lang a.is-active { background: #fff; color: #122745 !important; }
.apm-lang--inline { position: static; box-shadow: none; z-index: auto; flex: 0 0 auto; }
li.apm-lang-li { display: flex !important; align-items: center; padding: 0 0 0 15px; }
li.apm-lang-li::before, li.apm-lang-li::after { display: none !important; }
#ast-mobile-header .site-header-primary-section-right { display: flex; align-items: center; }
#ast-mobile-header .apm-lang--inline { margin-right: 10px; }
#ast-mobile-header .apm-lang--inline a { min-width: 34px; padding: 5px 8px; font-size: 12px; }
.apm-nav-right { display: flex; align-items: center; gap: 24px; margin-top: 20px; flex: 0 0 auto; }
.apm-nav-right .nav-links { margin: 0 !important; padding: 0 !important; gap: 24px !important; align-items: center; }
.apm-nav-right .nav-links a { white-space: nowrap; }
header.header .nav .logo { white-space: nowrap; }
@media (max-width: 767px) {
  .apm-lang { top: 12px; right: 12px; }
  .apm-nav-right { margin-top: 0; }
  header.header .nav .logo { white-space: normal; }
}

/* Logo dividido: APM Packers (web) + Iberico Pork Premium (inicio de página) */
header.header .nav .logo a { color: inherit !important; text-decoration: none; }
