/* ============================================
   HERO SECTION - Complete Styles
   All hero styling consolidated in one file
   Mobile-first approach with proper layering
   ============================================ */

/* ============================================
   HERO CONTAINER & LAYOUT
   ============================================ */
.hero {
  position: relative;
  width: 100%;
  min-height: 70vh; /* Taller but not full screen on mobile */
  min-height: 70dvh; /* Dynamic viewport height for mobile */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* Ghost header floats over hero - no spacing needed */
  padding-top: 0;
  margin-top: 0;
  background: transparent; /* Remove any background from previous CSS */
}

/* Tablet size */
@media (min-width: 481px) and (max-width: 768px) {
  .hero {
    min-height: 75vh;
    min-height: 75dvh;
  }
}

/* Desktop - taller but not full */
@media (min-width: 769px) {
  .hero {
    min-height: 80vh;
    min-height: 80dvh;
  }
}

/* Large desktop - taller but leaves room to see next section */
@media (min-width: 1024px) {
  .hero {
    min-height: 85vh;
    min-height: 85dvh;
  }
}

/* ============================================
   BACKGROUND IMAGE LAYER
   ============================================ */
.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Mobile: Focus on center of image */
@media (max-width: 768px) {
  .hero-bg-image {
    object-position: center center;
  }
}

/* ============================================
   OVERLAY GRADIENTS FOR TEXT READABILITY
   ============================================ */
.hero-background::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Multi-layer gradient for optimal text contrast - lightened */
  background:
    /* Vignette effect from edges - reduced opacity */
    radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.2) 100%),
    /* Top-to-bottom gradient for text area - reduced opacity */
    linear-gradient(
      180deg,
      rgba(0, 26, 15, 0.4) 0%,     /* Lighter green tint at top */
      rgba(0, 26, 15, 0.3) 30%,
      rgba(0, 26, 15, 0.2) 60%,
      rgba(0, 26, 15, 0.1) 80%,
      transparent 100%
    );
  z-index: 2;
}

/* Heavier overlay on mobile for better readability */
@media (max-width: 768px) {
  .hero-background::after {
    background:
      radial-gradient(ellipse at center, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.3) 100%),
      linear-gradient(
        180deg,
        rgba(0, 26, 15, 0.6) 0%,
        rgba(0, 26, 15, 0.5) 30%,
        rgba(0, 26, 15, 0.3) 60%,
        rgba(0, 26, 15, 0.2) 80%,
        rgba(0, 26, 15, 0.05) 100%
      );
  }
}

/* ============================================
   CONTENT CONTAINER
   ============================================ */
.hero-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem; /* Reduced padding on mobile */
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(60vh - 80px); /* Match hero height minus header */
}

/* Tablet */
@media (min-width: 481px) and (max-width: 768px) {
  .hero-container {
    padding: 2rem 1.5rem;
    min-height: calc(70vh - 80px);
  }
}

/* Desktop */
@media (min-width: 769px) {
  .hero-container {
    padding: 3rem 2rem;
    min-height: calc(90vh - 100px);
  }
}

/* Large desktop */
@media (min-width: 1024px) {
  .hero-container {
    min-height: calc(100vh - 100px);
  }
}

/* ============================================
   TYPOGRAPHY OVER IMAGE
   ============================================ */

/* Eyebrow text */
.hero-eyebrow {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-secondary); /* Keep the yellow */
  margin-bottom: 1.5rem; /* More space below eyebrow */
  text-align: center;
  /* Strong text shadow for readability */
  text-shadow:
    2px 2px 4px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(0, 0, 0, 0.6);
}

@media (min-width: 768px) {
  .hero-eyebrow {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
}

/* Main headline */
.hero-headline {
  font-size: clamp(1.75rem, 4.5vw, 4rem); /* Smaller minimum size for mobile */
  font-weight: 900;
  line-height: 1.2; /* Slightly more breathing room */
  color: #ffffff !important;
  margin-bottom: 1.5rem; /* More margin for better hierarchy */
  text-shadow:
    2px 2px 4px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(0, 0, 0, 0.6);
  text-align: center;
}

@media (min-width: 768px) {
  .hero-headline {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 2rem; /* More space on desktop */
  }
}

/* Main text span - force white color */
.hero-main {
  display: block;
  color: #ffffff !important;
  /* Subtle glow effect for better readability */
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.2));
}

/* Subheadline */
.hero-subheadline {
  font-size: clamp(0.875rem, 2vw, 1.375rem); /* Smaller on mobile */
  font-weight: 500;
  line-height: 1.4; /* Better line spacing for readability */
  color: rgba(255, 255, 255, 0.95) !important;
  max-width: 600px; /* Narrower for better line breaks */
  margin: 0 auto 1.5rem; /* Less margin */
  text-align: center; /* Ensure centered alignment */
  /* Readable text shadow */
  text-shadow:
    2px 2px 4px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(0, 0, 0, 0.6);
  /* Lighter semi-transparent background for readability on mobile */
  background: rgba(0, 26, 15, 0.15);
  padding: 0.75rem 1.25rem; /* Better padding for visual balance */
  border-radius: 8px;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

@media (min-width: 768px) {
  .hero-subheadline {
    font-size: clamp(1rem, 2.5vw, 1.375rem);
    line-height: 1.5; /* Consistent with updated line height */
    max-width: 700px; /* Slightly wider on larger screens */
    padding: 1.25rem 2rem;
    margin-bottom: 3rem;
  }
}

/* Remove background on larger screens where contrast is better */
@media (min-width: 1024px) {
  .hero-subheadline {
    background: transparent;
    padding: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* ============================================
   SCROLL INDICATOR
   ============================================ */
.scroll-hint {
  position: absolute;
  bottom: 1rem; /* Closer to bottom on mobile */
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem; /* Tighter gap */
  color: white;
  opacity: 0.9; /* More visible */
  transition: opacity 0.3s ease;
  animation: bounce 2s ease-in-out infinite;
}

@media (min-width: 768px) {
  .scroll-hint {
    bottom: 2rem;
    gap: 0.5rem;
  }
}

.scroll-hint:hover {
  opacity: 1;
}

.scroll-text {
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.scroll-arrow {
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.8));
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* Hide scroll hint when scrolled */
@media (min-width: 768px) {
  .hero.scrolled .scroll-hint {
    opacity: 0;
    pointer-events: none;
  }
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

/* Ensure image loads quickly */
.hero-bg-image {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Parallax effect on desktop (optional) */
@media (min-width: 1024px) {
  .hero-bg-image {
    transform: scale(1.1);
    transition: transform 10s ease-out;
  }

  .hero:hover .hero-bg-image {
    transform: scale(1.15);
  }
}

/* ============================================
   ACCESSIBILITY & REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .scroll-hint {
    animation: none;
  }

  .hero-bg-image {
    transition: none;
  }
}

/* High contrast mode - use better contrast without stroke */
@media (prefers-contrast: high) {
  .hero-headline {
    background: rgba(0, 0, 0, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 8px;
  }

  .hero-subheadline {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid white;
  }
}

/* ============================================
   FALLBACK FOR MISSING IMAGE
   ============================================ */
.hero-background:not(:has(img))::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    var(--color-primary-dark) 0%,
    var(--color-primary) 50%,
    var(--color-primary-light) 100%
  );
  z-index: 1;
}