/**
 * Homepage Hero Styles
 * Responsive hero image with text overlay
 * Optimized for all screen sizes
 */

/* ==========================================================================
   Hero Section Wrapper - Region Container
   ========================================================================== */

#hero-image-section,
.hero-section {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  display: block;
  clear: both;
  z-index: 1;
  isolation: isolate; /* Creates new stacking context */
}

/* ==========================================================================
   Hero Wrapper - Main Container
   ========================================================================== */

.homepage-hero-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden; /* Prevent text overflow */
  background-color: #18453b; /* MSU Green - Fallback color */
  margin: 0;
  padding: 0;
  display: block;
  clear: both;
  height: auto;
  min-height: auto; /* Let content determine height */
  box-sizing: border-box;
}

/* Full viewport height option */
.homepage-hero-wrapper.hero-fullscreen {
  min-height: 100vh;
}

.homepage-hero-wrapper.hero-fullscreen .homepage-hero-image {
  min-height: 100vh;
}

/* ==========================================================================
   Hero Image Container - Fixed: No absolute positioning
   ========================================================================== */

.homepage-hero-image {
  position: relative;
  width: 100%;
  min-height: 500px;
  z-index: 1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: block;
  overflow: hidden;
  box-sizing: border-box;
}

/* Responsive heights */
@media (min-width: 768px) {
  .homepage-hero-image {
    min-height: 600px;
  }
}

@media (min-width: 1200px) {
  .homepage-hero-image {
    min-height: 700px;
  }
}

/* Large screens (2K) */
@media (min-width: 1920px) {
  .homepage-hero-image {
    min-height: 900px;
  }
}

/* 4K resolution screens */
@media (min-width: 2560px) {
  .homepage-hero-image {
    min-height: 1200px;
  }
}

/* Ensure hero section doesn't overlay headers - CRITICAL FIX */
/* Z-index removed to prevent stacking context issues with dropdowns */
#msu-header-top,
#msu-header,
#dept-header {
  position: relative !important;
}

#top-menu {
  position: relative !important;
}

/* Ensure main-section sits below hero - CRITICAL FIX */
#main-section {
  position: relative !important;
  z-index: 1 !important;
  margin-top: 0 !important;
  clear: both !important;
  padding-top: 0 !important;
}

#page-header {
  position: relative;
  z-index: 1;
  margin-top: 0;
  clear: both;
}

/* Prevent any negative margins or transforms on hero section */
#hero-image-section,
.hero-section,
.homepage-hero-view {
  transform: none !important;
  top: auto !important;
  left: auto !important;
  margin-bottom: 0 !important;
  position: relative !important;
}

/* Ensure proper spacing between hero and content on all pages */
#hero-image-section + #page-header,
#hero-image-section + #main-section {
  margin-top: 0;
  padding-top: 0;
  position: relative;
  clear: both;
}

/* Fix for when hero is on front page */
body.path-frontpage #hero-image-section + #main-section {
  margin-top: 0;
}

/* Ensure hero section itself is in document flow */
#hero-image-section {
  position: relative;
  display: block;
  width: 100%;
  clear: both;
}

.homepage-hero-view {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0;
}

/* Ensure view wrapper doesn't have conflicting positioning */
.view.homepage-hero-view {
  position: relative;
  display: block;
}

/* Prevent any absolute positioning on the view content wrapper */
.homepage-hero-view .view-content {
  position: relative;
  display: block;
}

/* Fix for hero placed in any region */
[class*="region"] .homepage-hero-view,
.region .homepage-hero-view {
  position: static;
  width: 100%;
  display: block;
}

/* Ensure hero wrapper stays in document flow */
.homepage-hero-view .homepage-hero-wrapper {
  position: relative;
  width: 100%;
  display: block;
  margin-top: 0;
  top: auto;
  left: auto;
  transform: none;
}

/* Image tag styling (if not using background-image) */
.homepage-hero-image img {
  width: 100%;
  height: auto;
  min-height: 500px;
  object-fit: cover;
  object-position: center;
  display: block;
}

@media (min-width: 768px) {
  .homepage-hero-image img {
    min-height: 600px;
  }
}

