/* Birkle Recycling — efectos premium */

html {
  scroll-behavior: smooth;
}

/* Aparición al hacer scroll */
@media (prefers-reduced-motion: no-preference) {
  .bk-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .8s cubic-bezier(.22, .61, .36, 1), transform .8s cubic-bezier(.22, .61, .36, 1);
    transition-delay: var(--bk-delay, 0ms);
    will-change: opacity, transform;
  }
  .bk-reveal.bk-in {
    opacity: 1;
    transform: none;
  }

  /* Entrada del hero */
  .bk-hero-in h1.elementor-heading-title,
  .bk-hero-in h2.elementor-heading-title {
    animation: bkHero 1s cubic-bezier(.22, .61, .36, 1) both;
  }
  @keyframes bkHero {
    from { opacity: 0; transform: translateY(34px) scale(.98); }
    to   { opacity: 1; transform: none; }
  }
}

/* Botones: elevación y brillo */
.elementor-button,
.elementor-button-link {
  transition: transform .35s cubic-bezier(.22, .61, .36, 1), box-shadow .35s cubic-bezier(.22, .61, .36, 1), background-color .35s ease, color .35s ease !important;
}
.elementor-button:hover,
.elementor-button-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -10px rgba(46, 125, 50, .55);
}

/* Imágenes de widgets: micro-zoom suave */
.elementor-widget-image .elementor-widget-container {
  overflow: hidden;
  border-radius: inherit;
}
.elementor-widget-image img {
  transition: transform .9s cubic-bezier(.22, .61, .36, 1);
}
.elementor-widget-image:hover img {
  transform: scale(1.04);
}

/* Tarjetas icon-box: elevación */
.elementor-widget-icon-box .elementor-widget-container,
.elementor-widget-image-box .elementor-widget-container {
  transition: transform .45s cubic-bezier(.22, .61, .36, 1), box-shadow .45s cubic-bezier(.22, .61, .36, 1);
}
.elementor-widget-icon-box:hover .elementor-widget-container,
.elementor-widget-image-box:hover .elementor-widget-container {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .25);
}

/* Iconos dentro de icon-box: giro sutil */
.elementor-widget-icon-box .elementor-icon {
  transition: transform .5s cubic-bezier(.34, 1.56, .64, 1);
}
.elementor-widget-icon-box:hover .elementor-icon {
  transform: scale(1.12) rotate(-4deg);
}

/* Enlaces del menú: subrayado animado */
.elementor-nav-menu a.elementor-item {
  position: relative;
}
.elementor-nav-menu a.elementor-item::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 88%;
  bottom: 2px;
  height: 2px;
  background: currentColor;
  opacity: 0;
  transition: right .35s cubic-bezier(.22, .61, .36, 1), opacity .25s ease;
}
.elementor-nav-menu a.elementor-item:hover::after {
  right: 12%;
  opacity: .9;
}

/* Cabecera: sombra al hacer scroll (clase puesta por JS) */
.bk-header-scrolled {
  box-shadow: 0 6px 24px -12px rgba(0, 0, 0, .28) !important;
  transition: box-shadow .4s ease;
}

/* Selector de idiomas: transición */
.birkle-langs a {
  transition: opacity .25s ease, transform .25s ease;
  display: inline-block;
}
.birkle-langs a:hover {
  opacity: .7;
  transform: translateY(-1px);
}

/* Móvil: animaciones más cortas y sin hover-zoom */
@media (max-width: 767px) {
  .bk-reveal {
    transform: translateY(18px);
    transition-duration: .55s;
  }
  .elementor-widget-image:hover img {
    transform: none;
  }
}

