/* Stoà Sicula · Rifinitura 14: Gallery, Team e Home */
:root {
  --stoa-terracotta: #b87560;
  --stoa-terracotta-dark: #925b4b;
  --stoa-ink: #293943;
  --stoa-paper: #f8f4ef;
  --stoa-card: #fffdfa;
}

/* Home: sezioni leggermente più vicine, mantenendo respiro editoriale. */
.page-home .section-pad {
  padding-block: clamp(52px, 5.6vw, 78px);
}
.page-home .intro-section .values-row {
  margin-top: clamp(28px, 3.2vw, 42px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.page-home .value-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
  min-height: 132px;
  padding: clamp(18px, 2vw, 25px);
  border: 1px solid rgba(125, 105, 91, .13);
  border-radius: 5px;
  background: rgba(255, 253, 250, .78);
  box-shadow: 0 8px 24px rgba(38, 52, 61, .035);
  transition: transform .38s cubic-bezier(.2,.75,.25,1), box-shadow .38s ease,
              border-color .3s ease, background .3s ease;
}
.page-home .value-item::before {
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 2px;
  content: '';
  background: linear-gradient(90deg, var(--stoa-terracotta), rgba(184,117,96,0));
  transform: scaleX(.2);
  transform-origin: left;
  opacity: .55;
  transition: transform .38s ease, opacity .38s ease;
}
.page-home .value-item:hover,
.page-home .value-item:focus-within {
  transform: translateY(-6px);
  border-color: rgba(184, 117, 96, .34);
  background: #fffdfa;
  box-shadow: 0 20px 42px rgba(38, 52, 61, .085);
}
.page-home .value-item:hover::before,
.page-home .value-item:focus-within::before {
  transform: scaleX(1);
  opacity: 1;
}
.value-card-icon {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(184,117,96,.2);
  border-radius: 50%;
  background: #f4ece5;
  color: var(--stoa-terracotta-dark);
  transition: transform .38s ease, background .3s ease, color .3s ease;
}
.value-card-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.page-home .value-item:hover .value-card-icon {
  transform: translateY(-2px) rotate(-4deg);
  background: var(--stoa-terracotta);
  color: #fffdfa;
}
.page-home .value-item > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  padding-top: 3px;
}
.page-home .value-item strong {
  display: block;
  color: var(--stoa-ink);
  font: 600 21px/1.12 'Cormorant Garamond', Georgia, serif;
}
.page-home .value-item small {
  display: block;
  color: #77756e;
  font-size: 12px;
  line-height: 1.6;
}
.page-home .social-feed-section.section-pad {
  padding-block: clamp(42px, 4.6vw, 64px);
}
.page-home .intro-section .intro-grid { gap: clamp(24px, 4vw, 60px); }
.page-home .events-section .section-heading-row,
.page-home .activities-section .section-heading-row { margin-bottom: 24px; }

