/* ===== HERO CARRUSEL ===== */

.hero-carousel .hero-indicators {
  display: none;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  min-height: 500px;
  color: white;
  margin-bottom: 0 !important;
}

.hero-slides {
  position: relative;
  height: 100%;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s;
  
  padding: 50px 0 20px 0;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  position: relative;
}

/* Colores para cada slide */
.hero-slide[data-color="blue"] {
  background: linear-gradient(135deg, #9dc4ff 50%, #5a6aff 100%);
}

.hero-slide[data-color="red"] {
  background: linear-gradient(135deg, #ff6b6b 50%, #ff8e53 100%);
}

.hero-slide[data-color="green"] {
  background: linear-gradient(135deg, #4ECDC4 50%, #44A08D 100%);
}

/* Contenedor dentro de cada slide - HOMOGÉNEO */
.hero-slide .hero-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  position: relative;
  padding: 0 clamp(20px, 6vw, 90px);
  animation: fadeInUp 0.8s ease 0.3s both;
  min-height: 450px;
}

/* ========== TIPOGRAFÍA HOMOGÉNEA PARA TODOS LOS SLIDES ========== */
.hero-slide .hero-content {
  flex: 1;
  max-width: 600px;
  padding: 0 20px;
  z-index: 2;
}

/* Títulos principales - Mismo tamaño para todos */
.hero-slide .hero-content h1 {
  font-size: 2.7rem;
  line-height: 1.1;
  margin-bottom: 20px;
  font-weight: 800;
}

/* Párrafos - Mismo estilo para todos */
.hero-slide .hero-content p {
  font-size: 1.15rem;
  line-height: 1.55;
  margin-bottom: 25px;
  opacity: 0.95;
  max-width: 90%;
}

.hero-slide .hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
}

.hero-slide .hero-image img {
  max-width: 85%;
  max-height: 350px;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  animation: float 6s ease-in-out infinite;
  object-fit: contain;
}

/* ========== BOTONES DE NAVEGACIÓN MEJORADOS ========== */
.hero-prev, .hero-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.3rem;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  backdrop-filter: blur(5px);
  z-index: 100;
}

.hero-prev {
  left: 36px;
}

.hero-next {
  right: 36px;
}

.hero-prev:hover, .hero-next:hover {
  background: rgba(255, 255, 255, 0.35);
  border-color: white;
  transform: translateY(-50%) scale(1.12);
  backdrop-filter: blur(8px);
}

.hero-prev:active, .hero-next:active {
  transform: translateY(-50%) scale(0.97);
}

/* ========== INPUT GROUP MEJORADO - SOLO REDUCCIÓN PROPORCIONAL ========== */
.input-button-group {
  display: flex;
  max-width: 420px;
  margin: 25px 0 30px 0;
  background: white;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  transition: all 0.3s ease;
  min-height: 52px;
}

.input-button-group:focus-within {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transform: translateY(-3px);
}

#idruta-input {
  flex: 1;
  min-width: 0;
  padding: 14px 22px;
  font-size: 1.15rem;
  font-family: inherit;
  background: transparent;
  border: none;
  color: #333;
  outline: none;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

/* Placeholder más descriptivo */
#idruta-input::placeholder {
  color: #666;
  font-weight: 400;
  opacity: 0.8;
}

/* Para el slide verde específicamente */
.hero-slide[data-color="green"] #idruta-input {
  color: #2d5a51;
  font-weight: 500;
}

.hero-slide[data-color="green"] #idruta-input::placeholder {
  color: #448176;
}

.hero-slide[data-color="green"] #idruta-input:focus {
  background: transparent;
}

/* ===== BOTÓN DENTRO DEL INPUT GROUP ===== */
.input-button-group .btn-rutas {
  padding: 14px 28px !important;
  border-radius: 0 50px 50px 0 !important;
  border: none !important;
  background: linear-gradient(135deg, #44A08D 0%, #3A8A7F 100%) !important;
  color: white !important;
  font-weight: 700 !important;
  font-size: 1.15rem !important;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
  width: auto;
  margin: 0 !important;
  min-height: 52px;
}

.input-button-group .btn-rutas:hover {
  background: linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%) !important;
  box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.25);
}

/* ===== BOTONES REGULARES DEL HERO (COLORES ORIGINALES) ===== */
.hero-slide .hero-content .btn-primary {
  padding: 14px 32px !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  border-radius: 50px !important;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  min-height: 52px;
  line-height: 1;
  border: none;
  background: #0d6efd !important;
  color: white !important;
}