/* ---- Botón y modal de WhatsApp ---- */
.bk-wa-btn {
  position: fixed; bottom: 18px; right: 18px; z-index: 999999;
  width: 58px; height: 58px; border-radius: 50%; border: none; cursor: pointer;
  background: #25D366; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px -8px rgba(0,0,0,.45);
  transition: transform .35s cubic-bezier(.22,.61,.36,1), box-shadow .35s ease;
}
.bk-wa-btn:hover { transform: scale(1.08); box-shadow: 0 14px 30px -8px rgba(0,0,0,.5); }
.bk-wa-btn svg { width: 32px; height: 32px; fill: #fff; }

.bk-wa-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 1000000;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  opacity: 0; transition: opacity .3s ease;
}
.bk-wa-overlay.bk-open { opacity: 1; }
.bk-wa-card {
  background: #fff; border-radius: 16px; width: 100%; max-width: 380px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.5); overflow: hidden;
  transform: translateY(24px) scale(.97); transition: transform .35s cubic-bezier(.22,.61,.36,1);
}
.bk-wa-overlay.bk-open .bk-wa-card { transform: none; }
.bk-wa-head {
  background: #06A104; color: #fff; padding: 14px 18px; font-weight: 700; font-size: 16px;
  display: flex; justify-content: space-between; align-items: center;
}
.bk-wa-close { background: none; border: none; color: #fff; font-size: 22px; cursor: pointer; line-height: 1; }
.bk-wa-body { padding: 18px; }
.bk-wa-body label { display: block; font-size: 13px; font-weight: 600; margin: 10px 0 4px; color: #333; }
.bk-wa-body input, .bk-wa-body select {
  width: 100%; padding: 9px 12px; border: 1px solid #d5d5d5; border-radius: 8px;
  font-size: 14px; box-sizing: border-box; transition: border-color .25s ease, box-shadow .25s ease;
}
.bk-wa-body input:focus, .bk-wa-body select:focus {
  outline: none; border-color: #06A104; box-shadow: 0 0 0 3px rgba(6,161,4,.15);
}
.bk-wa-body .bk-err { border-color: #d32f2f !important; }
.bk-wa-send {
  margin-top: 16px; width: 100%; padding: 12px; border: none; border-radius: 10px;
  background: #06A104; color: #fff; font-weight: 700; font-size: 15px; cursor: pointer;
  transition: transform .3s cubic-bezier(.22,.61,.36,1), box-shadow .3s ease, background .3s ease;
}
.bk-wa-send:hover { background: #059003; transform: translateY(-2px); box-shadow: 0 10px 22px -10px rgba(6,161,4,.7); }
.bk-wa-note { font-size: 11px; color: #888; margin-top: 8px; text-align: center; }

/* Mensajes del formulario de contacto */
.bk-form-msg { margin-top: 12px; padding: 12px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.bk-form-msg.ok { background: #e6f7e6; color: #06A104; border: 1px solid #06A104; }
.bk-form-msg.ko { background: #fdecea; color: #c62828; border: 1px solid #c62828; }

/* Protección del formulario: captcha + RGPD */
.bk-form-extra { margin: 14px 0 4px; width: 100%; }
.bk-form-extra .bk-captcha-label { display: block; font-size: 13px; font-weight: 600; color: #333; margin-bottom: 5px; }
.bk-form-extra .bk-captcha-input {
  width: 120px; padding: 8px 12px; border: 1px solid #d5d5d5; border-radius: 8px;
  font-size: 14px; transition: border-color .25s ease, box-shadow .25s ease;
}
.bk-form-extra .bk-captcha-input:focus { outline: none; border-color: #06A104; box-shadow: 0 0 0 3px rgba(6,161,4,.15); }
.bk-form-extra .bk-consent { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; font-size: 13px; color: #444; font-weight: 400; cursor: pointer; }
.bk-form-extra .bk-consent input { margin-top: 3px; accent-color: #06A104; }
.bk-form-extra .bk-consent a { color: #06A104; font-weight: 600; text-decoration: underline; }

/* ---- Pestaña y panel lateral de contacto ---- */
.bk-contact-tab {
  position: fixed; right: 0; top: 130px; z-index: 999998;
  width: 52px; height: 52px; border: none; cursor: pointer;
  background: #06A104; border-radius: 8px 0 0 8px;
  box-shadow: 0 4px 14px -4px rgba(0,0,0,.3);
  display: flex; align-items: center; justify-content: center;
  transition: transform .3s cubic-bezier(.22,.61,.36,1);
}
.bk-contact-tab:hover { transform: translateX(-3px); }

.bk-contact-panel {
  position: fixed; right: 0; top: 120px; z-index: 999999;
  width: 320px; max-width: calc(100vw - 24px); max-height: calc(100vh - 140px);
  overflow-y: auto; background: #fff; border-radius: 14px 0 0 14px;
  box-shadow: -8px 10px 40px -12px rgba(0,0,0,.35);
  transform: translateX(105%); transition: transform .4s cubic-bezier(.22,.61,.36,1);
}
.bk-contact-panel.bk-open { transform: none; }
.bk-cp-head {
  background: #06A104; color: #fff; padding: 12px 16px; font-weight: 700; font-size: 15px;
  display: flex; justify-content: space-between; align-items: center;
  border-radius: 14px 0 0 0; position: sticky; top: 0;
}
.bk-cp-close { background: none; border: none; color: #fff; font-size: 21px; cursor: pointer; line-height: 1; }
.bk-cp-body { padding: 14px 16px 18px; }
.bk-cp-body label { display: block; font-size: 12px; font-weight: 600; margin: 9px 0 3px; color: #333; }
.bk-cp-body input, .bk-cp-body textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #d5d5d5; border-radius: 8px;
  font-size: 13px; box-sizing: border-box; transition: border-color .25s ease, box-shadow .25s ease;
}
.bk-cp-body input:focus, .bk-cp-body textarea:focus {
  outline: none; border-color: #06A104; box-shadow: 0 0 0 3px rgba(6,161,4,.15);
}
.bk-cp-hp { position: absolute !important; left: -9999px; height: 0; width: 0; opacity: 0; }
.bk-cp-consent { display: flex !important; gap: 7px; align-items: flex-start; margin-top: 11px !important; font-weight: 400 !important; cursor: pointer; line-height: 1.45; }
.bk-cp-consent input { width: auto !important; margin-top: 2px; accent-color: #06A104; }
.bk-cp-consent a { color: #06A104; font-weight: 600; }
.bk-cp-send {
  margin-top: 13px; width: 100%; padding: 10px; border: none; border-radius: 9px;
  background: #06A104; color: #fff; font-weight: 700; font-size: 14px; cursor: pointer;
  transition: transform .3s cubic-bezier(.22,.61,.36,1), background .3s ease;
}
.bk-cp-send:hover { background: #059003; transform: translateY(-2px); }
.bk-cp-msg { margin-top: 10px; padding: 9px 11px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.bk-cp-msg.ok { background: #e6f7e6; color: #06A104; border: 1px solid #06A104; }
.bk-cp-msg.ko { background: #fdecea; color: #c62828; border: 1px solid #c62828; }

@media (max-width: 767px) {
  .bk-contact-tab { display: none; }
  .bk-contact-panel { top: 90px; }
}

/* Vídeo de fondo del hero */
.e-parent { position: relative; }
.bk-bg-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; pointer-events: none;
  filter: blur(5px) brightness(.8); transform: scale(1.06);
}
.bk-bg-shade { position: absolute; inset: 0; background: rgba(0,0,0,.45); z-index: 0; pointer-events: none; }
.bk-bg-video ~ .e-con-inner { position: relative; z-index: 1; }

/* Velo verde para el video del CTA */
.bk-bg-shade-green { position: absolute; inset: 0; background: rgba(6,140,4,.72); z-index: 0; pointer-events: none; }

.bk-contact-tab img { width: 32px !important; height: 32px !important; max-width: none !important; }

/* Texto en blanco sobre el video del hero de Plasticos/materiales */
[data-id="23b0267"] .elementor-heading-title,
[data-id="0a57f14"], [data-id="0a57f14"] p {
  color: #fff !important;
}

/* Ocultar el botón flotante de accesibilidad (se abre desde el pie) */
.pojo-a11y-toolbar-toggle { display: none !important; }

/* Video del banner medio ambiente: nitido, con velo verde suave */
.bk-bg-video-clear {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; pointer-events: none;
}
.bk-bg-shade-green-soft { position: absolute; inset: 0; background: rgba(6,120,4,.45); z-index: 0; pointer-events: none; }

/* Boton de llamada: solo visible en movil */
.bk-call-tab {
  display: none; position: fixed; right: 0; top: 115px; z-index: 999998;
  width: 52px; height: 52px; background: #06A104; border-radius: 8px 0 0 8px;
  box-shadow: 0 4px 14px -4px rgba(0,0,0,.3);
  align-items: center; justify-content: center; text-decoration: none;
}
@media (max-width: 767px) {
  .bk-call-tab { display: flex; top: 200px; }
}

/* WhatsApp en movil: pestana pegada al borde como el telefono */
@media (max-width: 767px) {
  .bk-wa-btn {
    right: 0 !important; bottom: 18px !important;
    width: 52px !important; height: 52px !important;
    border-radius: 8px 0 0 8px !important;
  }
  .bk-wa-btn svg { width: 26px !important; height: 26px !important; }
}

/* Video del CTA verde: nitido y con velo mas ligero para que se vea */
.bk-bg-video-cta { filter: none !important; transform: none !important; }
.bk-bg-video-cta + .bk-bg-shade-green { background: rgba(6,130,4,.55); }

/* Enlace de accesibilidad del pie: solo en escritorio */
@media (max-width: 767px) {
  .bk-a11y-link { display: none !important; }
}

/* Menu desplegable movil: verde solo al pasar el cursor, no fijo */
@media (max-width: 1024px) {
  .elementor-nav-menu--dropdown a.elementor-item-active {
    background: transparent !important;
    color: #333 !important;
  }
  .elementor-nav-menu--dropdown a.elementor-item:hover,
  .elementor-nav-menu--dropdown a.elementor-item:focus {
    background: #06A104 !important;
    color: #fff !important;
  }
}

/* Evitar desbordamiento horizontal por los videos de fondo */
html, body { overflow-x: hidden; }
.e-con:has(> .bk-bg-video),
.e-con:has(> .bk-bg-video-clear),
.e-con:has(> .bk-bg-video-cta) { overflow: hidden; }

/* Ocultar widget antiguo de resenas (Trustindex) que ya no puede cargar datos */
.ti-widget, .ti-reviews-container-wrapper { display: none !important; }

/* Textos de proteccion del formulario de contacto: blancos sobre la foto oscura */
.elementor-form .bk-form-extra .bk-captcha-label,
.elementor-form .bk-form-extra .bk-consent {
  color: rgba(255,255,255,.72) !important;
  font-weight: 400 !important;
  text-shadow: none;
}
.elementor-form .bk-form-extra .bk-consent a { color: rgba(255,255,255,.9) !important; }
