/**
 * Hero Banner Block Styles
 */

/* Base Hero Banner */
.hero-banner {
  position: relative;
  overflow: hidden;
  width: 100%;
}

/* Height variants */
.hero-banner--small {
  min-height: 465px;
}

.hero-banner--medium {
  min-height: 600px;
}

.hero-banner--large {
  min-height: 800px;
}

.hero-banner--fullscreen {
  min-height: 100vh;
}

/* Background Layer */
.hero-banner__background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-banner__background-image,
.hero-banner__background-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-banner__background-color {
  width: 100%;
  height: 100%;
}

.hero-banner__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2;
}

/* Content Layer */
.hero-banner__content-wrapper {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  min-height: inherit;
  /* padding: 3rem 1.5rem; */
}

/* Content padding for non-carousel mode (desktop) */
.hero-banner:not(.hero-banner--carousel) .hero-banner__content-wrapper {
  padding: var(--hero-desktop-content-padding, 24px);
}

/* .hero-banner__content {
 margin: auto !important;
} */

/* Content Position */
.hero-banner--content-left .hero-banner__content-wrapper {
  justify-content: flex-start;
}

.hero-banner--content-center .hero-banner__content-wrapper {
  justify-content: center;
}

.hero-banner--content-right .hero-banner__content-wrapper {
  justify-content: flex-end;
}

/* Content Width Constraint (when full-width is disabled) */
.hero-banner__content--constrained {
  max-width: var(--container-max-width); /* 1440px */
  padding-left: var(--container-padding); /* 24px */
  padding-right: var(--container-padding);
}

/* Text Alignment */
.hero-banner__content--align-left {
  text-align: left;
}

.hero-banner__content--align-center {
  text-align: center;
}

.hero-banner__content--align-right {
  text-align: right;
}

/* Typography - using CSS custom properties for responsive control */
.hero-banner__subheadline {
  font-size: var(--hero-desktop-subheadline-size, 1.75rem);
  font-weight: 400;
  margin: 0 0 1rem;
  line-height: 1.4;
}

.hero-banner__headline {
  font-size: var(--hero-desktop-headline-size, 4.5rem);
  font-weight: 700;
  margin: 0 0 1.5rem;
  line-height: 1.1;
}

.hero-banner__description {
  font-size: var(--hero-desktop-description-size, 1.25rem);
  line-height: 1.6;
  margin: 0 0 2rem;
}

/* Text Colors */
.hero-banner--text-white .hero-banner__subheadline,
.hero-banner--text-white .hero-banner__headline,
.hero-banner--text-white .hero-banner__description {
  color: #ffffff;
}

/* Legacy support for 'light' option */
.hero-banner--text-light .hero-banner__subheadline,
.hero-banner--text-light .hero-banner__headline,
.hero-banner--text-light .hero-banner__description {
  color: #ffffff;
}

