/* =========================================
   1. VARIABLES & CONFIGURACIÓN BASE
   ========================================= */
:root {
    --primary: #4b5320;
    --accent: #ffba00;
    --dark: #1a1a1a;
    --light: #f4f4f4;
    --red: #e74c3c;
    --text: #333;
    --nav-height: 70px;
    --card-width: 320px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background: var(--light);
    color: var(--text);
    padding-top: var(--nav-height);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =========================================
   2. NAVBAR
   ========================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    background: var(--dark);
    position: fixed;
    width: 100%;
    height: var(--nav-height);
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.logo {
    color: rgb(221, 207, 4);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
}

.logo span {
    color: rgb(0, 68, 128);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent);
}

.btn-nav {
    background: var(--accent);
    color: var(--dark) !important;
    padding: 8px 18px;
    border-radius: 50px;
    transition: transform 0.3s !important;
}

.btn-nav:hover {
    transform: scale(1.05);
}

.menu-toggle {
    display: none;
    color: var(--accent);
    font-size: 1.8rem;
    cursor: pointer;
}

/* =========================================
   3. HERO SECTION (Separación Estricta)
   ========================================= */
.hero {
    /* Fondo limpio que ocupa el ancho disponible */
    background-color: #e0e0e0;
    /* Color de relleno por si sobra espacio */
    background-image: url('assets/img/FondoDef.jpg');

    /* CLAVE 1: La imagen ocupa el 100% del ancho y su altura es automática */
    background-size: 100% auto;
    background-position: top center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    /* Scroll normal para evitar cortes */

    /* CLAVE 2: Estructura Flex vertical */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* Alinea todo al inicio */

    width: 100%;
    position: relative;

    /* CLAVE 3: El Padding empuja el contenido hacia abajo */
    /* 56.25vw es la proporción de una imagen 16:9 estándar. */
    /* Usamos 60vw para dejar un pequeño margen extra visual. */
    padding-top: 60vw;
    padding-bottom: 50px;
    padding-left: 20px;
    padding-right: 20px;
}

/* Título (Oculto para limpieza visual, o ajustado) */
.hero h1 {
    display: none;
}

/* =========================================
   4. FORMULARIO DE RESERVA
   ========================================= */
.booking-form {
    background: #ffffff;
    padding: 30px;
    border-radius: 15px;

    display: flex;
    gap: 15px;
    align-items: flex-end;

    /* Sombra fuerte para destacar sobre el fondo gris/blanco */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border-bottom: 6px solid var(--accent);
    border: 1px solid #ddd;
    /* Borde sutil */

    flex-wrap: wrap;
    width: 100%;
    max-width: 900px;

    /* Aseguramos que no se superponga */
    margin-top: 20px;
    z-index: 10;
}

.input-group {
    flex: 1;
    min-width: 150px;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95rem;
    outline: none;
    background: #f9f9f9;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 30px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 6px;
    transition: 0.3s;
    height: 48px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    background: #353b17;
    transform: translateY(-2px);
}

/* =========================================
   5. COMPONENTES EXTRA (Categorías, Footer, etc)
   ========================================= */
.category-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 30px;
    margin-bottom: 40px;
    padding: 0 15px;
    position: relative;
    z-index: 10;
}

.category-bar {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    padding: 10px 15px;
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid #e0e0e0;
    gap: 10px;
    overflow-x: auto;
    max-width: 100%;
    scrollbar-width: none;
    white-space: nowrap;
}

.category-bar::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    border: 1px solid #ddd;
    background: #f9f9f9;
    padding: 12px 25px;
    border-radius: 40px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.filter-btn i {
    font-size: 1.1rem;
    color: var(--accent);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(75, 83, 32, 0.4);
}

.filter-btn.active i {
    color: white;
}

.section {
    padding: 80px 5%;
}

.section-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin-bottom: 40px;
    text-transform: uppercase;
    color: var(--dark);
}

.fleet-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 30px;
    padding: 20px 10px 40px 10px;
    -webkit-overflow-scrolling: touch;
}

.fleet-grid::-webkit-scrollbar {
    height: 8px;
}

