/* /css/hero.css - Ambient Pixels v2.3 - April 5, 2025 */

/* Define hero text shadow as a CSS variable for single source of truth */
:root {
  --hero-text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.8);
}

/* Hero CTA container */
.hero-cta {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Ensure buttons in hero have proper spacing */
.hero-cta > * {
  margin: 0;
}

/* Hero Content - Consolidated Styles */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
}

.hero-headline {
  font-size: 3.5rem;
  line-height: 1.2;
  margin: 0;
  color: #fff;
  text-shadow: var(--hero-text-shadow);
}

.hero-subheadline {
  font-size: 1.5rem;
  line-height: 1.5;
  margin: 1rem auto;
  color: #fff;
  text-shadow: var(--hero-text-shadow);
  text-align: center;
  max-width: 80%;
  width: 100%;
}

/* Mini Hero Section */
.mini-hero {
    position: relative;
    text-align: center;
    margin: 0px 0 0px 0;
    width: 100%;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 85px;
}

.mini-hero-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1; /* Keep image behind content */
}

.mini-hero h1,
.mini-hero .subtitle {
    position: relative;
    z-index: 2; /* Ensure text is above the image */
    color: #fff !important;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.9), 0 0 5px rgba(0, 0, 0, 0.8) !important;
    margin: 0 0 15px 0;
    padding: 0 20px;
    line-height: 1.3;
    width: 100%;
    max-width: 1000px;
    text-align: center;
}

.mini-hero-content-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    padding: 40px 20px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
}

.mini-hero .subtitle {
    font-size: 1.2em;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    margin: 0;
    padding: 0 20px;
    max-width: 800px;
    width: 100%;
    line-height: 1.5;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .mini-hero {
        min-height: 180px;
        margin-top: 140px;
    }
    
    .mini-hero-content-wrapper {
        padding: 30px 15px;
        min-height: 180px;
    }
    
    .mini-hero h1 {
        font-size: 1.8em;
        margin-bottom: 10px;
    }
    
    .mini-hero .subtitle {
        font-size: 1em;
        padding: 0 15px;
    }
}

.hero {
    position: relative;
    height: 500px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    z-index: 4;
    transition: opacity 0.5s ease;
}

.hero-loading.hidden {
  opacity: 0;
}

.loading-icon {
    font-size: 2em;
    animation: spin 1s linear infinite;
}

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

.hero-loading p {
    margin: 0;
}

.loading-bar {
    width: 100vw;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    width: 0;
    background: linear-gradient(to right, #2A577A, #4B3E8F);
    animation: loadBar 2s ease forwards;
}

@keyframes loadBar {
    to { width: 100%; }
}

.hero-slides {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

/* Removed duplicate .hero-content - use the consolidated style above */

.hero-headline,
.hero-subheadline {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.5s ease forwards 2s;
    color: #fff !important;
}

body[data-theme="light"] .hero .hero-headline,
body[data-theme="light"] .hero .hero-subheadline {
    color: #fff !important;
}

/* Particle Effect Styles */
.hero-particles-container {
  position: relative;
  min-height: 300px;
  overflow: hidden;
}

.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.particle {
  position: absolute;
  background: rgba(90, 228, 255, 0.6);
  border-radius: 50%;
  pointer-events: none;
  animation: float 15s infinite linear;
}

@keyframes float {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-1000px) translateX(200px); opacity: 0; }
}

/* Ensure hero logo stays above particles */
.hero-xbox-logo {
  position: relative;
  z-index: 2;
}

.hero-subheadline {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-soft);
    margin-top: 0.5rem;
    max-width: 60ch;
}

.hero h1 {
    font-size: 2.5em;
    margin: 0.2em 0;
    max-width: 80ch;
    line-height: 1.2;
    word-break: break-word;
}

.hero p {
    font-size: 1.2em;
}



.mini-hero-subtitle {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    color: var(--aura-glow, #e0f7ff);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    margin: 0;
    width: 90%;
    max-width: 800px;
    text-align: center;
}

.mini-hero-content {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.mini-hero-content.visible {
  opacity: 1;
}

.hero-headline {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero-subheadline {
  font-size: 1.2rem;
}

.hero-headlines h1,
.hero-subheadlines p {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.hero-headlines h1.active,
.hero-subheadlines p.active {
    display: block;
    opacity: 1;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Override theme.css text shadow with higher specificity */
body[data-theme="dark"] .hero .hero-headline,
body[data-theme="dark"] .hero .hero-subheadline,
body[data-theme="light"] .hero .hero-headline,
body[data-theme="light"] .hero .hero-subheadline {
  text-shadow: var(--hero-text-shadow) !important;
}
