/* 1. RESET Y BASES */
*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --dark: #0f172a;
    --light: #f1f5f9;
    --border: #e2e8f0;
    --success: #10b981;
    --danger: #ef4444;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0; background: var(--light); color: var(--dark);
    overflow-x: hidden;
}

.container { max-width: 600px; margin: 0 auto; padding: 15px; width: 100%;}

/* 2. HEADER */ 
.header {
    width: 100%;
    background: white;
    padding: 15px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.logo1-img {
    /* El !important asegura que ninguna otra regla interfiera */
    width: 90% !important;
    max-width: 570px !important;
    height: auto !important;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(0, 212, 255, 0.4));
}

@media (min-width: 600px) {
    .logo1-img {
        /* En PC limitamos la altura para que no ocupe toda la pantalla */
        max-height: 90px !important;
        width: auto !important;
    }
}
 .logo-img { height: 60px; width: auto; }
/* 3. BUSCADOR Y SUGERENCIAS (RESTAURADO) */
.search-box { display: flex; gap: 8px; margin-bottom: 15px; position: relative; }
.search-box input {
    flex: 1; padding: 14px; border-radius: 12px;
    border: 1px solid var(--border); font-size: 16px; outline: none;
}
.search-box button {
    padding: 0 20px; background: var(--primary); color: white;
    border: none; border-radius: 12px; cursor: pointer;
}

#sugerencias {
    position: absolute; top: 100%; left: 0; right: 0;
    background: white; z-index: 2000; border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 15px rgba(0,0,0,0.1); border: 1px solid var(--border);
    border-top: none; max-height: 250px; overflow-y: auto;
    display: none; /* Controlado por JS */
}
.sugerencia-item {
    padding: 12px 15px; cursor: pointer; border-bottom: 1px solid #f1f5f9;
    font-size: 14px; transition: background 0.2s;
}
.sugerencia-item:hover { background: #f8fafc; color: var(--primary); }

/* 4. MAPA Y GPS */
#map {
    height: 350px; width: 100%; border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); z-index: 1;
}
.btn-gps {
    width: 100%; margin-top: 15px; padding: 15px;
    background: white; border: 2px solid var(--primary);
    color: var(--primary); border-radius: 12px; font-weight: bold; cursor: pointer;
}

/* 5. PANEL DE INFORMACIÓN (RESTAURADO) */
.info-panel {
    background: white; padding: 20px; border-radius: 20px;
    margin-top: 20px; box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    display: none; /* Controlado por JS */
}
.drag-handle {
    width: 40px; height: 5px; background: #cbd5e1;
    margin: -10px auto 15px; border-radius: 10px;
}

/* Selectores de combustible */
.combustible-selector { display: flex; gap: 8px; margin: 15px 0; }
.btn-tipo {
    flex: 1; padding: 12px; border: 1px solid var(--border);
    border-radius: 10px; background: #f8fafc; cursor: pointer;
    font-weight: 600; color: #64748b;
}
.btn-tipo.active { background: var(--dark); color: white; border-color: var(--dark); }

