/*styles.css*/

@import url("https://fonts.googleapis.com/css2?family=Raleway:wght@400;600&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Gruppo&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap");
:root {
  --nav-height: 60px;
  --bg: #0d0d0d;
  --card: #141414;
  --accent: #d4af37;
  --accent-2: #ffd76b;
  --muted: #b0b0b0;
  --text: #f5f5f5;
  --glass: rgba(255, 255, 255, 0.03);
  --shadow-1: 0 8px 24px rgba(0, 0, 0, 0.55);
  --shadow-2: 0 4px 12px rgba(0, 0, 0, 0.45);
  --radius: 12px;
  --radius-lg: 20px;
  --gap: 1.2rem;
  --break-sm: 768px;
  --break-md: 900px;
}

/* Reset y base */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Poppins, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a {
  color: inherit;
  text-decoration: none;
}

body {
  padding-top: var(--nav-height);
}

.sr-only {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: -1px;
}
:focus {
  outline: 2px solid rgba(212, 175, 55, 0.18);
  outline-offset: 3px;
  border-radius: 6px;
}

/* NAVBAR */
.navbar {
  height: var(--nav-height);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  z-index: 1400;
  background: linear-gradient(
    90deg,
    rgba(13, 13, 13, 0.95),
    rgba(20, 20, 20, 0.9)
  );
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow-2);
}
.logo {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.6px;
  text-decoration: none;
}
.nav-links {
display: flex;
gap: 0.5rem; /* <-- Asegúrate de haber aumentado este valor */
list-style: none;
margin: 0;
padding: 0;
align-items: center;
}
.nav-links a {
color: var(--text);
font-weight: 600;
padding: 0.35rem;
border-radius: 6px;
display: inline-block; /* <-- AÑADIDO */
transition: transform 0.2s ease-out, color 0.2s ease-out; /* <-- AÑADIDO */
}
.nav-links a svg {
    display: block; /* Para que ocupe su propio espacio */
    width: 30px;    /* Ancho del ícono */
    height: 30px;   /* Alto del ícono */
    stroke: currentColor; /* El color del ícono seguirá el color del texto del enlace */
    stroke-width: 2; /* Grosor del trazo */
}
.nav-links a:hover {
color: var(--accent);
transform: scale(1.1); /* <-- AÑADIDO (agranda un 10%) */
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
}
.hamburger span {
  width: 26px;
  height: 3px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.25s ease;
}
.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* HERO */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-height));
  min-height: calc(100svh - var(--nav-height));
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
  padding: 0;
  margin-top: 0;
  overflow: hidden;
  background-color: #000;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("assets/fondo-hero1.jpg");
  background-size: cover;
  background-position: center;
  z-index: 0;
  opacity: 0;
  filter: brightness(0.2);
  animation: fadeInBackground 1.2s ease-out 0.1s forwards;
}
.hero-inner {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin: 0 auto;
  color: #999696;
  text-align: center;
  padding: 1rem 1rem 6rem;
  opacity: 0;
  animation: fadeIn 1.2s ease-out 0.1s forwards;
}
@keyframes fadeInBackground {
  from {
    opacity: 0;
    filter: brightness(0.2);
  }
  to {
    opacity: 1;
    filter: brightness(1.5);
  }
}
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* BOTONES */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
}
.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #000;
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--accent);
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  transition: all 0.2s ease-out;
}
.btn-ghost:hover {
  background: var(--accent);
  color: #000;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.1);
}
.btn-whatsapp {
  background: var(--accent);
  color: #000;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  display: inline-block;
  transition: all 0.2s ease-out;
}
.btn-whatsapp:hover,
.btn-whatsapp:focus {
  transform: translateY(-3px);
  filter: brightness(1.1);
  box-shadow: 0 5px 15px rgba(212, 175, 55, 0.25);
}
.btn-info-modal {
  margin-top: 1.5rem;
}

/* SECCIONES */
.section {
  padding: 2.5rem 1.25rem;
}
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
 padding-top: 45px;
}

/* TÍTULOS */
h1,
h2,
h3 {
  font-family: "Raleway", sans-serif;
  font-weight: 600;
  letter-spacing: 1px;
}
h2 {
  color: var(--accent);
  margin-bottom: 0.5rem;
  font-size: 2.2rem;
  text-transform: uppercase;
}
.hero-inner h1 {
  font-family: "Gruppo";
  margin: 36rem 0 0.5rem 0;
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 1px;
}

