/* CSS per mappa_index */

:root {
    /* Palette dei colori condivisa */
    --color-primary: #4D7298;     /* Blu scuro */
    --color-secondary: #77A6B6;   /* Blu medio */
    --color-accent: #9DC3C2;      /* Verde acqua */
    --color-light: #B3D89C;       /* Verde chiaro */
    --color-lighter: #D0EFB1;     /* Verde molto chiaro */
    --color-text: #333333;        /* Grigio scuro per il testo */
    --color-bg: #ffffff;          /* Bianco sfondo */
    --color-border: #9DC3C2;      /* Verde acqua per i bordi */
}

/* Stile per il contenitore della mappa */
.mapContainer {
    width: 65%;
    margin: 0px auto;
    height:500px;
    padding: 0 20px;
}

/* Stile per la sezione che contiene la mappa */
#mappa-index-section {
    background-color: var(--color-bg);
    padding: 25px;
    /* Rimossa la barra blu sopra il contenitore */
    margin-bottom: 40px;
    height: 100%;
}

/* Stile per il titolo della sezione */
#mappa-index-section h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
    color: #000000;
    font-weight: 600;
}

/* Stile per il contatore delle città */
.city-counter {
    text-align: center;
    margin-bottom: 20px;
    font-size: 16px;
    color: var(--color-text);
}

/* Stile per la mappa */
#map {
    width: 100%;
    height: 100%; /* Aumentato per renderlo più lungo */
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--color-border);
}

/* Stile per il testo sotto la mappa */
.map-description {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: var(--color-text);
}

/* Personalizzazioni per i popup di Leaflet */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content {
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    color: var(--color-text);
    margin: 10px 12px;
}

.leaflet-popup-tip {
    background-color: var(--color-bg);
}

.leaflet-popup-close-button {
    color: var(--color-primary);
}

/* Stili per i controlli della mappa */
.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15) !important;
}

.leaflet-control-zoom a {
    background-color: var(--color-bg) !important;
    color: var(--color-primary) !important;
    transition: all 0.2s ease;
}

.leaflet-control-zoom a:hover {
    background-color: var(--color-primary) !important;
    color: white !important;
}

.leaflet-control-attribution {
    font-size: 10px !important;
    background-color: rgba(255, 255, 255, 0.8) !important;
}

/* Stile per rendere la mappa mobile-friendly */
@media (max-width: 768px) {
    .mapContainer {
        padding: 0 15px;
    }
    
    #mappa-index-section {
        padding: 20px 15px;
    }
    
    #map {
        height: 350px;
    }
}

/* Stile per schermi molto piccoli */
@media (max-width: 480px) {
    #map {
        height: 300px;
    }
}























/*STILE PER LE SEZIONE RECENSIONI INDEX*/
.recensioni-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px; /* Stessa spaziatura laterale del footer */
}

.recensioni-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.recensioni-header h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-color-dark, #333);
    margin: 0;
}

.recensioni-header .see-all {
    font-size: 0.95rem;
    text-decoration: none;
    font-weight: 500;
    color: var(--primary-color, var(--color-blu));
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
    border: 1px solid var(--primary-color, var(--color-blu));
    margin-left: 15px;
}

.recensioni-header .see-all:hover {
    background-color: var(--color-primary);
    color: white;
}

.figurine-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    justify-content: center;
}