/* Estadísticas */
.resumen-comunidad {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 10px; background: #f1f5f9; padding: 15px;
    border-radius: 12px; text-align: center; margin-bottom: 15px;
}
.stat-item span { display: block; font-size: 10px; color: #64748b; font-weight: bold; }
.stat-item strong { font-size: 18px; color: var(--primary); }

/* Botón Cómo Llegar */
.btn-como-llegar {
    display: block; width: 100%; padding: 16px; background: var(--primary);
    color: white; text-align: center; text-decoration: none;
    border-radius: 12px; font-weight: bold; margin-bottom: 15px;
    box-sizing: border-box;
}

/* Botones de Estado */
.status-buttons { display: flex; gap: 10px; margin-bottom: 20px; }
.btn-status { flex: 1; padding: 12px; border: none; border-radius: 10px; color: white; font-weight: bold; cursor: pointer; }
.btn-open { background: var(--success); }
.btn-closed { background: var(--danger); }

/* 6. FORMULARIO Y REPORTE */
.grid-form {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
    border-top: 1px dashed var(--border); padding-top: 15px;
}
.form-group label { display: block; font-size: 12px; color: #64748b; margin-bottom: 4px; }
.form-group select, .form-group input { 
    width: 100%; padding: 10px; border-radius: 8px; 
    border: 1px solid var(--border); background: white;
    box-sizing: border-box; font-size: 16px;
}
.btn-reportar {
    grid-column: span 2; padding: 16px; background: var(--dark);
    color: white; border: none; border-radius: 12px; font-weight: bold;
    cursor: pointer; margin-top: 10px; width: 100%;
}

/* 7. BANNER DE INSTALACIÓN PREMIUM */
.banner-premium {
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(135deg, #1a2a6c 0%, #2a48ad 100%);
    padding: 12px 18px; border-radius: 16px; margin-bottom: 15px;
    color: white; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}
.banner-info { display: flex; align-items: center; gap: 12px; }
.banner-icon { font-size: 24px; background: rgba(255,255,255,0.15); width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; border-radius: 12px; }
.banner-text { display: flex; flex-direction: column; }
.banner-text strong { font-size: 16px; font-weight: 700; }
.banner-text span { font-size: 12px; opacity: 0.85; }
.btn-instalar-banner {
    background-color: #ffffff; color: #1a2a6c; border: none;
    padding: 8px 18px; border-radius: 10px; font-weight: 700; cursor: pointer;
}

/* 8. FOOTER Y RESPONSIVIDAD */
.main-footer { text-align: center; padding: 40px 20px; color: #64748b; }
.footer-links { margin: 15px 0; display: flex; justify-content: center; gap: 15px; }
.footer-links a { color: #64748b; text-decoration: none; font-size: 14px; }

@media (max-width: 480px) {
    .grid-form { grid-template-columns: 1fr; }
    .btn-reportar { grid-column: span 1; }
    .banner-premium { flex-direction: row; } /* Mantenemos horizontal si cabe */
}
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid var(--border);
}

.status-badge.abierta {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.status-badge.cerrada {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}
 .banner-ads {
     background: #fff;
     border: 0px dashed #bbb;
     padding: 10px;
     text-align: center;
     margin: 20px auto;
     border-radius: 15px;
     color: #888;

     /* ESTO ES LO IMPORTANTE */
     max-width: 100%;
     /* Nunca será más ancho que el celular */
     box-sizing: border-box;
     /* Incluye el padding en el ancho total */
     display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: center;
     overflow: hidden;
     /* Corta cualquier cosa que intente salirse */
 }

 /* Si usas una imagen dentro del banner */
 .banner-ads img {
     max-width: 100%;
     /* La imagen se encoge si el celular es chico */
     height: auto;
     /* Mantiene la proporción */
     border-radius: 8px;
 }
 .propietario-fab {
     position: fixed;
     bottom: 25px;
     z-index: 1000;
     background: #1a202c;
     color: white;
     padding: 15px 25px;
     border-radius: 15px;
     /* Más cuadrado y moderno en PC */
     display: flex;
     align-items: center;
     box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
     border-left: 5px solid #28a745;
     /* Línea de acento verde */
     transition: all 0.3s ease;
     animation: slideUp 0.5s ease-out;
 }

 /* --- AJUSTE PARA MÓVIL (Pantallas pequeñas) --- */
 @media (max-width: 768px) {
     .propietario-fab {
         left: 5%;
         right: 5%;
         bottom: 20px;
         width: 90%;
         box-sizing: border-box;
     }
 }

 /* --- AJUSTE PARA PC (Pantallas grandes) --- */
 @media (min-width: 769px) {
     .propietario-fab {
         right: 30px;
         /* Se queda fijo en la esquina inferior derecha */
         width: 350px;
     }
 }

 .fab-content {
     flex-grow: 1;
 }

 .fab-content span {
     display: block;
     font-size: 12px;
     color: #cbd5e0;
     margin-bottom: 4px;
 }

 .btn-registrar {
     color: #48bb78;
     text-decoration: none;
     font-weight: bold;
     font-size: 16px;
     display: block;
 }

 .btn-registrar:hover {
     color: #ffffff;
     text-decoration: underline;
 }

 .fab-close {
     background: rgba(255, 255, 255, 0.1);
     border: none;
     color: white;
     width: 25px;
     height: 25px;
     border-radius: 50%;
     margin-left: 15px;
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 16px;
 }

 .fab-close:hover {
     background: rgba(255, 255, 255, 0.2);
 }

 @keyframes slideUp {
     from {
         transform: translateY(100px);
         opacity: 0;
     }

     to {
         transform: translateY(0);
         opacity: 1;
     }
 }
 /* --- CORRECCIÓN MARCADOR GPS --- */

 /* Oculta el círculo azul de precisión y el marcador por defecto de Leaflet Locate */
 .leaflet-control-locate-circle,
 .leaflet-control-locate-marker circle,
 .leaflet-marker-icon.leaflet-gps-dot {
     display: none !important;
 }

 /* Estilo para el marcador del coche (opcional: sombra suave) */
 .leaflet-marker-icon[src*="png"] {
     filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.2));
 }