/* ------------------------------------
   Variables y reset global
------------------------------------ */
:root {
  --banner-height: 50px;   /* Ajusta según tu banner */
  --navbar-height: 56px;   /* Altura estándar de Bootstrap navbar */
  --header-height: calc(var(--banner-height) + var(--navbar-height));
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  overflow-x: hidden;       /* Elimina scroll horizontal */
  scroll-behavior: smooth;
  font-family: 'Poppins', sans-serif;
}

body {
  padding-top: var(--header-height); /* Reserva espacio para banner + navbar */
}

/* ------------------------------------
   Banner superior de oferta
------------------------------------ */
.oferta-top {
  background: #dc3545;
  color: white;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: var(--banner-height);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1050;
  font-weight: bold;
  padding: 0 1rem;
}

.oferta-top .btn {
  margin-left: 0.5rem;
  transition: transform 0.3s ease-in-out;
}

@keyframes vibrarBoton {
  0%   { transform: translateX(0); }
  25%  { transform: translateX(-2px); }
  50%  { transform: translateX(2px); }
  75%  { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}

.oferta-top .btn.animate {
  animation: vibrarBoton 0.3s ease-in-out infinite;
}

/* ------------------------------------
   Navbar fija justo debajo del banner
------------------------------------ */
.navbar {
  position: fixed;
  top: var(--banner-height);
  left: 0;
  width: 100%;
  height: var(--navbar-height);
  z-index: 1040;
}

/* ------------------------------------
   Hero principal con fondo oscuro
------------------------------------ */
.hero-espinal {
  position: relative;
  height: calc(100vh - var(--header-height));
  background: url('../img/carretera.png') center center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
}

.hero-espinal::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.hero-espinal .container {
  position: relative;
  z-index: 2;
}

.hero-espinal h1,
.hero-espinal p {
  color: white;
}

/* Ajustes móviles para el hero */
@media (max-width: 768px) {
  .hero-espinal {
    background-position: center top;
  }
  .hero-espinal h1 {
    font-size: 1.8rem;
    line-height: 1.3;
  }
  .hero-espinal p {
    font-size: 1rem;
  }
}

/* ------------------------------------
   Carrusel de vehículos
------------------------------------ */
.carousel-inner,
.carousel-item {
  overflow: hidden;
}

/* ------------------------------------
   Cards de vehículos
------------------------------------ */
.vehiculo ul {
  padding-left: 0;
}

.vehiculo .card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vehiculo .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.vehiculo .card-title {
  font-weight: 600;
}

.vehiculo .card-text del {
  color: #6c757d;
}

.vehiculo .badge {
  font-size: 0.75rem;
  padding: 0.3em 0.6em;
}

/* ------------------------------------
   Modal de galería
------------------------------------ */
.modal .img-fluid {
  transition: transform 0.3s ease;
}

.modal .img-fluid:hover {
  transform: scale(1.05);
}

/* ------------------------------------
   Sección 'Nosotros'
------------------------------------ */
.nosotros-section {
  background: linear-gradient(to right, #7c141e, #dc3545);
  color: white;
}

.nosotros-section i {
  margin-bottom: 0.5rem;
}

/* ------------------------------------
   Sección 'Reserva con nosotros'
------------------------------------ */
.seccion-reserva {
  background-color: #f8f9fa;
}

.seccion-reserva h2 {
  font-size: 2rem;
}

.seccion-reserva img {
  border-radius: 1rem;
}

/* ------------------------------------
   Animación contador
------------------------------------ */
.contador {
  font-size: 2rem;
}

/* ------------------------------------
   Botón "subir al top"
------------------------------------ */
#btnSubir {
  position: fixed;
  bottom: 30px; right: 30px;
  z-index: 1060;
  display: none;
  width: 45px; height: 45px;
  background-color: #dc3545;
  color: white;
  border: none;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#btnSubir:hover {
  background-color: #bb2d3b;
}

/* ------------------------------------
   Footer: hover en iconos
------------------------------------ */
footer a:hover {
  color: #dc3545;
}

/* ------------------------------------
   Logo
------------------------------------ */
.logo {
  padding-top:15px;
  height: 110px;
  width: auto;
}

/* ------------------------------------
   Controles del carrusel
------------------------------------ */
.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-color: rgba(0,0,0,0.7);
  border-radius: 50%;
  padding: 1rem;
}

