/* Home Page Styles - Using Design Tokens where applicable */

/* Responsive background images for hero section */
@media (min-width: 769px) {
    .hero-background {
      background-image: url('/assets/images/fondo_landing_móvil.png');
    }
}

@media (max-width: 768px) {
    .hero-background {
      background-image: url('/assets/images/fondo_landing_móvil.png');
}

.hero-background::before {
      background-image: url('/assets/images/fondo_landing_móvil.png');
    }
}

/* Hero background image container */
.hero-background {
    position: relative; /* Necesario para posicionar el pseudo-elemento */
    /*background-image: url('/assets/images/istockphoto-2191698212-2048x2048.webp');*/
    background-image: url('/assets/images/fondo_landing.png');
    background-size: cover;
    background-position: right top;
    background-repeat: no-repeat;
    background-attachment: scroll;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    min-height: auto;
    padding-bottom: var(--space-16);
    overflow: hidden; /* Evita bordes raros con blur */
}

@media (max-width: 768px) {
    /* Fondo normal sin blur en móviles */
    .hero-background {
      background-image: url('/assets/images/fondo_landing_móvil.png');
      background-size: cover;
      background-position: center center;
      background-repeat: no-repeat;
      padding-bottom: var(--space-8);
      width: 100vw;
      margin-left: calc(50% - 50vw);

}

/* Eliminar pseudo-elemento blur en móviles */
.hero-background::before {
      display: none;
    }
}

.hero-background {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

.page-wrap-home {
    flex-direction: column;
}

.home-hero-grid {
    display: grid;
    grid-template-columns: 55% 45%;
    min-height: 80vh;
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

@media (max-width: 768px) {
    .home-hero-grid {
      grid-template-columns: 1fr;
      min-height: auto;
      width: 100%;
      margin-left: 0;
    }
}

.home-hero-grid {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

@media (max-width: 767px) {
    .home-hero-grid {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

@media (max-width: 768px) {
    .hero-left-space {
      display: none;
    }
}

/* Force hero-content to fit within screen bounds */
@media (max-width: 767px) {
    .hero-left-space {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .hero-left-space {
        display: none;
    }
}

.hero-content {
    padding: var(--space-16) var(--space-10);
    padding-bottom: var(--space-32);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 768px) {
    .hero-content {
        padding: var(--space-8) var(--space-6);
    }
}

.hero-content {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-width: 480px) {
    .hero-content {
        padding: 0 var(--space-4) !important;
        margin: 0 !important;
        width: 100% !important;
    }
}

/* Remove fixed margins from hero-content and make it responsive */
@media (max-width: 767px) {
    .hero-content {
      margin-left: 0 !important;
      margin-right: 0 !important;
      padding: 0 var(--space-8) !important;
      width: 100% !important;
      max-width: 100% !important;
      box-sizing: border-box !important;
    }
}

@media (max-width: 480px) {
    .hero-content {
      padding: 0 var(--space-6) !important;
    }
}

@media (max-width: 360px) {
    .hero-content {
      padding: 0 var(--space-4) !important;
    }
}

/* Force hero-content to fit within screen bounds */
@media (max-width: 767px) {
    .hero-content {
      width: 100vw !important;
      max-width: 100vw !important;
      margin: 0 !important;
      padding-left: var(--space-6) !important;
      padding-right: var(--space-6) !important;
      box-sizing: border-box !important;
      position: relative !important;
      left: 50% !important;
      transform: translateX(-50%) !important;
    }
}

@media (max-width: 480px) {
    .hero-content {
      padding-left: var(--space-4) !important;
      padding-right: var(--space-4) !important;
    }
}

.slide-content__subtitle-main {
    font-size: var(--text-3xl);
    line-height: var(--leading-tight);
    color: #FFFFFF;
    font-weight: var(--font-normal);
    margin-bottom: var(--space-12);
    text-shadow:
      0 0 5px rgba(0, 0, 0, 0.7),   /* sombra negra */
      0 0 10px rgba(255, 255, 255, 0.1);; /* halo blanco sutil */
}

@media (max-width: 1024px) {
    .slide-content__subtitle-main {
        font-size: var(--text-2xl);
    }
}

/* Responsive adjustments for very small screens */
@media (max-width: 480px) {
    .slide-content__subtitle-main {
        font-size: var(--text-lg) !important;
        line-height: var(--leading-normal) !important;
    }
}

/* Adjust mobile font sizes for hero text elements */
@media (max-width: 767px) {
    .slide-content__subtitle-main {
        font-size: var(--text-2xl) !important;
        line-height: var(--leading-normal) !important;
        text-align: center !important;
    }
}

/* Rotating text animations */
.slide-content__subtitle-main {
    min-height: 4em; /* Fixed height to accommodate 2-3 lines */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Mobile specific adjustments */
@media (max-width: 767px) {
    .slide-content__subtitle-main {
      min-height: 5em; /* Slightly more height for mobile */
    }
}

/* Mobile carousel spacer to maintain layout */
@media (max-width: 767px) {
    .mobile-carousel-spacer {
      height: 300px; /* Mantener espacio donde estaba el carousel */
      margin: var(--space-12) 0;
    }
}

.hero-button-center {
    text-align: center;
    margin-top: var(--space-12);
}

@media (max-width: 768px) {
    .hero-button-center {
        bottom: var(--space-4);
    }
}

/* Rotating text animations */
#rotating-text {
  display: inline-block;
  line-height: var(--leading-normal);
  width: 100%;
  text-align: center;
}

.text-fade-out {
  opacity: 0;
  transition: opacity var(--transition-base) ease-in-out;
}

.text-fade-in {
  opacity: 1;
  transition: opacity var(--transition-base) ease-in-out;
}

@keyframes fadeOutIn {
  0% { opacity: 1; }
  50% { opacity: 0; }
  100% { opacity: 1; }
}
