/* =========================================
   OVERRIDE COLORI GLOBALI (Verde Petrolio)
   Colore Base: #3d8da8
   ========================================= */

/* 1. Sovrascrittura variabili Bootstrap (se supportato dal browser) */
:root {
    --bs-primary: #3d8da8;
    --bs-primary-rgb: 61, 141, 168;
    --bs-link-color: #3d8da8;
    --bs-link-hover-color: #2c6b80;
}

/* 2. Bottoni Primari (Normali, Hover, Active) */
.btn-primary {
    background-color: #3d8da8 !important;
    border-color: #3d8da8 !important;
    color: #fff !important;
}

.btn-primary:hover, 
.btn-primary:focus, 
.btn-primary:active {
    background-color: #2c6b80 !important; /* Versione leggermente più scura per l'effetto hover */
    border-color: #286275 !important;
}

/* 3. Bottoni "Outline" (Bordo colorato, fondo trasparente) */
.btn-outline-primary {
    color: #3d8da8 !important;
    border-color: #3d8da8 !important;
}

.btn-outline-primary:hover {
    background-color: #3d8da8 !important;
    color: #fff !important;
}

/* 4. Testi colorati (es. link, icone) */
.text-primary {
    color: #3d8da8 !important;
}

/* 5. Sfondi colorati (es. badge, sezioni) */
.bg-primary {
    background-color: #3d8da8 !important;
}

/* 6. Paginazione (i numeretti delle pagine) */
.page-link.active, .active > .page-link {
    background-color: #3d8da8 !important;
    border-color: #3d8da8 !important;
}
.page-link {
    color: #3d8da8;
}
/* Layout Generale e Header Scuro */
.hero-dark-bg {
    background-color: #1a1a1a;
    color: white;
    padding: 80px 0 120px 0; /* Più spazio sotto per far rientrare la mappa */
    text-align: center;
}

.hero-dark-bg h1 {
    font-weight: 800;
    font-size: 3.5rem;
    margin-bottom: 15px;
}

/* Container Mappa "Floating" */
.map-wrapper {
    background: white;
    border-radius: 30px;
    padding: 12px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    margin-top: -80px; /* Alza la mappa sopra il nero */
    position: relative;
    z-index: 5;
}

#map {
    height: 480px;
    border-radius: 22px;
    width: 100%;
}

/* Card Annunci Stile Premium [cite: 2026-01-23] */
.ad-card-premium {
    background: white;
    border: 1px solid #edf2f7;
    border-radius: 25px; /* Bordi arrotondati come da screenshot */
    padding: 25px;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.ad-card-premium:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
}

/* Gestione Piani Pagamento nelle Card [cite: 2026-01-23] */
.ad-card-premium.is-urgent {
    border: 2px solid #ffc107; /* Bordo giallo per piano Bold */
}

.badge-urgent {
    background: #ffc107;
    color: #000;
    font-weight: 800;
    font-size: 0.7rem;
    padding: 5px 12px;
    border-radius: 8px;
    text-transform: uppercase;
}

.ad-date {
    font-size: 0.85rem;
    color: #a0aec0;
}
/* Badge Vetrina (Gold/Premium) */
.badge-premium {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #fff;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.7rem;
    padding: 5px 12px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
    letter-spacing: 0.5px;
    border: none;
}

/* Badge Urgente (Animato) */
.badge-urgent {
    background: #fee2e2;
    color: #ef4444;
    font-weight: 800;
    font-size: 0.7rem;
    padding: 5px 12px;
    border-radius: 50px;
    border: 1px solid #fecaca;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Effetto pulsante per l'urgenza */
.dot-urgent {
    width: 6px;
    height: 6px;
    background-color: #ef4444;
    border-radius: 50%;
    display: inline-block;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Look della Card Placeholder "Vuoi essere qui?" */
.card-promo-placeholder {
    border: 2px dashed #cbd5e1;
    background: #f8fafc;
    border-radius: 20px;
    transition: 0.3s;
    min-height: 280px;
}

.card-promo-placeholder:hover {
    border-color: #f59e0b;
    background: #fff;
    transform: translateY(-5px);
}

.promo-plus-icon {
    font-size: 2rem;
    color: #94a3b8;
    background: #fff;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
/* Rende il contenitore della mappa pulito e senza bordi grigi */
#map {
    height: 400px; /* Regola l'altezza come preferisci */
    width: 100%;
    border-radius: 20px;
    background-color: #e5e3df !important; /* Un grigio molto più chiaro, simile alla carta */
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

/* Rimuove i margini interni che creano lo spazio vuoto */
.leaflet-container {
    background: #fff !important;
}
/* Badge Vetrina: Look 'Take-off' */
.badge-premium {
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%); /* Blu profondo aviazione */
    color: #fff !important;
    font-weight: 800;
    font-size: 0.65rem;
    padding: 6px 14px;
    border-radius: 0 15px 0 15px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Badge Urgente: Look 'Hot' */
.badge-urgent-modern {
    background: #fff;
    color: #f97316; /* Arancio vibrante */
    border: 1px solid #ffedd5;
    font-weight: 800;
    font-size: 0.65rem;
    padding: 5px 12px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.15);
}

.icon-travel {
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));
}
.placeholder-img {
    height: 180px;
    width: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 12px 12px 0 0;
    display: flex !important; /* Cambiato da block a flex */
    align-items: center;
    justify-content: center;
    background-color: #e2e8f0; /* Grigio chiaro di base */
    position: relative;
    color: #94a3b8;
}

/* Se l'immagine fallisce, mostriamo un'icona travel sotto */
.placeholder-img::before {
    content: "\f5b0"; /* Icona mappa di FontAwesome */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 2rem;
    position: absolute;
    z-index: 0;
}

.placeholder-img > * {
    position: relative;
    z-index: 1; /* I badge staranno sopra l'icona di backup */
}
#map {
    height: 450px;
    width: 100%;
    border-radius: 20px;
    /* Cambiamo il colore di sfondo del div: un blu acqua che richiama l'oceano */
    background-color: #aad3df !important; 
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

/* Forza le tiles a coprire tutto */
.leaflet-container {
    background: #aad3df !important;
}
.placeholder-img {
    height: 180px;
    width: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 12px 12px 0 0;
    display: block !important;
    /* Uno sfondo con un gradiente leggero è più gradevole del grigio piatto */
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}
