/* ========================================
   Vanguard Garage — Estilos Corporativos
   Concesionario profesional, limpio, moderno
   ======================================== */

:root {
  --primary: #1a1a2e;
  --primary-dark: #0f0f1a;
  --accent: #c0392b;
  --accent-hover: #e74c3c;
  --gold: #d4a853;
  --white: #ffffff;
  --off-white: #f5f5f7;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-500: #6c757d;
  --gray-700: #343a40;
  --gray-900: #111111;
  --text: #222222;
  --text-light: #666666;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --transition: 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; }
body { 
  font-family: var(--font-body); 
  color: var(--text); 
  background: var(--off-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Top Bar */
.topbar {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.7);
  font-size: 0.8rem;
  padding: 0.5rem 0;
}
.topbar-container {
  max-width: 1300px; margin: 0 auto; padding: 0 2rem;
  display: flex; justify-content: space-between;
}

/* Navbar */
.navbar {
  background: var(--white);
  position: sticky; top: 0; z-index: 1000;
  border-bottom: 1px solid var(--gray-300);
  transition: box-shadow var(--transition);
}
.navbar.scrolled { box-shadow: var(--shadow); }
.nav-container {
  max-width: 1300px; margin: 0 auto; padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.logo-img { height: 40px; width: auto; border-radius: var(--radius); }
.logo-text { 
  font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700;
  color: var(--primary); letter-spacing: 0.5px;
}
.logo-text strong { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; }
.nav-links a { 
  color: var(--gray-700); text-decoration: none; font-size: 0.9rem;
  font-weight: 500; transition: color var(--transition);
}
.nav-links a:hover { color: var(--accent); }
.btn-nav { 
  background: var(--accent); color: var(--white) !important;
  padding: 0.6rem 1.5rem; border-radius: var(--radius);
}
.btn-nav:hover { background: var(--accent-hover); color: var(--white) !important; }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.hamburger span { width: 24px; height: 2px; background: var(--primary); }

/* Hero */
.hero {
  position: relative;
  min-height: 75vh;
  display: flex; align-items: center;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #1a1a2e 100%);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 5 L55 30 L30 55 L5 30Z' fill='none' stroke='rgba(255,255,255,0.03)' stroke-width='1'/%3E%3C/svg%3E");
  opacity: 0.5;
}
.hero-overlay { 
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(192,57,43,0.15) 0%, transparent 60%);
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 1300px; margin: 0 auto; padding: 4rem 2rem;
}
.hero-label {
  color: var(--accent); text-transform: uppercase;
  letter-spacing: 3px; font-size: 0.85rem; margin-bottom: 1rem;
  font-weight: 600;
}
.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800;
  color: var(--white); line-height: 1.2; margin-bottom: 1rem;
}
.hero h1 span { color: var(--accent); }
.hero-sub {
  color: rgba(255,255,255,0.7); font-size: 1.1rem;
  max-width: 550px; margin-bottom: 2rem; line-height: 1.7;
}
.hero-btns { display: flex; gap: 1rem; margin-bottom: 3rem; }
.btn {
  padding: 0.85rem 2rem; border-radius: var(--radius);
  font-weight: 600; font-size: 0.9rem; text-decoration: none;
  transition: all var(--transition); display: inline-block;
  cursor: pointer; border: 2px solid transparent;
  font-family: var(--font-body);
}
.btn-primary { background: var(--accent); color: var(--white); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-outline { 
  background: transparent; color: var(--white); 
  border-color: rgba(255,255,255,0.3);
}
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.05); }
.hero-stats { display: flex; gap: 2.5rem; }
.hero-stat { color: rgba(255,255,255,0.6); font-size: 0.85rem; }
.hero-stat strong { display: block; color: var(--white); font-size: 1.1rem; }

