@charset "UTF-8";
/* CSS Document */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap');
@import url('main_colori.css');



.item_content p {
    margin: 0 0 1em 0;
}


.img_dida {
    font-size: 0.8em;
    color: #919191;
    margin: 0px;
}



/* ########################## ITEMS ARTICOLO ########################## */

.item_container {
    margin: 0 0 var(--space) 0;
}
.item_container h2 {
    font-size: 1.2em;
    font-style: italic !important;
    color: var(--color_text);
    margin: 10px 0;
}
.item_container h5 {
    font-size: 1em;
    font-style: italic !important;
    color: var(--color_text);
    margin: 0px 0 10px;
}
.item_container h5.chiaro {
    color: var(--color_btnh);
}
.item_title.chiaro {
    font-size: 1em;
    font-style: italic !important;
    color: var(--color_btnh);
    margin: 30px 0 10px;
}
.item_content {
    display: flex;
}
.item_content.wrap {
    flex-wrap: wrap;
}
.item_content_center {
    width: 100%;
    flex-shrink: 2;
    font-size: 1em;
    line-height: 1.6em;
    font-weight: 400;
    color: var(--color_text);
    /*margin: 1em auto;*/
}
.item_content_center h3 {
    margin: 0 0 1em 0;
}
.item_content_sx {
    max-width: 500px;
    width: 40%;
    margin: 1em var(--space) 0 0;
}
.item_content_dx {
    max-width: 500px;
    width: 40%;
    margin: 1em 0 0 var(--space);
}

.item_all {
    padding: var(--space);
    background-color: var(--color_btn);
    color: white;
    border-radius: var(--corner);
    margin: 0 var(--space) var(--space) 0;
}
.item_all i { padding: 0 10px 0 0; }
.item_all:hover {
    background-color: var(--color_btnh);
    color: var(--color_btn);
}
.videoWrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    /*padding-top: 25px;*/
    width: 100%;
    height: 0;
}
.videoWrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}


/* FINO IPAD VERT */
@media (max-width: 767px) {
    
    .item_content {
        flex-direction: column;
    }
    .item_content_sx {
        width: 100%;
        max-width: none;
        margin: var(--space) 0;
    }
    .item_content_dx {
        width: 100%;
        max-width: none;
        margin: var(--space) 0;
    }
}

/* MOBILE VERT */
@media (max-width: 479px) {

    
}






/* ########################## MAPPA AUTO ########################## */

/* Contenitore mappa */
#paesi-map {
  height: 30vh;
  min-height: 300px;
  width: min(1200px, 100%);
  margin: 24px auto;
  border-radius: 12px;
  outline: 1px solid rgba(0,0,0,.08);
}

/* Tipografia base */
.leaflet-container {
  font: 14px/1.35 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* Tooltip stile "popup" */
.leaflet-tooltip.paese-tooltip {
  background: #fff;
  border: 1px solid rgba(0,0,0,.2);
  border-radius: 8px;
  padding: 8px 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  color: inherit;
}
.leaflet-tooltip.paese-tooltip::before {
  /* punta */
  border-top-color: rgba(0,0,0,.2);
}
.paese-tooltip .paese-tooltip-content strong {
  display: inline-block;
  margin-bottom: 2px;
}
.paese-tooltip .paese-link {
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
}
.paese-tooltip .paese-link:hover {
  text-decoration: underline;
}




/* ########################## MAPPA ########################## */

#header_menu_dropdown_content {
  position: relative;
  z-index: 1000;
}

.leaflet-container {
  z-index: 0 !important;
}

#map-container {
    position: relative;
    height: 500px;
    width: 100%;
    margin-bottom: 1em;
}

#map {
    height: 100%;
    width: 100%;
}

/* Hover labels */
.hover-label {
    background: rgba(255,255,255,0.9) !important;
    border: none !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    font-weight: bold !important;
    text-align: center !important;
    pointer-events: none !important;
}

.leaflet-tooltip-arrow { 
    display: none; 
}

/* Layer control styling */
.leaflet-control-layers {
    background: var(--color_bg) !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    border: none !important;
}

.leaflet-control-layers-selector {
    width: 16px !important;
    height: 16px !important;
    margin-right: 6px !important;
    accent-color: var(--color_header) !important;
}