.figurina {
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: white;
    height: auto;
    display: block;
    text-decoration: none;
    color: var(--text-color-dark, #333);
}

.figurina:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.figurina img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.badge-verifica {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--warning-color, #FFC107);
    color: #333;
    padding: 5px 10px;
    font-size: 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.badge-verifica.verificato {
    background-color: var(--success-color, #4CAF50);
    color: white;
}

.info-figurina {
    padding: 15px;
    background: white;
    box-sizing: border-box;
    z-index: 5;
}

.nome-utente {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: var(--text-color-dark, #333);
}

.nome-stato {
    font-size: 0.9rem;
    margin: 0 0 10px 0;
    color: var(--color-secondary, #77A6B6);
}

.media-valutazioni {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color-dark, #333);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Sistema stelline */
.stelle-container {
    display: inline-flex;
    align-items: center;
    margin-left: 5px;
}

.stelle {
    display: inline-flex;
}

.stelle .stella {
    color: #dddddd; /* Colore predefinito grigio chiaro */
    font-size: 16px;
    margin: 0 1px;
}

.stelle .stella.piena {
    color: #FFD700; /* Stelline piene dorate */
}

.stelle .stella.mezza {
    position: relative;
    overflow: hidden;
}

.stelle .stella.mezza:before {
    content: "★";
    position: absolute;
    left: 0;
    width: 50%;
    overflow: hidden;
    color: #FFD700;
}

.valore-numerico {
    margin-left: 5px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .figurine-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .recensioni-header h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .figurine-container {
        grid-template-columns: 1fr;
    }
    
    .figurina img {
        height: 180px;
    }
}

















/*sezione per la sezione forum index*/
.forum-section {
    background-color: #f8f9fa;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.navigate-wrapper {
    margin-bottom: 20px;
    margin-top:20px;
    background-color: var(--color-accent);
    border-radius: 50px;
    padding: 10px 25px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.navigate-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.15);
}

.navigate-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    font-size: 14px;
}

.navigate-link i {
    font-size: 16px;
}

.forum-card {
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 700px;
    width: 100%;
    padding: 0;
    display: flex;
    overflow: hidden;
}

.forum-content {
    flex: 1;
    padding: 20px;
}

.forum-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.user-info {
    display: flex;
    align-items: center;
}

.forum-user {
    font-size: 14px;
}

.post-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.bookmark-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    font-size: 16px;
    transition: color 0.2s;
}

.bookmark-btn:hover {
    color: #6c63ff;
}

.forum-question {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    margin-bottom: 12px;
}

.forum-description {
    font-size: 16px;
    color: #444;
    line-height: 1.7;
    margin-bottom: 10px;
}














/*stile barra di ricerca index*/
.barra-ricerca-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 30px 0;
    margin-bottom: 0px;
    position: relative;
    z-index: 999; /* sopra la mappa */
  }
  
  #form-ricerca {
    background: white;
    padding: 8px 12px;
    border-radius: 30px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  #campo-ricerca {
    border: none;
    outline: none;
    font-size: 16px;
    padding: 6px 10px;
    border-radius: 20px;
    width: 200px;
  }
  
  #form-ricerca button {
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
  }


/* ============================================================
   RESPONSIVE INDEX — xchangemap
   Breakpoints: 1024px (tablet), 768px (mobile grande), 480px (mobile)
   ============================================================ */


/* ─── TABLET (fino a 1024px) ─────────────────────────────── */
@media (max-width: 1024px) {

  /* Hero text */
  body > p[style*="font-size:50px"],
  body > p[style*="font-size: 50px"] {
    font-size: 38px !important;
    margin-top: 3% !important;
    padding: 0 20px;
  }
  body > p[style*="font-size:16px"],
  body > p[style*="font-size: 16px"] {
    font-size: 15px !important;
    padding: 0 20px;
  }

  /* Mappa */
  .mapContainer {
    width: 85%;
    height: 420px;
  }

  /* Recensioni */
  .recensioni-section {
    padding: 0 30px;
  }
  .figurine-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  /* Forum */
  .forum-card {
    max-width: 90%;
  }
  .forum-question {
    font-size: 20px;
  }

  /* Barra ricerca */
  #campo-ricerca {
    width: 260px;
  }
}


/* ─── MOBILE GRANDE (fino a 768px) ──────────────────────── */
@media (max-width: 768px) {

  /* Hero text */
  body > p[style*="font-size:50px"],
  body > p[style*="font-size: 50px"] {
    font-size: 28px !important;
    margin-top: 4% !important;
    line-height: 1.3;
    padding: 0 16px;
  }
  body > p[style*="font-size:16px"],
  body > p[style*="font-size: 16px"] {
    font-size: 14px !important;
    padding: 0 16px;
  }

  /* Spacer navbar */
  div[style*="height:105px"] {
    height: 70px !important;
  }

  /* Mappa */
  .mapContainer {
    width: 100%;
    height: 360px;
    padding: 0 16px;
    box-sizing: border-box;
  }
  #mappa-index-section {
    padding: 16px 12px;
    margin-bottom: 24px;
  }
  #mappa-index-section h2 {
    font-size: 20px;
  }
  #map {
    height: 300px;
    border-radius: 8px;
  }

  /* Barra ricerca */
  .barra-ricerca-container {
    margin: 20px 0 0;
    padding: 0 16px;
    box-sizing: border-box;
  }
  #form-ricerca {
    width: 100%;
    max-width: 480px;
    box-sizing: border-box;
  }
  #campo-ricerca {
    width: 100%;
    font-size: 15px;
  }

  /* Recensioni */
  .recensioni-section {
    margin: 28px auto;
    padding: 0 16px;
  }
  .recensioni-header {
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
  }
  .recensioni-header h2 {
    font-size: 1.4rem;
  }
  .recensioni-header .see-all {
    margin-left: 0;
    font-size: 0.85rem;
    padding: 5px 10px;
  }
  .figurine-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .figurina img {
    height: 170px;
  }
  .nome-utente {
    font-size: 1rem;
  }
  .nome-stato {
    font-size: 0.82rem;
  }
  .media-valutazioni {
    font-size: 0.8rem;
  }

  /* Forum */
  .forum-section {
    padding: 28px 16px;
  }
  .forum-card {
    max-width: 100%;
    border-radius: 12px;
  }
  .forum-content {
    padding: 16px;
  }
  .forum-question {
    font-size: 18px;
    margin-bottom: 10px;
  }
  .forum-description {
    font-size: 14px;
    line-height: 1.6;
  }
  .forum-info {
    font-size: 13px;
    margin-bottom: 12px;
  }
  .navigate-wrapper {
    padding: 9px 20px;
  }
  .navigate-link {
    font-size: 13px;
  }
}