/* Section Headers */
.section-header { text-align: center; margin-bottom: 3rem; }
.section-label {
  color: var(--accent); text-transform: uppercase;
  letter-spacing: 3px; font-size: 0.8rem; font-weight: 600; margin-bottom: 0.5rem;
}
.section-header h2 {
  font-family: var(--font-heading); font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700; color: var(--primary); margin-bottom: 0.5rem;
}
.divider { width: 40px; height: 3px; background: var(--accent); margin: 0.75rem auto; }
.section-header p { color: var(--text-light); max-width: 500px; margin: 0 auto; }

/* Catálogo */
.catalogo { padding: 5rem 2rem; max-width: 1300px; margin: 0 auto; }
.filtros {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 0.5rem; margin-bottom: 2.5rem;
}
.filtro-btn {
  background: var(--white); border: 1px solid var(--gray-300);
  color: var(--text-light); padding: 0.5rem 1.2rem;
  border-radius: 50px; font-size: 0.8rem; font-weight: 500;
  cursor: pointer; transition: all var(--transition);
  font-family: var(--font-body);
}
.filtro-btn:hover, .filtro-btn.active {
  background: var(--primary); color: var(--white); border-color: var(--primary);
}
.coches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}
.coche-card {
  background: var(--white); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow);
  transition: all var(--transition); cursor: pointer;
}
.coche-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.coche-imagen {
  width: 100%; height: 220px; overflow: hidden; position: relative;
}
.coche-imagen img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.coche-card:hover .coche-imagen img { transform: scale(1.05); }
.coche-precio-badge {
  position: absolute; top: 1rem; right: 1rem;
  background: var(--accent); color: var(--white);
  padding: 0.4rem 1rem; border-radius: 50px;
  font-weight: 700; font-size: 1rem;
}
.coche-info { padding: 1.5rem; }
.coche-marca {
  font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--accent);
  font-weight: 600; margin-bottom: 0.25rem;
}
.coche-titulo {
  font-family: var(--font-heading); font-size: 1.15rem;
  font-weight: 700; color: var(--primary); margin-bottom: 0.75rem;
}
.coche-detalles {
  display: flex; gap: 1.5rem; margin-bottom: 1rem;
}
.coche-detalle {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.85rem; color: var(--text-light);
}
.coche-detalle strong { color: var(--text); }
.coche-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 1rem; border-top: 1px solid var(--gray-200);
}
.coche-precio {
  font-family: var(--font-heading); font-size: 1.3rem;
  font-weight: 700; color: var(--accent);
}

/* Servicios */
.servicios { padding: 5rem 2rem; background: var(--white); }
.servicios-grid {
  max-width: 1300px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}
.servicio-card {
  text-align: center; padding: 2.5rem 2rem;
  border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  transition: all var(--transition);
}
.servicio-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.servicio-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.servicio-card h3 {
  font-family: var(--font-heading); font-size: 1.1rem;
  color: var(--primary); margin-bottom: 0.5rem;
}
.servicio-card p { color: var(--text-light); font-size: 0.9rem; }

