/* =========================================================
   NUVOLE DI LUOGHI — PAGINA ARCHIVIO
   archivio.css
   ========================================================= */


/* =========================================================
   DESKTOP
   ========================================================= */


/* --- BODY --- */

body.archivio-page {
  background-color: black;
  min-height: 100vh;
  height: auto;
  overflow-y: auto;
  overflow-x: hidden;
}


/* --- LAYOUT PRINCIPALE --- */

.archivio-main {
  width: 100%;
  box-sizing: border-box;
  padding: 140px 50px 80px;
  max-width: 1400px;
  margin: 0 auto;
}


/* =========================================================
   PANNELLI FILTRO
   ========================================================= */

.archivio-filtri {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 48px;
  align-items: start;
}

.filtro-panel {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background-color: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transition: opacity 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.filtro-panel:not(.attivo) {
  opacity: 0.60;
}

.filtro-panel:not(.attivo) .filtro-body {
  display: none;
}

.filtro-panel.attivo {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.30);
  background-color: rgba(255, 255, 255, 0.08);
}


/* --- INTESTAZIONE PANNELLO --- */

.filtro-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
}

.filtro-titolo {
  color: white;
  font-family: "Century Gothic", "Gill Sans", sans-serif;
  font-weight: bold;
  font-style: italic;
  font-size: 22px;
  letter-spacing: 0.03em;
}


/* --- INTERRUTTORE ON/OFF --- */

.filtro-toggle {
  position: relative;
  width: 50px;
  height: 28px;
  border-radius: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.50);
  background-color: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.filtro-toggle::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.60);
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.filtro-panel.attivo .filtro-toggle {
  background-color: rgba(255, 255, 255, 0.30);
  border-color: white;
}

.filtro-panel.attivo .filtro-toggle::after {
  transform: translateX(22px);
  background-color: white;
}


/* --- CORPO PANNELLO --- */

.filtro-body {
  padding: 10px 20px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

.filtro-body::-webkit-scrollbar {
  display: none;
}


/* =========================================================
   SLIDER VERTICALE — ANNO
   ========================================================= */

.slider-wrap {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0 10px 30px;
  width: 100%;
}

.slider-track {
  position: relative;
  width: 8px;
  height: 320px;
  flex-shrink: 0;
  background-color: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

.slider-fill {
  position: absolute;
  left: 0;
  right: 0;
  background-color: rgba(255, 255, 255, 0.70);
  border-radius: 4px;
  pointer-events: none;
}

.slider-handle {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: white;
  border: 2px solid rgba(255, 255, 255, 0.50);
  cursor: grab;
  z-index: 2;
  transition: box-shadow 0.2s ease;
}

.slider-handle:active {
  cursor: grabbing;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.18);
}


/* --- ETICHETTE SLIDER --- */

.slider-labels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 320px;
}

.slider-label {
  color: transparent;
  font-family: "Century Gothic", "Gill Sans", sans-serif;
  font-style: normal;
  font-weight: normal;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.slider-label.anchor {
  color: rgba(255, 255, 255, 0.75);
  font-weight: bold;
  font-size: 13px;
}

.slider-label.nel-range {
  color: transparent;
}

.slider-label.anchor.nel-range {
  color: white;
}


/* --- RIEPILOGO SELEZIONE --- */

.slider-riepilogo {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.45);
  font-family: "Century Gothic", "Gill Sans", sans-serif;
  font-style: italic;
  font-weight: normal;
  font-size: 13px;
  text-align: center;
  width: 100%;
}

.slider-riepilogo span {
  color: white;
  font-weight: bold;
}


/* =========================================================
   LISTE CHECKBOX — REGIONE E TIPOLOGIA
   ========================================================= */

.regioni-lista,
.tipologie-lista {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

#panel-regione .filtro-body {
  align-items: flex-start;
  padding-top: 10px;
  padding-left: 20px;
}