.leaflet-control-layers label { 
    color: white !important; 
}

.leaflet-control-layers label:hover { 
    color: #2E8B57 !important; 
    cursor: pointer; 
}

.clickable { 
    cursor: pointer; 
}

/* Map controls - unified styling */
.map-controls {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
    pointer-events: none; /* Container non intercetta click */
}

.map-btn {
    background: white;
    border: 2px solid var(--color_bg) !important;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: all 0.2s;
    pointer-events: auto; /* Pulsanti ricevono click */
    touch-action: manipulation; /* Migliora touch su mobile */
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 46px; /* Larghezza minima per touch */
    min-height: 46px; /* Altezza minima per touch */
}

.map-btn:hover {
    background: #e9f5ec;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.map-btn:active {
    transform: scale(0.95);
}

.map-btn svg {
    width: 30px;
    height: 30px;
    fill: var(--color_bg);
    display: block;
}

/* Zoom controls - posizionati in basso a sinistra */
.leaflet-control-zoom {
    box-shadow: none !important;
    border: none !important;
}

/* Riposiziona il container zoom usando Leaflet API */
.leaflet-bottom.leaflet-left {
    position: absolute;
    bottom: 0;
    left: 0;
    display: flex;
    pointer-events: none;
}

.leaflet-control-zoom a {
    background: white !important;
    border: 2px solid var(--color_bg) !important;
    border-radius: 8px !important;
    color: var(--color_bg) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s !important;
    width: 46px !important;
    height: 46px !important;
    line-height: 1 !important;
    font-size: 20px !important;
    font-weight: bold !important;
    text-decoration: none !important;
    margin-bottom: 2px !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3) !important;
    touch-action: manipulation !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.leaflet-control-zoom a:hover {
    background: #e9f5ec !important;
    border-color: var(--color_bg) !important;
    color: var(--color_bg) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4) !important;
}

.leaflet-control-zoom a:active {
    transform: scale(0.95) !important;
}

.leaflet-control-zoom a:first-child {
    margin-bottom: 2px !important;
}

.leaflet-control-zoom a:last-child {
    margin-bottom: 0 !important;
}

/* Fullscreen mode */
.fullscreen-active {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    background: white;
}

/* Controlli in fullscreen - sempre visibili */
.fullscreen-active .map-controls {
    z-index: 10001 !important;
    position: fixed !important;
    bottom: 20px;
    right: 20px;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .map-controls {
        gap: 8px;
        bottom: 15px;
        right: 15px;
    }
    
    .map-btn {
        min-width: 50px;
        min-height: 50px;
        padding: 10px;
    }
    
    .map-btn svg {
        width: 24px;
        height: 24px;
    }
    
    /* Zoom controls su mobile - posizionati in basso a sinistra */
    .leaflet-bottom.leaflet-left {
        bottom: 15px !important;
        left: 15px !important;
    }
    
    .leaflet-control-zoom a {
        width: 50px !important;
        height: 50px !important;
        font-size: 22px !important;
        padding: 0 !important;
    }
    
    .fullscreen-active .map-controls {
        bottom: 30px;
        right: 30px;
    }
    
    /* Zoom in fullscreen su mobile */
    .fullscreen-active .leaflet-bottom.leaflet-left {
        bottom: 30px !important;
        left: 30px !important;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .map-controls {
        flex-direction: column;
        gap: 6px;
        bottom: 20px;
        right: 10px;
    }
    
    .map-btn {
        min-width: 54px;
        min-height: 54px;
        padding: 12px;
    }
    
    .map-btn svg {
        width: 26px;
        height: 26px;
    }
    
    /* Zoom controls su schermi molto piccoli */
    .leaflet-bottom.leaflet-left {
        bottom: 20px !important;
        left: 10px !important;
    }
    
    .leaflet-control-zoom a {
        width: 54px !important;
        height: 54px !important;
        font-size: 24px !important;
        padding: 0 !important;
    }
    
    .fullscreen-active .map-controls {
        bottom: 40px;
        right: 20px;
    }
    
    /* Zoom in fullscreen su schermi piccoli */
    .fullscreen-active .leaflet-bottom.leaflet-left {
        bottom: 40px !important;
        left: 20px !important;
    }
    
    /* In fullscreen su mobile, stack verticale */
    .fullscreen-active .map-controls {
        flex-direction: column;
    }
}











/* ########################## BANNER TIPO1 - GRID RESPONSIVE ########################## */

.banner_grid.tipo1 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space, 20px);
    margin: var(--space, 20px) 0;
}

