/* ============================================= */
/* ========= ESTILOS PARA HOME (index.html) ======== */
/* ============================================= */

/* --- Header (Banner Principal Home) --- */
.main-banner {
  background: url("img/banner.png") center/cover no-repeat fixed;
  color: #fff;
  text-align: center;
  padding: 180px 20px; 
  position: relative;
}

.banner-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 20px;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.4);
}

header::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.1);
  z-index: 1;
}

header .container {
  position: relative;
  z-index: 2;
}

/* --- Servicios (Tarjetas con imagen) --- */
#servicios {
  padding: 0;
  margin: 0;
}

.cards-container {
  display: flex;
  justify-content: center;
  gap: 0;
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.cards-container > * {
  flex: 1;
}

.card-link {
  text-decoration: none;
  color: inherit;
}

.image-card {
  aspect-ratio: 3/4;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  position: relative;
  will-change: transform; 
}

.image-card img, .image-card picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.card-title {
  position: absolute;
  bottom: 15%;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 2rem;
  font-weight: bold;
  text-align: center;
  z-index: 5;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
  transition: all 0.4s ease;
}

.image-card:hover {
  transform: scale(1.08);
  z-index: 10;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.image-card:hover img {
  transform: scale(1.05);
}

.image-card:hover .card-title {
  bottom: 18%;
  text-shadow: 3px 3px 5px rgba(0, 0, 0, 0.8);
}

.cards-container > *:first-child .image-card:hover {
  transform-origin: left; 
}

.cards-container > *:last-child .image-card:hover {
  transform-origin: right;
}

/* --- Contacto --- */
#contacto {
  background: url('img/fondo_formulario.png') center/cover no-repeat fixed;
  max-width: 100%;
  width: 100%;
  border-radius: 0;
  padding: 80px 0;
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  max-width: 900px;
  margin: 30px auto;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.contact-image {
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.contact-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.contact-form {
  padding: 40px;
  display: flex;
  align-items: center;
}

form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
}

form input, form textarea {
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
  font-family: inherit;
}

form input:focus, form textarea:focus {
  outline: none;
  border-color: #F25022;
}

form textarea {
  min-height: 120px;
  resize: vertical;
}

form button {
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
}

/* --- Reseñas --- */
#reseñas {
  background-color: #fff;
  padding: 60px 0;
}

.slider-wrapper {
  position: relative;
  width: 95%;
  max-width: 1400px;
  margin: 0 auto;
}

.slider-container {
  overflow: hidden;
}

.slider-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.review-card {
  flex: 0 0 calc(100% / 5 - 24px);
  margin: 0 12px;
  background: #fff;
  border: 1px solid #ddd;
  border-left: 4px solid #F25022;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.review-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.review-header {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 15px;
}

.review-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F25022 0%, #d63e16 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(242, 80, 34, 0.3);
}

.review-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.review-name {
  font-weight: bold;
  font-size: 1rem;
  color: #333;
}

.review-stars {
  color: #fbbc05;
  font-size: 1rem;
}

.review-text {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.5;
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid #ccc;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  cursor: pointer;
  z-index: 10;
  font-size: 24px;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  transition: all 0.2s ease;
}

.slider-arrow:hover {
  background-color: #fff;
  transform: translateY(-50%) scale(1.1);
}

.slider-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.slider-arrow.prev { left: -22px; }
.slider-arrow.next { right: -22px; }

/* --- Ubicación y Mapa --- */
#ubicacion {
  background-color: #fff;
  padding: 60px 0;
}

.location-wrapper {
  display: flex;
  gap: 30px;
  max-width: 1100px;
  width: 90%;
  margin: 0 auto;
}

