body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #0b0b0b;
  color: white;
}

/* ============================= */
/* HEADER */
/* ============================= */

header {
  background: black;
  padding: 10px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 95px;
}

.logo img {
  height: 85px;
  width: auto;
}

nav a {
  color: white;
  margin-left: 25px;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
}

nav a:hover {
  color: #d62828;
}

/* ============================= */
/* HERO */
/* ============================= */

.hero {
  min-height: 85vh;
  background: linear-gradient(rgba(0,0,0,0.75), rgba(0,0,0,0.65)),
    url("img/inicio.jpg")
    center/cover no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* >>> AJUSTE SOLO DE ESPACIADO (NUEVO) <<< */

.hero-content {
  margin-top: -20px;
}

.hero h2 {
  font-size: 85px;
  font-weight: bold;
  margin-bottom: 10px;
}

.hero-subtitle {
  font-size: 22px;
  color: rgba(255,255,255,0.9);
  line-height: 1.6;
  margin-top: 10px;
  margin-bottom: 28px;
}

.hero-buttons {
  margin-top: 10px;
  display: flex;
  gap: 15px;
  justify-content: center;
}

/* ============================= */
/* BOTONES */
/* ============================= */

.btn-principal {
  background: #d62828;
  color: white;
  padding: 15px 38px;
  border-radius: 14px;
  font-weight: 600;
  text-decoration: none;
  opacity: 0.9;
  transition: 0.3s;
}

.btn-principal:hover {
  opacity: 1;
}

/* Mejor contraste (Lighthouse) */
.btn-whatsapp{
  background:#15803d;
  color:#fff;
  padding: 16px 42px;
  border-radius: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow:0 4px 12px rgba(0,0,0,0.25);
  transition:0.25s;
  opacity: 1;
}

.btn-whatsapp:hover{
  transform: translateY(-2px);
  filter: brightness(1.05);
}
/* ============================= */
/* SECCIONES */
/* ============================= */

.section {
  padding: 90px 40px;
  text-align: center;
}

.section h2 {
  font-size: 42px;
  margin-bottom: 15px;
  color: #d62828;
}

.text {
  font-size: 16px;
  color: #ccc;
  margin-bottom: 30px;
  text-align: left;
}

/* ===== ARREGLO SUBTEXTO VEHÍCULOS ===== */
#autos .text{
  text-align: center;
  margin-top: 8px;
  font-size: 20px;     /* más grande */
  color: #e0e0e0;      /* más claro */
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}
/* ============================= */
/* FILTROS */
/* ============================= */

.filtros {
  margin: 40px auto;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.filtros select,
.filtros button {
  padding: 12px 15px;
  border-radius: 10px;
  border: none;
  font-size: 16px;
}

.filtros button {
  background: #d62828;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

#btn-limpiar {
  background: gray;
}

/* ============================= */
/* AUTOS */
/* ============================= */

.autos-grid {
  margin-top: 60px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  justify-items: center;
  gap: 30px;
  max-width: 1100px;
  margin: auto;
}

.vendidos-grid{
  display:grid;
  grid-template-columns:repeat(6, 1fr);
  gap:30px;
  max-width:1140px;
  margin:auto;
}

.vendidos-grid .auto-card{
  grid-column:span 2;
  width:100%;
  max-width:360px;
  justify-self:center;
}

/* 1 auto */
.vendidos-grid .auto-card:first-child:nth-last-child(1){
  grid-column:3 / span 2;
}

/* 2 autos */
.vendidos-grid .auto-card:first-child:nth-last-child(2){
  grid-column:2 / span 2;
}
.vendidos-grid .auto-card:nth-child(2):nth-last-child(1){
  grid-column:4 / span 2;
}

/* 4 autos: el 4to abajo centrado */
.vendidos-grid .auto-card:nth-child(4):nth-last-child(1){
  grid-column:3 / span 2;
}

/* 5 autos: los 2 de abajo centrados */
.vendidos-grid .auto-card:nth-child(4):nth-last-child(2){
  grid-column:2 / span 2;
}
.vendidos-grid .auto-card:nth-child(5):nth-last-child(1){
  grid-column:4 / span 2;
}

@media (max-width: 768px){
  .vendidos-grid{
    grid-template-columns:1fr;
  }

  .vendidos-grid .auto-card,
  .vendidos-grid .auto-card:first-child:nth-last-child(1),
  .vendidos-grid .auto-card:first-child:nth-last-child(2),
  .vendidos-grid .auto-card:nth-child(2):nth-last-child(1),
  .vendidos-grid .auto-card:nth-child(4):nth-last-child(1),
  .vendidos-grid .auto-card:nth-child(4):nth-last-child(2),
  .vendidos-grid .auto-card:nth-child(5):nth-last-child(1){
    grid-column:auto;
  }
}

.auto-card {
  background: #121821;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 0 18px rgba(0,0,0,0.7);
  transition: 0.3s;
  position: relative;
}

.auto-card{
  width:100%;
  max-width:360px;
}

.auto-card:hover {
  transform: translateY(-8px);
}

.auto-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.95);
  transition: 0.3s;
}

