/* --- CONFIGURACIÓN DEL MAPA --- */
#map { height: 550px; width: 100%; z-index: 1; background: #f1f5f9; outline: none; border: none; }

/* ELIMINACIÓN DE FONDO BLANCO EN ICONOS DE PROPIEDADES */
.leaflet-marker-icon, .leaflet-div-icon { 
    background: transparent !important; 
    border: none !important; 
    box-shadow: none !important; 
}

/* PIN NARANJA (EXACTO) */
.marker-pin {
    width: 38px; height: 38px; border-radius: 50% 50% 50% 0;
    position: absolute; transform: rotate(-45deg);
    left: 50%; top: 50%; margin: -19px 0 0 -19px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid white; background-color: #f97316 !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
.marker-pin img { transform: rotate(45deg); width: 20px; height: 20px; }

/* CÍRCULO AZUL (APROXIMADO) */
.marker-circle {
    width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid white; background-color: #2563eb !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.marker-circle img { width: 18px; height: 18px; }

/* CUADRADO BLANCO LOGO OFICINA */
.office-box-container {
    background: white !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    padding: 4px !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2) !important;
    display: flex !important; align-items: center; justify-content: center;
}

/* --- LOGO LINKTREE --- */
/* En el header: color azul oscuro Becker */
.lt-header { width: 18px; height: 18px; filter: invert(18%) sepia(85%) saturate(1466%) hue-rotate(214deg) brightness(91%) contrast(101%); }
/* En el footer: blanco */
.lt-footer { width: 16px; height: 16px; filter: brightness(0) invert(1); display: inline-block; vertical-align: middle; margin-right: 8px; }

/* --- INTERFAZ --- */
.map-legend { background: white; padding: 12px; border-radius: 8px; box-shadow: 0 0 15px rgba(0,0,0,0.1); font-size: 10px; font-weight: bold; }
.property-card { transition: 0.4s ease; cursor: pointer; background: white; border: 1px solid #f1f5f9; height: 100%; display: flex; flex-direction: column; }
.property-card:hover { transform: translateY(-8px); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15); }

/* MODAL Y GALERÍA */
.modal-overlay { background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(8px); z-index: 2000; }
.gallery-thumb { height: 80px; width: 100%; cursor: pointer; border-radius: 8px; object-fit: cover; border: 2px solid transparent; transition: 0.2s; }
.gallery-thumb:hover { border-color: #f97316; }
.obs-content { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out; }
.obs-open { max-height: 1000px; }

/* FOOTER OFICIAL */
.footer-becker { background-color: #3b3db1; border-top: 8px solid #f97316; color: white; }
.footer-title { font-size: 16px; font-weight: 600; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 10px; }
.footer-link { display: block; margin-bottom: 10px; color: rgba(255,255,255,0.8); transition: 0.3s; cursor: pointer; }

.hidden-view { display: none !important; }
.lang-active { color: #f97316 !important; border-bottom: 2px solid #f97316; }
.nav-link { cursor: pointer; transition: 0.2s; border-bottom: 2px solid transparent; }
.nav-link:hover { color: #f97316; border-bottom: 2px solid #f97316; }
html { scroll-behavior: smooth; }

/* --- ESTILO PARA EL GRUPO DE PROPIEDADES (CLUSTERS) --- */
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large {
    background-color: rgba(249, 115, 22, 0.6) !important;
    border-radius: 50%;
}
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div {
    background-color: #f97316 !important;
    color: white !important;
    font-weight: bold;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
}

/* Formato 4:3 para miniaturas */
.thumb-4-3 {
    aspect-ratio: 4 / 3;
    width: 100%;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
    border: 2px solid transparent;
}
.thumb-4-3:hover { border-color: #f97316; transform: scale(1.05); }

/* Grid de extras (Booleans) */
.amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
    background: #f8fafc;
    padding: 15px;
    border-radius: 12px;
}
.amenity-item { display: flex; align-items: center; gap: 8px; font-size: 11px; text-transform: uppercase; font-weight: bold; }

/* Botones de navegación en la foto principal */
.modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    backdrop-filter: blur(4px);
}
.modal-nav-btn:hover { background: #f97316; }

/* Miniaturas debajo sin distorsión */
.thumb-4-3 { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; border-radius: 8px; cursor: pointer; transition: 0.2s; border: 2px solid transparent; }
.thumb-4-3:hover { border-color: #f97316; transform: scale(1.05); }

/* Grid de extras compacto */
.amenities-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; background: #f8fafc; padding: 15px; border-radius: 12px; border: 1px solid #edf2f7; }
.amenity-item { display: flex; align-items: center; gap: 8px; font-size: 10px; text-transform: uppercase; font-weight: bold; color: #4a5568; }

/* Botones de navegación sobre foto principal */
.modal-nav-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.3); color: white; width: 45px; height: 45px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: 0.3s; backdrop-filter: blur(4px); font-size: 20px; z-index: 10; border: 1px solid rgba(255,255,255,0.2); }
.modal-nav-btn:hover { background: #f97316; scale: 1.1; }

/* Lightbox navigation */
#lightbox .nav-btn { font-size: 40px; font-weight: bold; cursor: pointer; user-select: none; }

.relational-table { width: 100%; border-collapse: collapse; font-size: 11px; background: white; border-radius: 10px; overflow: hidden; }
.relational-table th { background: #1e3a8a; color: white; padding: 10px; text-align: left; text-transform: uppercase; letter-spacing: 1px; }
.relational-table td { padding: 10px; border-bottom: 1px solid #f1f5f9; cursor: pointer; }
.relational-table tr:hover td { background: #fff7ed; }
.badge-interest { padding: 2px 8px; border-radius: 4px; font-weight: bold; font-size: 9px; text-transform: uppercase; }
.interest-muy { background: #dcfce7; color: #166534; }
.interest-interesado { background: #fef9c3; color: #854d0e; }
.interest-des { background: #fee2e2; color: #991b1b; }

/* Estilo para el input de búsqueda resaltado */
#clientInput { border-left: 4px solid #f97316; }
/* Asegurar que el modal de login tape todo */
#loginModal { background: rgba(15, 23, 42, 0.8); backdrop-filter: blur(10px); }
/* Estilo para links clicables en tablas */
.clickable-row { cursor: pointer; transition: 0.2s; }
.clickable-row:hover { background: #fff7ed !important; color: #f97316; }

/* Marca de agua para propiedades descatalogadas */
.watermark-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 5rem;
    font-weight: 900;
    color: rgba(255, 0, 0, 0.15);
    text-transform: uppercase;
    pointer-events: none;
    z-index: 100;
    width: 100%;
    text-align: center;
    white-space: nowrap;
}

.modal-overlay .relative { position: relative; }