/* VEHÍCULOS GRID & CARD */
.vehiculos-container {
  display: grid !important;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 1rem;
  visibility: visible !important;
  opacity: 1 !important;
}
.card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.2, 1), box-shadow 0.28s;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
}
.card picture,
.card img {
  display: block;
}
.card-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  cursor: pointer;
  display: block;
}
.card-content {
  padding: 1rem;
  flex-direction: column;
  gap: 0.8rem;
  flex: 1;
  text-align: center;
}
.card h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}
.card .small {
  font-size: 0.88rem;
  color: var(--muted);
}
.card-desc {
  color: var(--muted);
  margin: 0;
}
.price {
  font-weight: 800;
  color: var(--accent);
  font-size: 1.05rem;
}
.btn-whatsapp-card {
  margin-top: 1.5rem;
  padding: 0.5rem 0.8rem;
  font-size: 0.9rem;
  align-self: center;
  max-width: max-content;
}
.badge {
  position: absolute;
  left: 12px;
  top: 12px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #000;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.78rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.card-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.6rem;
  justify-content: center;
}
.card-details {
  margin-top: 0.8rem;
  color: var(--muted);
  text-align: left;
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.03);
  display: none;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, max-height 0.3s ease, margin-top 0.3s ease,
    padding-top 0.3s ease;
}
.card-details.visible-details {
  opacity: 1;
  max-height: 500px;
  margin-top: 0.8rem;
  padding-top: 0.5rem;
  display: block;
}
.spec-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.3rem;
  font-size: 0.93rem;
}
.spec-list li strong {
  color: var(--text);
  margin-right: 0.35rem;
}

/* MODAL GALERÍA */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1500;
  padding: 1rem;
}
.modal[aria-hidden="false"] {
  display: flex;
}
.modal-card {
  background: linear-gradient(180deg, #0f0f0f, #161616);
  border-radius: var(--radius-lg);
  padding: 1rem;
  max-width: 800px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: start;
  position: relative;
}

.modal-info {
  display: none;
}
.cerrar {
  position: absolute;
  top: 18px;
  right: 18px;
  background: transparent;
  color: var(--text);
  border: 0;
  font-size: 26px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s ease;
}
.cerrar:hover {
  color: var(--accent);
}
.carrousel {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  align-items: center;
  justify-content: center;
}
/* Estilos compartidos para thumbs */
.carrousel .thumb {
  width: 70px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.18s;
  display: inline-block;
  vertical-align: middle;
}
.carrousel .thumb:hover {
  border-color: var(--accent);
}
.carrousel .thumb.active {
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.08);
}

