/* ==========================================================================
   GIACOMO TONCELLI - PORTFOLIO (Adobe Portfolio "Geometric" Dark Theme)
   ========================================================================== */

:root {
  --bg-color: #191919;
  --bg-elevated: #222222;
  --text-primary: #ffffff;
  --text-secondary: #888888;
  --text-Light: #bbbbbb;
  --accent-bg: #2b2b2b;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-site-width: 1600px;
  --grid-gap: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-color);
  color: var(--text-secondary);
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-color);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Override inline font-family:gmsj from Adobe Portfolio rich-text */
[style*="font-family:gmsj"],
[style*="font-family: gmsj"] {
  font-family: var(--font-main) !important;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   LAYOUT CONTAINERS
   ========================================================================== */
.site-wrap {
  width: 100%;
  min-height: 100vh;
}

.site-container {
  max-width: var(--max-site-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 42px 0 32px;
  position: relative;
  z-index: 100;
}

.logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.logo-text a {
  font-size: 21px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.logo-secondary-text {
  margin-top: 2px;
}

.logo-secondary-text a {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
}

.nav-container {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* ==========================================================================
   FLAG SWITCHER (IT / EN) & STATI VISIVI
   - Posizionato subito prima di PORTFOLIO nella barra di navigazione.
   - Stato attivo: la bandiera della lingua corrente è desaturata/opacizzata (opacity: 0.45, grayscale: 80%).
   - Stato inattivo/invito: l'altra bandiera è vivida a colori pieni (opacity: 1, grayscale: 0%), invitando al clic.
   ========================================================================== */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 4px;
}

.lang-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  padding: 0;
  cursor: pointer;
  line-height: 0;
  box-sizing: border-box;
  transition: opacity 0.35s ease, filter 0.35s ease, transform 0.2s ease, border-color 0.25s ease;
}

.lang-btn .flag-icon {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  pointer-events: none;
}

/* 1. Stato attivo Italiano (Default): IT desaturato/dimmed, UK saturo e cliccabile */
html[data-lang="it"] .lang-btn--it,
html:not([data-lang]) .lang-btn--it {
  opacity: 0.45;
  filter: grayscale(80%);
  border-color: rgba(255, 255, 255, 0.12);
  cursor: default;
}

html[data-lang="it"] .lang-btn--en,
html:not([data-lang]) .lang-btn--en {
  opacity: 1;
  filter: grayscale(0%);
  border-color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
}

html[data-lang="it"] .lang-btn--en:hover,
html:not([data-lang]) .lang-btn--en:hover {
  transform: scale(1.12);
  border-color: #ffffff;
}

/* 2. Stato attivo Inglese: UK desaturato/dimmed, IT saturo e cliccabile */
html[data-lang="en"] .lang-btn--en {
  opacity: 0.45;
  filter: grayscale(80%);
  border-color: rgba(255, 255, 255, 0.12);
  cursor: default;
}

html[data-lang="en"] .lang-btn--it {
  opacity: 1;
  filter: grayscale(0%);
  border-color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
}

html[data-lang="en"] .lang-btn--it:hover {
  transform: scale(1.12);
  border-color: #ffffff;
}

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

/* ==========================================================================
   ISOLAMENTO LINGUISTICO BILINGUE (MAI VISUALIZZAZIONE SIMULTANEA)
   ========================================================================== */
html[data-lang="it"] .lang-en,
html[data-lang="it"] [data-lang-content="en"],
html:not([data-lang]) .lang-en,
html:not([data-lang]) [data-lang-content="en"] {
  display: none !important;
}

html[data-lang="en"] .lang-it,
html[data-lang="en"] [data-lang-content="it"] {
  display: none !important;
}

.lang-divider {
  display: none !important;
}

/* ==========================================================================
   EFFETTO TEXT SCRAMBLE / SLOT MACHINE
   ========================================================================== */
.scramble-char {
  color: #777777;
  opacity: 0.85;
  display: inline-block;
}

.nav-container .page-title a {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  text-transform: uppercase;
  padding: 4px 0;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-container .page-title a:hover,
.nav-container .page-title a.active {
  color: var(--text-primary);
  font-weight: 600;
}

.pf-nav-social ul {
  display: flex;
  align-items: center;
}

.pf-nav-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.pf-nav-social a:hover {
  opacity: 1;
}

.pf-nav-social .icon,
.pf-footer-social .icon,
.project-module-social_icons .icon {
  width: 28px;
  height: 22px;
  fill: var(--text-primary);
}

/* Mobile Hamburger */
.hamburger-click-area {
  display: none;
  cursor: pointer;
  padding: 10px;
  z-index: 110;
}

.hamburger {
  width: 24px;
  height: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger i {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

body.nav-open .hamburger i:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
body.nav-open .hamburger i:nth-child(2) {
  opacity: 0;
}
body.nav-open .hamburger i:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ==========================================================================
   PAGE VIEWS & TRANSITIONS
   ========================================================================== */
.page-view {
  display: none;
  animation: fadeInView 0.35s ease forwards;
}

.page-view.active {
  display: block;
}

@keyframes fadeInView {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   MASTHEAD (Portfolio & Workshop)
   ========================================================================== */
.masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px 56px;
  max-width: 1140px;
  margin: 0 auto;
}

.masthead-title {
  font-size: 38px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.masthead-text p {
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-secondary);
  font-weight: 300;
}

.masthead-text .masthead-en {
  display: inline;
  font-style: italic;
  font-weight: 200;
  color: var(--text-secondary);
  margin-left: 6px;
}

.masthead-arrow-container {
  margin-top: 56px;
  cursor: pointer;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.masthead-arrow-container:hover {
  opacity: 1;
  transform: translateY(3px);
}

.masthead-arrow {
  width: 16px;
  height: 16px;
  border-right: 2px solid var(--text-secondary);
  border-bottom: 2px solid var(--text-secondary);
  transform: rotate(45deg);
}

/* ==========================================================================
   PROJECT COVERS GRID (Portfolio 3-col, Workshop 2-col, Related 4-col)
   ========================================================================== */
.project-covers {
  display: grid;
  gap: var(--grid-gap);
  width: 100%;
}

.project-covers.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.project-covers.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.project-covers.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ==========================================================================
   FASE 3: DIMENSIONI UNIFORMI CARD (16/10) & HOVER SCALA DI GRIGI -> COLORI
   - aspect-ratio: 16/10 assicura che ogni card abbia proporzioni identiche.
   - Le immagini usano object-fit: cover e non alterano mai la dimensione del box.
   - A riposo: filter: grayscale(100%) su tutte le immagini (Layer A e Layer B).
   - In hover (:hover): filter: grayscale(0%) svela i colori naturali in modo fluido.
   - Due layer sovrapposti (.cover__img--layer-a e .cover__img--layer-b) permettono
     il carosello asincrono con crossfade di opacità senza alcuno scatto visivo.
   ========================================================================== */
.project-cover {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: #202020;
  cursor: pointer;
}

.cover-content-container,
.cover-image-wrap,
.cover-image,
.cover,
.cover-normal {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Layer immagini per carosello crossfade (Layer A e Layer B) */
.cover__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(100%);
  transition: filter 0.4s ease, opacity 0.9s ease, transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: opacity, filter, transform;
}

.cover__img--layer-a {
  z-index: 1;
  opacity: 1;
}

.cover__img--layer-b {
  z-index: 2;
  opacity: 0;
}

/* Hover: svela i colori naturali su entrambi i layer e applica leggero zoom */
.project-cover:hover .cover__img {
  filter: grayscale(0%);
  transform: scale(1.03);
}

.details-wrap {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(180deg, rgba(18, 18, 18, 0.25) 0%, rgba(18, 18, 18, 0.65) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  pointer-events: none;
}

.project-cover:hover .details-wrap {
  opacity: 1;
}

.details {
  width: 100%;
  max-height: 100%;
  overflow-y: auto;
  scrollbar-width: none;
}

.details::-webkit-scrollbar {
  display: none;
}

.details-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.details-inner .title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

.details-inner .description {
  font-size: 12.5px;
  line-height: 1.45;
  color: #cccccc;
  font-weight: 300;
  white-space: pre-line;
  max-width: 95%;
}

.details-inner .date {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ==========================================================================
   STANDARD PAGES & PROJECT MODULES
   ========================================================================== */
.page.standard-modules {
  padding-top: 24px;
  padding-bottom: 60px;
}

.page-header.content {
  text-align: center;
  padding: 40px 20px 44px;
}

.page-header .title {
  font-size: 38px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.project-modules {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.project-module-text {
  width: 100%;
  margin: 0 auto;
}

.module-text {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.module-text div {
  min-height: 1em;
}

.services-text {
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-Light);
}

.services-text > div {
  margin-bottom: 6px;
}

.italic-en {
  font-style: italic;
  font-weight: 300;
}

/* ==========================================================================
   FASE 2: DETTAGLIO PROGETTO OTTIMIZZATO (IMAGE-ONLY STREAM & ARCHITETTURA)
   - Layout minimale incentrato sulle immagini ad alta risoluzione.
   - Intestazione con Titolo e Descrizione bilingue (Italiano + Inglese).
   - Flusso visivo continuo senza interruzioni di testo o etichette intermedie.
   - Tutti i percorsi delle immagini sono definiti in "progetti.json".
   ========================================================================== */

/* Sezione descrittiva principale (Lingua singola isolata) */
.project-detail-header-desc {
  max-width: 960px;
  margin: 0 auto 36px;
  text-align: center;
  padding: 0 20px;
}

.project-desc-single {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-primary);
  max-width: 900px;
  margin: 0 auto;
}

.project-desc-it {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.project-desc-divider {
  color: var(--text-secondary);
  opacity: 0.6;
  margin: 14px 0;
  font-size: 14px;
  letter-spacing: 2px;
}

.project-desc-en {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  font-style: italic;
  font-weight: 300;
}

/* Flusso visivo continuo delle immagini (Image-Only Stream) */
.project-stream {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.project-stream-item {
  width: 100%;
  overflow: hidden;
  cursor: zoom-in;
  background-color: #1e1e1e;
  border-radius: 2px;
}

.project-stream-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.35s ease, opacity 0.3s ease;
}

.project-stream-item:hover .project-stream-image {
  transform: scale(1.01);
}

/* ==========================================================================
   CONSTRUCTION MANAGEMENT - DEDICATED EDITORIAL LAYOUT
   (Applicato ESCLUSIVAMENTE al layout del progetto Construction Management)
   ========================================================================== */
.cm-editorial-wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.cm-editorial-section {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.cm-section-header {
  border-bottom: 1px solid #2a2a2a;
  padding-bottom: 12px;
}

.cm-section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.cm-subsection {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cm-subsection-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-Light);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cm-image-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
}

.cm-image-item {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 2px;
  background-color: #1e1e1e;
  cursor: zoom-in;
  position: relative;
}

.cm-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.cm-image-item:hover img {
  transform: scale(1.02);
}

.cm-closing-section {
  margin-top: 16px;
  padding: 32px;
  background-color: var(--bg-elevated);
  border: 1px solid #2a2a2a;
  border-radius: 4px;
}

.cm-closing-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.cm-closing-desc {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-Light);
  margin-bottom: 24px;
}

.cm-brands-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  list-style: disc;
  padding-left: 20px;
  margin: 0;
}

.cm-brands-list li {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}

@media (max-width: 768px) {
  .cm-editorial-wrap {
    gap: 36px;
  }
  
  .cm-image-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .cm-closing-section {
    padding: 24px 20px;
  }
}

/* ==========================================================================
   FAUCET DESIGN RESEARCH - DEDICATED EDITORIAL LAYOUT
   (Applicato ESCLUSIVAMENTE al layout del progetto Faucet Design Research)
   ========================================================================== */
.faucet-editorial-wrap {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.faucet-subtitle {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-Light);
  text-align: center;
  letter-spacing: 0.02em;
  margin-top: -24px;
  margin-bottom: 40px;
}

.faucet-family-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faucet-family-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  text-align: center;
  margin-top: 4rem;
  margin-bottom: 1.5rem;
}

.faucet-family-block:first-of-type .faucet-family-title {
  margin-top: 1.5rem;
}

.faucet-row {
  display: grid;
  gap: 10px;
  width: 100%;
}

.faucet-row--2 {
  grid-template-columns: repeat(2, 1fr);
}

.faucet-row--3 {
  grid-template-columns: repeat(3, 1fr);
}

.faucet-row--4 {
  grid-template-columns: repeat(4, 1fr);
}

.faucet-img-item {
  width: 100%;
  overflow: hidden;
  background-color: #1e1e1e;
  border-radius: 2px;
  cursor: zoom-in;
  position: relative;
}

.faucet-img-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease, opacity 0.3s ease;
}

.faucet-img-item:hover img {
  transform: scale(1.02);
}

@media (max-width: 860px) {
  .faucet-row--3,
  .faucet-row--4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

@media (max-width: 520px) {
  .faucet-row--2,
  .faucet-row--3,
  .faucet-row--4 {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .faucet-family-title {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 16px;
  }
}

/* ==========================================================================
   SKETCHES AND CONCEPTS - DEDICATED TWO-COLUMN EDITORIAL LAYOUT
   (Applicato ESCLUSIVAMENTE al layout del progetto Sketches and Concepts)
   ========================================================================== */
.sketches-editorial-wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 72px;
  padding-bottom: 40px;
}

.sketches-section {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: flex-start;
  width: 100%;
}

.sketches-side-caption {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
}

.sketches-section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  letter-spacing: 0.02em;
  margin: 0;
}

.sketches-section-subtitle {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-Light);
  line-height: 1.6;
  margin: 0;
}

.sketches-media-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  width: 100%;
}

.sketches-sub-caption {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 14px;
  margin-bottom: 4px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sketches-row {
  display: grid;
  gap: 10px;
  width: 100%;
}

.sketches-row--1 {
  grid-template-columns: 1fr;
}

.sketches-row--2 {
  grid-template-columns: repeat(2, 1fr);
}

.sketches-row--3 {
  grid-template-columns: repeat(3, 1fr);
}

.sketches-row--4 {
  grid-template-columns: repeat(4, 1fr);
}

.sketches-img-item {
  width: 100%;
  overflow: hidden;
  background-color: #1a1a1a;
  border-radius: 2px;
  cursor: zoom-in;
  position: relative;
  display: flex;
}

.sketches-img-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease, opacity 0.3s ease;
}

.sketches-img-item:hover img {
  transform: scale(1.02);
}

/* Logo Glyphs Grid (11 items) */
.sketches-glyphs-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  width: 100%;
  background-color: #161616;
  padding: 16px;
  border-radius: 4px;
}

.sketches-glyph-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background-color: #1f1f1f;
  border-radius: 3px;
  cursor: zoom-in;
  aspect-ratio: 1 / 1;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.sketches-glyph-item:hover {
  background-color: #2b2b2b;
  transform: scale(1.04);
}

.sketches-glyph-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* Video Wrapper & Elements */
.sketches-video-wrapper {
  width: 100%;
  background-color: #0d0d0d;
  border-radius: 3px;
  overflow: hidden;
}

.sketches-video {
  width: 100%;
  height: auto;
  display: block;
  max-height: 85vh;
  outline: none;
  background-color: #000;
}

@media (max-width: 900px) {
  .sketches-editorial-wrap {
    gap: 48px;
  }

  .sketches-section {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .sketches-side-caption {
    position: static;
    padding-right: 0;
  }

  .sketches-glyphs-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 600px) {
  .sketches-row--3,
  .sketches-row--4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .sketches-glyphs-grid {
    grid-template-columns: repeat(3, 1fr);
    padding: 10px;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .sketches-row--2 {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .sketches-glyphs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   PROTOTYPING & ENGINEERING - DEDICATED EDITORIAL LAYOUT
   (Applicato ESCLUSIVAMENTE al layout del progetto Prototyping & Engineering)
   ========================================================================== */
.proto-editorial-wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 72px;
  padding-bottom: 40px;
}

.proto-intro-heading {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  margin: 0 0 16px 0;
  letter-spacing: 0.01em;
}

.proto-section-divider-header {
  text-align: center;
  padding-top: 32px;
  margin-bottom: -16px;
}

.proto-main-section-title {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  margin: 0;
  letter-spacing: 0.02em;
}

.proto-section {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: flex-start;
  width: 100%;
}

.proto-side-caption {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 4px;
}

.proto-section-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  letter-spacing: 0.02em;
  margin: 0;
}

.proto-side-desc {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-Light);
  line-height: 1.6;
  margin: 0;
}

.proto-media-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  width: 100%;
}

.proto-row {
  display: grid;
  gap: 10px;
  width: 100%;
}

.proto-row--3 {
  grid-template-columns: repeat(3, 1fr);
}

.proto-row--4 {
  grid-template-columns: repeat(4, 1fr);
}

.proto-row--5 {
  grid-template-columns: repeat(5, 1fr);
}

.proto-row--7 {
  grid-template-columns: repeat(7, 1fr);
}

.proto-img-item {
  width: 100%;
  overflow: hidden;
  background-color: #1a1a1a;
  border-radius: 2px;
  cursor: zoom-in;
  position: relative;
  display: flex;
}

/* Aspect ratio per riga per garantire altezze uniformi */
.proto-row--3 .proto-img-item {
  aspect-ratio: 4 / 3;
}

.proto-row--4 .proto-img-item {
  aspect-ratio: 3 / 4;
}

.proto-row--5 .proto-img-item {
  aspect-ratio: 1 / 1;
}

.proto-row--7 .proto-img-item {
  aspect-ratio: 3 / 4;
}

.proto-row--shooting-row2 .proto-img-item {
  aspect-ratio: 3 / 4;
}

.proto-img-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease, opacity 0.3s ease;
}

.proto-img-item:hover img {
  transform: scale(1.02);
}

@media (max-width: 900px) {
  .proto-editorial-wrap {
    gap: 48px;
  }

  .proto-section {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .proto-side-caption {
    position: static;
  }

  .proto-row--7 {
    grid-template-columns: repeat(4, 1fr);
  }

  .proto-row--5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .proto-row--7 {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .proto-row--5 {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .proto-row--4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .proto-row--3 {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* ==========================================================================
   ATMOSPHERES & ART DIRECTION - DEDICATED EDITORIAL LAYOUT
   (Applicato ESCLUSIVAMENTE al layout del progetto Atmospheres & Art Direction)
   ========================================================================== */
.atmos-editorial-wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding-bottom: 24px;
}

.atmos-subtitle-wrap {
  text-align: center;
  margin: -16px auto 16px;
  max-width: 800px;
}

.atmos-subtitle {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
  letter-spacing: 0.02em;
}

[data-lang="en"] .atmos-subtitle,
html[lang="en"] .atmos-subtitle,
.atmos-subtitle.is-en {
  font-style: italic;
}

.atmos-gallery {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.atmos-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
}

.atmos-row--1 .atmos-img-item {
  aspect-ratio: 1396 / 2024;
}

.atmos-row--2 .atmos-img-item {
  aspect-ratio: 1 / 1;
}

.atmos-img-item {
  width: 100%;
  overflow: hidden;
  background-color: #1e1e1e;
  border-radius: 2px;
  cursor: zoom-in;
  position: relative;
}

.atmos-img-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease, opacity 0.3s ease;
}

.atmos-img-item:hover img {
  transform: scale(1.02);
}

@media (max-width: 768px) {
  .atmos-editorial-wrap {
    gap: 20px;
  }

  .atmos-gallery {
    gap: 10px;
  }

  .atmos-row {
    gap: 10px;
  }
}

@media (max-width: 600px) {
  .atmos-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* Single Image Module */
.project-module-image {
  width: 100%;
  max-width: 1100px;
  margin: 8px auto 24px;
}

.project-module-image .js-lightbox {
  cursor: zoom-in;
  overflow: hidden;
}

.project-module-image img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Media Collection / Justified Grid Module */
.project-module-media_collection {
  width: 100%;
  margin: 8px auto 24px;
}

.grid--main {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.grid-row {
  display: flex;
  flex-direction: row;
  gap: 8px;
  width: 100%;
  align-items: stretch;
}

.grid__item-container {
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
  background-color: #202020;
  display: flex;
  flex-direction: column;
}

.grid__item-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.grid__item-container:hover .grid__item-image {
  transform: scale(1.015);
}

.grid__image-caption {
  padding: 8px 4px 4px;
  text-align: center;
  background-color: var(--bg-color);
}

.grid__caption-text {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
}

/* Tree Module (Side-by-side columns) */
.project-module-tree {
  width: 100%;
  margin: 16px auto;
}

.tree-wrapper {
  display: flex;
  flex-direction: row;
  gap: 40px;
  align-items: flex-start;
  width: 100%;
}

.tree-child-wrapper {
  min-width: 0;
}

.about-bio-module {
  max-width: 680px;
}

/* Video Module */
.project-module-video {
  width: 100%;
  margin: 12px auto;
}

.embed-dimensions {
  width: 100%;
  margin: 0 auto;
}

.embed-aspect-ratio {
  position: relative;
  width: 100%;
  height: 0;
  background: #141414;
}

.embed-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Button Module */
.project-module-button {
  width: 100%;
  margin: 16px 0;
}

.button-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.button-container.align-right {
  justify-content: flex-end;
}

.button-container.align-left {
  justify-content: flex-start;
}

.button-module {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #2a2a2a;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  padding: 14px 34px;
  border-radius: 30px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.button-module:hover {
  background-color: #3d3d3d;
  transform: translateY(-1px);
}

/* Social Icons Module (in FAQ) */
.project-module-social_icons .social ul {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 0;
}

/* ==========================================================================
   CONTACT FORM
   ========================================================================== */
.project-module-form {
  max-width: 580px;
  width: 100%;
  margin: 36px auto 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-input input,
.form-input textarea {
  width: 100%;
  padding: 15px 16px;
  background-color: #ffffff;
  color: #191919;
  border: none;
  border-radius: 2px;
  font-family: var(--font-main);
  font-size: 14px;
  outline: none;
}

.form-input textarea {
  resize: vertical;
  min-height: 130px;
}

.submit-button {
  align-self: center;
  margin-top: 8px;
  background-color: #2a2a2a;
  color: var(--text-primary);
  border: none;
  padding: 14px 40px;
  border-radius: 30px;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.submit-button:hover {
  background-color: #3d3d3d;
}

.contact-form-sent {
  display: none;
  text-align: center;
  padding: 32px;
  font-size: 18px;
  color: var(--text-primary);
  font-weight: 500;
}

/* ==========================================================================
   FAQ STYLING
   ========================================================================== */
.faq-text .faq-q,
.faq-text .faq-a {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  line-height: 1.7;
  margin-bottom: 12px;
}

.faq-text .faq-q {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 10px;
}

.faq-text .faq-a {
  color: var(--text-Light);
  font-weight: 400;
  margin-bottom: 22px;
}

.faq-text .faq-num {
  color: var(--text-primary);
  font-weight: 700;
  flex-shrink: 0;
  min-width: 24px;
}

.faq-text .faq-text-content {
  flex: 1;
  min-width: 0;
}

.faq-footer-note {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #2a2a2a;
  color: var(--text-primary);
  line-height: 1.65;
  text-align: center;
}

/* ==========================================================================
   OTHER PROJECTS ("You may also like")
   ========================================================================== */
.other-projects {
  margin-top: 80px;
  padding-top: 40px;
}

.other-projects .title-wrapper {
  margin-bottom: 24px;
  text-align: center;
}

.other-projects-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
}

/* ==========================================================================
   BACK TO TOP & FOOTER
   ========================================================================== */
.back-to-top {
  text-align: center;
  padding: 64px 0 32px;
}

.back-to-top a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.back-to-top a:hover {
  color: var(--text-primary);
}

.back-to-top-fixed {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  background-color: rgba(40, 40, 40, 0.85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, background-color 0.2s ease;
  z-index: 90;
}

.back-to-top-fixed.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top-fixed:hover {
  background-color: #3a3a3a;
}

.icon-back-to-top {
  width: 18px;
  height: 18px;
  fill: var(--text-primary);
}

.site-footer {
  padding: 24px 0 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.pf-footer-social a {
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.pf-footer-social a:hover {
  opacity: 1;
}

/* ==========================================================================
   LIGHTBOX MODAL
   ========================================================================== */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 15, 15, 0.96);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.lightbox-modal.open {
  display: flex;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 82vh;
  object-fit: contain;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
}

.lightbox-caption {
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-Light);
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-primary);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
  left: 24px;
}

.lightbox-next {
  right: 24px;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1024px) {
  .project-covers.grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .project-covers.grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .site-container {
    padding: 0 18px;
  }

  .hamburger-click-area {
    display: block;
  }

  .nav-container {
    position: fixed;
    inset: 0;
    background-color: rgba(25, 25, 25, 0.98);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 105;
  }

  body.has-nav .nav-container,
  body.nav-open .nav-container {
    opacity: 1;
    pointer-events: auto;
  }

  .lang-switcher {
    gap: 16px;
    margin-right: 0;
    margin-bottom: 8px;
  }

  .lang-btn {
    width: 26px;
    height: 26px;
  }

  .nav-container .page-title a {
    font-size: 20px;
  }

  .masthead {
    padding: 48px 12px 36px;
  }

  .masthead-title {
    font-size: 28px;
  }

  .masthead-text p {
    font-size: 16px;
  }

  .project-covers.grid-3,
  .project-covers.grid-2,
  .project-covers.grid-4 {
    grid-template-columns: 1fr;
  }

  .tree-wrapper {
    flex-direction: column;
    gap: 24px;
  }

  .grid-row {
    flex-direction: column;
  }

  .page-header .title {
    font-size: 28px;
  }
}

/* ==========================================================================
   VISUAL STUDIES & COMPOSITION - GRIGLIA GIUSTIFICATA + SPOTLIGHT
   ========================================================================== */
.vs-editorial-wrap {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding-bottom: 40px;
}

.vs-subtitle-wrap {
  text-align: center;
  margin: -16px auto 16px;
  max-width: 850px;
}

.vs-subtitle {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 16px 0;
  letter-spacing: 0.02em;
}

html[lang="en"] .vs-subtitle,
.vs-subtitle.is-en {
  font-style: italic;
}

.vs-intro-desc {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-primary);
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

/* Griglia giustificata: larghezza e crescita di ogni foto sono proporzionali al
   suo rapporto d'aspetto (--r = larghezza/altezza). Le foto di una stessa riga
   hanno quindi la stessa altezza, nessuna viene ritagliata e ogni riga riempie
   esattamente la larghezza della griglia. --vs-h e' l'altezza target di riga. */
.vs-dynamic-grid {
  --vs-h: 240px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
}

/* Riempitivo: evita che l'ultima riga (incompleta) venga stirata a tutta larghezza */
.vs-dynamic-grid::after {
  content: "";
  flex-grow: 100000;
}

.vs-img-item {
  --r: 1.5;
  flex-grow: calc(var(--r) * 100);
  flex-shrink: 1;
  flex-basis: calc(var(--r) * var(--vs-h));
  aspect-ratio: var(--r);
  min-width: 0;
  overflow: hidden;
  background-color: #1a1a1a;
  border-radius: 2px;
  cursor: zoom-in;
  position: relative;
}

.vs-img-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(100%);
  opacity: 0.75;
  transition: filter 0.8s ease, opacity 0.8s ease, transform 0.6s ease;
  will-change: filter, opacity, transform;
}

/* Hover manuale: colore pieno immediato */
.vs-img-item:hover img {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.03);
}

/* Spotlight automatico casuale: colore pieno fluido */
.vs-img-item.vs-spotlight-active img {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.02);
}

@media (max-width: 768px) {
  .vs-dynamic-grid {
    --vs-h: 140px;
    gap: 6px;
  }
}

/* ==========================================================================
   AGGIUNTE PER LE PAGINE STATICHE (SEO) - elementi nuovi, stesso stile del sito
   ========================================================================== */

/* Transizione leggera tra le pagine (browser compatibili, nessun JavaScript) */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* Link nei testi: riconoscibili senza cambiare i colori del sito */
.masthead-text a,
.services-text a,
.module-text a,
.project-desc-single a,
.faq-text a,
.footer-info a,
.form-privacy a,
.contact-noscript a,
.cm-closing-link a {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 3px;
}
.masthead-text a:hover,
.services-text a:hover,
.module-text a:hover,
.project-desc-single a:hover,
.faq-text a:hover,
.footer-info a:hover,
.form-privacy a:hover,
.cm-closing-link a:hover {
  text-decoration-color: #ffffff;
}

/* Paragrafo introduttivo "chi, cosa, dove" */
.masthead-intro {
  margin-bottom: 20px;
}
.services-intro {
  text-align: center;
}

/* Sezioni della pagina Servizi e delle pagine dedicate */
.service-section {
  padding-top: 96px;
  scroll-margin-top: 24px;
}
.service-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.3;
  margin-bottom: 24px;
}
.services-index {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 26px;
  margin-top: 8px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.services-index a {
  color: var(--text-secondary);
}
.services-index a:hover {
  color: var(--text-primary);
}

/* Elenco dell'esperienza (Chi sono) */
.experience-list {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-Light);
}
.experience-list li {
  padding: 12px 0;
  border-bottom: 1px solid #2a2a2a;
}
.experience-list strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* FAQ: domande a fisarmonica, la risposta si apre con la freccia */
.faq-text details.faq-item {
  border-bottom: 1px solid #2a2a2a;
}
.faq-text details.faq-item:last-of-type {
  border-bottom: none;
}
.faq-text summary.faq-q {
  list-style: none;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0;
  padding: 16px 0;
}
.faq-text summary.faq-q::-webkit-details-marker {
  display: none;
}
.faq-text summary.faq-q:focus-visible {
  outline: 1px solid #ffffff;
  outline-offset: 4px;
}
.faq-q-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  font-size: inherit;
  font-weight: 600;
  line-height: 1.7;
  color: var(--text-primary);
}
.faq-arrow {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-right: 2px solid var(--text-secondary);
  border-bottom: 2px solid var(--text-secondary);
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.25s ease, border-color 0.2s ease;
}
.faq-text summary.faq-q:hover .faq-arrow {
  border-color: var(--text-primary);
}
.faq-text details[open] .faq-arrow {
  transform: translateY(2px) rotate(-135deg);
}
.faq-text details.faq-item .faq-a {
  margin: 0;
  padding: 0 0 22px;
}
.faq-intro {
  text-align: center;
  margin-bottom: 36px;
  color: var(--text-Light);
}
.faq-item {
  scroll-margin-top: 24px;
}

/* Pulsanti di contatto (footer e pagina Contatti) */
.contact-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}
.contact-noscript {
  text-align: center;
  font-size: 14px;
  margin-bottom: 16px;
}
.footer-info {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 16px;
  padding: 0 16px;
}

/* Modulo contatti */
.form-honeypot {
  display: none !important;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.form-privacy {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
}

/* Pagine progetto in griglia: stessa griglia di "Studi visivi", righe piu' alte e foto a colori */
.vs-dynamic-grid.project-grid {
  --vs-h: 300px;
  max-width: 1400px;
  margin: 0 auto;
}
.project-grid .vs-img-item img {
  filter: none;
  opacity: 1;
  transition: transform 0.6s ease, opacity 0.3s ease;
}
.project-grid .vs-img-item:hover img {
  transform: scale(1.03);
}
@media (max-width: 768px) {
  .vs-dynamic-grid.project-grid {
    --vs-h: 160px;
  }
}

/* Barra di navigazione sempre visibile durante lo scorrimento */
html {
  scroll-padding-top: 96px;          /* i collegamenti interni (#...) non finiscono sotto la barra */
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  margin: 0 -32px;                   /* lo sfondo copre anche i margini laterali del contenitore */
  padding-left: 32px;
  padding-right: 32px;
  background-color: var(--bg-color);
  border-bottom: 1px solid transparent;
  transition: padding 0.25s ease, border-color 0.25s ease;
}
body.header-compact .site-header {
  padding-top: 14px;
  padding-bottom: 14px;
  border-bottom-color: #262626;
}
.sketches-side-caption,
.proto-side-caption {
  top: 112px;
}
@media (max-width: 768px) {
  .site-header {
    margin: 0 -18px;
    padding-left: 18px;
    padding-right: 18px;
  }
  body.header-compact .site-header {
    padding-top: 10px;
    padding-bottom: 10px;
  }
  html {
    scroll-padding-top: 76px;
  }
}

/* Dimensioni del testo scelte dall'editor (relative al testo intorno) */
.t-piccolo { font-size: 0.85em; }
.t-grande { font-size: 1.25em; line-height: 1.4; }
.t-molto-grande { font-size: 1.6em; line-height: 1.3; }

/* Portfolio direzione lavori: collegamento al servizio */
.cm-closing-link {
  margin-top: 24px;
  text-align: center;
}

/* Informativa privacy */
.privacy-text .service-title {
  font-size: 20px;
  text-align: left;
  margin: 32px 0 8px;
}
.privacy-text p {
  margin-bottom: 12px;
}

/* Pagina chiusa (rendering commerciali): ogni gruppo e' un rettangolo pieno. Ogni riga riempie tutta la larghezza,
   le foto hanno la stessa altezza (larghezza proporzionale alla forma, nessun ritaglio). Le righe le decide il generatore. */
.vs-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.vs-row {
  display: flex;
  gap: 10px;
  width: 100%;
}
.vs-rows .vs-img-item {
  flex: var(--r) 1 0%;
  min-width: 0;
}
/* Su telefono le righe tornano libere: le foto vanno a capo e occupano comunque tutta la larghezza */
@media (max-width: 600px) {
  .vs-rows {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }
  .vs-row {
    display: contents;
  }
  .vs-rows .vs-img-item {
    flex: calc(var(--r) * 100) 1 calc(var(--r) * 110px);
  }
}