@media (min-width: 1200px) {
  .homepage-hero-image img {
    min-height: 700px;
  }
}

/* Large screens (2K) */
@media (min-width: 1920px) {
  .homepage-hero-image img {
    min-height: 900px;
  }
}

/* 4K resolution screens */
@media (min-width: 2560px) {
  .homepage-hero-image img {
    min-height: 1200px;
  }
}

/* ==========================================================================
   Hero Overlay - For Better Text Contrast - Fixed positioning
   ========================================================================== */

.homepage-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to top,
    #0f2222 0%,
    #0f2222 15%,
    rgba(15, 34, 34, 0.8) 35%,
    rgba(15, 34, 34, 0.4) 60%,
    transparent 100%
  );
  z-index: 2;
  pointer-events: none;
}

/* Ensure parent maintains positioning context */
.homepage-hero-wrapper {
  position: relative;
}

/* Dark overlay variant */
.homepage-hero-wrapper.dark-overlay .homepage-hero-overlay {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.7) 100%
  );
}

/* Light overlay variant */
.homepage-hero-wrapper.light-overlay .homepage-hero-overlay {
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0.4) 100%
  );
}

/* ==========================================================================
   Hero Content - Text Overlay Container - Fixed positioning
   ========================================================================== */

.homepage-hero-wrapper {
  position: relative; /* Required for absolute positioning of content */
}

.homepage-hero-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  padding: 0 0 4rem 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.homepage-hero-content .container {
  position: relative;
  width: 100%;
  max-width: 100%;
  padding-left: 15px;
  padding-right: 15px;
}

