/* Reset */
body, ul, li, h1, h2, h3, p, a {
    margin: 0;
    padding: 0;
    list-style: none;
    text-decoration: none;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #15233a;
    
    line-height: 1.6;
}

/* Header inicial */
header {
    background-color: transparent;
    padding: 10px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background 0.3s, box-shadow 0.3s;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/* Header con scroll */
header.scrolled {
    background-color: #2f2f2f;
    box-shadow: 0 3px 8px rgba(0,0,0,0.4);
}

/* Logo */
.logo h1 {
    color: #fff;
    font-size: 22px;
}

.logo span {
    color: #a93226;
}

/* Menú */
.menu {
    display: flex;
    gap: 15px;
}

.menu li {
    position: relative;
}

.menu a {
    color: #fff;
    font-weight: bold;
    padding: 8px 12px;
    transition: all 0.3s;
    display: block;
}

.menu a:hover {
    background: #1f3555;
    border-radius: 5px;
}

/* Submenú */
.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #1f3555;
    border-radius: 5px;
    min-width: 160px;
    z-index: 1001;
}

.submenu li a {
    padding: 10px 15px;
    white-space: nowrap;
}

.submenu li a:hover {
    background: #29466e;
}

.menu li:hover .submenu {
    display: block;
}

/* Botones */
.user-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn {
    background: #a93226;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: bold;
    transition: 0.3s;
    display: inline-block;
}

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

/* Icono responsive */
.menu-icon {
    font-size: 26px;
    color: #fff;
    cursor: pointer;
    display: none;
}

/* Sección Flota de autos */
#flota {
    padding: 60px 20px;
    text-align: center;
}

#flota h2 {
    font-size: 32px;
    margin-bottom: 40px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.vehiculos-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.vehiculo-card {
    position: relative;
    background: #111;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.7);
    transition: transform 0.3s, box-shadow 0.3s;
}

.vehiculo-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.8);
}

.vehiculo-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s;
}

.vehiculo-card:hover img {
    transform: scale(1.05);
}

/* Franja oscura inferior */
.vehiculo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 95%;
    padding: 15px;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Texto vehículo */
.vehiculo-info {
    color: #fff;
    text-align: left;
    flex: 1;
}

.vehiculo-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.vehiculo-info p {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    color: #a93226;
}

/* Botón reservar */
.btn-reservar {
    background: #0d6efd;
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s, transform 0.2s;
    white-space: nowrap;
}

.btn-reservar:hover {
    background: #0b5ed7;
    transform: scale(1.05);
}

.ver-flota {
    margin-top: 40px;
}

.btn-ver {
    background: transparent;
    color: #a93226;
    border: 2px solid #a93226;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    display: inline-block;
}

.btn-ver:hover {
    background: #a93226;
    color: #15233a;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(244, 180, 0, 0.3);
}

/* Pie de Página */
footer {
    background: #0f1c2d;
    padding: 30px 20px;
    text-align: center;
    margin-top: 60px;
}

footer p {
    margin: 10px 0;
    color: #aaa;
}

/* Responsive */
@media (max-width: 992px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .menu {
        flex-direction: column;
        width: 100%;
        display: none;
        margin: 10px 0;
    }
    
    .menu-icon {
        display: block;
        position: absolute;
        right: 20px;
        top: 15px;
    }
    
    .user-actions {
        width: 100%;
        justify-content: center;
        margin-top: 15px;
        display: none;
    }
    
    .menu.active, .user-actions.active {
        display: flex;
    }
    
    .submenu {
        position: static;
        margin-left: 20px;
    }
}

@media (max-width: 768px) {
    .vehiculo-overlay {
        flex-direction: column;
        text-align: center;
        padding: 10px;
    }
    
    .vehiculo-info {
        text-align: center;
        margin-bottom: 10px;
    }
    
    #flota {
        padding: 40px 15px;
    }
    
    #flota h2 {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 20px;
    }
    
    .btn {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .vehiculos-container {
        grid-template-columns: 1fr;
    }
}
/* Estilos para el mensaje de usuario logueado */
.user-actions span {
    margin-right: 15px;
    font-weight: bold;
}

/* Estilos responsive para el menú */
@media (max-width: 992px){

.user-actions{
    width:100%;
    justify-content:center;
    margin-top:15px;
    display:none;              /* <— QUITA esto */
    gap:10px;
    position:relative;
    z-index:2;
    flex-direction: column;
 }
  .user-actions{
    width:100%;
    justify-content:center;
    margin-top:15px;
    display:flex;              /* <— PON esto */
    gap:10px;
    position:relative;
    z-index:2;
    flex-direction: column;
 }
}


/* Mejoras para el submenú */
.menu li {
    position: relative;
}

.submenu {
    display: none;
    position: absolute;
    background: #1f3555;
    min-width: 160px;
    z-index: 1000;
}

.menu li:hover .submenu {
    display: block;
}

.submenu li {
    width: 100%;
}

.submenu a {
    padding: 12px 15px;
    display: block;
    white-space: nowrap;
}

.submenu a:hover {
    background: #29466e;
}
.estado-chip{
  position:absolute;
  left:12px;
  bottom:12px;
  padding:6px 10px;
  border-radius:10px;
  font-size:.85rem;
  font-weight:600;
  background:rgba(0,0,0,.65);
  color:#fff;
  backdrop-filter: blur(2px);
}
.estado-chip.rentado{ background:#b22222cc; }
.estado-chip.mantenimiento{ background:#b87333cc; }

.btn-reservar.disabled{
  pointer-events:none;
  opacity:.6;
  background:#3a3a3a !important;
  color:#ddd !important;
}