/* Hover para todos los botones primarios */
.hero-slide .hero-content .btn-primary:hover {
  background:  #3d8bfd !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* ===== ELIMINAR INDICADORES ===== */
.hero-indicators-container {
  display: none !important;
}

/* ===== MEDIA QUERIES - HOMOGÉNEAS ===== */

/* Para tablets grandes y laptops pequeños */
@media (max-width: 1200px) {

  .hero-carousel .hero-indicators {
    display: none;
  }


  .hero-slide .hero-container {
    padding: 0 70px;
    min-height: 420px;
  }
  
  .hero-prev, .hero-next {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
  }
  
  .hero-prev {
    left: 30px;
  }
  
  .hero-next {
    right: 30px;
  }
  
  /* Tipografía tablet */
  .hero-slide .hero-content h1 {
    font-size: 2.3rem;
  }
  
  .hero-slide .hero-content p {
    font-size: 1.1rem;
    line-height: 1.5;
  }
  
  .hero-slide .hero-image img {
    max-width: 80%;
    max-height: 300px;
  }
  
  /* INPUT GROUP - Reducción proporcional */
  .input-button-group {
    max-width: 380px;
    min-height: 48px;
  }
  
  #idruta-input {
    padding: 13px 20px;
    font-size: 1.1rem;
  }
  
  .input-button-group .btn-rutas {
    padding: 13px 25px !important;
    font-size: 1.1rem !important;
    min-height: 48px;
  }
  
  /* Botones regulares */
  .hero-slide .hero-content .btn-primary {
    padding: 13px 30px !important;
    font-size: 1.1rem !important;
    min-height: 48px;
  }
}

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

  .hero-carousel .hero-indicators {
    display: none;
  }



  .hero-slide .hero-container {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    padding: 0 50px;
    gap: 30px;
    min-height: 400px;
  }
  
  .hero-slide .hero-content {
    margin-bottom: 0;
    padding: 0;
    max-width: 100%;
    order: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .hero-slide .hero-content p {
    max-width: 85%;
    margin-left: auto;
    margin-right: auto;
  }
  
  /* IMAGEN VISIBLE EN TABLET */
  .hero-slide .hero-image {
    display: flex !important;
    order: 2;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
  }
  
  .hero-slide .hero-image img {
    max-width: 70%;
    max-height: 250px;
  }
  
  /* INPUT GROUP - Tablet - MANTIENE FORMA HORIZONTAL */
  .input-button-group {
    max-width: 380px;
    margin: 25px auto !important;
    display: flex;
    flex-direction: row !important;
    border-radius: 50px;
    background: white;
    min-height: 48px;
  }
  
  #idruta-input {
    border-radius: 50px 0 0 50px !important;
    border: none !important;
    padding: 13px 20px;
    background: transparent !important;
    font-size: 1.1rem;
  }
  
  .input-button-group .btn-rutas {
    border-radius: 0 50px 50px 0 !important;
    border: none !important;
    padding: 13px 25px !important;
    font-size: 1.1rem !important;
    min-height: 48px;
  }
  
  /* BOTONES REGULARES EN TABLET */
  .hero-slide .hero-content .btn-primary {
    padding: 13px 30px !important;
    font-size: 1.1rem !important;
    min-height: 48px;
  }
  
  /* BOTONES DEL CARRUSEL - Tablet */
  .hero-prev, .hero-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) !important;
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.25);
  }
  
  .hero-prev {
    left: 25px !important;
  }
  
  .hero-next {
    right: 25px !important;
  }
  
  .hero-prev:hover, .hero-next:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
    transform: translateY(-50%) scale(1.1) !important;
  }
  
  /* CONTENIDO DE TEXTO - Tablet */
  .hero-slide .hero-content h1 {
    font-size: 2.2rem;
    line-height: 1.15;
    margin-bottom: 15px;
  }
  
  .hero-slide .hero-content p {
    font-size: 1.1rem;
    line-height: 1.45;
    margin-bottom: 20px;
    max-width: 90%;
  }
}

/* MOBILE (768px) */
@media (max-width: 768px) {

  .hero-carousel .hero-indicators {
    display: none;
  }


  /* BOTONES DE NAVEGACIÓN OCULTOS EN MÓVIL */
  .hero-prev,
  .hero-next {
    font-size: 6px;
    width: 20px;
    height: 20px;
    display: flex !important;
  }
  
  /* CONTROL DE ALTURA */
  .hero-carousel {
    min-height: auto !important;
    padding-bottom: 20px;
    margin-bottom: 0 !important;
  }
  
  .hero-slide {
    padding: 40px 0 !important;
  }
  
  .hero-slide .hero-container {
    padding: 0 30px;
    gap: 25px;
    min-height: auto;
  }
  
  /* OCULTAR IMAGEN EN MÓVIL */
  .hero-slide .hero-image {
    display: none !important;
  }
  
  /* JERARQUÍA VISUAL - Mobile */
  .hero-slide .hero-content h1 {
    font-size: 1.9rem;
    line-height: 1.1;
    margin-bottom: 12px;
  }
  
  .hero-slide .hero-content p {
    font-size: 1.05rem;
    margin-bottom: 20px;
    max-width: 95%;
    line-height: 1.5;
  }
  
  /* BOTONES REGULARES EN MOBILE */
  .hero-slide .hero-content .btn-primary {
    padding: 14px 28px !important;
    font-size: 1.05rem !important;
    min-height: 48px;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    display: block;
  }
  
  /* ===== INPUT GROUP - MOBILE - MANTIENE FORMA HORIZONTAL ===== */
  .input-button-group {
    max-width: 100%;
    margin: 20px auto !important;
    display: flex;
    flex-direction: row !important;
    border-radius: 50px;
    background: white;
    min-height: 48px;
    width: 100%;
  }
  
  #idruta-input {
    border-radius: 50px 0 0 50px !important;
    border: none !important;
    padding: 15px 18px !important;
    background: white !important;
    font-size: 1.05rem;
    min-height: 48px !important;
  }
  
  .input-button-group .btn-rutas {
    border-radius: 0 50px 50px 0 !important;
    border: none !important;
    padding: 15px 18px !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    min-height: 48px !important;
  }
}

