.hero {
  position: relative;
  width: 100%;
  height: var(--hero-height, 80vh);
  min-height: 400px;
  overflow: hidden;
}

.hero__slider {
  width: 100%;
  height: 100%;
}

.hero__slide {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #111; /* placeholder while the hero image loads */
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* `object-fit: cover` is the modern equivalent of `background-size: cover`.
     Using <img> lets the browser pick the right src from srcset and apply
     the right resolution to each viewport (including HiDPI). */
  object-fit: cover;
  object-position: center center;
  /* Disable browser-side image smoothing algorithms that can soften
     upscaled photos (causing the "pixelated / mushy" look on Retina). */
  image-rendering: auto;
}

.hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.5) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  padding: 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero__content--left {
  align-items: flex-start !important;
  text-align: left !important;
  /* Limit content to the left half of the hero so long titles/subtitles
     don't span the full width. Width is anchored to the parent so it
     can shrink below 50% when the viewport is narrow, but it never
     exceeds the half + a comfortable cap. */
  width: 100% !important;
  max-width: 600px !important;
  margin-left: 0 !important;
  margin-right: auto !important;
  padding-left: 10%;
  padding-right: 20px;
}

.hero__content--right {
  align-items: flex-end !important;
  text-align: right !important;
  width: 100% !important;
  max-width: 600px !important;
  margin-left: auto !important;
  margin-right: 0 !important;
  padding-left: 20px;
  padding-right: 10%;
}

.hero__content--center {
  align-items: center !important;
  text-align: center !important;
}

.hero__content--left .hero__title,
.hero__content--left .hero__subtitle,
.hero__content--left .hero__btn {
  text-align: left !important;
  align-self: flex-start !important;
  margin-left: 0 !important;
  margin-right: auto !important;
}

.hero__content--right .hero__title,
.hero__content--right .hero__subtitle,
.hero__content--right .hero__btn {
  text-align: right !important;
  align-self: flex-end !important;
  margin-left: auto !important;
  margin-right: 0 !important;
}

.hero__content--center .hero__title,
.hero__content--center .hero__subtitle,
.hero__content--center .hero__btn {
  text-align: center;
  align-self: center;
}

.hero__title {
font-family: var(--ds-title-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: var(--hero-title-weight, 700);
  color: var(--hero-title-color, #fff);
  margin-bottom: 16px;
  line-height: 1.1;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(30px);
  animation: heroFadeInUp 0.8s ease forwards;
  animation-delay: 0.2s;
}

.hero__subtitle {
font-family: var(--ds-body-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-weight: var(--hero-subtitle-weight, 400);
  color: var(--hero-subtitle-color, #fff);
  margin-bottom: 32px;
  max-width: 600px;
  line-height: 1.5;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(30px);
  animation: heroFadeInUp 0.8s ease forwards;
  animation-delay: 0.4s;
}

.hero__btn {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 14px 36px;
font-family: var(--ds-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
  animation: heroFadeInUp 0.8s ease forwards;
  animation-delay: 0.6s;
  background-color: var(--hero-btn-bg, #111331);
  color: var(--hero-btn-text, #ffffff);
  border: 2px solid var(--hero-btn-bg, #111331);
  border-radius: 8px;
  text-align: center;
  line-height: 1;
  white-space: nowrap;
}

.hero__btn:hover {
  background-color: var(--hero-btn-hover-bg, #c09578);
  color: var(--hero-btn-hover-text, #ffffff);
  border-color: var(--hero-btn-hover-bg, #c09578);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

@keyframes heroFadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__arrow {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  color: #fff;
  z-index: 10;
  transition: all 0.3s ease;
}

.hero__arrow::after {
  font-size: 18px;
  font-weight: 700;
}

.hero__arrow:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: #fff;
}

.hero__pagination {
  bottom: 30px !important;
  z-index: 10;
}

.hero__pagination .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.8);
  opacity: 1;
  transition: all 0.3s ease;
  cursor: pointer;
}

.hero__pagination .swiper-pagination-bullet-active {
  background: #fff;
  border-color: #fff;
  transform: scale(1.2);
}

.hero__pagination .swiper-pagination-bullet:hover {
  background: rgba(255, 255, 255, 0.8);
}

@media (max-width: 768px) {
  .hero {
    height: var(--hero-height, 60vh);
    min-height: 350px;
  }

  .hero__content {
    padding: 40px 20px;
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
    align-items: center !important;
    text-align: center !important;
    justify-content: center;
  }

  /* En móvil, forzar alineación centrada para todos los layouts
     regardless del align desktop (--left/--right/--center). Esto evita
     que el texto quede pegado a un borde en pantallas estrechas. */
  .hero__content--left,
  .hero__content--right,
  .hero__content--center {
    align-items: center !important;
    text-align: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 40px 24px;
  }

  .hero__content--left .hero__title,
  .hero__content--left .hero__subtitle,
  .hero__content--left .hero__btn,
  .hero__content--right .hero__title,
  .hero__content--right .hero__subtitle,
  .hero__content--right .hero__btn,
  .hero__content--center .hero__title,
  .hero__content--center .hero__subtitle,
  .hero__content--center .hero__btn {
    text-align: center !important;
    align-self: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Mobile alignment overrides via theme mod still honored */
  .hero__content--mobile-left {
    align-items: flex-start !important;
    text-align: left !important;
    padding-left: 10%;
    padding-right: 20px;
  }
  .hero__content--mobile-left .hero__title,
  .hero__content--mobile-left .hero__subtitle,
  .hero__content--mobile-left .hero__btn {
    text-align: left !important;
    align-self: flex-start !important;
    margin-left: 0 !important;
    margin-right: auto !important;
  }

  .hero__content--mobile-right {
    align-items: flex-end !important;
    text-align: right !important;
    padding-left: 20px;
    padding-right: 10%;
  }
  .hero__content--mobile-right .hero__title,
  .hero__content--mobile-right .hero__subtitle,
  .hero__content--mobile-right .hero__btn {
    text-align: right !important;
    align-self: flex-end !important;
    margin-left: auto !important;
    margin-right: 0 !important;
  }

  .hero__content--mobile-center {
    align-items: center !important;
    text-align: center !important;
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero__title {
    margin-bottom: 12px;
  }

  .hero__subtitle {
    margin-bottom: 24px;
    max-width: 100%;
  }

  .hero__btn {
    padding: 12px 28px;
    font-size: 13px;
    max-width: 90%;
    width: auto;
  }

  .hero__arrow {
    width: 40px;
    height: 40px;
  }

  .hero__arrow::after {
    font-size: 14px;
  }

  .hero__pagination {
    bottom: 20px !important;
  }

  .hero__pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: 300px;
  }

  .hero__content {
    padding: 30px 15px;
  }

  .hero__title {
    font-size: 1.75rem;
  }

  .hero__subtitle {
    font-size: 1rem;
  }

  .hero__btn {
    padding: 10px 24px;
    font-size: 12px;
  }
}

.swiper-button-prev.hero__arrow--prev {
  left: 20px;
}

.swiper-button-next.hero__arrow--next {
  right: 20px;
}

@media (max-width: 768px) {
  .swiper-button-prev.hero__arrow--prev {
    left: 10px;
  }

  .swiper-button-next.hero__arrow--next {
    right: 10px;
  }
}
