/**
 * Hero Block Styles - Video Background
 * Usa variables de theme.json para consistencia
 * Video en relative para definir altura, contenido en absolute
 */

/* ===========================
   CONTENEDOR PRINCIPAL
   Background viene del inline style (ACF field)
   =========================== */

.home-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  gap: 24px;
  padding-bottom: var(--wp--preset--spacing--xx-large);
  overflow: hidden;
  min-height: calc(100vh - 4rem);
  margin-bottom: -3rem;
  z-index: 10;
}

.home-hero.hero--no-overlap {
  margin-bottom: 0;
}

/* ===========================
   CONTENEDOR BG (altura fija, imagen en absolute)
   Figma: height 605px, padding 64px
   =========================== */

.home-hero .hero-bg {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 208px);
  overflow: hidden;
}

/* Imagen de fondo container - ABSOLUTE para cubrir todo el BG */
.home-hero .hero-background-image-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

/* Imagen de fondo */
.home-hero .hero-background-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* ===========================
   BOTÓN PLAY CENTRADO
   =========================== */

.home-hero .hero-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.home-hero .hero-play-button:hover {
  transform: translate(-50%, -50%) scale(1.1);
}

.home-hero .hero-play-button:focus {
  outline: 2px solid var(--wp--preset--color--white);
  outline-offset: 4px;
  border-radius: 50%;
}

.home-hero .hero-play-icon {
  width: 100px;
  height: 100px;
  color: var(--wp--preset--color--white);
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.4));
}

/* ===========================
   TOOLTIP BADGE (sin video)
   Figma: Badge component - siempre visible
   =========================== */

.home-hero .hero-tooltip-badge {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
  background-color: rgba(244, 244, 244, 0.2);
  border: 1px solid #787878;
  border-radius: 40px;
  font-family: var(--wp--preset--font-family--inter);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.21;
  text-align: center;
  color: #FFFFFF;
  white-space: nowrap;
  pointer-events: none;
}

/* Overlay oscuro - ABSOLUTE sobre el video */
.home-hero .hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1;
  pointer-events: none;
}

/* ===========================
   CONTENIDO (TEXTOS + LOGO) - ABSOLUTE sobre la imagen
   =========================== */

.home-hero .hero-content {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  display: flex;
  justify-content: center;
  box-sizing: border-box;
}

/* Wrapper con max-width 1920px para contenido */
.home-hero .hero-content-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 1920px;
  padding: var(--wp--preset--spacing--extra-large);
  padding-bottom: 1rem;
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  z-index: 1;
}

/* Frame 1 - Wrapper de textos (ancho dinámico via ACF range) */
.home-hero .hero-text-wrapper {
  display: flex;
  flex-direction: column;
  width: var(--hero-text-width, 480px);
  max-width: 100%;
}

/* Grupo de títulos - Frame 124 (gap: 8px) */
.home-hero .hero-titles-group,
.home-hero .hero-text-wrapper > .wp-block-group {
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--x-small);
  align-self: stretch;
}

/* Reset estilos de grupo de Gutenberg */
.home-hero .hero-text-wrapper > .wp-block-group {
  padding: 0;
  margin: 0;
}

.home-hero .hero-description{
  margin-top: 3rem;
}

/* Título H1 - Desktop/H1 Bold */
.home-hero .hero-main-title,
.home-hero .hero-text-wrapper h1,
.home-hero .hero-text-wrapper .wp-block-heading {
  font-family: var(--wp--preset--font-family--inter);
  font-weight: 700;
  font-size: var(--wp--preset--font-size--gigantic);
  line-height: 1.2;
  color: var(--wp--preset--color--white);
  margin: 0;
  text-align: left;
}

/* Subtítulo - Desktop/H4 Bold */
.home-hero .hero-subtitle,
.home-hero .wp-block-group .wp-block-paragraph {
  font-family: var(--wp--preset--font-family--inter);
  font-weight: 700;
  font-size: var(--wp--preset--font-size--large);
  line-height: 1.2;
  color: var(--wp--preset--color--white);
  margin: 0;
  text-align: left;
}