.map-column {
  flex: 3;
  min-height: 450px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.map-column iframe {
  width: 100%;
  height: 100%;
}

.directions-column {
  flex: 1;
  background: #f5f5f5;
  padding: 30px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.directions-column h3 { margin-bottom: 10px; font-size: 1.5rem; }
.directions-column p { margin-bottom: 20px; font-size: 0.9rem; color: #666; }

#directions-form input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  margin-bottom: 15px;
  transition: border-color 0.3s;
}

#directions-form input:focus { outline: none; border-color: #F25022; }
#directions-form button { width: 100%; }

/* --- Media Queries específicas para el Home --- */
@media (max-width: 1200px) {
  .review-card { flex-basis: calc(100% / 4 - 24px); }
}

@media (max-width: 992px) {
  .review-card { flex-basis: calc(100% / 3 - 24px); }
  .location-wrapper {
    flex-direction: column;
    width: 90%;
  }
  .map-column {
    min-height: auto;
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 768px) {
  .banner-title {
    font-size: 2.5rem;
  }
  .cards-container { flex-direction: column; gap: 0; }
  .image-card { aspect-ratio: 16/9; }
  .card-title { font-size: 1.5rem; bottom: 20%; }
  .image-card:hover .card-title { bottom: 22%; }
  .contact-wrapper { grid-template-columns: 1fr; width: 80%; margin-top: 20px; margin-bottom: 20px; }
  .contact-image { height: 250px; }
  .contact-form { padding: 30px 20px; }
  .review-card { flex-basis: calc(100% / 2 - 20px); margin: 0 10px; }
  .slider-wrapper { width: 90%; }
  .slider-arrow.prev { left: -10px; }
  .slider-arrow.next { right: -10px; }
  #contacto {
    background-attachment: scroll;
  }
  .main-banner {
    background-image: url("img/banner_movil.png");
    aspect-ratio: 3 / 4;
    height: auto;
    padding-top: 150px;
    background-attachment: scroll;
  }
}

@media (max-width: 576px) {
  .review-card { flex-basis: calc(100% - 20px); }
}


/* --- Animación Título del Banner --- */
@keyframes fadeInSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.banner-title span {
  display: inline-block;
  opacity: 0;
}

.banner-title .line-1 {
  animation: fadeInSlideUp 1.2s ease-out forwards;
}

.banner-title .line-2 {
  color: #fff;
  animation: fadeInSlideUp 1.2s ease-out 0.4s forwards;
}

/* --- Cursores Personalizados --- */
#card-reparaciones .image-card:hover {
  cursor: url('img/cursor_martillo.png'), auto;
}

#card-upgrade .image-card:hover {
  cursor: url('img/cursor_rayo.png'), auto;
}

#card-mantenciones .image-card:hover {
  cursor: url('img/cursor_spray.png'), auto;
}

/* ============================================= */
/* ======== NUEVOS ESTILOS DE RESEÑAS (v2) ========== */
/* ============================================= */

/* 1. Hacemos espacio para el avatar flotante */
.slider-track {
  padding-top: 35px; /* Mantenemos el espacio para el avatar */
}

/* 2. Hacemos la tarjeta 'relativa' Y definimos 4 tarjetas */
.review-card {
  /* ESTE ES EL CAMBIO: de / 5 a / 4 para que sean más anchas */
  flex: 0 0 calc(100% / 4 - 24px);
  
  position: relative;
  padding: 25px;
}

/* 3. Estilos del Avatar Flotante (Sin cambios) */
.review-avatar {
  position: absolute;
  top: 0;
  left: 25px;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(242, 80, 34, 0.4);
  z-index: 5;
}

/* 4. Ajustamos el header de la tarjeta */
.review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 15px; /* Mantenemos el margen original */
  
  /* El avatar tiene 50px de alto y está 50% "subido" (25px).
     Le damos 30px de padding-top para dejar espacio
     debajo del avatar (25px) + 5px de "aire".
     Ajusta este '30px' si quieres más o menos aire. */
  padding-top: 30px; 
}

/* 5. Estilos para el Icono de Google (Sin cambios) */
.review-source {
  font-size: 1.5rem;
  color: #aaa;
  flex-shrink: 0;
}

/* 6. Estilos para las Estrellas Gráficas (Sin cambios) */
.review-stars {
  color: #fbbc05;
  font-size: 1rem;
}
.review-stars i {
  letter-spacing: 2px;
}

/* 7. Estilos para la Cita Destacada (Sin cambios) */
.review-quote {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 15px;
  padding-left: 15px;
  border-left: 3px solid #F25022; 
  line-height: 1.5;
}

/* 8. Ajuste final al texto de la reseña (Sin cambios) */
.review-text {
  font-size: 0.88rem; 
}

/* ============================================= */
/* ======== RESPONSIVE PARA RESEÑAS (v2) ======= */
/* ============================================= */

/* En pantallas medianas (ej. tablets en vertical, 3 columnas) */
@media (max-width: 1100px) {
  .review-card {
    flex-basis: calc(100% / 3 - 24px);
  }
}

/* En pantallas más pequeñas (2 columnas) */
@media (max-width: 820px) {
  .review-card {
    flex-basis: calc(100% / 2 - 24px);
  }
}

/* En pantallas móviles (1 columna, como pediste) */
@media (max-width: 768px) {
  .review-card {
    /* Ocupa casi todo el ancho, menos el margen */
    flex-basis: calc(100% - 24px);
  }
  
  /* Ajustamos las flechas para que no estorben en móvil */
  .slider-arrow {
    width: 40px;
    height: 40px;
  }
  .slider-arrow.prev { left: -10px; }
  .slider-arrow.next { right: -10px; }
  .slider-wrapper { width: 90%; }
}