* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: white;
    color: #333;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, #0e1c5a 0%, #2d2f3b 100%);
    color: white;
    padding: 0 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    align-items: center;
    height: 64px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

@media(max-width: 768px) {
    .navbar {
        height: auto;
        min-height: 56px;
        padding: 8px 12px;
        gap: 8px;
    }
}

.navbar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    padding: 0 8px;
}

.navbar-logo img {
    height: 54px;
    width: auto;
    display: block;
    transition: opacity 0.2s;
}

.navbar-logo:hover img {
    opacity: 0.85;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s;
}

@media(max-width:768px) {
    .nav-toggle {
        display: flex;
        order: 1;
    }
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
    justify-content: flex-start;
    margin-right: auto;
    padding-left: 24px;
}

@media(max-width:768px) {
    .nav-links {
        order: 4;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height .35s ease;
        padding-left: 0;
        background: rgba(0, 0, 0, 0.15);
        margin-right: 0;
    }

    .nav-links.open {
        max-height: 400px;
    }

    .nav-links a {
        padding: 12px 20px;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        font-size: 15px;
    }
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: flex-end;
}

@media(max-width:768px) {
    .user-actions {
        order: 2;
        gap: 6px;
        margin-left: auto;
    }

    .navbar-logo {
        order: 0;
    }

    .btn {
        padding: 7px 12px !important;
        font-size: 12px !important;
    }

    .leng-selector {
        font-size: 12px;
    }

    .btn-nombre-usuario {
        font-size: 12px !important;
        padding: 5px 10px !important;
    }
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.8;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-login {
    background: white;
    color: #667eea;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

.btn-logout {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid white;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* hero section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
    url("/imagenes/herofoto.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat; 
    color: white;
    text-align: center;
    padding: 100px 20px;
}

@media(max-width:768px) {
    .hero {
        padding: 60px 16px;
    }

    .hero h2 {
        font-size: 28px;
    }

    .hero p {
        font-size: 16px;
    }

    .btn-hero {
        display: block;
        max-width: 260px;
        margin: 10px auto;
    }
}

.hero h2 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-hero {
    background: linear-gradient(135deg, #0e1c5a 0%, #2d2f3b 100%);
    color: white;
    padding: 15px 40px;
    font-size: 18px;
    border-radius: 50px;
    text-decoration: none;
    display: inline-block;
    margin: 10px;
    transition: transform 0.3s;
}

.btn-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

/* Stats Section */
.stats {
    background: white;
    padding: 60px 20px;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.stat-item {
    padding: 20px;
}

.stat-number {
    font-size: 48px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 16px;
    color: #666;
}

/* Vehiculos Section */
.section {
    padding: 60px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 36px;
    color: #333;
    margin-bottom: 10px;
}

.section-title p {
    color: #666;
    font-size: 18px;
}

.vehiculo-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.vehiculo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.vehiculo-img {
    height: 200px;
    background: linear-gradient(135deg, #0e1c5a 0%, #2d2f3b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
    overflow: hidden;
}

.vehiculo-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.vehiculo-card:hover .vehiculo-img img {
    transform: scale(1.05);
}

.vehiculo-info {
    padding: 20px;
}

.vehiculo-marca {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.vehiculo-modelo {
    font-size: 18px;
    color: #666;
    margin-bottom: 15px;
}

.vehiculo-detalles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.detalle-item {
    display: flex;
    flex-direction: column;
}

.detalle-label {
    font-size: 12px;
    color: #999;
}

.detalle-value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.vehiculo-precio {
    font-size: 28px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 15px;
}

.btn-ver-mas {
    background: linear-gradient(135deg, #0e1c5a 0%, #2d2f3b 100%);
    color: white;
    padding: 12px;
    border-radius: 5px;
    text-align: center;
    text-decoration: none;
    display: block;
    font-weight: 600;
    transition: opacity 0.3s;
}

.btn-ver-mas:hover {
    opacity: 0.9;
}

/* Panel de Usuario */
.panel-usuario {
    background: linear-gradient(135deg, #0e1c5a 0%, #2d2f3b 100%);
    color: white;
    padding: 40px 20px;
    margin: 40px 0;
    border-radius: 10px;
}

.panel-usuario h3 {
    font-size: 28px;
    margin-bottom: 20px;
    text-align: center;
}

.panel-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.panel-stat {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.panel-stat-number {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 10px;
}

.panel-stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 40px 20px;
    text-align: center;
}

.footer p {
    margin: 10px 0;
    color: #aaa;
}

/* ── Servicios ──────────────────────────────────────────── */
.servicios-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

@media(max-width:500px) {
    .vehiculo-detalles {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }
}

.servicios-grid .stat-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    border: 1px solid #e8eaf0;
    padding: 0;
    transition: transform 0.25s, box-shadow 0.25s;
}

.servicios-grid .stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.servicios-grid .stat-item .stat-number {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f0f2f5;
    margin: 0;
    font-size: unset;
    color: unset;
    display: flex;
    align-items: center;
    justify-content: center;
}

.servicios-grid .stat-item .stat-number img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.servicios-grid .stat-item:last-child .stat-number {
    background: white;
}

.servicios-grid .stat-item:last-child .stat-number img {
    object-fit: contain;
    padding: 20px;
}

.servicios-grid .stat-item:hover .stat-number img {
    transform: scale(1.05);
}

.servicios-grid .stat-item .stat-label {
    font-size: 16px;
    font-weight: 700;
    color: #0e1c5a;
    padding: 14px 16px 4px;
}

.servicios-grid .stat-item p {
    font-size: 13px;
    color: #777;
    padding: 0 16px 18px;
    line-height: 1.5;
}

@media (max-width: 900px) {
    .servicios-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .servicios-grid {
        grid-template-columns: 1fr;
    }
}

/* Nombre de usuario clicable en navbar */
.btn-nombre-usuario {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: background 0.2s, border-color 0.2s;
}

.btn-nombre-usuario:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.7);
}