/* === Layout generale e sfondo === */
:root {
  --container-max: 1120px;   /* larghezza massima del pannello */
  --panel-gap: 1rem;
  --row-h: 3rem;             /* altezza riga media per le liste */
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: sans-serif;

  /* layout */
  display: flex;
  justify-content: flex-end;   /* pannello spinto a destra su desktop */
  align-items: flex-start;
  padding-top: 4rem;
  padding-bottom: 2rem;
  padding-left: 4vw;           /* poco spazio a sinistra (si vede bene la foto) */
  padding-right: 6vw;          /* più aria dal bordo destro */

  /* sfondo */
  background: url('web_images/1990 0615 Vulcano VU - 086.jpg') no-repeat center center fixed;
  background-size: cover;

  color: #fff;
  text-shadow: 1px 1px 4px #000;
}

/* === Pannello principale === */
.contenitore {
  width: clamp(320px, 40vw, 520px);  /* UNA sola regola per tutti */
  background: rgba(0,0,0,0.60);
  padding: clamp(1rem, 2.5vw, 2rem);
  border-radius: 20px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  text-align: left;
}

/* === Adattamento mobile === */
@media (max-width: 600px) {
  body {
    justify-content: center;
    padding-left: 4vw;
    padding-right: 4vw;
  }
  /* niente .contenitore qui */
}

h1 {
  text-align: center;
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  margin: 0 0 1rem 0;
}

/* === Due blocchi (progetti / servizi) affiancati o verticali === */
.grid {
  display: grid;
  gap: var(--panel-gap);
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* === Pannelli interni === */
.panel {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 0.75rem;
}

.panel h2 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  letter-spacing: 0.2px;
}

/* === Liste scrollabili “a misura” === */
ul {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: calc(var(--rows, 6) * var(--row-h));
  overflow-y: auto;
  scrollbar-color: #888 #444;
  scrollbar-width: thin;
}

.scrollbox { --rows: 8; }         /* pannello “grande” */
.scrollbox-small { --rows: 5; }   /* pannello “piccolo” */

/* scrollbar WebKit */
ul::-webkit-scrollbar {
  width: 8px;
}
ul::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}
ul::-webkit-scrollbar-track {
  background: #444;
}

/* item lista */
li {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.14);
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.5rem;
  border-radius: 12px;
  transition: background 0.2s ease;
  font-size: 0.92rem;
}

li:hover {
  background: rgba(255,255,255,0.22);
}

a {
  color: white;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.title {
  font-size: 1rem;
  font-weight: 700;
}

.desc {
  font-size: 0.8rem;
  color: #ccc;
  margin-top: 0.15rem;
}

.new-project {
  color: #7fff7f;
  font-weight: bold;
  margin-left: 8px;
}

/* === Footer === */
.footer {
  position: fixed;
  bottom: 10px;
  width: 100%;
  text-align: center;
  font-size: 0.9em;
  color: #ddd;
  text-shadow: 1px 1px 2px #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.footer a {
  display: inline;
  white-space: nowrap;
}

