/* Hogar Alemán — mejoras de rendimiento y micro-interacciones sutiles.
   Un único archivo, cacheable en todas las páginas. No reemplaza ni
   sobreescribe estilos de Elementor: solo añade transiciones y estados. */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .u-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.75s cubic-bezier(0.22, 0.61, 0.36, 1),
      transform 0.75s cubic-bezier(0.22, 0.61, 0.36, 1);
    transition-delay: var(--rd, 0s);
  }

  .u-reveal.u-revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Zoom suave en imágenes al pasar el cursor */
.elementor-widget-image .elementor-widget-container {
  overflow: hidden;
}
.elementor-widget-image img,
.elementor-widget-gallery img {
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.elementor-widget-image:hover img,
.elementor-widget-gallery .gallery-item:hover img {
  transform: scale(1.035);
}

/* Botones: leve elevación al pasar el cursor (usan su propia
   transición "all .3s" ya definida por Elementor) */
.elementor-button:hover,
a.elementor-button-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px -16px rgba(0, 0, 0, 0.4);
}
.elementor-button:active,
a.elementor-button-link:active {
  transform: translateY(-1px);
}

/* Icon boxes: leve elevación */
.elementor-icon-box-wrapper {
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.elementor-icon-box-wrapper:hover {
  transform: translateY(-4px);
}

/* Páginas simples propias (gracias, política de privacidad): estas no
   tienen el CSS específico por widget que genera Elementor, así que los
   títulos quedan sin margen por defecto. Les damos espaciado razonable. */
.u-simple-page {
  display: block;
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 20px;
}
.u-simple-page .elementor-widget {
  width: 100%;
}
.u-simple-page .elementor-heading-title {
  display: block;
  margin: 0.9em 0 0.35em;
}
.u-simple-page h1.elementor-heading-title {
  margin-top: 0;
}
.u-simple-page p.wp-block-paragraph {
  margin: 0 0 1em;
  line-height: 1.6;
}

/* Formulario de Denuncias Ley N° 21.643 */
.u-karin-form {
  margin-top: 1.5em;
  max-width: 640px;
}
.u-karin-section {
  margin-top: 1.6em !important;
  padding-top: 0.8em;
  border-top: 1px solid #e2e2e2;
}
.u-karin-label {
  display: block;
  font-weight: 600;
  font-size: 15px;
  margin: 0 0 1.1em;
  color: #333;
}
.u-karin-input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
  border: 1px solid #ccc;
  border-radius: 3px;
  box-sizing: border-box;
}
.u-karin-textarea {
  resize: vertical;
}
.u-karin-checkbox {
  display: block;
  font-weight: 400;
  font-size: 15px;
  margin: 0 0 0.6em;
  line-height: 1.5;
}
.u-karin-checkbox input {
  margin-right: 8px;
}
.u-karin-confidencialidad {
  margin-top: 1.4em;
  padding: 14px;
  background: #f7f7f7;
  border-radius: 4px;
}
.u-karin-submit {
  margin-top: 1.2em;
}

/* Tarjetas de "Novedades": la caja de la miniatura reserva una altura
   fija para parejar las tarjetas, pero la imagen no la llenaba y dejaba
   un hueco gris debajo. La imagen ahora cubre todo el recuadro. */
.elementor-post__thumbnail img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transform: none !important;
}

/* Menú de navegación: subrayado animado */
.elementor-item {
  position: relative;
}
.elementor-item::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 0;
  height: 2px;
  background: currentColor;
  opacity: 0.8;
  transition: width 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.elementor-item:hover::after {
  width: 100%;
}

/* Lightbox de video propio (no depende de módulos de Elementor Pro) */
body.u-video-lightbox-lock {
  overflow: hidden;
}
.u-video-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  align-items: center;
  justify-content: center;
}
.u-video-lightbox.is-open {
  display: flex;
}
.u-video-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.85);
}
.u-video-lightbox__box {
  position: relative;
  width: min(900px, 92vw);
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.u-video-lightbox__frame,
.u-video-lightbox__frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.u-video-lightbox__close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}
.u-video-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.3);
}