.banner_item.tipo1 {
    position: relative;
    border-radius: var(--corner, 8px);
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.banner_item.tipo1:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.banner_content {
    width: 100%;
    padding: var(--space, 20px);
    z-index: 2;
}

.banner_titolo.tipo1 {
    font-size: 1.4em;
    font-weight: 700;
    color: white;
    margin: 0 0 12px 0;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.banner_link.tipo1 {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--color_btn, #2E8B57);
    color: white;
    text-decoration: none;
    border-radius: var(--corner, 8px);
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.banner_link.tipo1:hover {
    background-color: var(--color_btnh, #236B43);
}

/* TABLET (2 colonne) */
@media (max-width: 1024px) {
    .banner_grid.tipo1 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* MOBILE (1 colonna) */
@media (max-width: 767px) {
    .banner_grid.tipo1 {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .banner_item.tipo1 {
        min-height: 220px;
    }
    
    .banner_titolo.tipo1 {
        font-size: 1.2em;
    }
    
    .banner_link.tipo1 {
        padding: 8px 16px;
        font-size: 0.9em;
    }
}






/* =========================================
   BANNER A - VERSIONE FULL WIDTH E RESPONSIVE
   ========================================= */

.banner_grid.bannerA {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* ogni colonna cresce per riempire tutto */
    gap: var(--space, 20px);
    margin: var(--space, 20px) 0;
    width: 100%;
    box-sizing: border-box;
}

/* Colonne dinamiche da campo banner_colonne */
.banner_grid.bannerA.cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.banner_grid.bannerA.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.banner_grid.bannerA.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.banner_grid.bannerA.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.banner_grid.bannerA.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

/* Ogni item deve sempre occupare la sua cella in modo uniforme */
.banner_item.bannerA {
    position: relative;
    border-radius: var(--corner, 8px);
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--color_bg);
    border: 2px solid var(--color_bg);
    display: flex;
    align-items: end;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

/* Overlay hover */
.banner_item.bannerA::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    z-index: 1;
}

.banner_item.bannerA:hover::before {
    background: rgba(0, 0, 0, 0.15);
}

.banner_item.bannerA:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

/* Contenuto */
.banner_content {
    width: 100%;
    text-align: right;
    padding: var(--space, 20px);
    z-index: 2;
}

.banner_titolo.bannerA {
    font-size: 1.4em;
    font-weight: 700;
    color: white;
    margin: 0;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5), 0 4px 24px rgba(0, 0, 0, 0.6);
}

.banner_link.bannerA {
    display: none;
}

/* =========================================
   RESPONSIVE
   ========================================= */

/* TABLET (max 1024px) */
@media (max-width: 1024px) {
    .banner_grid.bannerA.cols-4,
    .banner_grid.bannerA.cols-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .banner_grid.bannerA.cols-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .banner_titolo.bannerA {
        font-size: 1.6em;
    }
}

/* MOBILE (max 767px) */
@media (max-width: 767px) {
    .banner_grid.bannerA {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
        gap: 16px;
    }
    
    .banner_item.bannerA {
        min-height: 220px;
    }
    
    .banner_titolo.bannerA {
        font-size: 1.3em;
    }
    
    .banner_content {
        padding: 16px;
    }
}




/* ########################## AVVISO ########################## */

.avviso_container {
    background-color: var(--color_avviso_bg);
    margin: 0 0 1px 0;
}
.avviso_content {
     max-width: var(--max-width);
     margin: 0 auto;
     padding: 20px;
     box-sizing: border-box;
     font-size: 1em;
     font-weight: 500;
     color: var(--color_avviso_testo);
}
.content.home .avviso_content {
    padding: 20px 30px;
}
.avviso_titolo {
    all: unset;
    font-size: 1.4em;
    font-weight: 700;
    margin: 0 0 10px 0;
}
.avviso_link {
    display: flex;
    align-items: center;
    gap: 6px;
}