/* Sobre */
.sobre { padding: 5rem 2rem; background: var(--gray-100); }
.sobre-container {
  max-width: 1300px; margin: 0 auto;
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 4rem;
  align-items: center;
}
.sobre-text h2 {
  font-family: var(--font-heading); font-size: 2rem;
  color: var(--primary); margin-bottom: 0.5rem;
}
.sobre-text .divider { margin: 1rem 0 1.5rem; }
.sobre-text p { color: var(--text-light); margin-bottom: 1rem; line-height: 1.7; }
.sobre-text .btn { margin-top: 1rem; }
.sobre-imagen { display: flex; justify-content: center; }
.sobre-imagen img { 
  max-width: 250px; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* Contacto */
.contacto { padding: 5rem 2rem; }
.contacto-grid {
  max-width: 900px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}
.contacto-card {
  background: var(--white); text-align: center;
  padding: 2.5rem 2rem; border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  transition: all var(--transition);
}
.contacto-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.contacto-icon { font-size: 2rem; margin-bottom: 1rem; }
.contacto-card h3 {
  font-family: var(--font-heading); font-size: 1.1rem;
  color: var(--primary); margin-bottom: 0.5rem;
}
.contacto-card p { color: var(--text-light); font-size: 0.9rem; margin-bottom: 0.5rem; }
.contacto-card .btn-outline { 
  color: var(--accent); border-color: var(--accent); 
  padding: 0.5rem 1.5rem; font-size: 0.85rem; margin-top: 0.5rem;
}
.contacto-card .btn-outline:hover { background: var(--accent); color: var(--white); }

/* Footer */
.footer {
  background: var(--primary-dark); color: rgba(255,255,255,0.7);
  padding: 4rem 2rem 2rem;
}
.footer-container {
  max-width: 1300px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem;
}
.footer-brand h3 { 
  font-family: var(--font-heading); color: var(--white);
  font-size: 1.2rem; margin-bottom: 0.5rem;
}
.footer-brand p { font-size: 0.9rem; max-width: 300px; }
.footer-links h4 { color: var(--white); margin-bottom: 1rem; font-size: 0.95rem; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; font-size: 0.9rem; }
.footer-links a { color: rgba(255,255,255,0.6); text-decoration: none; transition: color var(--transition); }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  max-width: 1300px; margin: 2rem auto 0; padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1); text-align: center;
  font-size: 0.85rem;
}

/* Modal */
.modal {
  position: fixed; inset: 0; z-index: 2000;
  display: none; align-items: center; justify-content: center;
}
.modal.active { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(5px); }
.modal-content {
  position: relative; background: var(--white); border-radius: var(--radius-lg);
  max-width: 800px; width: 95%; max-height: 90vh; overflow-y: auto; z-index: 1;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: rgba(0,0,0,0.5); color: var(--white);
  border: none; width: 36px; height: 36px; border-radius: 50%;
  font-size: 1.5rem; cursor: pointer; z-index: 2;
  display: flex; align-items: center; justify-content: center;
}
.modal-gallery {
  display: flex; overflow-x: auto; gap: 0.5rem;
  padding: 0.5rem; background: #000;
}
.modal-gallery img {
  height: 300px; flex-shrink: 0; border-radius: var(--radius);
}
.modal-info { padding: 2rem; }
.modal-info h2 { font-family: var(--font-heading); font-size: 1.6rem; color: var(--primary); }
.modal-info .precio { font-size: 1.8rem; color: var(--accent); font-weight: 700; margin: 0.5rem 0; }
.modal-info .desc { color: var(--text-light); line-height: 1.7; margin: 1rem 0; white-space: pre-line; }
.modal-specs {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem; margin: 1.5rem 0;
  background: var(--gray-100); padding: 1.5rem; border-radius: var(--radius-lg);
}
.modal-spec { text-align: center; }
.modal-spec .label { font-size: 0.75rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 1px; }
.modal-spec .value { font-size: 1.1rem; font-weight: 600; color: var(--primary); }

/* Responsive */
@media (max-width: 968px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-links.active {
    display: flex; position: fixed; inset: 0; background: var(--white);
    flex-direction: column; justify-content: center; align-items: center;
    gap: 2rem; z-index: 999;
    font-size: 1.2rem;
  }
  .sobre-container { grid-template-columns: 1fr; }
  .sobre-imagen { order: -1; }
  .footer-container { grid-template-columns: 1fr; gap: 2rem; }
  .hero-stats { flex-wrap: wrap; gap: 1.5rem; }
  .coches-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hero h1 { font-size: 1.8rem; }
  .hero-btns { flex-direction: column; }
  .hero-stats { flex-direction: column; gap: 0.75rem; }
  .modal-gallery img { height: 200px; }
  .filtros { gap: 0.3rem; }
  .filtro-btn { padding: 0.4rem 0.8rem; font-size: 0.7rem; }
}
