/* ========================================
   HERO SECTION & CAROUSEL STYLES
   ======================================== */

.hero-section {
  position: relative;
  background-size: cover;
  background-position: center;
  background-color: var(--hero-background);
  border-radius: 16px;
  min-height: clamp(60vh, 70vh, 75vh);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: var(--spacing-lg) auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.hero-image.loaded {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--hero-overlay);
  border-radius: 16px;
  z-index: 3;
}

/* Image Carousel */
.image-carousel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  border-radius: 16px;
  overflow: hidden;
}

.image-carousel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, 
    rgba(27, 60, 83, 0.8) 0%, 
    rgba(42, 74, 95, 0.6) 50%, 
    rgba(27, 60, 83, 0.8) 100%);
  z-index: 1;
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 0.6; }
}

.carousel-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1);
  transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 16px;
}

.carousel-image--active {
  opacity: 1;
  transform: scale(1.001);
}

.image-carousel.images-loaded::before {
  display: none;
}

/* Hero Content */
.hero-title {
  color: #ffffff;
  font-size: var(--font-size-hero-title);
  font-weight: 300;
  font-family: var(--font-family-primary);
  text-align: center;
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  color: #ffffff;
  font-size: var(--font-size-hero-subtitle);
  font-weight: 300;
  font-family: var(--font-family-primary);
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-content {
  position: relative;
  text-align: center;
  z-index: 4;
  max-width: 800px;
  padding: 0 2rem;
}

/* Service Hero (for index page) */
#medical-services .service-hero {
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(27, 60, 83, 0.9) 0%, rgba(42, 74, 95, 0.9) 100%);
  border-radius: 16px;
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
}

#medical-services .service-hero h2 {
  color: #fff;
  font-size: var(--font-size-2xl);
  font-weight: 300;
  text-align: center;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section {
    min-height: 50vh;
    margin: var(--spacing-md) auto;
  }
  
  .hero-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }
  
  .hero-subtitle {
    font-size: clamp(1rem, 4vw, 1.25rem);
  }
  
  .hero-content {
    padding: 0 1rem;
  }
  
  #medical-services .service-hero {
    min-height: 200px;
    margin: 1rem 0;
  }
  
  #medical-services .service-hero h2 {
    font-size: var(--font-size-xl);
  }
}