/* Gallery: pulsante fotografia al posto del link che apriva una nuova scheda. */
.gallery-photo-trigger {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #eee8e1;
  color: inherit;
  cursor: zoom-in;
  text-align: left;
}
.gallery-photo-trigger img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform .55s cubic-bezier(.2,.75,.25,1), filter .35s ease;
}
.gallery-photo-trigger:hover img,
.gallery-photo-trigger:focus-visible img {
  transform: scale(1.035);
  filter: brightness(.88);
}
.gallery-photo-open-label {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 11px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 3px;
  background: rgba(38,52,61,.82);
  color: #fffdfa;
  font: 600 11px/1.2 'DM Sans', sans-serif;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity .25s ease, transform .25s ease;
}
.gallery-photo-trigger:hover .gallery-photo-open-label,
.gallery-photo-trigger:focus-visible .gallery-photo-open-label {
  opacity: 1;
  transform: translateY(0);
}
.gallery-share-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
  padding-top: 17px;
  border-top: 1px solid rgba(45,58,62,.12);
}
.gallery-share-bar > span:first-child {
  margin-right: 5px;
  color: #77766f;
  font-size: 12px;
  font-weight: 600;
}
.gallery-share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid #ded3c9;
  border-radius: 3px;
  background: rgba(255,253,250,.7);
  color: #925b4b;
  font: 600 11px/1.2 'DM Sans', sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: color .22s ease, border-color .22s ease, background .22s ease, transform .22s ease;
}
.gallery-share-button:hover,
.gallery-share-button:focus-visible {
  border-color: var(--stoa-terracotta);
  background: #f4e9e1;
  color: #75483d;
  transform: translateY(-2px);
}
.gallery-share-feedback {
  color: #557467;
  font-size: 11px;
}
.gallery-lightbox {
  width: min(94vw, 1180px);
  max-width: 1180px;
  max-height: 94vh;
  padding: 0;
  overflow: visible;
  border: 1px solid rgba(255,253,250,.2);
  background: transparent;
  color: #fffdfa;
}
.gallery-lightbox::backdrop {
  background: rgba(22, 30, 34, .91);
  backdrop-filter: blur(5px);
}
.gallery-lightbox-shell {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0,1fr) 52px;
  grid-template-rows: minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 300px;
  max-height: 92vh;
  padding: clamp(14px, 2vw, 26px);
  border-radius: 5px;
  background: #1f2b31;
  box-shadow: 0 25px 90px rgba(0,0,0,.35);
}
.gallery-lightbox-close {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: #fff;
  font: 400 26px/1 'DM Sans', sans-serif;
  cursor: pointer;
}
.gallery-lightbox-close:hover { background: rgba(255,255,255,.2); }
.gallery-lightbox-figure {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  max-height: calc(92vh - 90px);
  margin: 0;
}
.gallery-lightbox-figure img {
  display: block;
  max-width: 100%;
  max-height: calc(92vh - 145px);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 12px 42px rgba(0,0,0,.22);
}
.gallery-lightbox-figure figcaption {
  max-width: 780px;
  padding: 12px 8px 0;
  color: #e5ddd4;
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
}
.gallery-lightbox-nav {
  grid-row: 1;
  display: grid;
  place-items: center;
  width: 42px;
  height: 54px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 3px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font: 300 36px/1 'Cormorant Garamond', serif;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.gallery-lightbox-nav:hover { border-color: #c48a74; background: rgba(196,138,116,.22); }
.gallery-lightbox-prev { grid-column: 1; }
.gallery-lightbox-next { grid-column: 3; }
.gallery-lightbox-footer {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 4px 0;
  border-top: 1px solid rgba(255,255,255,.12);
  color: #d5ccc2;
  font-size: 11px;
}
.gallery-lightbox-footer .gallery-share-button { border-color: rgba(255,255,255,.24); background: transparent; color: #f0d4c8; }
.gallery-lightbox-footer .gallery-share-button:hover { background: rgba(255,255,255,.1); }

/* Team: intestazioni di sezione per distinguere fondatori e membri. */
.team-sections { padding-top: 28px; }
.team-section-separated {
  margin-top: clamp(40px, 6vw, 68px);
  padding-top: clamp(28px, 4vw, 46px);
  border-top: 1px solid rgba(125,105,91,.2);
}
.team-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 26px;
  padding-left: 3px;
}
.team-section-heading .section-kicker { margin: 0 0 5px; }
.team-section-heading h2 {
  margin: 0;
  color: var(--stoa-ink);
  font: 500 clamp(32px, 3.6vw, 45px)/1 'Cormorant Garamond', Georgia, serif;
  letter-spacing: -.02em;
}
.team-section-heading h2::after {
  display: block;
  width: 42px;
  height: 2px;
  margin-top: 11px;
  content: '';
  background: var(--stoa-terracotta);
}

@media (max-width: 760px) {
  .page-home .section-pad { padding-block: 48px; }
  .page-home .intro-section .values-row { grid-template-columns: 1fr; gap: 11px; }
  .page-home .value-item { min-height: 0; padding: 16px 18px; }
  .gallery-lightbox { width: 96vw; max-height: 94vh; }
  .gallery-lightbox-shell { grid-template-columns: 36px minmax(0,1fr) 36px; gap: 5px; min-height: 240px; padding: 12px 7px; }
  .gallery-lightbox-nav { width: 33px; height: 46px; font-size: 29px; }
  .gallery-lightbox-figure img { max-height: calc(92vh - 155px); }
  .gallery-share-bar { gap: 7px; }
  .gallery-share-bar > span:first-child { flex-basis: 100%; }
  .gallery-share-button { min-height: 34px; padding-inline: 10px; }
  .team-section-heading { margin-bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .page-home .value-item,
  .page-home .value-item::before,
  .value-card-icon,
  .gallery-photo-trigger img,
  .gallery-photo-open-label,
  .gallery-share-button { transition: none !important; }
}
