/* =========================================
   Hero Section & Video Background Styles
   ========================================= */

/* Hero Wrapper: Spacing on both sides */
.hero-wrapper {
  width: 100%;
  padding: 0 clamp(12px, 2.5vw, 32px);
  box-sizing: border-box;
  overflow: hidden;
}

/* Hero Container: Rounded bottom corners & Fixed generous height */
.hero-section {
  position: relative;
  height: 860px;
  min-height: 820px;
  width: 100%;
  border-bottom-left-radius: clamp(28px, 4vw, 48px);
  border-bottom-right-radius: clamp(28px, 4vw, 48px);
  overflow: hidden;
  padding-top: 90px;
  padding-bottom: 40px;
  display: flex;
  align-items: center;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
  background-color: #f1f5f9;
}

/* Full Hero Background Video in Loop */
.hero-video-bg-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  contain: strict;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.hero-bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 75% center;
  display: block;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform;
}

/* YouTube iframe background */
#ytBgPlayer {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 177.78vh; /* 16:9 ratio */
  height: 100vh;
  min-width: 100%;
  min-height: 56.25vw; /* 16:9 ratio */
  pointer-events: none;
  z-index: 0;
}

#ytBgPlayer iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Overlay for text readability */
.hero-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at 65% 40%,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0.02) 60%,
    rgba(240, 244, 248, 0.1) 100%
  );
  pointer-events: none;
}

/* Main Content Floating over the background video */
.hero-main-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 3vw 0 clamp(340px, 40vw, 520px); /* Un poco más a la derecha */
  display: flex;
  justify-content: flex-start;
  align-items: center;
  box-sizing: border-box;
}

.hero-content {
  width: 100%;
  max-width: 660px;
  margin-top: -65px; /* Desplaza todo el bloque un poco más arriba */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

/* Hero Logo Display (Mucho más grande y prominente) */
.hero-brand-headline {
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.hero-brand-logo-img {
  height: clamp(95px, 12vw, 160px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 6px 18px rgba(255, 255, 255, 0.9));
  transition: transform var(--transition-spring);
}

.hero-brand-logo-img:hover {
  transform: scale(1.03);
}

/* Hero Titles & Texts (Space Grotesk Bold & Medium - Más grandes) */
.hero-title-main {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 2.25vw, 2.15rem);
  font-weight: 700; /* Bold */
  color: #334155;
  line-height: 1.22;
  letter-spacing: -0.025em;
  margin-bottom: 0.55rem;
  text-align: left;
  max-width: 640px;
}

.hero-legal-tag {
  font-family: var(--font-heading);
  font-size: clamp(0.88rem, 1.05vw, 1.02rem);
  color: #475569;
  font-weight: 500; /* Medium */
  margin-bottom: 1.35rem;
  text-align: left;
  line-height: 1.42;
}

/* Call to Action Buttons Container (Guaranteed 100% visible) */
.hero-content .btn-group {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 14px !important;
  flex-wrap: wrap !important;
  width: 100% !important;
  position: relative !important;
  z-index: 50 !important;
  margin-top: 10px !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Responsive adjustments */
@media (max-width: 1120px) {
  .hero-section {
    height: 780px;
    min-height: 740px;
  }
  .hero-main-container {
    padding: 0 3vw 0 34vw;
  }
}

@media (max-width: 960px) {
  .hero-section {
    padding-top: 100px;
    height: auto;
    min-height: 680px;
  }
  .hero-main-container {
    padding: 2rem 2.5rem;
    justify-content: center;
    align-items: center;
  }
  .hero-content {
    margin-top: 0;
    align-items: center;
    text-align: center;
    max-width: 520px;
    width: 100%;
  }
  .hero-brand-headline {
    justify-content: center;
    width: 100%;
  }
  .hero-title-main,
  .hero-legal-tag {
    text-align: center;
    width: 100%;
  }
  .hero-content .btn-group {
    justify-content: center !important;
    width: 100% !important;
  }
}

@media (max-width: 640px) {
  .hero-wrapper {
    padding: 0 8px;
  }
  .hero-section {
    padding-top: 85px;
    padding-bottom: 35px;
    min-height: 620px;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
  }
  .hero-main-container {
    padding: 1.5rem 1.25rem;
  }
  .hero-content {
    max-width: 100%;
    align-items: center;
  }
  .hero-content .btn-group {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
  }
  .btn {
    width: 100%;
    max-width: 320px;
  }
}
