/* Hero Banner CSS Variables */
:root {
  --hero-transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --hero-border-radius: 0px;
  --hero-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  --hero-overlay: rgba(0, 0, 0, 0.3);
  --hero-aspect-ratio: 16 / 9;
}

/* Hero Section Base */
.hero-section {
  position: relative;
  width: 100%;
  aspect-ratio: var(--hero-aspect-ratio);
  min-height: 500px;
  max-height: 70vh;
  overflow: hidden;
  margin-bottom: 50px;
  border-radius: var(--hero-border-radius);
  box-shadow: var(--hero-shadow);
}

/* Hero Banner Base */
.hero-banner {
  position: relative;
  width: 100%;
  aspect-ratio: var(--hero-aspect-ratio);
  min-height: 500px;
  max-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--hero-border-radius);
}

/* Hero Image */
.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  transition: var(--hero-transition);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: var(--hero-transition);
}

/* Hero Overlay Image */
.hero-overlay-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

.hero-overlay-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: var(--hero-transition);
}

/* Hero Content Overlay - for single banner */
.single-banner .hero-content {
  position: relative;
  z-index: 4;
  text-align: center;
  padding: 40px 20px;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  letter-spacing: -0.02em;
  color: white;
}

.hero-subtitle {
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 30px;
  line-height: 1.4;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
  color: rgba(255, 255, 255, 0.95);
}

.hero-button {
  display: inline-block;
  padding: 16px 32px;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid white;
  border-radius: 50px;
  transition: all 0.3s ease;
  background: transparent;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-button:hover {
  background: white;
  color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  text-decoration: none;
}

/* Carousel Specific Styles */
.hero-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: var(--hero-aspect-ratio);
  min-height: 500px;
  max-height: 70vh;
  overflow: hidden;
  border-radius: var(--hero-border-radius);
}

.carousel-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  transform: translateX(100%);
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
  visibility: visible;
}

.carousel-item.active {
  transform: translateX(0);
  z-index: 2;
}

.carousel-item.prev {
  transform: translateX(-100%);
  z-index: 1;
}

.carousel-item.next {
  transform: translateX(100%);
  z-index: 1;
}

.carousel-item.exiting-left {
  transform: translateX(-100%);
  z-index: 1;
}

.carousel-item.entering-right {
  transform: translateX(0);
  z-index: 2;
}

/* Smooth fade transition for hero content - properly centered */
.carousel-item .hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) translateY(30px);
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s;
  width: 90%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 4;
}

.carousel-item.active .hero-content {
  transform: translate(-50%, -50%) translateY(0);
  opacity: 1;
}

/* Ensure text elements are properly styled in carousel */
.carousel-item .hero-content .hero-title {
  margin: 0 0 15px 0;
  line-height: 1.2;
}

.carousel-item .hero-content .hero-subtitle {
  margin: 0 0 20px 0;
  line-height: 1.4;
}

.carousel-item .hero-content .hero-button {
  margin: 10px 0 0 0;
}

/* Smooth image transitions */
.carousel-item .hero-image img {
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: scale(1.1);
}

.carousel-item.active .hero-image img {
  transform: scale(1);
}

/* Navigation Buttons */
.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 10;
  pointer-events: none;
}

.hero-nav-btn {
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--brand);
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  pointer-events: all;
}

.hero-nav-btn:hover {
  background: white;
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.hero-nav-btn:active {
  transform: scale(0.95);
}

/* Carousel Indicators */
.hero-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.hero-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.hero-indicator.active {
  background: white;
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.hero-indicator:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.1);
}

/* Progress Bar */
.hero-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  z-index: 10;
}

.hero-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--brand), #4ade80);
  transition: width 0.3s ease;
}

.hero-progress-bar.active {
  animation: progress-fill linear forwards;
}

@keyframes progress-fill {
  from { width: 0; }
  to { width: 100%; }
}