/* ─── MOBILE PICCOLO (fino a 480px) ─────────────────────── */
@media (max-width: 480px) {

  /* Hero text */
  body > p[style*="font-size:50px"],
  body > p[style*="font-size: 50px"] {
    font-size: 22px !important;
    margin-top: 5% !important;
    padding: 0 12px;
  }
  body > p[style*="font-size:16px"],
  body > p[style*="font-size: 16px"] {
    font-size: 13px !important;
    padding: 0 12px;
    margin-top: 6px !important;
  }

  /* Spacer navbar */
  div[style*="height:105px"] {
    height: 60px !important;
  }

  /* Mappa */
  .mapContainer {
    width: 100%;
    height: 300px;
    padding: 0 10px;
  }
  #map {
    height: 250px;
    border-radius: 6px;
  }
  #mappa-index-section {
    padding: 12px 8px;
    margin-bottom: 16px;
  }
  #mappa-index-section h2 {
    font-size: 17px;
    margin-bottom: 12px;
  }
  .city-counter {
    font-size: 13px;
    margin-bottom: 12px;
  }
  .map-description {
    font-size: 12px;
    margin-top: 12px;
  }

  /* Barra ricerca */
  .barra-ricerca-container {
    margin: 14px 0 0;
    padding: 0 10px;
  }
  #form-ricerca {
    padding: 6px 10px;
    gap: 6px;
  }
  #campo-ricerca {
    font-size: 14px;
    padding: 5px 8px;
  }
  #form-ricerca button {
    font-size: 16px;
  }

  /* Recensioni */
  .recensioni-section {
    margin: 20px auto;
    padding: 0 10px;
  }
  .recensioni-header {
    gap: 8px;
    margin-bottom: 16px;
  }
  .recensioni-header h2 {
    font-size: 1.2rem;
  }
  .recensioni-header .see-all {
    font-size: 0.8rem;
    padding: 4px 9px;
  }
  .figurine-container {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .figurina {
    border-radius: 12px;
  }
  .figurina img {
    height: 190px;
  }
  .info-figurina {
    padding: 12px;
  }
  .nome-utente {
    font-size: 0.95rem;
  }
  .badge-verifica {
    font-size: 0.7rem;
    padding: 4px 8px;
    top: 10px;
    right: 10px;
  }

  /* Forum */
  .forum-section {
    padding: 20px 10px;
  }
  .forum-card {
    border-radius: 10px;
  }
  .forum-content {
    padding: 14px 12px;
  }
  .forum-question {
    font-size: 16px;
    margin-bottom: 8px;
  }
  .forum-description {
    font-size: 13px;
    line-height: 1.55;
    margin-bottom: 6px;
  }
  .forum-info {
    font-size: 12px;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
  }
  .post-actions {
    gap: 10px;
  }
  .navigate-wrapper {
    margin-top: 14px;
    margin-bottom: 14px;
    padding: 8px 18px;
  }
  .navigate-link {
    font-size: 12px;
    gap: 6px;
  }
  .navigate-link i {
    font-size: 14px;
  }
}


/* ── Fix z-index: navbar dropdown sopra tutto ── */
.navbarContainer {
    position: relative;
    z-index: 10000;
}

.barra-ricerca-container {
    z-index: 100 !important; /* era 999, abbassato sotto la navbar */
}

/* I controlli Leaflet (zoom +/-) sotto il menu */
.leaflet-top,
.leaflet-bottom {
    z-index: 400 !important; /* Leaflet default è 1000, lo abbassiamo */
}


  