/* Scroll-linked Hero Animation Styles */

/* Override existing styles and set up container */
#section-home.site-section-hero {
  position: relative !important;
  height: 100vh !important;
  width: 100%;
  overflow: hidden;
  background-color: #1a1a2e; /* Fallback dark background */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
}

/* Remove the :before pseudo element */
#section-home.site-section-hero:before {
  display: none !important;
}

#hero-canvas {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 1 !important;
  display: block;
  object-fit: cover;
}

/* Frame display container */
#frame-display {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 1 !important;
  overflow: hidden;
}

/* Individual frame images - crop and zoom to remove black bars */
.frame-image {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1.05);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
  object-position: center;
}

/* Loading overlay */
#frame-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #1a1a2e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

#frame-loader .loader-content {
  text-align: center;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#frame-loader .spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: #df0e62;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#frame-progress {
  font-size: 24px;
  font-weight: bold;
  color: #df0e62;
  margin-top: 10px;
}

/* Content overlay - override existing row styles */
#section-home .row {
  position: relative !important;
  z-index: 10 !important;
  height: auto !important;
  min-height: auto !important;
  width: 100%;
  margin: 0;
}

/* Add subtle text shadows for better readability */
#section-home .text-white,
#section-home h1,
#section-home .heading {
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9) !important;
}

#section-home .lead {
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.8) !important;
}

/* Ensure button is visible */
#section-home .btn {
  position: relative;
  z-index: 11;
}

/* Scroll text overlays */
#scroll-text-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-text {
  position: absolute;
  color: white;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 0 40px;
  width: 100%;
}

.scroll-text.active {
  opacity: 1;
}

/* Center alignment for first text */
.scroll-text.text-center {
  text-align: center;
  left: 0;
  right: 0;
}

/* Left alignment for second text */
.scroll-text.text-left {
  text-align: left;
  left: 0;
  padding-left: 60px;
}

/* Right alignment for third text */
.scroll-text.text-right {
  text-align: right;
  right: 0;
  padding-right: 60px;
}

.scroll-text h1 {
  font-size: 4rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.9);
  margin: 0;
}

.scroll-text h2 {
  font-size: 2.5rem;
  font-weight: 600;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
  margin: 0;
  line-height: 1.4;
}

/* Mobile optimization */
@media (max-width: 768px) {
  #section-home.site-section-hero {
    height: 100vh !important;
  }
  
  .frame-image {
    transform: translate(-50%, -50%) scale(1.05);
  }
  
  #section-home .col-md-7 {
    padding: 0 20px;
  }
  
  #frame-progress {
    font-size: 18px;
  }
  
  .scroll-text h1 {
    font-size: 2.5rem;
  }
  
  .scroll-text h2 {
    font-size: 1.8rem;
  }
}