#panel-regione .regioni-lista {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
}

#panel-tipologia .filtro-body {
  align-items: flex-start;
  padding-top: 10px;
  padding-left: 20px;
}

#panel-tipologia .tipologie-lista {
  gap: 20px;
  padding-top: 4px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: white;
  font-family: "Century Gothic", "Gill Sans", sans-serif;
  font-style: normal;
  font-weight: normal;
  font-size: 14px;
  padding: 5px 2px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
  user-select: none;
}

.check-item:hover:not(.disabled) {
  background-color: rgba(255, 255, 255, 0.06);
}

.check-item.disabled {
  opacity: 0.25;
  cursor: default;
  pointer-events: none;
}

.check-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.check-box {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background-color: transparent;
  flex-shrink: 0;
  position: relative;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.check-item input[type="checkbox"]:checked + .check-box {
  background-color: white;
  border-color: white;
}

.check-item input[type="checkbox"]:checked + .check-box::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 5px;
  width: 4px;
  height: 7px;
  border: 2px solid black;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}


/* =========================================================
   RISULTATI
   ========================================================= */

.archivio-risultati {
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  padding-top: 32px;
}

.risultati-header {
  color: rgba(255, 255, 255, 0.35);
  font-family: "Century Gothic", "Gill Sans", sans-serif;
  font-style: italic;
  font-weight: normal;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 20px;
  min-height: 20px;
}

.risultati-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.risultati-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}

.risultati-empty p {
  color: rgba(255, 255, 255, 0.30);
  font-family: "Century Gothic", "Gill Sans", sans-serif;
  font-style: italic;
  font-weight: normal;
  font-size: 16px;
  margin: 0 0 12px 0;
}

.risultati-empty a {
  color: rgba(255, 255, 255, 0.55);
  font-family: "Century Gothic", "Gill Sans", sans-serif;
  font-style: normal;
  font-weight: bold;
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.risultati-empty a:hover {
  color: white;
  border-bottom-color: white;
}

.card-modello {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background-color: rgba(255, 255, 255, 0.04);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.card-modello:hover {
  border-color: rgba(255, 255, 255, 0.30);
  background-color: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.card-immagine {
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.card-immagine img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-info {
  padding: 14px 16px 16px;
}

.card-nome {
  color: white;
  font-family: "Century Gothic", "Gill Sans", sans-serif;
  font-style: italic;
  font-weight: bold;
  font-size: 15px;
  margin-bottom: 8px;
}

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.card-meta span {
  color: rgba(255, 255, 255, 0.42);
  font-family: "Century Gothic", "Gill Sans", sans-serif;
  font-style: normal;
  font-weight: normal;
  font-size: 12px;
}


/* =========================================================
   TABLET
   ========================================================= */

@media screen and (max-width: 1100px) {

  .archivio-main {
    padding: 130px 30px 60px;
  }

  .archivio-filtri {
    gap: 12px;
  }

  .filtro-titolo {
    font-size: 16px;
  }

  .risultati-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media screen and (max-width: 768px) {

  .archivio-main {
    padding: 200px 18px 50px;
  }

  .archivio-filtri {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 32px;
  }

  .filtro-header {
    padding: 16px 16px;
  }

  .filtro-titolo {
    font-size: 17px;
  }

  .filtro-body {
    padding: 0 16px 18px;
    height: auto;
    overflow-y: visible;
  }

  #panel-regione .filtro-body,
  #panel-tipologia .filtro-body {
    align-items: flex-start;
  }

  #panel-regione .regioni-lista {
    grid-template-columns: 1fr 1fr;
  }

  .slider-wrap {
    padding: 10px 0 10px 10px;
  }

  .slider-track {
    min-height: 320px;
    height: 320px;
  }

  .slider-labels {
    height: 320px;
  }

  .risultati-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .card-nome {
    font-size: 14px;
  }

  .archivio-page .footer-text {
    display: none;
  }
}