/* Play/Pause Button */
.hero-play-pause {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--brand);
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.hero-play-pause:hover {
  background: white;
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .hero-title {
    font-size: 3rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
}

@media (max-width: 992px) {
  .hero-section {
    min-height: 450px;
    max-height: 65vh;
  }
  
  .hero-banner {
    min-height: 450px;
    max-height: 65vh;
  }
  
  .hero-carousel {
    min-height: 450px;
    max-height: 65vh;
  }
  
  .hero-title {
    font-size: 2.5rem;
    margin-bottom: 18px;
  }
  
  .hero-subtitle {
    font-size: 1.15rem;
    margin-bottom: 28px;
  }
  
  .hero-button {
    padding: 15px 30px;
    font-size: 1.05rem;
  }
  
  .hero-nav {
    padding: 0 15px;
  }
  
  .hero-nav-btn {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }
}

@media (max-width: 768px) {
  .hero-section {
    min-height: 380px;
    max-height: 60vh;
    margin-bottom: 30px;
  }
  
  .hero-banner {
    min-height: 380px;
    max-height: 60vh;
  }
  
  .hero-carousel {
    min-height: 380px;
    max-height: 60vh;
  }
  
  .hero-title {
    font-size: 2rem;
    margin-bottom: 15px;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 25px;
  }
  
  .single-banner .hero-content {
    max-width: 500px;
    padding: 25px 15px;
    border-radius: 15px;
  }
  
  .carousel-item .hero-content {
    width: 95%;
    max-width: 500px;
    padding: 20px 15px;
  }
  
  .hero-button {
    padding: 14px 35px;
    font-size: 1rem;
  }
  
  .hero-nav {
    padding: 0 10px;
  }
  
  .hero-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .hero-indicators {
    bottom: 15px;
    gap: 10px;
  }
  
  .hero-indicator {
    width: 10px;
    height: 10px;
  }
}

@media (max-width: 576px) {
  .hero-section {
    min-height: 280px;
    max-height: 45vh;
  }
  
  .hero-banner {
    min-height: 280px;
    max-height: 45vh;
  }
  
  .hero-carousel {
    min-height: 280px;
    max-height: 45vh;
  }
  
  .hero-title {
    font-size: 1.8rem;
    margin-bottom: 12px;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 20px;
  }
  
  .single-banner .hero-content {
    padding: 20px 12px;
    border-radius: 12px;
  }
  
  .carousel-item .hero-content {
    width: 95%;
    padding: 15px 10px;
  }
  
  .hero-button {
    padding: 12px 30px;
    font-size: 0.95rem;
  }
  
  .hero-nav-btn {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }
  
  .hero-indicators {
    bottom: 12px;
    gap: 8px;
  }
  
  .hero-indicator {
    width: 8px;
    height: 8px;
  }
}

@media (max-width: 400px) {
  .hero-section {
    min-height: 250px;
    max-height: 40vh;
  }
  
  .hero-banner {
    min-height: 250px;
    max-height: 40vh;
  }
  
  .hero-carousel {
    min-height: 250px;
    max-height: 40vh;
  }
  
  .hero-title {
    font-size: 1.6rem;
  }
  
  .hero-subtitle {
    font-size: 0.95rem;
  }
  
  .single-banner .hero-content {
    padding: 18px 10px;
  }
  
  .carousel-item .hero-content {
    width: 95%;
    padding: 15px 8px;
  }
  
  .hero-button {
    padding: 10px 25px;
    font-size: 0.9rem;
  }
}

/* Accessibility and Motion Preferences */
@media (prefers-reduced-motion: reduce) {
  .hero-banner,
  .carousel-item,
  .hero-content,
  .hero-image img,
  .hero-nav-btn,
  .hero-indicator,
  .hero-button {
    transition: none;
    animation: none;
  }
  
  .hero-progress-bar {
    animation: none;
  }
  
  .carousel-item {
    transition: opacity 0.5s ease;
  }
}

@media (prefers-contrast: high) {
  .hero-nav-btn,
  .hero-indicator,
  .hero-play-pause {
    background: white;
    border: 2px solid var(--brand);
  }
  
  .hero-indicator.active {
    background: var(--brand);
  }
}

/* Loading States */
.hero-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  background: linear-gradient(135deg, var(--brand) 0%, #2c5530 100%);
  color: white;
  border-radius: var(--hero-border-radius);
}

.hero-error {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  background: #f8f9fa;
  color: #6c757d;
  border-radius: var(--hero-border-radius);
  border: 2px dashed #dee2e6;
}

/* Touch optimizations */
@media (hover: none) and (pointer: coarse) {
  .hero-nav-btn,
  .hero-indicator,
  .hero-play-pause {
    min-width: 44px;
    min-height: 44px;
  }
  
  .hero-button {
    min-height: 44px;
    padding: 14px 32px;
  }
}

/* Text Animations */
@keyframes pride-color-animation {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.hero-text-pride-color {
  background: linear-gradient(
    90deg,
    #e40303 0%,
    #e40303 16.66%,
    #ff8c00 16.66%,
    #ff8c00 33.33%,
    #ffed00 33.33%,
    #ffed00 50%,
    #008026 50%,
    #008026 66.66%,
    #24408e 66.66%,
    #24408e 83.33%,
    #732982 83.33%,
    #732982 100%
  );
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: pride-color-animation 3s linear infinite !important;
  font-weight: bold !important;
}