.auto-card:hover img {
  transform: scale(1.04);
}

.auto-info {
  padding: 25px;
}

.auto-info h3 {
  font-size: 22px;
  margin: 0;
}

.auto-info p {
  margin-top: 12px;
  color: #bbb;
}

.btn-detalle {
  display: inline-block;
  margin-top: 15px;
  background: #d62828;
  padding: 10px 18px;
  border-radius: 12px;
  color: white;
  text-decoration: none;
  font-weight: bold;
}

/* ============================= */
/* MENSAJE SIN RESULTADOS */
/* ============================= */

.mensaje-vacio {
  display:none;
  margin-top:40px;
  color:#bbb;
  text-align:center;
}

.mensaje-vacio p{
  margin-bottom:10px;
}

.mensaje-vacio .btn-whatsapp{
  margin-top:15px;
  display:inline-block;
}

/* ============================= */
/* VENDIDOS */
/* ============================= */

.vendido {
  opacity: 0.55;
}

.etiqueta-vendido {
  position: absolute;
  top: 15px;
  left: 15px;
  background: darkred;
  color: white;
  font-weight: bold;
  padding: 8px 14px;
  border-radius: 10px;
}

/* ============================= */
/* SERVICIOS */
/* ============================= */

.services-premium {
  margin-top: 70px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  align-items: stretch;
}

.service-card {
  background: #121821;
  padding: 40px 30px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 0 20px rgba(0,0,0,0.6);
  transition: 0.3s;
  min-height: 170px;
}

.service-card:hover {
  transform: translateY(-7px);
}

.service-card h3 {
  font-size: 22px;
  margin-bottom: 12px;
  color: white;
}

.service-card p {
  font-size: 16px;
  color: #bbb;
  line-height: 1.6;
}

/* ============================= */
/* CONTACTO */
/* ============================= */

.contact-box {
  margin: 35px auto;
  padding: 30px;
  background: rgba(255,255,255,0.06);
  border-radius: 18px;
  max-width: 520px;
  text-align: left;
}

/* ============================= */
/* DETALLE AUTO */
/* ============================= */

.detalle-box {
  max-width: 850px;
  margin: auto;
  background: #121821;
  padding: 35px;
  border-radius: 20px;
}

.detalle-img {
  width: 100%;
  border-radius: 18px;
  max-height: 420px;
  object-fit: cover;
}

.detalle-titulo {
  margin-top: 25px;
  font-size: 35px;
  color: #d62828;
}

.detalle-specs {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
}

.spec-item {
  background: rgba(255,255,255,0.06);
  padding: 18px;
  border-radius: 14px;
  text-align: center;
}

.spec-item span {
  display:block;
  color:#bbb;
  font-size:14px;
  margin-bottom:6px;
}

.spec-item b {
  color:white;
  font-size:18px;
  font-weight:bold;
}
/* ============================= */
/* LIGHTBOX GALERIA */
/* ============================= */

.lightbox{
  display:none;
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:rgba(0,0,0,0.92);
  justify-content:center;
  align-items:center;
  z-index:9999;
}

.lightbox img{
  max-width:90%;
  max-height:90%;
  border-radius:14px;
  box-shadow:0 0 40px rgba(0,0,0,0.8);
  animation:zoomIn .3s ease;
}