/* CONTACTO Y MAPA */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}
.contact-grid h2 {
  margin-top: 0;
}
.map-container {
  margin-top: 1.2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.map-container iframe {
  width: 100%;
  height: 350px;
  border: 0;
  display: block;
}

/* ANIMACIONES */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: all 3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* FOOTER Y SOCIAL ICONS */
footer {
  text-align: center;
  padding: 3rem 1rem 2rem;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 2rem;
  border-top: 1px solid var(--glass);
}

.social-icons { 
  display: flex; 
  justify-content: center; 
  gap: 2.5rem; /* <--- AUMENTADO */
  margin-top: 2.5rem; 
}
.social-icons a { 
  color: var(--muted); 
  transition: color 0.2s ease, transform 0.2s ease; 
  display: inline-block; 
}

/* ESTILO AL PRESIONAR (Móvil y PC) */
.social-icons a:active {
  color: var(--accent);
  transform: translateY(-3px); 
}

.logo-ticker-section {
  padding-top: 1rem; /* Menos padding arriba */
  padding-bottom: 2rem; /* Más padding abajo */
  background-color: #0d0d0d; /* Fondo sutil si quieres */
  
}

.logo-ticker {
  width: 100%;
  overflow: hidden; /* Oculta lo que se sale */
  position: relative; /* Para posibles efectos de degradado */
  /* Opcional: Máscara con degradado en los bordes */
  -webkit-mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
  mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
}

.logo-ticker__track {
  display: flex;
  align-items: center; /* Centra verticalmente los logos */
  gap: 4rem; /* Espacio entre logos */
  list-style: none;
  margin: 0;
  padding: 1.5rem 0; /* Pequeño padding vertical */
  width: max-content; /* Se ajusta al contenido */
  
  /* Animación */
  animation: scroll 30s linear infinite; 
}

/* Pausar animación al pasar el mouse (opcional) */
.logo-ticker:hover .logo-ticker__track {
  animation-play-state: paused;
}

.logo-ticker__track li {
  flex-shrink: 0; /* Evita que los logos se achiquen */
}

.logo-ticker__track img {
  display: block; /* Quita espacio extra debajo */
  max-height: 100px; /* Altura máxima (ajusta según tus logos) */
  width: auto;     /* Ancho automático */
  filter: grayscale(1) brightness(0.8); /* Efecto B&N tenue */
  opacity: 0.8;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

/* Efecto al pasar el mouse sobre un logo (opcional) */
.logo-ticker__track img:hover {
  filter: grayscale(0) brightness(1);
  opacity: 1;
}

/* Definición de la animación */
@keyframes scroll {
  from {
    transform: translateX(0);
  }
  to {
    /* Mueve hacia la izquierda la mitad del ancho total (porque duplicamos los logos) */
    transform: translateX(calc(-50% - (var(--logo-gap, 4rem) / 2))); 
  }
}

/* Ajuste para el gap en el cálculo de translateX */
:root { --logo-gap: 4rem; } /* Define el gap como variable CSS */
.logo-ticker__track { gap: var(--logo-gap);}

/* ESTILO HOVER (SOLO PC con mouse) */
@media (hover: hover) {
  .social-icons a:hover { 
    color: var(--accent); 
    transform: translateY(-3px); 
  }
}

/* Estilo del SVG */
.social-icons svg { 
  width: 28px; 
  height: 28px; 
  fill: currentColor; 
}

/* GRADIENTE HERO */
.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, rgba(13, 13, 13, 0), var(--bg));
  z-index: 1;
}

/* --- Estilos para Video Modal --- */
.media-container {
  position: relative;
  width: 100%;
  height: 450px; /* Ajustado para proporción ~16:9 */
  border-radius: 8px;
  background-color: #000;
  overflow: hidden;
}
.media-container > #imagen-principal,
.media-container > .video-container { /* Aplica a ambos contenedores de video */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%; /* Ocupa la altura del .media-container */
  border-radius: 8px;
}
.modal-card img#imagen-principal {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: #000;
}
#youtube-iframe,
#local-video {
  width: 100%;
  height: 100%; /* Ocupa la altura de su contenedor (.video-container) */
  border: 0;
  /* object-fit: cover; <- No aplica a iframe, object-fit: contain; es default para video */
}
.thumb-video {
  background-color: #333;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M8 5v14l11-7z"/></svg>');
  background-size: 40%;
  background-position: center;
  background-repeat: no-repeat;
}

/* ========================================================= */
/* Modal de Información Simple */
/* ========================================================= */
.info-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1600;
  padding: 1rem;
  backdrop-filter: blur(4px);
}
.info-modal[aria-hidden="false"] {
  display: flex;
}

/* --- TAMAÑOS ORIGINALES (PARA TODOS LOS INFO-MODAL) --- */
.info-modal-content {
  position: relative;
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  max-width: 600px; /* <-- TAMAÑO ORIGINAL */
  width: calc(100vw - 2rem);
  max-height: 90vh;
  box-shadow: var(--shadow-1);
}
.info-modal-content img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 75vh; /* <-- TAMAÑO ORIGINAL */
  object-fit: contain;
  border-radius: var(--radius);
}

/* --- TAMAÑOS GRANDES SOLO PARA .modal-grande (DESKTOP) --- */
.info-modal.modal-grande .info-modal-content {
  max-width: 900px; /* <-- TAMAÑO GRANDE */
}
.info-modal.modal-grande .info-modal-content img {
  max-height: 88vh; /* <-- TAMAÑO GRANDE */
}

/* (ACTUALIZADO) Botón cerrar del modal de info */
.info-modal-cerrar {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  color: var(--text);
  border: 0;
  font-size: 26px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s ease;
  z-index: 1610;
  width: auto;
  height: auto;
  border-radius: 0;
  box-shadow: none;
  font-weight: normal;
}
.info-modal-cerrar:hover {
  color: var(--accent);
  transform: none;
}