.hero-banner--text-dark .hero-banner__subheadline,
.hero-banner--text-dark .hero-banner__headline,
.hero-banner--text-dark .hero-banner__description {
  color: var(--content-on-surface, #1F2937);
}

.hero-banner--text-custom {
  /* Custom text color applied via inline style, children inherit */
}

.hero-banner--text-custom .hero-banner__subheadline,
.hero-banner--text-custom .hero-banner__headline,
.hero-banner--text-custom .hero-banner__description {
  color: inherit;
}

/* Actions */
.hero-banner__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-banner__content--align-center .hero-banner__actions {
  justify-content: center;
}

.hero-banner__content--align-right .hero-banner__actions {
  justify-content: flex-end;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes slideRight {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-banner--animation-fade-in .hero-banner__content {
  animation: fadeIn 0.8s ease-out;
}

.hero-banner--animation-slide-up .hero-banner__content {
  animation: slideUp 0.8s ease-out;
}

.hero-banner--animation-slide-right .hero-banner__content {
  animation: slideRight 0.8s ease-out;
}

/* Carousel Styles */
.hero-banner--carousel {
  position: relative;
}

.hero-banner__slides {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
}

.hero-banner__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease-in-out, visibility 1s ease-in-out;
  min-height: inherit;
}

.hero-banner__slide--active {
  position: relative;
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

/* Carousel Navigation */
.hero-banner__navigation {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  justify-content: space-between;
  padding: 0 2rem;
  pointer-events: none;
}

.hero-banner__nav-button {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.hero-banner__nav-button:hover {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: scale(1.1);
}

.hero-banner__nav-button svg {
  width: 24px;
  height: 24px;
  color: #1a4d2e;
}

/* Carousel Pagination */
.hero-banner__pagination {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 0.75rem;
}

.hero-banner__pagination-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.hero-banner__pagination-dot:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.2);
}

.hero-banner__pagination-dot--active {
  background: rgba(255, 255, 255, 1);
  width: 32px;
  border-radius: 6px;
}

/* Responsive - Tablet (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .hero-banner--small {
    min-height: 350px;
  }

  .hero-banner--medium {
    min-height: 450px;
  }

  .hero-banner--large {
    min-height: 550px;
  }

  /* Override font sizes for tablet - use tablet-specific var if set, otherwise use scaled defaults */
  .hero-banner__headline {
    font-size: var(--hero-tablet-headline-size, 2.75rem) !important;
  }

  .hero-banner__subheadline {
    font-size: var(--hero-tablet-subheadline-size, 1.25rem) !important;
  }

  .hero-banner__description {
    font-size: var(--hero-tablet-description-size, 1rem) !important;
    text-align: left !important;
  }

  /* Padding only for carousel mode */
  .hero-banner--carousel .hero-banner__content-wrapper {
    padding-left: var(--hero-tablet-content-padding, 60px) !important;
    padding-right: var(--hero-tablet-content-padding, 60px) !important;
    padding-top: var(--hero-tablet-vertical-padding, 40px) !important;
    padding-bottom: var(--hero-tablet-vertical-padding, 40px) !important;
  }

  /* Content padding for non-carousel mode */
  .hero-banner:not(.hero-banner--carousel) .hero-banner__content-wrapper {
    padding: var(--hero-tablet-general-padding, 24px) !important;
  }
  .hero-banner__navigation {
    padding: 0 1rem;
  }

  .hero-banner__nav-button {
    width: 40px;
    height: 40px;
  }
}

/* Responsive - Mobile (below 768px) */
@media (max-width: 767px) {
  .hero-banner--small {
    min-height: 300px;
  }

  .hero-banner--medium {
    min-height: 400px;
  }

  .hero-banner--large {
    min-height: 500px;
  }

  /* Override font sizes for mobile - use mobile-specific var if set, otherwise use scaled defaults */
  .hero-banner__headline {
    font-size: var(--hero-mobile-headline-size, 2rem) !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    line-height: 1.2 !important;
  }

  .hero-banner__subheadline {
    font-size: var(--hero-mobile-subheadline-size, 1rem) !important;
  }

  .hero-banner__description {
    font-size: var(--hero-mobile-description-size, 0.9375rem) !important;
    text-align: left !important;
    line-height: 1.5 !important;
  }

  /* Padding only for carousel mode */
  .hero-banner--carousel .hero-banner__content-wrapper {
    padding-top: var(--hero-mobile-vertical-padding, 24px) !important;
    padding-bottom: var(--hero-mobile-vertical-padding, 24px) !important;
    padding-left: var(--hero-mobile-content-padding, 50px) !important;
    padding-right: var(--hero-mobile-content-padding, 50px) !important;
  }

  /* Content padding for non-carousel mode */
  .hero-banner:not(.hero-banner--carousel) .hero-banner__content-wrapper {
    padding: var(--hero-mobile-general-padding, 14px) !important;
  }

  .hero-banner__content {
    max-width: 100% !important;
    width: 100% !important;
  }

  .hero-banner__actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-banner__actions .btn,
  .hero-banner__actions a {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .hero-banner__navigation {
    padding: 0 0.5rem;
  }

  .hero-banner__nav-button {
    width: 36px;
    height: 36px;
  }

  .hero-banner__nav-button svg {
    width: 18px;
    height: 18px;
  }

  .hero-banner__pagination {
    bottom: 1rem;
  }

  .hero-banner__pagination-dot {
    width: 10px;
    height: 10px;
  }

  .hero-banner__pagination-dot--active {
    width: 24px;
  }
}

/* Extra small mobile (below 480px) */
@media (max-width: 479px) {
  .hero-banner__headline {
    font-size: var(--hero-mobile-headline-size, 1.75rem) !important;
    line-height: 1.2 !important;
  }

  .hero-banner__subheadline {
    font-size: var(--hero-mobile-subheadline-size, 0.9375rem) !important;
  }

  .hero-banner__description {
    font-size: var(--hero-mobile-description-size, 0.875rem) !important;
    line-height: 1.5 !important;
  }

  /* Padding only for carousel mode */
  .hero-banner--carousel .hero-banner__content-wrapper {
    padding-top: var(--hero-mobile-vertical-padding, 16px) !important;
    padding-bottom: var(--hero-mobile-vertical-padding, 16px) !important;
    padding-left: var(--hero-mobile-content-padding, 40px) !important;
    padding-right: var(--hero-mobile-content-padding, 40px) !important;
  }

  /* Content padding for non-carousel mode */
  .hero-banner:not(.hero-banner--carousel) .hero-banner__content-wrapper {
    padding: var(--hero-mobile-general-padding, 14px) !important;
  }
}