.fleet-grid::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.car-card {
    flex: 0 0 var(--card-width);
    scroll-snap-align: center;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.car-image {
    height: 200px;
    overflow: hidden;
}

.car-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.car-details {
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.price {
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 900;
    margin: 10px 0;
}

.features {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 0.8rem;
    color: #666;
    margin: 15px 0;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.btn-secondary {
    display: block;
    background: var(--dark);
    color: white;
    padding: 12px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
}

.location-section {
    background: #f0f2f5;
}

.location-container {
    display: flex;
    flex-wrap: wrap;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.location-info {
    flex: 1;
    min-width: 300px;
    padding: 50px;
}

.map-wrapper {
    flex: 1;
    min-width: 300px;
    min-height: 400px;
}

footer {
    background: var(--dark);
    color: #888;
    text-align: center;
    padding: 50px 20px;
    border-top: 5px solid var(--accent);
}

.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: #25D366;
    color: white;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    z-index: 1000;
    text-decoration: none;
}

/* =========================================
   6. RESPONSIVE MÓVIL
   ========================================= */
@media (max-width: 768px) {
    :root {
        --nav-height: 60px;
        --card-width: 280px;
    }

    .hero {
        /* En móvil, mantenemos la lógica pero aumentamos el espacio si es necesario */
        padding-top: 60vw;
        /* 60% del ancho de la pantalla como espacio libre arriba */
    }

    .booking-form {
        flex-direction: column;
        /* Inputs verticales */
        padding: 20px;
        margin-top: 30px;
        /* Más separación entre foto y form */
        width: 95%;
    }

    .input-group {
        width: 100%;
        margin-bottom: 5px;
    }

    .btn-primary {
        width: 100%;
        margin-top: 15px;
    }

    /* Menú Móvil */
    .navbar {
        padding: 0 20px;
    }

    .nav-links {
        position: absolute;
        top: var(--nav-height);
        right: 0;
        width: 100%;
        background: rgba(26, 26, 26, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 40px 0;
        transform: translateY(-150%);
        opacity: 0;
        transition: 0.4s ease;
        pointer-events: none;
        z-index: 999;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .menu-toggle {
        display: block;
    }

    .category-wrapper {
        justify-content: flex-start;
        padding: 0 5%;
    }

    .location-info {
        padding: 30px 20px;
    }
}

/* =========================================
   7. AJUSTE PC PANTALLAS GRANDES
   ========================================= */
@media (min-width: 1024px) {
    .hero {
        /* En PC, para que no sea GIGANTE el padding, lo limitamos */
        padding-top: 45vh;
        /* Ocupa un poco menos de la mitad de la pantalla */
        /* O podemos usar pixeles fijos si la imagen tiene altura fija */
        /* padding-top: 500px; */
    }

    .booking-form {
        /* En PC el form puede ser horizontal */
        flex-direction: row;
        align-items: flex-end;
    }
}
/* =========================================
   MEJORA DE BOTONES WAZE Y MAPS
   ========================================= */

/* Contenedor de los botones */
.app-buttons {
    display: flex;
    gap: 15px;
    /* Espacio entre botones */
    margin-top: 25px;
    flex-wrap: wrap;
    /* Para que bajen de línea en pantallas muy pequeñas */
}

/* Estilo Base del Botón */
.btn-app {
    flex: 1;
    /* Ambos botones ocupan el mismo ancho */
    min-width: 140px;
    /* Ancho mínimo para que no se aplasten */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 8px;
    /* Bordes ligeramente redondeados modernos */
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    /* Sombra sutil */
    border: none;
}

.btn-app i {
    margin-right: 10px;
    font-size: 1.2rem;
}

/* Efecto Hover (al pasar el mouse) */
.btn-app:hover {
    transform: translateY(-4px);
    /* Se eleva */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    /* Sombra más fuerte */
}

/* Color Específico Waze */
.btn-app.waze {
    background: #33ccff;
    /* Cian oficial de Waze */
    background: linear-gradient(135deg, #33ccff 0%, #00aadd 100%);
}

/* Color Específico Google Maps */
.btn-app.gmaps {
    background: #4285F4;
    /* Azul Google */
    background: linear-gradient(135deg, #4285F4 0%, #2b62c4 100%);
}

/* Ajuste del Iframe del Mapa para que llene el contenedor */
.map-wrapper iframe {
    width: 100%;
    height: 100%;
    border-radius: 0 20px 20px 0;
    /* Redondea solo el lado derecho */
    display: block;
}

/* =========================================
   AJUSTE RESPONSIVE SOLO PARA ESTA SECCIÓN
   ========================================= */
@media (max-width: 768px) {
    .location-container {
        flex-direction: column;
        /* Mapa abajo del texto en móvil */
    }

    .map-wrapper {
        min-height: 250px;
        /* Altura del mapa en celular */
    }

    .map-wrapper iframe {
        border-radius: 0 0 20px 20px;
        /* En móvil redondeamos abajo */
    }

    .app-buttons {
        flex-direction: column;
        /* Botones uno encima del otro en móvil */
    }

    .btn-app {
        width: 100%;
        /* Botón ancho completo */
    }
}