/* Descripción - Desktop/md body medium */
.home-hero .hero-description,
.home-hero .hero-text-wrapper > .wp-block-paragraph {
  font-family: var(--wp--preset--font-family--inter);
  font-weight: 500;
  font-size: var(--wp--preset--font-size--normal);
  line-height: 1.5;
  color: var(--wp--preset--color--white);
  text-align: left;
}

/* ===========================
   LOGO IMAGEN DESKTOP (superior derecha)
   =========================== */

.home-hero .hero-logo-desktop {
  position: absolute;
  top: var(--wp--preset--spacing--extra-large);
  right: var(--wp--preset--spacing--extra-large);
  width: 350px;
  height: auto;
  object-fit: contain;
  z-index: 3;
}

/* ===========================
   ELEMENTOS MOBILE (ocultos en desktop)
   =========================== */

.home-hero .hero-logo-mobile,
.home-hero .hero-image-mobile,
.home-hero .hero-buttons-mobile {
  display: none;
}

/* Imagen mobile container */
.home-hero .hero-image-mobile {
  position: relative;
  width: 100%;
  max-width: 100%;
}

.home-hero .hero-image-mobile img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

/* Botón play sobre imagen mobile */
.home-hero .hero-play-button-mobile {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* ===========================
   ELIPSE DECORATIVA
   =========================== */

.home-hero .hero-ellipse {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  height: 529px;
  background-color: var(--wp--preset--color--white);
  border-radius: 50%;
  z-index: 2;
  width: 200%;
  bottom: -460px;
}

/* ===========================
   BOTONES CTA DESKTOP (debajo del video, flujo normal)
   =========================== */

.home-hero .hero-buttons-desktop {
  position: relative;
  z-index: 3;
  padding: 0 var(--wp--preset--spacing--extra-large);
  max-width: 1920px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* ===========================
   VIDEO MODAL (igual que voces)
   =========================== */

.hero-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.hero-modal[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.hero-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.hero-modal-content {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 1200px;
  aspect-ratio: 16 / 9;
  background-color: #000000;
  border-radius: 8px;
  overflow: hidden;
}

.hero-modal-close {
  position: absolute;
  top: -48px;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background-color: transparent;
  border: none;
  color: #FFFFFF;
  cursor: pointer;
  transition: color 0.3s ease;
}

.hero-modal-close:hover {
  color: #F4F4F4;
}

.hero-modal-video {
  width: 100%;
  height: 100%;
}

.hero-modal-video iframe,
.hero-modal-video video {
  width: 100%;
  height: 100%;
  border: none;
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 1400px) {
  /* .home-hero .hero-main-title,
  .home-hero .hero-text-wrapper h1,
  .home-hero .hero-text-wrapper .wp-block-heading {
    font-size: var(--wp--preset--font-size--huge);
  }

  .home-hero .hero-logo-image {
    width: 280px;
  } */
}

/* @media (max-width: 1200px) {
  .home-hero .hero-content-wrapper {
    padding: var(--wp--preset--spacing--large);
  }

  .home-hero .hero-logo-desktop {
    width: 220px;
    top: var(--wp--preset--spacing--large);
    right: var(--wp--preset--spacing--large);
  }

  .home-hero .hero-ellipse {
    bottom: -400px;
  }
} */

@media (max-width: 1024px) {
  .home-hero .hero-content-wrapper {
    padding: var(--wp--preset--spacing--medium);
  }

  .home-hero .hero-text-wrapper {
    width: 100%;
    max-width: 500px;
    gap: var(--wp--preset--spacing--medium);
  }

  .home-hero .hero-main-title,
  .home-hero .hero-text-wrapper h1,
  .home-hero .hero-text-wrapper .wp-block-heading {
    font-size: var(--wp--preset--font-size--extra-large);
  }

  .home-hero .hero-subtitle,
  .home-hero .wp-block-group .wp-block-paragraph {
    font-size: var(--wp--preset--font-size--medium);
  }

  .home-hero .hero-logo-desktop {
    width: 180px;
    top: var(--wp--preset--spacing--medium);
    right: var(--wp--preset--spacing--medium);
  }

  .home-hero .hero-buttons-desktop {
    padding: 0 var(--wp--preset--spacing--medium);
  }

  .home-hero .hero-ellipse {
    bottom: -350px;
    height: 400px;
  }
}

@media (max-width: 768px) {
  .home-hero {
    padding: 64px 16px 80px;
    gap: 24px;
    align-items: center;
  }

  /* Ocultar elementos desktop */
  .home-hero .hero-logo-desktop,
  .home-hero .hero-buttons-desktop,
  .home-hero .hero-background-image-container,
  .home-hero .hero-play-button,
  .home-hero .hero-overlay,
  .home-hero .hero-bg .hero-tooltip-badge {
    display: none;
  }

  /* Mostrar elementos mobile */
  .home-hero .hero-logo-mobile {
    display: block;
    width: 264px;
    height: 156px;
    object-fit: cover;
    border-radius: 8px;
  }

  .home-hero .hero-image-mobile {
    display: block;
    width: 100%;
  }

  .home-hero .hero-buttons-mobile {
    display: flex;
    flex-direction: row;
    gap: 8px;
    width: 100%;
    padding-top: 40px;
  }

  .home-hero .hero-buttons-mobile .btn {
    flex: 1;
    min-width: 0;
    padding: 8px 16px;
    height: 40px;
    font-size: 14px;
    white-space: nowrap;
    box-sizing: border-box;
  }

  /* Hero BG sin imagen de fondo en mobile */
  .home-hero .hero-bg {
    min-height: auto;
    padding: 0 16px;
   /*  background: rgba(0, 0, 0, 0.4); */
  }

  .home-hero .hero-tooltip-badge--mobile {
    display: inline-flex;
  }

  .home-hero .hero-play-icon {
    width: 56px;
    height: 56px;
  }

  .home-hero .hero-content {
    position: relative;
  }

  .home-hero .hero-content-wrapper {
    padding: 0;
    justify-content: center;
  }

  .home-hero .hero-text-wrapper {
    width: 100%;
    gap: 24px;
  }

  /* Textos centrados en mobile - Figma */
  .home-hero .hero-main-title,
  .home-hero .hero-text-wrapper h1,
  .home-hero .hero-text-wrapper .wp-block-heading {
    font-size: 28px;
    text-align: center;
  }

  .home-hero .hero-subtitle,
  .home-hero .wp-block-group .wp-block-paragraph {
    font-size: 18px;
    text-align: center;
  }

  .home-hero .hero-description,
  .home-hero .hero-text-wrapper > .wp-block-paragraph {
    font-size: 12px;
    text-align: center;
    margin-top: 0;
  }

  .home-hero .hero-ellipse {
    bottom: -250px;
    height: 300px;
  }
}

@media (max-height: 760px) {
  .home-hero .hero-main-title, 
  .home-hero .hero-text-wrapper h1, 
  .home-hero .hero-text-wrapper .wp-block-heading{
    font-size: 38px;
  }

  .home-hero .hero-subtitle{
    font-size: 22px;
    margin-top: 8px;
  }

}

@media (max-width: 760px) {
  .home-hero {
    min-height: fit-content;
  }
} 

@media (max-width: 480px) {
  .home-hero {
    padding: 48px 12px 64px;
  }

  .home-hero .hero-logo-mobile {
    width: 200px;
    height: auto;
  }

  .home-hero .hero-play-icon {
    width: 48px;
    height: 48px;
  }

  .home-hero .hero-main-title,
  .home-hero .hero-text-wrapper h1,
  .home-hero .hero-text-wrapper .wp-block-heading {
    font-size: 24px;
  }

  .home-hero .hero-subtitle,
  .home-hero .wp-block-group .wp-block-paragraph {
    font-size: 16px;
  }

  .home-hero .hero-bg {
    padding: 0 12px;
  }

  .home-hero .hero-ellipse {
    bottom: -200px;
    height: 250px;
  }

  /* Botones en línea también en móviles pequeños */
  .home-hero .hero-buttons-mobile {
    flex-direction: row;
    padding-top: 32px;
  }

  .home-hero .hero-buttons-mobile .btn {
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* ===========================
   EDITOR PREVIEW
   =========================== */

.editor-styles-wrapper .home-hero {
  min-height: 400px;
}

.editor-styles-wrapper .home-hero .hero-play-button {
  pointer-events: none;
  opacity: 0.7;
}