/* MÓVILES PEQUEÑOS (576px) */
@media (max-width: 576px) {

  .hero-carousel .hero-content p {
    max-width: 260px;
  }

  .hero-carousel .hero-indicators {
    display: none;
  }


  .hero-slide .hero-container {
    padding: 0 20px;
    gap: 20px;
  }
  
  .hero-slide .hero-content h1 {
    font-size: 1.7rem;
    margin-bottom: 10px;
  }
  
  .hero-slide .hero-content p {
    font-size: 1rem;
    margin-bottom: 18px;
    line-height: 1.45;
  }
  
  /* Botones regulares */
  .hero-slide .hero-content .btn-primary {
    padding: 13px 24px !important;
    font-size: 1rem !important;
    min-height: 46px;
    max-width: 260px;
  }
  
  /* Input group más compacto */
  .input-button-group {
    margin: 16px auto !important;
    min-height: 46px;
    max-width: 280px;
  }
  
  #idruta-input {
    padding: 14px 16px !important;
    font-size: 1rem;
    min-height: 46px !important;
  }
  
  .input-button-group .btn-rutas {
    padding: 14px 16px !important;
    font-size: 1rem !important;
    min-height: 46px !important;
  }
}

/* MÓVILES MUY PEQUEÑOS (400px) */
@media (max-width: 400px) {

  .hero-carousel .hero-indicators {
    display: none;
  }


  .hero-slide .hero-container {
    padding: 0 15px;
    gap: 18px;
  }
  
  .hero-slide .hero-content h1 {
    font-size: 1.5rem;
    margin-bottom: 8px;
  }
  
  .hero-slide .hero-content p {
    font-size: 0.95rem;
    margin-bottom: 16px;
    line-height: 1.4;
  }
  
  /* Botones regulares */
  .hero-slide .hero-content .btn-primary {
    padding: 12px 20px !important;
    font-size: 0.95rem !important;
    min-height: 44px;
    max-width: 240px;
  }
  
  .input-button-group {
    margin: 14px auto !important;
    min-height: 44px;
  }
  
  #idruta-input {
    padding: 13px 15px !important;
    font-size: 0.95rem;
    min-height: 44px !important;
  }
  
  .input-button-group .btn-rutas {
    padding: 13px 15px !important;
    font-size: 0.95rem !important;
    min-height: 44px !important;
  }
  
  /* Mensaje informativo SOLO para slide verde en móviles pequeños */
  .hero-slide[data-color="green"] .hero-content::after {
    display: block;
    font-size: 0.85rem;
    margin-top: 12px;
    opacity: 0.9;
    font-style: italic;
    line-height: 1.3;
  }
}

/* ===== ANIMACIONES ===== */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

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

/* ===== ESTILO PARA MENSAJES DE ERROR ===== */
.error-message {
  display: none;
  color: #059669;
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.1);
  animation: slideDown 0.3s ease-out;
  position: relative;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.error-message::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: #10b981;
  border-radius: 2px;
}

.input-error {
  border-color: #10b981 !important;
  outline-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
  transition: all 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-15px);
    max-height: 0;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    max-height: 100px;
  }
}

.error-message::after {
  content: 'ⓘ';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #34d399;
  font-size: 16px;
  font-weight: bold;
}

.error-message:hover {
  background-color: #dcfce7;
  box-shadow: 0 4px 6px rgba(5, 150, 105, 0.15);
  transition: all 0.2s ease;
}

@media (max-width: 768px) {
  .error-message {
    font-size: 13px;
    padding: 10px 14px;
    margin-top: 10px;
  }
  
  .error-message::after {
    right: 14px;
    font-size: 14px;
  }
}

@media (max-width: 400px) {
  .error-message {
    font-size: 12px;
    padding: 9px 12px;
  }
}