/**
 * Hero Image Styles
 * Styling for the hero image view template
 */

/* Hero wrapper - main container */
.home-hero-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: #18453b; /* Fallback color only */
  min-height: 500px;
}

/* Remove background when inside slider */
.bxslider-hero .home-hero-wrapper {
  background-color: transparent;
}

/* Hero image container */
.home-hero-image {
  position: relative;
  width: 100%;
  height: 500px; /* Match the image style height */
  overflow: hidden;
}

/* Make the image responsive and maintain aspect ratio */
.home-hero-image img {
  width: 100%;
  height: auto;
  display: block;
  min-height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Alternative: Use the image as background for better control */
.home-hero-image.as-background {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.home-hero-image.as-background img {
  display: none;
}

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

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

/* 75% viewport height hero */
.home-hero-wrapper.hero-large {
  min-height: 75vh;
}

.home-hero-wrapper.hero-large .home-hero-image {
  height: 75vh;
}

/* Auto height based on image */
.home-hero-wrapper.hero-auto-height .home-hero-image {
  height: auto;
}

.home-hero-wrapper.hero-auto-height .home-hero-image img {
  height: auto;
  min-height: auto;
}

/* Overlay gradient for better text readability */
.home-hero-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.3) 100%);
  pointer-events: none;
}

/* Container positioning */
.home-hero-wrapper .container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 100%;
}

/* Slide content container - Responsive */
.slide-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 90%;
  max-width: 1200px;
  padding: clamp(1rem, 4vw, 3rem);
  text-align: left;
  max-height: 85vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Text wrapper - now inside container */
.home-hero-txt-wrapper {
  text-align: left;
  color: #ffffff;
  padding: 2rem 0;
}

/* Hero title styling - Responsive */
.home-hero-title {
  margin-bottom: clamp(0.75rem, 2vw, 1.5rem);
  animation: fadeInUp 0.8s ease-out;
}

.hero-title,
.slide-content .hero-title,
.slide-title,
.slide-content .slide-title {
  font-size: clamp(1.75rem, 5vw + 1rem, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  color: #ffffff;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  letter-spacing: -0.02em;
}

/* Hero description styling - Responsive */
.home-hero-description,
.slide-content .home-hero-description,
.slide-description,
.slide-content .slide-description {
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  animation: fadeInUp 0.8s ease-out 0.2s both;
  max-width: min(90%, 600px);
  font-size: clamp(1rem, 2vw + 0.5rem, 1.5rem) !important;
  line-height: 1.5 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  letter-spacing: normal !important;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.7) !important;
}

.home-hero-description p,
.home-hero-description div,
.home-hero-description span,
.home-hero-description *,
.slide-description p,
.slide-description div,
.slide-description span,
.slide-description *,
.home-hero-wrapper .home-hero-description,
.home-hero-wrapper .home-hero-description p,
.home-hero-wrapper .home-hero-description *,
.slide-content .slide-description,
.slide-content .slide-description p,
.slide-content .slide-description * {
  font-size: inherit !important;
  line-height: inherit !important;
  margin: 0;
  color: inherit !important;
  font-weight: inherit !important;
  letter-spacing: inherit !important;
  text-shadow: inherit !important;
}

/* Hero button styling - Responsive */
.home-hero-button,
.slide-content .home-hero-button {
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.home-hero-button a,
.slide-content .home-hero-button a {
  display: inline-block;
  padding: clamp(0.5rem, 1.5vw, 0.75rem) clamp(1.25rem, 3vw, 2rem);
  background-color: #18453b;
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(0.875rem, 1.5vw + 0.25rem, 1.125rem);
  border-radius: 0;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 2px solid #ffffff;
}

.home-hero-button a:hover {
  background-color: #ffffff;
  color: #18453b;
  border-color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Animation keyframes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Extra large screens */
@media (min-width: 1920px) {
  .slide-content {
    max-width: min(90%, 1400px);
  }
}

/* Large screens */
@media (min-width: 1200px) and (max-width: 1919px) {
  .slide-content {
    max-width: min(90%, 1140px);
  }
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .slide-content {
    width: 95%;
    max-width: 100%;
  }
  
  .home-hero-wrapper {
    min-height: auto;
  }
  
  .home-hero-image {
    height: auto;
  }
}

/* Alternative layout: Center-aligned text */
.home-hero-wrapper.hero-align-center .home-hero-txt-wrapper {
  text-align: center;
}

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

/* Alternative layout: Right-aligned text */
.home-hero-wrapper.hero-align-right .home-hero-txt-wrapper {
  text-align: right;
}

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

/* Parallax effect on scroll (optional) */
.home-hero-image.parallax {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -1;
}

.home-hero-wrapper.with-parallax {
  position: relative;
  z-index: 1;
  background: transparent;
}

/* Dark overlay variant */
.home-hero-wrapper.dark-overlay .home-hero-image::after {
  background: rgba(0,0,0,0.7);
}

/* Light overlay variant */
.home-hero-wrapper.light-overlay .home-hero-image::after {
  background: rgba(255,255,255,0.3);
}

.home-hero-wrapper.light-overlay .hero-title,
.home-hero-wrapper.light-overlay .home-hero-description p {
  color: #18453b;
  text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
}

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

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

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .home-hero-title,
  .home-hero-description,
  .home-hero-button {
    animation: none;
  }
  
  .home-hero-button a {
    transition: none;
  }
  
  .home-hero-button a:hover {
    transform: none;
  }
}