/* ------------------------------------
   Ajustes específicos móviles
------------------------------------ */
@media (max-width: 992px) {
  /* Logo centrado en móvil */
  .navbar .navbar-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
  /* Toggler a la derecha */
  .navbar-toggler {
    position: absolute;
    right: 1rem;
  }
  /* Menu desplegado como overlay fijo */
  .navbar-collapse {
    position: fixed;
    top: var(--header-height);
    left: 0; right: 0;
    background: #212529;
    padding: 1rem;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    z-index: 1050;
  }
  .navbar-collapse .nav-link {
    color: #f8f9fa;
    padding: 0.75rem 1rem;
  }
  .navbar-collapse .btn {
    width: 100%;
    margin-top: 1rem;
  }
}
/* ------------------------------------
   Nav-link activo
------------------------------------ */
.navbar-nav .nav-link.active {
  color: #dc3545 !important;      /* color rojo */
  font-weight: 600;               /* un poco más destacado */
  position: relative;
}

.navbar-nav .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: #dc3545;            /* subrayado rojo */
}

/* ------------------------------------
   Iconos sociales flotantes lateral
------------------------------------ */
#social-scroll {
  position: fixed;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  flex-direction: column;
  gap: 10px;
  z-index: 1060; /* Encima de navbar y oferta */
}

#social-scroll.show {
  display: flex;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #fff;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  transition: transform 0.3s ease, background 0.3s ease;
}

.social-icon:hover {
  transform: scale(1.1);
  background: rgba(0, 0, 0, 0.8);
}

/* Colores por red */
.social-icon.fb { background: #3b5998; }
.social-icon.ig { background: #E1306C; }
.social-icon.tt { background: #010101; }
.social-icon.ws { background: #25D366; }

/* Tamaño estándar para las imágenes de las cards */
.vehiculo .card-img-top {
  width: 100%;
  height: 200px;        /* Ajusta aquí la altura que quieras */
  object-fit: cover;    /* Recorta/escala manteniendo proporción */
  border-top-left-radius: 0.375rem;
  border-top-right-radius: 0.375rem;
}




/* ajuste modal fotos: espacio lateral y no full-screen aplastado */
#modalFotos .modal-dialog {
  max-width: 900px;
  margin: 1.5rem auto;
}
@media (max-width: 768px) {
  #modalFotos .modal-dialog {
    max-width: 95%;
  }
}
#modalFotos .modal-body {
  max-height: 80vh;
  overflow-y: auto;
  padding: 1rem;
}
#modalFotos .modal-content {
  border-radius: 0.75rem;
}

/* Nosotros: tarjetas de características */
.feature-card {
  background: rgba(255, 255, 255, 0.06);
  border: none;
  border-radius: 1rem;
  position: relative;
  padding: 1.25rem;
  transition: transform .3s ease, box-shadow .3s ease;
  backdrop-filter: blur(8px);
}
.feature-card .icon-wrapper {
  font-size: 2rem;
  color: #ff4757;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  margin: 0 auto;
}
.feature-card h5 {
  margin-top: 0.5rem;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.25);
}

/* Testimonios: tarjetas modernas */
.testimonial-card {
  background: #ffffff;
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px -10px rgba(0,0,0,0.15);
  transition: transform .3s ease, box-shadow .3s ease;
}
.testimonial-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 25px 60px -10px rgba(0,0,0,0.2);
}
.testimonial-card .avatar {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
}
.testimonial-card .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #f1f1f1;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.testimonial-card .rating {
  color: #ffb400;
  font-size: 0.9rem;
}
.testimonial-card p {
  font-size: 0.95rem;
  line-height: 1.4;
}

/* Ajuste para dar sombra sutil a la foto de nosotros/reserva */
.nosotros-section img,
.seccion-reserva img {
  box-shadow: 0 25px 60px -15px rgba(0,0,0,0.25);
  border-radius: 0.75rem;
  transition: transform .3s ease;
}
.nosotros-section img:hover,
.seccion-reserva img:hover {
  transform: translateY(-2px);
}
