/* =========================================
1. ESTILOS COMPARTIDOS (Todas las páginas)
   ========================================= */

   /* Configuración de desplazamiento para evitar que el menú tape los títulos */
html {
    scroll-padding-top: 100px; /* Deja un margen para el menú fijo */
    scroll-behavior: smooth; /* Hace que el deslizamiento sea suave y elegante */
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #0a0a0a;
    color: #d1d1d1;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

/* Encabezado */
header {
    background-color: rgba(0, 0, 0, 0.95);
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #cfa861;
    position: sticky;
    top: 0;
    z-index: 1000;
}
header h1 {
    font-size: 1.8rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #cfa861;
}
nav a {
    color: #ffffff;
    text-decoration: none;
    margin-left: 30px;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.3s;
}
nav a:hover {
    color: #cfa861;
}

/* Pie de página */
footer {
    background-color: #050505;
    color: #777;
    text-align: center;
    padding: 3rem 0;
    border-top: 2px solid #cfa861;
    font-size: 0.9rem;
}


/* =========================================
2. ESTILOS PARA INDEX.HTML (Página Principal)
   ========================================= */
.hero {
    background-size: cover;
    background-position: center;
    height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 2rem;
    border-bottom: 1px solid #222;
}
.hero h2 { font-size: 4rem; margin-bottom: 15px; letter-spacing: 2px; }
.hero p { font-size: 1.2rem; margin-bottom: 40px; max-width: 600px; font-weight: 300; }

.btn-principal {
    background-color: #cfa861;
    color: #000;
    padding: 15px 40px;
    text-decoration: none;
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.4s ease;
}
.btn-principal:hover { background-color: #b58d4a; }

.flota-container { max-width: 1200px; margin: 5rem auto; padding: 0 2rem; text-align: center; }
.flota-container h3 { font-size: 2.5rem; margin-bottom: 3rem; letter-spacing: 3px; color: #cfa861; }
.grid-autos { display: flex; gap: 40px; justify-content: center; flex-wrap: wrap; }

.caja-auto {
    width: 340px;
    background-color: #111;
    border: 1px solid #222;
    overflow: hidden;
    text-align: left;
    transition: transform 0.4s ease, border-color 0.4s ease;
    display: flex;
    flex-direction: column;
    
    /* Reglas para evitar el pixelado al pasar el mouse */
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform;
}
.caja-auto:hover { transform: translateY(-10px); border-color: #cfa861; }
.foto-auto {
    width: 100%;
    height: 220px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat; /* Obliga a la imagen a no multiplicarse */
    background-color: #111; /* Oculta fondos blancos si la imagen tiene transparencia */
    border-bottom: 1px solid #cfa861;
}
.contenido-caja { padding: 2rem; display: flex; flex-direction: column; flex-grow: 1; }
.contenido-caja h4 { font-size: 1.6rem; margin-bottom: 10px; color: #cfa861; }
.contenido-caja p { font-size: 0.9rem; line-height: 1.6; margin-bottom: 20px; }

.botones-tarjeta { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.btn-detalles { display: block; background-color: transparent; color: #cfa861; text-decoration: none; padding: 10px 15px; font-size: 0.85rem; text-align: center; text-transform: uppercase; letter-spacing: 1px; border: 1px solid #cfa861; transition: all 0.3s; }
.btn-detalles:hover { background-color: #cfa861; color: #000; }
.btn-cotizar { display: block; background-color: #1a1a1a; color: #ffffff; text-decoration: none; padding: 10px 15px; font-size: 0.85rem; text-align: center; text-transform: uppercase; letter-spacing: 1px; border: 1px solid #333; transition: background 0.3s, color 0.3s; }
.btn-cotizar:hover { background-color: #25D366; border-color: #25D366; color: #000; }


/* =========================================
3. ESTILOS PARA PÁGINAS INTERNAS (Los Autos)
   ========================================= */
.car-hero {
    background-size: cover;
    background-position: center;
    height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 4rem 10%;
}
.car-hero h2 { font-size: 4rem; color: #cfa861; margin-bottom: 10px; }
.car-hero p { font-size: 1.2rem; max-width: 600px; }

.detalle-container { max-width: 1200px; margin: 4rem auto; padding: 0 2rem; }
.info-grid { display: flex; flex-wrap: wrap; gap: 40px; margin-bottom: 4rem; }

.descripcion { flex: 2; min-width: 300px; }
.descripcion h3 { font-size: 2rem; margin-bottom: 1.5rem; color: #fff; border-bottom: 1px solid #333; padding-bottom: 10px; }
.descripcion p { line-height: 1.8; font-size: 1.1rem; color: #bbb; }

.especificaciones { flex: 1; min-width: 300px; background-color: #111; padding: 2rem; border: 1px solid #222; }
.especificaciones h3 { font-size: 1.5rem; margin-bottom: 1.5rem; color: #cfa861; }
.especificaciones ul { list-style: none; padding: 0; margin: 0; }
.especificaciones li { padding: 12px 0; border-bottom: 1px solid #222; display: flex; justify-content: space-between; }
.especificaciones li span { font-weight: bold; color: #fff; }

.galeria-titulo { font-size: 2rem; margin-bottom: 2rem; text-align: center; }
.galeria-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-bottom: 4rem; }
.foto-galeria { 
    width: 100%; 
    height: 250px; 
    background-color: #111; 
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat; /* Evita que fotos pequeñas se dupliquen */
    border-radius: 4px; 
    transition: transform 0.3s; 
    
    /* Reglas anti-pixelado */
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform;
}

.foto-galeria:hover { 
    /* Mantenemos el translateZ junto al scale para que no pierda la nitidez al moverse */
    transform: scale(1.02) translateZ(0); 
}

.cta-reserva { text-align: center; padding: 4rem 2rem; background-color: #111; border: 1px solid #222; margin-bottom: 4rem; }
.cta-reserva h3 { font-size: 2.5rem; margin-bottom: 1rem; }
.btn-whatsapp-gigante { display: inline-block; margin-top: 20px; background-color: #25D366; color: #fff; text-decoration: none; padding: 15px 40px; font-size: 1.2rem; font-weight: bold; border-radius: 5px; text-transform: uppercase; letter-spacing: 2px; transition: background 0.3s; }
.btn-whatsapp-gigante:hover { background-color: #1ebe57; }


/* =========================================
4. DISEÑO RESPONSIVO (Para Celulares)
   ========================================= */
@media (max-width: 768px) {
    header { flex-direction: column; padding: 1rem; }
    header h1 { margin-bottom: 15px; font-size: 1.5rem; }
    nav { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }
    nav a { margin-left: 0; font-size: 0.85rem; }
    
    .hero h2, .car-hero h2 { font-size: 2.8rem; }
    .flota-container h3, .descripcion h3 { font-size: 2rem; }
    .caja-auto { width: 100%; max-width: 350px; }
    
    /* Ajustes específicos para las páginas internas en celular */
    .detalle-container { 
        padding: 0 1rem; /* Reduce el margen lateral en móviles */
    }
    .car-hero {
        padding: 3rem 1rem; /* Reduce el margen de la foto del auto */
    }
    .info-grid { 
        gap: 20px; /* Reduce el espacio entre textos */
    }
    .descripcion, .especificaciones { 
        min-width: 100%; /* Obliga a que los textos bajen ordenadamente */
    }
}


/* =========================================
   5. LOGOTIPO Y SECCIÓN DE SERVICIOS
   ========================================= */

/* Ajuste del contenedor del Logo y Nombre */
.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}
.logo-img {
    height: 55px; /* Puedes ajustar este tamaño según tu imagen */
    width: auto;
}

/* Sección de Servicios */
.servicios-container {
    max-width: 1200px;
    margin: 5rem auto;
    padding: 0 2rem;
}
.servicios-container h3 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    letter-spacing: 3px;
    color: #cfa861;
    text-align: center;
}
.grid-servicios {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}
.caja-servicio {
    background-color: #111;
    border: 1px solid #222;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s ease, border-color 0.4s ease;
}
.caja-servicio:hover {
    transform: translateY(-5px);
    border-color: #cfa861;
}
.caja-servicio h4 {
    font-size: 1.3rem;
    color: #cfa861;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    letter-spacing: 1px;
}
.caja-servicio ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    flex-grow: 1;
}
.caja-servicio li {
    font-size: 0.9rem;
    color: #bbb;
    margin-bottom: 10px;
    padding-left: 15px;
    position: relative;
    line-height: 1.5;
}
.caja-servicio li::before {
    content: "•";
    color: #cfa861;
    position: absolute;
    left: 0;
    font-weight: bold;
}
.caja-servicio .ideal-para {
    font-size: 0.9rem;
    color: #fff;
    margin-bottom: 20px;
    font-style: italic;
}
.caja-servicio .excepciones {
    font-size: 0.85rem;
    color: #ff6b6b; /* Un tono rojo sutil para los "No incluye" */
    margin-bottom: 15px;
}

footer a {
    color: #cfa861;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}
footer a:hover {
    color: #ffffff;
}

/* =========================================
6. VISOR DE GALERÍA (LIGHTBOX)
   ========================================= */
.foto-galeria {
    cursor: pointer; /* Muestra la manito para indicar que se puede hacer clic */
}

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.92);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.lightbox.activo {
    display: flex;
}

.lightbox-img {
    max-width: 90%;
    max-height: 85vh;
    border: 2px solid #cfa861;
    border-radius: 4px;
    object-fit: contain;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
}

.lightbox-cerrar {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #cfa861;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.lightbox-cerrar:hover {
    color: #ffffff;
}

/* Flechas de navegación del Lightbox */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.65);
    color: #cfa861;
    border: 1px solid #cfa861;
    font-size: 2rem;
    padding: 10px 18px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s, color 0.3s;
    z-index: 2001;
}

.lightbox-nav:hover {
    background-color: #cfa861;
    color: #000000;
}

.lightbox-prev { left: 25px; }
.lightbox-next { right: 25px; }

@media (max-width: 768px) {
    .lightbox-nav {
        font-size: 1.4rem;
        padding: 8px 13px;
    }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
}