@keyframes zoomIn{
  from{transform:scale(0.85);opacity:0;}
  to{transform:scale(1);opacity:1;}
}

.detalle-img{
  cursor:zoom-in;
}


.detalle-btn {
  display: block;
  margin: 40px auto 0 auto;
  max-width: 320px;
  text-align: center;
}

/* ============================= */
/* FOOTER */
/* ============================= */

footer {
  background: black;
  padding: 25px;
  text-align: center;
  color: gray;
}

/* ============================= */
/* RESPONSIVE */
/* ============================= */

@media (max-width: 768px) {

  header {
    flex-direction: column;
    padding: 20px;
    height: auto;
  }

  .hero h2 {
    font-size: 55px;
  }

  .auto-card img {
    height: 210px;
  }

  .contact-box {
    text-align: center;
  }
}
/* HEADER STICKY */
header{
  position:sticky;
  top:0;
  z-index:999;
}

/* WHATSAPP FLOTANTE */
.whatsapp-float{
  position:fixed;
  bottom:25px;
  right:25px;
  background:#25d366;
  color:white;
  font-size:26px;
  padding:15px 18px;
  border-radius:50%;
  text-decoration:none;
  box-shadow:0 0 15px rgba(0,0,0,0.6);
}

/* MINI BOTON CARD */
.btn-whatsapp.mini{
  display:inline-block;
  margin-top:10px;
  padding:8px 14px;
  font-size:14px;
}

/* SECCION CONFIANZA */
.confianza{
  background:#121821;
  padding:25px;
  text-align:center;
}
.confianza-grid{
  display:flex;
  justify-content:center;
  gap:40px;
  flex-wrap:wrap;
  font-weight:bold;
}
.galeria{
  display:flex;
  gap:10px;
  margin-top:15px;
  flex-wrap:wrap;
}
.thumb{
  width:90px;
  height:70px;
  object-fit:cover;
  border-radius:10px;
  cursor:pointer;
  opacity:0.7;
}
.thumb:hover{opacity:1;}
/* FLECHAS LIGHTBOX */
.flecha{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  font-size:60px;
  color:white;
  cursor:pointer;
  user-select:none;
  padding:20px;
}

.izquierda{ left:20px; }
.derecha{ right:20px; }

.flecha:hover{ opacity:0.7; }
/* ============================= */
/* ANIMACIONES SCROLL */
/* ============================= */

.animar{
  opacity:0;
  transform:translateY(40px);
  transition: all 0.8s ease;
}