/* Botones Slider */
.info-modal-prev,
.info-modal-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: var(--text);
  border: none;
  font-size: 2rem;
  font-weight: bold;
  padding: 0.2rem 0.8rem;
  border-radius: 50%;
  cursor: pointer;
  z-index: 1605;
  display: none;
  line-height: 1;
  width: 40px;
  height: 40px;
  transition: background 0.2s ease;
}
.info-modal-prev:hover,
.info-modal-next:hover {
  background: rgba(0, 0, 0, 0.8);
}
.info-modal-prev {
  left: 10px;
}
.info-modal-next {
  right: 10px;
}
.info-modal.slider-active .info-modal-prev,
.info-modal.slider-active .info-modal-next {
  display: block;
}

/* ========================================================= */
/* RESPONSIVE */
/* ========================================================= */
@media (min-width: 901px) {
  .vehiculos-container {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 900px) {
 
}
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    background: #111;
    width: 70%;
    height: auto;
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    z-index: 1450;
    border-bottom-right-radius: var(--radius);
  }
  .nav-links.active {
    display: flex;
  }
  .nav-links a {
    padding: 0.6rem 0;
    border-radius: 6px;
  }
  .nav-links .hide-on-mobile {
    display: none;
  }
  .logo {
    order: 1;
  }
  .vehiculos-container {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
  .modal-card {
    grid-template-columns: 1fr;
    padding: 0.8rem;
  }

  .media-container {
    height: 225px; /* Ajustado para proporción ~16:9 */
  }
  #youtube-iframe,
  #local-video {
    height: 100%; /* Ocupa la altura del .media-container */
  }

  /* Ajusta tamaño thumbs en móvil */
  .carrousel .thumb {
    width: 60px;
    height: 45px;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    align-items: center;
  }
  .hero .hero-bg {
    background-size: 150% auto;
    background-repeat: no-repeat;
    animation: fadeInBackground 1.2s ease-out 0.1s forwards;
  }
  .hero .hero-inner {
    padding: 2rem 1rem;
  }
  .hero .hero-inner h1 {
    font-size: 1.1rem;
    margin: 20rem 0 0.5rem 0;
    font-family: "Gruppo";
  }
  h2 {
    font-size: 1.8rem;
  }
  .card-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    cursor: pointer;
    display: block;
  }

  /* Ajuste botón cerrar modal info en móvil */
  .info-modal-cerrar {
    top: 5px;
    right: 5px;
    font-size: 24px;
  }

  /* --- INICIO CORRECCIÓN MODAL INFO MÓVIL --- */
  
  /* ESTILOS GENERALES (MÁS PEQUEÑOS) PARA INFO-MODAL EN MÓVIL */
  .info-modal-content {
    max-width: calc(100vw - 4rem); /* Más margen */
    width: calc(100vw - 4rem); 
    max-height: 85vh; /* Altura normal */
  }
  .info-modal-content img {
    max-height: 70vh; /* Imagen un poco más baja */
    width: 100%; /* Asegura que no se desborde */
    height: auto; /* Mantiene proporción */
  }

  /* ESTILOS GRANDES (SOLO PARA .modal-grande EN MÓVIL, VAN DESPUÉS)*/
  .info-modal.modal-grande .info-modal-content {
    max-width: calc(100vw - 2rem); /* Menos margen (más ancho) */
    width: calc(100vw - 2rem); 
    max-height: 90vh; /* Más alto */
  }
  .info-modal.modal-grande .info-modal-content img {
    max-height: 85vh; /* Imagen más alta */
  }
  /* --- FIN CORRECCIÓN MODAL INFO MÓVIL --- */

  /* Ajuste botones slider en móvil */
  .info-modal-prev,
  .info-modal-next {
    font-size: 1.5rem;
    width: 35px;
    height: 35px;
    padding: 0.1rem 0.6rem;
  }
  .info-modal-prev {
    left: 5px;
  }
  .info-modal-next {
    right: 5px;
  }
}
@media (min-width: 769px) {
  .map-container iframe {
    max-width: 600px;
    margin: 0 auto;
    height: 350px;
    display: block;
  }
}

blockquote,
pre {
  max-width: 100%;
}