/* ===================================
   HERO SLIDER - MEJORADO UI/UX
   =================================== */

/* Contenedor principal del slider */
.hero-slider-section {
  position: relative;
  width: 100%;
  height: calc(100vh - 110px);
  /* Fixed height to fill screen */
  min-height: 600px;
  /* Minimum height to prevent squashing */

  overflow: hidden;
  margin-top: 110px;
  /* Push down by header height */
  padding-top: 0;
}

/* Contenedor Swiper */
.hero-slider-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.hero-slider-container .swiper-wrapper {
  height: 100%;
}

.hero-slider-container .swiper-slide {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Slide individual */
.hero-slide {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Imagen de fondo del slide */
.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Overlay oscuro para mejorar contraste del texto */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg,
      rgba(7, 18, 51, 0.85) 0%,
      rgba(27, 155, 158, 0.75) 50%,
      rgba(92, 184, 92, 0.65) 100%);
  z-index: 1;
}

/* Contenedor de contenido del slide */
.hero-slide .container {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

/* Layout estándar (texto centrado o a la izquierda) */
.hero-content.standard {
  width: 100%;
  max-width: 900px;
  padding: 2rem;
}

.hero-content.standard.text-center {
  margin: 0 auto;
  text-align: center;
}

.hero-content.standard.text-left {
  text-align: left;
}

.hero-content.standard.text-right {
  text-align: right;
  margin-left: auto;
}

/* Layout moderno split (texto + imagen) */
.hero-content.modern_split {
  width: 100%;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 3rem;
  align-items: center;
}

/* Texto del hero */
.hero-text {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.swiper-slide-active .hero-text {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.3s;
}

/* Subtítulo */
.hero-subtitle {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 700;
  color: #F7B731;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 1.25rem;
  padding: 0.625rem 1.5rem;
  background: rgba(247, 183, 49, 0.5);
  /* 50% transparency */
  border-radius: 12px;
  /* Match button style */
  border: none;
  /* No border */
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Título principal */
.hero-title {
  font-size: 3.5rem;
  font-weight: 900;
  color: #FFFFFF;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  letter-spacing: -1px;
}

/* Descripción */
.hero-description {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 2.5rem;
  line-height: 1.7;
  max-width: 650px;
  font-weight: 400;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Botones del hero */
.hero-buttons {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.hero-content.text-center .hero-buttons {
  justify-content: center;
}

.hero-content.text-right .hero-buttons {
  justify-content: flex-end;
}

/* Imagen en layout split */
.hero-image {
  position: relative;
  opacity: 0;
  transform: translateX(50px) scale(0.95);
  transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.swiper-slide-active .hero-image {
  opacity: 1;
  transform: translateX(0) scale(1);
  transition-delay: 0.5s;
}

.hero-image img {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: contain;
  filter: none;
  /* Remove drop-shadow or border effects */
  animation: float 6s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-20px);
  }
}

/* ===================================
   CONTROLES DE NAVEGACIÓN
   =================================== */

/* Flechas de navegación */
.hero-slider-prev,
.hero-slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.15);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.9;
}

.hero-slider-prev:hover,
.hero-slider-next:hover {
  background: rgba(27, 155, 158, 0.9);
  border-color: rgba(27, 155, 158, 1);
  transform: translateY(-50%) scale(1.1);
  opacity: 1;
  box-shadow: 0 8px 24px rgba(27, 155, 158, 0.4);
}

.hero-slider-prev {
  left: 2.5rem;
}

.hero-slider-next {
  right: 2.5rem;
}

/* Paginación */
.hero-slider-pagination {
  position: absolute;
  bottom: 3rem !important;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  z-index: 10;
}

.hero-slider-pagination .swiper-pagination-bullet {
  width: 14px;
  height: 14px;
  background: rgba(255, 255, 255, 0.4);
  opacity: 1;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0 !important;
  cursor: pointer;
  border: 2px solid transparent;
}

.hero-slider-pagination .swiper-pagination-bullet:hover {
  background: rgba(255, 255, 255, 0.6);
  transform: scale(1.2);
}

.hero-slider-pagination .swiper-pagination-bullet-active {
  background: #F7B731;
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.3);
  box-shadow: 0 0 12px rgba(247, 183, 49, 0.6);
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 1200px) {
  .hero-title {
    font-size: 3.5rem;
  }

  .hero-description {
    font-size: 1.125rem;
  }

  .hero-content.modern_split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-image {
    order: -1;
    max-width: 500px;
    margin: 0 auto;
  }
}

@media (max-width: 992px) {
  .hero-slider-section {
    min-height: 600px;
  }

  .hero-title {
    font-size: 3rem;
  }

  .hero-description {
    font-size: 1.0625rem;
  }

  .hero-content.standard {
    padding: 1.5rem;
  }

  .hero-slider-prev,
  .hero-slider-next {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }

  .hero-slider-prev {
    left: 1.5rem;
  }

  .hero-slider-next {
    right: 1.5rem;
  }
}

@media (max-width: 768px) {
  .hero-slider-section {
    min-height: auto;
    height: auto;
    margin-top: 100px;
    /* Slightly smaller header on mobile */
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .hero-subtitle {
    font-size: 0.75rem;
    padding: 0.5rem 1.25rem;
    letter-spacing: 2px;
  }

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

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  /* Ocultar flechas en móvil */
  .hero-slider-prev,
  .hero-slider-next {
    display: none;
  }

  .hero-slider-pagination {
    bottom: 2rem !important;
  }

  .hero-image img {
    max-height: 250px;
  }

  /* Centrar todo en móvil */
  .hero-content.standard.text-left,
  .hero-content.standard.text-right {
    text-align: center;
  }

  .hero-content.standard.text-left .hero-buttons,
  .hero-content.standard.text-right .hero-buttons {
    justify-content: center;
  }
}

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

  .hero-title {
    font-size: 1.875rem;
    margin-bottom: 1rem;
  }

  .hero-description {
    font-size: 0.9375rem;
    margin-bottom: 2rem;
  }

  .hero-content.standard {
    padding: 1rem;
    padding-bottom: 4rem;
    /* Space for pagination */
  }

  .hero-slider-pagination {
    bottom: 1.5rem !important;
  }

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

/* ===================================
   MEJORAS ADICIONALES UI/UX
   =================================== */

/* Indicador de scroll */
.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.7;
  animation: bounce 2s infinite;
}

.scroll-indicator span {
  color: white;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.scroll-indicator i {
  color: white;
  font-size: 1.5rem;
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  40% {
    transform: translateX(-50%) translateY(-10px);
  }

  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* Efecto de transición suave entre slides */
.hero-slider-container .swiper-slide {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.hero-slider-container .swiper-slide-active {
  opacity: 1;
}

/* Loading state */
.hero-slider-container.loading {
  background: linear-gradient(135deg, #1B9B9E 0%, #5CB85C 100%);
}

.hero-slider-container.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 100;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* ===================================
   HERO SLIDER - LAYOUTS DINÁMICOS
   =================================== */

/* Base Flex Configuration for Hero Content */
.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: 100%;
  max-width: 1200px;
  /* Ensure it doesn't stretch too wide */
  margin: 0 auto;
}

/* --- IMAGE RIGHT (Default) --- */
.hero-content.layout-image-right {
  flex-direction: row;
}

.hero-content.layout-image-right .hero-text {
  flex: 1;
  text-align: left;
}

.hero-content.layout-image-right .hero-image {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

/* --- IMAGE LEFT --- */
.hero-content.layout-image-left {
  flex-direction: row-reverse;
}

.hero-content.layout-image-left .hero-text {
  flex: 1;
  text-align: right;
  /* Text aligns to right as requested */
}

.hero-content.layout-image-left .hero-buttons {
  justify-content: flex-end;
  /* Buttons align to right */
}

.hero-content.layout-image-left .hero-image {
  flex: 1;
  display: flex;
  justify-content: flex-start;
}

/* --- IMAGE CENTER (Text Only Centered) --- */
.hero-content.layout-image-center {
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding-top: 0;
}

/* Reset display contents to allow normal stacking */
.hero-content.layout-image-center .hero-text {
  display: block;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

/* Hide the main image in this layout */
.hero-content.layout-image-center .hero-image {
  display: none !important;
}

/* Ensure buttons are visible and centered */
.hero-content.layout-image-center .hero-buttons {
  display: flex !important;
  justify-content: center;
  margin-top: 2rem;
}

/* Reset orders as we are using normal flow */
.hero-content.layout-image-center .hero-title,
.hero-content.layout-image-center .hero-subtitle,
.hero-content.layout-image-center .hero-description {
  order: unset;
  width: 100%;
}

.hero-content.layout-image-center .hero-description {
  margin-left: auto;
  margin-right: auto;
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 992px) {

  .hero-content.layout-image-left,
  .hero-content.layout-image-right {
    flex-direction: column-reverse;
    /* Stack on mobile: Image top, Text bottom usually, or Text top? Standard is Text top usually. Let's stick to column-reverse (Image Top) or column (Text Top) */
    /* Actually, let's keep it simple: Text Top, Image Bottom for mobile usually */
    flex-direction: column;
    text-align: center;
  }

  .hero-content.layout-image-left .hero-text,
  .hero-content.layout-image-right .hero-text {
    text-align: center;
  }

  .hero-content.layout-image-left .hero-buttons,
  .hero-content.layout-image-right .hero-buttons {
    justify-content: center;
  }

  .hero-content.layout-image-left .hero-image,
  .hero-content.layout-image-right .hero-image {
    justify-content: center;
    margin-top: 2rem;
  }
}