@media (max-width: 767px) {
  .homepage-hero-content .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Text wrapper - padding removed */
.homepage-hero-text-wrapper {
  padding: 0;
  color: #ffffff;
  max-width: 100%;
  width: 100%;
  text-align: left;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Mobile: adjust content and spacing */
@media (max-width: 767px) {
  .homepage-hero-wrapper {
    overflow: hidden; /* Prevent text overflow outside hero */
  }

  .homepage-hero-text-wrapper {
    padding: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    margin-top: 2rem;
  }

  .homepage-hero-image {
    min-height: 600px; /* Increased to accommodate text with top spacing */
  }

  .homepage-hero-content {
    padding: 4rem 0 2.5rem 0;
    overflow: hidden; /* Ensure content stays within bounds */
  }

  .homepage-hero-content .container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    box-sizing: border-box;
  }

  /* Mobile-specific font adjustments */
  .homepage-hero-eyebrow,
  .homepage-hero-eyebrow .hero-eyebrow,
  .homepage-hero-eyebrow span,
  span.hero-eyebrow {
    font-size: 0.75rem !important; /* 12px */
    line-height: 1.3 !important;
    letter-spacing: 0.06em !important;
    margin-bottom: 0.5rem !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
  }

  .homepage-hero-title,
  .homepage-hero-title .hero-title,
  .homepage-hero-title h1,
  h1.hero-title {
    font-size: 1.375rem !important; /* 22px */
    line-height: 1.2 !important;
    letter-spacing: 0.05em !important;
    margin-top: 1.5rem !important;
    margin-bottom: 0.5rem !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  .homepage-hero-subtitle,
  .homepage-hero-subtitle .hero-subtitle,
  .homepage-hero-subtitle h2,
  h2.hero-subtitle {
    font-size: 0.8125rem !important; /* 13px */
    line-height: 1.4 !important;
    letter-spacing: 0.01em !important;
    margin-bottom: 0.75rem !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
  }

  .homepage-hero-description,
  .homepage-hero-description p,
  .homepage-hero-description div {
    font-size: 0.8125rem !important; /* 13px */
    line-height: 1.5 !important;
    letter-spacing: 0.01em !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
  }

  .homepage-hero-button {
    margin-top: 1rem !important;
    margin-bottom: 1.5rem !important;
    max-width: 100% !important;
  }

  .homepage-hero-button a,
  .homepage-hero-button .btn {
    font-size: 0.8125rem !important; /* 13px */
    padding: 0.75rem 1.5rem !important;
    letter-spacing: 0.04em !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    word-wrap: break-word !important;
  }

  /* Ensure all container divs respect boundaries */
  .homepage-hero-eyebrow,
  .homepage-hero-title,
  .homepage-hero-subtitle,
  .homepage-hero-description,
  .homepage-hero-button {
    box-sizing: border-box !important;
    max-width: 100% !important;
  }
}

/* Extra small devices (portrait phones, less than 375px) */
@media (max-width: 374px) {
  .homepage-hero-image {
    min-height: 650px !important; /* More height for smaller text with top spacing */
  }

  .homepage-hero-text-wrapper {
    margin-top: 1.5rem !important;
  }

  .homepage-hero-eyebrow .hero-eyebrow,
  .homepage-hero-eyebrow span,
  span.hero-eyebrow {
    font-size: 0.6875rem !important; /* 11px */
    letter-spacing: 0.04em !important;
  }

  .homepage-hero-title .hero-title,
  .homepage-hero-title h1,
  h1.hero-title {
    font-size: 1.125rem !important; /* 18px */
    letter-spacing: 0.03em !important;
    line-height: 1.2 !important;
    margin-top: 1.25rem !important;
  }

  .homepage-hero-subtitle .hero-subtitle,
  .homepage-hero-subtitle h2,
  h2.hero-subtitle {
    font-size: 0.75rem !important; /* 12px */
    letter-spacing: 0.01em !important;
  }

  .homepage-hero-description,
  .homepage-hero-description p,
  .homepage-hero-description div {
    font-size: 0.75rem !important; /* 12px */
    letter-spacing: 0.01em !important;
  }

  .homepage-hero-button a,
  .homepage-hero-button .btn {
    font-size: 0.75rem !important; /* 12px */
    padding: 0.625rem 1.25rem !important;
    letter-spacing: 0.03em !important;
  }
}

/* Tablet: optimal scaling for medium screens */
@media (min-width: 768px) and (max-width: 1199px) {
  .homepage-hero-eyebrow .hero-eyebrow,
  .homepage-hero-eyebrow span,
  span.hero-eyebrow {
    font-size: clamp(1rem, 1.125rem + 0.4vw, 1.25rem) !important;
    line-height: clamp(1.5rem, 1.75rem + 0.4vw, 1.9375rem) !important;
  }

  .homepage-hero-title .hero-title,
  .homepage-hero-title h1,
  h1.hero-title {
    font-size: clamp(2rem, 2.1875rem + 0.8vw, 3rem) !important;
    line-height: clamp(2.4rem, 2.625rem + 0.8vw, 3.6rem) !important;
  }

  .homepage-hero-subtitle .hero-subtitle,
  .homepage-hero-subtitle h2,
  h2.hero-subtitle {
    font-size: clamp(0.9375rem, 0.9375rem + 0.3vw, 1.125rem) !important;
    line-height: clamp(1.5rem, 1.5rem + 0.3vw, 1.8rem) !important;
  }

  .homepage-hero-description,
  .homepage-hero-description p,
  .homepage-hero-description div {
    font-size: clamp(0.9375rem, 1rem + 0.2vw, 1.125rem) !important;
  }
}

/* Desktop: larger screens optimal sizing */
@media (min-width: 1200px) {
  .homepage-hero-eyebrow .hero-eyebrow,
  .homepage-hero-eyebrow span,
  span.hero-eyebrow {
    font-size: clamp(1.125rem, 1.125rem + 0.25vw, 1.375rem) !important;
    line-height: clamp(1.75rem, 1.75rem + 0.25vw, 2.125rem) !important;
  }

  .homepage-hero-title .hero-title,
  .homepage-hero-title h1,
  h1.hero-title {
    font-size: clamp(2.1875rem, 2.1875rem + 0.5vw, 3.5rem) !important;
    line-height: clamp(2.625rem, 2.625rem + 0.5vw, 4.2rem) !important;
  }

  .homepage-hero-subtitle .hero-subtitle,
  .homepage-hero-subtitle h2,
  h2.hero-subtitle {
    font-size: clamp(0.9375rem, 0.9375rem + 0.15vw, 1.25rem) !important;
    line-height: clamp(1.5rem, 1.5rem + 0.25vw, 2rem) !important;
  }

  .homepage-hero-description,
  .homepage-hero-description p,
  .homepage-hero-description div {
    font-size: clamp(1rem, 1rem + 0.15vw, 1.25rem) !important;
  }
}

/* ==========================================================================
   Hero Eyebrow Text - Small text above title
   ========================================================================== */

.homepage-hero-eyebrow {
  margin-bottom: clamp(0.5rem, 1.5vw, 1rem);
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.homepage-hero-eyebrow .hero-eyebrow,
.homepage-hero-eyebrow span,
span.hero-eyebrow {
  /* Fallback for older browsers */
  font-size: 18px;
  /* Responsive: min 14px, preferred 18px + 0.5vw, max 22px */
  font-size: clamp(0.875rem, 1.125rem + 0.5vw, 1.375rem) !important;
  font-weight: 600 !important;
  font-style: normal !important;
  /* Fallback line-height */
  line-height: 28px;
  /* Responsive line-height: 1.55 ratio for better scaling */
  line-height: clamp(1.375rem, 1.75rem + 0.5vw, 2.125rem) !important;
  margin: 0;
  padding: 0;
  color: #7ED709;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.5),
    0 1px 2px rgba(0, 0, 0, 0.3),
    0 4px 8px rgba(0, 0, 0, 0.6) !important;
  font-family: 'Metropolis', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  display: inline-block;
}

/* Optional: Add accent border/bar before eyebrow text */
.homepage-hero-eyebrow .hero-eyebrow::before {
  content: none;
  display: none;
}

/* ==========================================================================
   Hero Title - Modern Typography
   ========================================================================== */

.homepage-hero-title {
  margin-bottom: clamp(1rem, 3vw, 2rem);
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.homepage-hero-title .hero-title,
.homepage-hero-title h1,
h1.hero-title {
  /* Fallback for older browsers */
  font-size: 30px !important;
  /* Responsive: min 24px (mobile), preferred 35px + 1vw, max 56px (large screens) */
  font-size: clamp(1.5rem, 2.1875rem + 1vw, 3.5rem) !important;
  font-weight: 700 !important;
  font-style: normal !important;
  /* Fallback line-height */
  line-height: 42px;
  /* Responsive line-height: maintains ~1.2 ratio */
  line-height: clamp(1.8rem, 2.625rem + 1vw, 4.2rem) !important;
  margin: 0 0 1rem;
  padding: 0;
  color: #ffffff;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow:
    0 4px 6px rgba(0, 0, 0, 0.5),
    0 8px 16px rgba(0, 0, 0, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.6);
  font-family: 'Metropolis', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Add gradient text effect (optional modern touch) */
.homepage-hero-title .hero-title.gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Fixed size across all breakpoints - no responsive overrides needed */

/* ==========================================================================
   Hero Subtitle - Modern Design
   ========================================================================== */

.homepage-hero-subtitle {
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.homepage-hero-subtitle .hero-subtitle,
.homepage-hero-subtitle h2,
h2.hero-subtitle {
  /* Fallback for older browsers */
  font-size: 15px;
  /* Responsive: min 13px (mobile), preferred 15px + 0.25vw, max 20px (large screens) */
  font-size: clamp(0.8125rem, 0.9375rem + 0.25vw, 1.25rem) !important;
  font-weight: 400 !important;
  font-style: normal !important;
  /* Fallback line-height */
  line-height: 24px;
  /* Responsive line-height: maintains ~1.6 ratio */
  line-height: clamp(1.3rem, 1.5rem + 0.4vw, 2rem) !important;
  margin: 0;
  padding: 0;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.01em;
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.2);
  font-family: 'Metropolis', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Optional: Add subtle backdrop for better readability */
.homepage-hero-subtitle .hero-subtitle.with-backdrop {
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  display: inline-block;
}

/* ==========================================================================
   Hero Description - Modern, Readable Text
   ========================================================================== */

.homepage-hero-description {
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
  opacity: 0.85;
}

.homepage-hero-description,
.homepage-hero-description p,
.homepage-hero-description div {
  /* Fallback for older browsers */
  font-size: 16px;
  /* Responsive: min 14px (mobile), preferred 16px + 0.25vw, max 20px (large screens) */
  font-size: clamp(0.875rem, 1rem + 0.25vw, 1.25rem) !important;
  line-height: 1.7 !important;
  color: rgba(255, 255, 255, 1) !important;
  font-weight: 400 !important;
  letter-spacing: 0.02em !important;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.5),
    0 2px 6px rgba(0, 0, 0, 0.3) !important;
  margin: 0 0 0.75rem 0 !important;
  font-family: 'Metropolis', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.homepage-hero-description p:last-child,
.homepage-hero-description div:last-child {
  margin-bottom: 0 !important;
}

/* Optional: Glass morphism effect for description */
.homepage-hero-description.glass-effect {
  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile: description now matches title width (no constraints) */

/* ==========================================================================
   Hero Button/CTA - Modern Design
   ========================================================================== */

.homepage-hero-button {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.45s both;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  margin-bottom: 2rem;
}

.homepage-hero-button a,
.homepage-hero-button .btn,
.homepage-hero-button button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: clamp(1rem, 2vw, 1.5rem) clamp(2rem, 4vw, 3.5rem);
  background: linear-gradient(135deg, #18453b 0%, #0f2b23 100%);
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(0.9375rem, 1vw + 0.2rem, 1.4rem);
  border-radius: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  line-height: 1.2;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 4px 15px rgba(24, 69, 59, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}

/* Shine effect on hover */
.homepage-hero-button a::before,
.homepage-hero-button .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.6s ease;
}

.homepage-hero-button a:hover::before,
.homepage-hero-button .btn:hover::before {
  left: 100%;
}

.homepage-hero-button a:hover,
.homepage-hero-button a:focus,
.homepage-hero-button .btn:hover,
.homepage-hero-button .btn:focus {
  background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
  color: #18453b;
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 8px 25px rgba(24, 69, 59, 0.5),
    0 4px 15px rgba(0, 0, 0, 0.3);
  text-decoration: none;
}

.homepage-hero-button a:active,
.homepage-hero-button .btn:active {
  transform: translateY(-1px) scale(0.98);
}

/* Optional: Ghost button variant */
.homepage-hero-button.ghost-style a,
.homepage-hero-button.ghost-style .btn {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.homepage-hero-button.ghost-style a:hover,
.homepage-hero-button.ghost-style .btn:hover {
  background: rgba(255, 255, 255, 0.95);
  color: #18453b;
  border-color: rgba(255, 255, 255, 0.5);
}

/* Mobile: Adjusted sizing */
@media (max-width: 575px) {
  .homepage-hero-button a,
  .homepage-hero-button .btn {
    width: 100%;
    max-width: 320px;
    text-align: center;
  }
}

/* ==========================================================================
   Modern Animations & Effects
   ========================================================================== */

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

/* Smooth fade in for hero content */
@keyframes smoothFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Subtle pulse animation for CTA */
@keyframes subtlePulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}

/* Add optional pulse to button after page load */
.homepage-hero-button a.pulse-once,
.homepage-hero-button .btn.pulse-once {
  animation:
    fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.45s both,
    subtlePulse 2s ease-in-out 2s 3;
}

/* ==========================================================================
   Optional Modern Effects & Enhancements
   ========================================================================== */

/* Add subtle border accent to text wrapper */
.homepage-hero-text-wrapper.with-accent {
  border-left: 4px solid rgba(255, 255, 255, 0.3);
  padding-left: 1.5rem;
}

/* Glass morphism container variant */
.homepage-hero-text-wrapper.glass-container {
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: clamp(2rem, 4vw, 3rem);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Gradient overlay for better text contrast */
.homepage-hero-wrapper.enhanced-overlay .homepage-hero-overlay {
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.4) 0%,
    rgba(24, 69, 59, 0.3) 50%,
    rgba(0, 0, 0, 0.5) 100%
  );
}

/* Add subtle glow effect to title */
.homepage-hero-title .hero-title.with-glow {
  text-shadow:
    0 0 20px rgba(255, 255, 255, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.3),
    0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Animated underline effect for links in description */
.homepage-hero-description a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  border-bottom: 2px solid rgba(255, 255, 255, 0.4);
  transition: border-color 0.3s ease;
  padding-bottom: 2px;
}

.homepage-hero-description a:hover,
.homepage-hero-description a:focus {
  border-bottom-color: rgba(255, 255, 255, 1);
  color: #ffffff;
}

/* ==========================================================================
   Alignment Variants
   ========================================================================== */

/* Center-aligned text */
.homepage-hero-wrapper.hero-align-center .homepage-hero-text-wrapper {
  text-align: center;
}

.homepage-hero-wrapper.hero-align-center .homepage-hero-description {
  margin-left: auto;
  margin-right: auto;
}

/* Right-aligned text */
.homepage-hero-wrapper.hero-align-right .homepage-hero-text-wrapper {
  text-align: right;
}

.homepage-hero-wrapper.hero-align-right .homepage-hero-description {
  margin-left: auto;
}

/* ==========================================================================
   Light Theme Variant (for light backgrounds)
   ========================================================================== */

.homepage-hero-wrapper.light-theme .hero-eyebrow {
  color: #7ED709 !important;
  text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.9) !important;
}

.homepage-hero-wrapper.light-theme .hero-title,
.homepage-hero-wrapper.light-theme .hero-subtitle,
.homepage-hero-wrapper.light-theme .homepage-hero-description,
.homepage-hero-wrapper.light-theme .homepage-hero-description p {
  color: #18453b !important;
  text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.9) !important;
}

.homepage-hero-wrapper.light-theme .hero-eyebrow::before {
  background: #7ED709 !important;
}

.homepage-hero-wrapper.light-theme .homepage-hero-button a {
  background-color: #18453b;
  color: #ffffff;
  border-color: #18453b;
}

.homepage-hero-wrapper.light-theme .homepage-hero-button a:hover {
  background-color: transparent;
  color: #18453b;
  border-color: #18453b;
}

/* ==========================================================================
   Accessibility - Skip Link
   ========================================================================== */

.skip-hero-link {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  padding: 0.5rem 1rem;
  background-color: #18453b;
  color: #ffffff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
}

.skip-hero-link:focus {
  position: absolute;
  clip: auto;
  width: auto;
  height: auto;
  overflow: visible;
}

/* ==========================================================================
   Accessibility - Reduced Motion & Enhanced Focus States
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .homepage-hero-eyebrow,
  .homepage-hero-title,
  .homepage-hero-subtitle,
  .homepage-hero-description,
  .homepage-hero-button,
  .homepage-hero-button a::before,
  .homepage-hero-button .btn::before {
    animation: none !important;
  }

  .homepage-hero-button a,
  .homepage-hero-button .btn {
    transition: opacity 0.2s ease, color 0.2s ease !important;
  }

  .homepage-hero-button a:hover,
  .homepage-hero-button .btn:hover {
    transform: none !important;
  }
}

/* Enhanced focus states for accessibility */
.homepage-hero-button a:focus-visible,
.homepage-hero-button .btn:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.8);
  outline-offset: 4px;
  box-shadow:
    0 0 0 4px rgba(24, 69, 59, 0.4),
    0 8px 25px rgba(24, 69, 59, 0.5),
    0 4px 15px rgba(0, 0, 0, 0.3);
}

.homepage-hero-description a:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  .homepage-hero-wrapper {
    min-height: auto;
    page-break-inside: avoid;
  }

  .homepage-hero-overlay {
    display: none;
  }

  .homepage-hero-button {
    display: none;
  }
}

/* ==========================================================================
   High Contrast Mode Support
   ========================================================================== */

@media (prefers-contrast: high) {
  .homepage-hero-overlay {
    background: rgba(0, 0, 0, 0.8);
  }

  .homepage-hero-button a,
  .homepage-hero-button .btn {
    border-width: 3px;
  }
}
