/* ============================================================
   Cognetti.it — foglio di stile principale
   Palette: ivory #F7F4ED · inchiostro #22201B
            blu araldico #1B3A5C (accento) · oro tenue #B8924A
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Source+Serif+4:ital,wght@0,400;0,600;1,400&family=Inter:wght@400;500;600&display=swap');

:root{
  --ivory: #F7F4ED;
  --ivory-deep: #EFEADD;
  --ink: #22201B;
  --ink-soft: #4A463E;
  --blue: #1B3A5C;
  --blue-soft: #2C5076;
  --gold: #B8924A;
  --gold-soft: #D9C18C;
  --line: #DBD4C2;
  --error: #9B3B2E;
  --max-width: 1180px;
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: 'Source Serif 4', Georgia, serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .eyebrow-font{
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
}

h1{ font-size: clamp(2.4rem, 4vw, 3.6rem); line-height: 1.1; margin: 0 0 .4rem; }
h2{ font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin: 2.2rem 0 .8rem; }
h3{ font-size: 1.3rem; margin: 0 0 .4rem; }

a{ color: var(--blue); text-decoration: none; }
a:hover{ color: var(--gold); text-decoration: underline; }

p{ margin: 0 0 1.1rem; color: var(--ink-soft); }

.container{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Header / navigazione ---------- */
.site-header{
  border-bottom: 1px solid var(--line);
  background: var(--ivory);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .container{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}
.brand{
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.03em;
}
.brand span{ color: var(--blue); }
nav.main-nav{ display: flex; gap: 1.8rem; }
nav.main-nav a{
  font-family: 'Inter', sans-serif;
  font-size: .92rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
nav.main-nav a:hover, nav.main-nav a.attiva{ color: var(--blue); text-decoration: none; }

/* ---------- Motivo "sei monti" — segno distintivo del sito ---------- */
.sei-monti{
  display: flex;
  align-items: flex-end;
  gap: 3px;
  width: 56px;
  height: 16px;
  margin: 0 auto;
  opacity: .75;
}
.sei-monti span{
  flex: 1;
  background: var(--gold);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.sei-monti span:nth-child(1){ height: 55%; }
.sei-monti span:nth-child(2){ height: 80%; }
.sei-monti span:nth-child(3){ height: 100%; }
.sei-monti span:nth-child(4){ height: 100%; }
.sei-monti span:nth-child(5){ height: 80%; }
.sei-monti span:nth-child(6){ height: 55%; }

.divider{
  margin: 2.8rem 0;
  text-align: center;
}

/* ---------- Hero ---------- */
.hero{
  padding: 3.4rem 0 1rem;
  text-align: center;
}
.hero .eyebrow{
  font-family: 'Inter', sans-serif;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .9rem;
  display: block;
}
.hero p.lead{
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.15rem;
  color: var(--ink-soft);
}
.hero-img{
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 4px;
  margin: 2.2rem 0;
  box-shadow: 0 12px 30px -14px rgba(27,58,92,0.35);
}

/* ---------- Layout a due colonne (contenuto + colonna persone) ---------- */
.layout-due-colonne{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 3.2rem;
  align-items: start;
  padding: 1.5rem 0 4rem;
}
.contenuto-principale{ min-width: 0; }
.contenuto-principale p{ font-size: 1.04rem; }

.colonna-persone{
  position: sticky;
  top: 5.5rem;
}
.colonna-persone h3.titolo-colonna{
  font-family: 'Inter', sans-serif;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  padding-bottom: .6rem;
  margin-bottom: 1rem;
}

.card-persona{
  display: flex;
  gap: .8rem;
  padding: .9rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.card-persona:hover{
  border-color: var(--gold-soft);
  box-shadow: 0 6px 18px -10px rgba(184,146,74,0.5);
}
.card-persona img{
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--ivory-deep);
}
.card-persona .card-persona-corpo{ min-width: 0; }
.card-persona .card-persona-corpo a{
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  display: block;
}
.card-persona .card-persona-corpo a:hover{ color: var(--blue); text-decoration: none; }
.card-persona .card-persona-corpo p{
  font-family: 'Inter', sans-serif;
  font-size: .82rem;
  color: var(--ink-soft);
  margin: .2rem 0 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-persona .ramo-tag{
  font-family: 'Inter', sans-serif;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gold);
}

.separatore-persona{
  height: 1px;
  background: var(--line);
  margin: .9rem .2rem;
}

/* ---------- Sezioni araldica ---------- */
.stemma-blocco{
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.8rem;
  align-items: start;
  margin-bottom: 2.6rem;
  padding-bottom: 2.4rem;
  border-bottom: 1px solid var(--line);
}
.stemma-blocco:last-of-type{ border-bottom: none; }
.stemma-blocco img{
  width: 100%;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: #fff;
}
.stemma-blocco .numero{
  font-family: 'Cormorant Garamond', serif;
  font-size: .85rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .2rem;
  display: block;
}

@media (max-width: 640px){
  .stemma-blocco{ grid-template-columns: 1fr; }
}

/* ---------- Galleria immagini (home) ---------- */
.galleria{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}
.galleria img{
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
}

/* ---------- Form segnalazione ---------- */
.form-segnalazione{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2rem;
  margin-top: 1rem;
}
.form-segnalazione label{
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-soft);
  margin-bottom: .35rem;
}
.campo{ margin-bottom: 1.2rem; }
.form-segnalazione input[type=text],
.form-segnalazione input[type=email],
.form-segnalazione textarea{
  width: 100%;
  font-family: 'Source Serif 4', serif;
  font-size: 1rem;
  padding: .65rem .8rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--ivory);
  color: var(--ink);
}
.form-segnalazione input:focus,
.form-segnalazione textarea:focus{
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(27,58,92,0.12);
}
.form-segnalazione textarea{ min-height: 140px; resize: vertical; }

.bottone{
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: .92rem;
  letter-spacing: .02em;
  padding: .75rem 1.6rem;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s ease;
}
.bottone:hover{ background: var(--blue-soft); color: #fff; text-decoration: none; }

.messaggio-flash{
  padding: .9rem 1.1rem;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: .9rem;
  margin-bottom: 1rem;
}
.messaggio-flash.successo{ background: #E4EFE5; color: #2E5A33; border: 1px solid #BFD9C2; }
.messaggio-flash.errore{ background: #F6E4E1; color: var(--error); border: 1px solid #E3BDB6; }

/* ---------- Pagina persona ---------- */
.persona-header{
  display: flex;
  gap: 1.6rem;
  align-items: center;
  margin-bottom: 2rem;
}
.persona-header img{
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--ivory-deep);
}

.persona-sezione{
  margin: 2.6rem 0;
}
.persona-sezione > h2{
  border-bottom: 1px solid var(--line);
  padding-bottom: .5rem;
}

.voce-esperienza{
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}
.voce-esperienza:last-child{ border-bottom: none; }
.voce-esperienza .ruolo{
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
  display: block;
}
.voce-esperienza .azienda-periodo{
  font-family: 'Inter', sans-serif;
  font-size: .8rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .04em;
  display: block;
  margin: .15rem 0 .5rem;
}
.voce-esperienza p{ margin-bottom: 0; }

.tabella-risultati{
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-family: 'Inter', sans-serif;
  font-size: .85rem;
}
.tabella-risultati th{
  text-align: left;
  padding: .6rem .7rem;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
}
.tabella-risultati th:first-child{ border-radius: 5px 0 0 0; }
.tabella-risultati th:last-child{ border-radius: 0 5px 0 0; }
.tabella-risultati td{
  padding: .55rem .7rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}
.tabella-risultati tr:nth-child(even) td{ background: #FBF9F3; }

.galleria-persona{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .7rem;
  margin-top: 1rem;
}
.galleria-persona img{
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
}

/* ---------- Footer ---------- */
.site-footer{
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  padding: 2.4rem 0;
  text-align: center;
}
.site-footer p{
  font-family: 'Inter', sans-serif;
  font-size: .82rem;
  color: var(--ink-soft);
}

@media (max-width: 880px){
  .layout-due-colonne{ grid-template-columns: 1fr; }
  .colonna-persone{ position: static; }
  nav.main-nav{ gap: 1rem; flex-wrap: wrap; }
}

/* ---------- Didascalie immagini araldica ---------- */
.didascalia-ricostruzione{
  font-family: 'Inter', sans-serif;
  font-size: .72rem;
  font-style: italic;
  color: var(--ink-soft);
  text-align: center;
  margin: .5rem 0 0;
  opacity: .85;
}

.didascalia-ricostruzione.didascalia-fonte{
  color: var(--blue);
  font-style: normal;
  font-weight: 600;
}

/* ---------- Lightbox gallerie fotografiche ---------- */
body.lightbox-blocco-scroll{ overflow: hidden; }

.lightbox-overlay{
  position: fixed;
  inset: 0;
  background: rgba(34, 32, 27, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity .2s ease;
}
.lightbox-overlay.lightbox-attiva{
  display: flex;
  opacity: 1;
}

.lightbox-corpo{
  max-width: 90vw;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
}

.lightbox-immagine{
  max-width: 90vw;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.6);
  cursor: zoom-in;
  transition: transform .25s ease;
  transform: scale(1);
}
.lightbox-immagine.lightbox-zoom{
  cursor: zoom-out;
  transform: scale(1.7);
}

.lightbox-contatore{
  font-family: 'Inter', sans-serif;
  font-size: .8rem;
  color: var(--gold-soft);
  margin: 0;
}

.lightbox-chiudi,
.lightbox-prec,
.lightbox-succ{
  position: absolute;
  background: rgba(247, 244, 237, 0.12);
  color: #F7F4ED;
  border: 1px solid rgba(247, 244, 237, 0.25);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease;
}
.lightbox-chiudi:hover,
.lightbox-prec:hover,
.lightbox-succ:hover{
  background: rgba(247, 244, 237, 0.25);
}

.lightbox-chiudi{ top: 1.5rem; right: 1.5rem; }
.lightbox-prec{ left: 1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-succ{ right: 1.5rem; top: 50%; transform: translateY(-50%); }

@media (max-width: 640px){
  .lightbox-prec{ left: .6rem; width: 38px; height: 38px; }
  .lightbox-succ{ right: .6rem; width: 38px; height: 38px; }
  .lightbox-chiudi{ top: .8rem; right: .8rem; width: 38px; height: 38px; }
}

/* ---------- Placeholder video (in attesa del link YouTube/RaiPlay) ---------- */
.placeholder-video{
  height: 160px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  color: #FFFFFF;
  text-align: center;
  padding: .5rem;
  text-decoration: none;
  transition: background .15s ease;
}
a.placeholder-video:hover{
  background: #2C2A24;
  text-decoration: none;
}
a.placeholder-video:hover .etichetta{
  color: #FFFFFF;
}
.placeholder-video .icona-play{
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.placeholder-video .etichetta{
  font-family: 'Inter', sans-serif;
  font-size: .76rem;
  color: #D8D4C8;
}
.placeholder-video .sorgente{
  font-family: 'Inter', sans-serif;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gold-soft);
}

/* ---------- Citazioni nelle pagine persona ---------- */
.citazione-persona{
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--ink-soft);
  border-left: 3px solid var(--gold-soft);
  padding: .2rem 0 .2rem 1.4rem;
  margin: 2rem 0;
}
.citazione-persona .firma{
  display: block;
  text-align: right;
  font-style: normal;
  font-size: .85rem;
  color: var(--gold);
  margin-top: .8rem;
}