.animar.visible{
  opacity:1;
  transform:translateY(0);
}
/* BADGES AUTOS */
.badges{
  position:absolute;
  top:15px;
  right:15px;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.badge{
  background:#d62828;
  padding:6px 10px;
  border-radius:8px;
  font-size:12px;
  font-weight:bold;
}
/* ============================= */
/* MOBILE OPTIMIZATION PRO */
/* ============================= */

@media (max-width:768px){

  /* HERO más chico */
  .hero{
    min-height:70vh;
    padding:40px 20px;
  }

  .hero h2{
    font-size:42px;
  }

  .hero-subtitle{
    font-size:18px;
  }

  .btn-principal,
  .btn-whatsapp{
    padding:12px 22px;
    font-size:14px;
  }

  /* HEADER más compacto */
  header{
    padding:15px;
  }

  .logo img{
    height:60px;
  }

  nav a{
    margin:10px;
    font-size:14px;
  }

  /* SECCIONES menos espacio */
  .section{
    padding:60px 20px;
  }

  /* AUTOS */
  .auto-card img{
    height:190px;
  }

  .auto-info{
    padding:18px;
  }

  /* WHATSAPP flotante más chico */
  .whatsapp-float{
    bottom:18px;
    right:18px;
    font-size:22px;
    padding:12px 14px;
  }

  /* GALERIA miniaturas */
  .thumb{
    width:70px;
    height:55px;
  }

  /* Flechas lightbox más chicas */
  .flecha{
    font-size:40px;
    padding:10px;
  }

}
/* SCROLL SUAVE MENU */
html {
  scroll-behavior: smooth;
}
/* LOADER AUTOS */
.loader{
  text-align:center;
  font-size:20px;
  margin-top:40px;
  color:#bbb;
}
.hero h1{
  font-size:85px;
  margin-bottom:10px;
}
/* ============================= */
/* CONTACTO PRO (WhatsApp + Mapa + Redes) */
/* ============================= */

.contacto-grid{
  margin-top:50px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:30px;
  max-width:1100px;
  margin-left:auto;
  margin-right:auto;
  align-items:stretch;
}

.contacto-card{
  background:#121821;
  padding:35px;
  border-radius:20px;
  text-align:left;
  box-shadow:0 0 20px rgba(0,0,0,0.6);
}

.contacto-card h3{
  margin:0 0 18px 0;
  font-size:24px;
}

.contacto-card p{
  color:#ccc;
  margin:12px 0;
}

.btn-mapa{
  display:inline-block;
  margin:10px 0 20px 0;
  background:rgba(255,255,255,0.10);
  padding:10px 16px;
  border-radius:12px;
  color:white;
  text-decoration:none;
  font-weight:bold;
}

.btn-mapa:hover{ opacity:0.85; }

.redes{
  margin-top:22px;
  display:flex;
  gap:15px;
}

.redes a{
  color:#d62828;
  font-weight:bold;
  text-decoration:none;
}

.redes a:hover{ opacity:0.85; }

.contacto-map{
  border-radius:20px;
  overflow:hidden;
  box-shadow:0 0 20px rgba(0,0,0,0.6);
  background:#121821;
}

.contacto-map iframe{
  width:100%;
  height:100%;
  min-height:320px;
  border:0;
  display:block;
}

@media (max-width:768px){
  .contacto-grid{ grid-template-columns:1fr; }
  .contacto-card{ padding:25px; }
  .contacto-map iframe{ min-height:260px; }
}
/* ============================= */
/* AJUSTE ESPACIADO CONTACTO (más aire) */
/* ============================= */

/* Más separación general dentro de la tarjeta */
.contacto-card{
  padding: 40px;              /* antes 35px */
}

/* Separación entre líneas de texto */
.contacto-card p{
  margin: 16px 0;             /* antes 12px */
  line-height: 1.6;
}

/* Botón Google Maps con más aire */
.btn-mapa{
  margin: 12px 0 26px 0;      /* más separación abajo */
}

/* Botón WhatsApp con margen arriba/abajo */
.contacto-card .btn-whatsapp{
  display: inline-block;
  margin: 10px 0 18px 0;      /* separa del número y de las redes */
}

/* Redes: más aire y que bajen una línea si hace falta */
.redes{
  margin-top: 18px;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

/* Opcional: un separador suave antes de las redes */
.redes{
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* En mobile, todavía más aire */
@media (max-width:768px){
  .contacto-card{ padding: 28px; }
  .contacto-card .btn-whatsapp{ width: 100%; text-align: center; }
  .btn-mapa{ width: 100%; text-align: center; }
}
/* ============================= */
/* PROTECCIÓN BÁSICA IMÁGENES (NO rompe clicks) */
/* ============================= */
img{
  -webkit-user-drag: none; /* evita arrastrar en Chrome/Edge */
  user-select: none;       /* evita seleccionar */
}
#contacto .text{
  text-align:center;
}
#autos .text{
  font-size: 22px;
  color: #eaeaea;
  text-align: center;
  max-width: 650px;
  margin: 12px auto 28px auto;
  line-height: 1.5;
}
/* ===== TEXTO SOBRE NOSOTROS ===== */
#nosotros .text{
  font-size: 18px;
  line-height: 1.7;
  max-width: 900px;
  margin: auto;
  color: #d0d0d0;
}

/* ===== SUBTEXTO CONTACTO ===== */
#contacto .text{
  font-size: 19px;
  text-align: center;
  color: #e0e0e0;
  margin-bottom: 35px;
}
.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}
/* FIX: en contacto, que los botones NO se salgan de la card en móvil */
@media (max-width:768px){
  .contacto-card .btn-mapa,
  .contacto-card .btn-whatsapp{
    display:block;
    width:100%;
    max-width:100%;
    box-sizing:border-box;
    padding-left:18px;   /* reduce el padding lateral gigante */
    padding-right:18px;
    text-align:center;
  }
}