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

body {
  font-family: 'Inter', sans-serif;
  background: #f5f1ea;
  color: #1f2f2a;
  line-height: 1.7;
}

body {
  opacity: 0;
  transition: opacity 0.6s ease;
}

body.loaded {
  opacity: 1;
}

html {
  scroll-behavior: smooth;
}

/* NAV */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #000;
}

/* .nav-inner {
  max-width: 1400px;
  margin: auto;
  padding: 20px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: nowrap;  
}
*/

.nav-inner {
  display: flex;
  align-items: center;
}

.logo {
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 0.3em;
  color: #f5f1ea;
  font-size: 18px;
  position: relative;
}

.root-line {
  display: block;
  height: 1px;
  width: 60%;
  background: rgba(245,241,234,0.5);
  margin-top: 6px;
}

.nav a {
  color: #f5f1ea;
  text-decoration: none;
  margin-left: 30px;
  font-size: 14px;
  letter-spacing: 0.15em;
  opacity: 0.8;
}

nav a.active {
  opacity: 1;
  border-bottom: 1px solid #000;
}

.nav a:hover {
  opacity: 1;
}

/* HERO */
.hero {
  height: 100vh;
  background: url("../images/hero.jpg") center/cover no-repeat;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}

.hero-content {
  position: relative;
  text-align: center;
  color: #f5f1ea;
}

.hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 52px;
  margin-bottom: 20px;
}

.hero p {
  text-transform: uppercase;
  font-size: 18px;
  letter-spacing: 0.2em;
}


/* LINK */
.link-personalizzato {
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    margin-bottom: 20px;
    color: #f5f1ea;
    text-decoration: none; /* Rimuove la sottolineatura */
    font-weight: bold;
}
    
.link-personalizzato:hover {
    text-decoration: underline; /* Sottolinea al passaggio */
    opacity: 1;
}


/* SECTIONS */
.section {
  padding: 120px 40px;
  max-width: 900px;
 text-align: center;
  margin: auto;
}

section {
  scroll-margin-top: 50px;
}

.section h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 34px;
  margin-bottom: 25px;
}

.section h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 30px;
  margin-bottom: 20px;
}

.section-description p {
  line-height: 1.7;
  letter-spacing: 0.02em;
}

.section.light {
  background: #ebe7df;
  /* max-width: none; */
  max-width: 900px;
}

.section.dark {
  background: #000;
  color: #f5f1ea;
}

.section.dark ul {
  list-style: none;
}

.section.dark li {
  margin-bottom: 10px;
}

.italic {
  font-style: italic;
  margin-top: 20px;
}


/* GALLERY */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 50px;
}

figure img {
  width: 100%;
  height: 380px;
  object-fit: cover;
}

figcaption {
  margin-top: 16px;
  font-family: 'Cormorant Garamond', serif;
}


/* CONTACT */
.contact {
  background: #f5f1ea;
  /* background: #ebe7df;*/
  text-align: center;
}

.button {
  display: inline-block;
  margin-top: 30px;
  padding: 14px 34px;
  border: 1px solid #1f2f2a;
  color: #1f2f2a;
  text-decoration: none;
  transition: 0.4s;
}

.button:hover {
  background: #1f2f2a;
  color: #f5f1ea;
}

/* FOOTER */
.footer {
  background: #000;
  text-align: center;
  color: #f5f1ea;
  padding: 40px;
  font-size: 12px;
}

/* MICRO-ANIMAZIONI */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 1s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}


/* =========================
   LOGO RESPONSIVE STABILE
========================= */
.logo-svg img {
  height: clamp(40px, 6vw, 70px);
  width: auto;
  max-width: 55vw;
  object-fit: contain;
  display: block;
}

.logo-svg img {
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.logo-svg:hover img {
  opacity: 0.85;
  transform: translateY(1px);
}

.logo-svg {
  flex-shrink: 1;
  min-width: 0;
  flex: 0 0 auto;
}


/* INTERIOR FULL BAND */
.interior-band {
  width: 100%;
  background: #000;
  color: #f5f1ea;
  padding: 140px 40px;
}


.interior-content {
  max-width: 900px;
  text-align: center;
  margin: auto;
}

.interior-band h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 34px;
  margin-bottom: 30px;
}

.interior-band p {
  margin-bottom: 30px;
}

.interior-band ul {
  list-style: none;
}

.interior-band li {
  margin-bottom: 12px;
}

/* =========================
   DARK MODE TOTALE
========================= */

body.dark-mode {
  background: #000;
  color: #f5f1ea;
}

/* NAV */
body.dark-mode .nav {
  background: #000;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* SEZIONI */
body.dark-mode .section {
  background: #000;
}

body.dark-mode .section.light {
  background: #0e0e0e;
}

body.dark-mode h2,
body.dark-mode p,
body.dark-mode li {
  color: #f5f1ea;
}

/* HERO */
body.dark-mode .hero-overlay {
  background: rgba(0,0,0,0.65);
}

/* IMMAGINI */
body.dark-mode img {
  filter: grayscale(10%) contrast(95%);
}

/* BUTTON */
body.dark-mode .button {
  border-color: #f5f1ea;
  color: #f5f1ea;
}

body.dark-mode .button:hover {
  background: #f5f1ea;
  color: #000;
}

/* FOOTER */
body.dark-mode .footer {
  background: #000;
  color: rgba(245,241,234,0.6);
}

body.dark-mode .bonsai-overlay {
  background: rgba(0, 0, 0, 0.45);
}


/* =========================
   BONSAI HOVER OVERLAY
========================= */

.bonsai-card {
  position: relative;
  overflow: hidden;
  border-radius: 5px; /* opzionale */
}

.bonsai-card {
  cursor: pointer;
}

.bonsai-card img {
  width: 100%;
  display: block;
  filter: brightness(0.95) contrast(1.05);
  /* transition: filter 0.4s ease;*/
  aspect-ratio: 4 / 5;   /* oppure 1 / 1, 3 / 4 ecc */
  object-fit: cover;
  /* filter: brightness(1.45) contrast(0.9) saturate(1.15); */
  transition: transform 0.8s ease, filter 0.8s ease;
}

.bonsai-card:hover img {
  filter: brightness(1.05);
/*  filter: brightness(1.45) contrast(0.9) saturate(1.05); */
} 


/* Overlay */
.bonsai-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.38); /*55*/
  color: #f5f1ea;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 24px;
}

/* Stato iniziale */
.bonsai-overlay h3,
.bonsai-overlay p {
  opacity: 0;
  transform: translateY(12px);
}


/* Titolo */
.bonsai-overlay h3 {
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Testo (leggermente ritardato) */
.bonsai-overlay p {
  transition: opacity 0.6s ease 0.15s,
              transform 0.6s ease 0.15s;
}


/* Testo */
.bonsai-overlay p {
  font-size: 14px;
  line-height: 1.6;
  max-width: 280px;
}

/* Hover */
.bonsai-card:hover .bonsai-overlay h3,
.bonsai-card:hover .bonsai-overlay p {
  opacity: 1;
  transform: translateY(0);
}

/* Hover effect */
.bonsai-card:hover .bonsai-overlay {
  opacity: 1;
}

.bonsai-card:hover img {
  transform: scale(1.05);
}

.bonsai-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    /*rgba(255,255,255,0.15),
    rgba(255,255,255,0) */
    rgba(0,0,0,0.2),
    rgba(0,0,0,0)
  );
  pointer-events: none;
}

.process {
  background: #f5f1ea;
  text-align: center;
}

.process h2 {
  margin-bottom: 32px;
}

.process p {
  max-width: 720px;
  margin: 0 auto 20px;
  line-height: 1.7;
}

/* Choose Bonsai */
.choose-bonsai {
  background: #f5f1ea;
  /*background: #ebe7df;*/
  text-align: center;
}

.choose-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  margin-top: 40px;
}

.choose-item h3 {
  margin-bottom: 12px;
  letter-spacing: 0.08em;
}

.choose-item p {
  line-height: 1.6;
}


/* GALLERIA */
.gallery {
/*  background: #fff;*/
 /*background: #f5f1ea;*/
 background: #ebe7df;
 text-align: center;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.gallery-grid img {
  width: 100%;
  display: block;
}

.gallery-grid img {
  transition: transform 0.6s ease;
}

.gallery-grid img:hover {
  transform: scale(1.05);
}

/* BACK TO TOP */
.back-to-top.fixed {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 1000;

  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.65);
  color: #f5f1ea;

  border-radius: 50%;
  font-size: 1rem;
  text-decoration: none;

  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  opacity: 0.85;

  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    background 0.3s ease;
}

.back-to-top.fixed:hover {
  opacity: 1;
  transform: translateY(-2px);
  background: rgba(0, 0, 0, 0.85);
}

.back-to-top.fixed:hover {
  transform: translateY(-4px);
}

/* =========================
   MODAL GALLERY PREMIUM
========================= */

.image-modal {
  position: fixed;
  inset: 0;
  display: block;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(6px);

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease;

  z-index: 20000;
}

.image-modal.active {
  opacity: 1;
  visibility: visible;
}

/* Wrapper centrale */
.image-modal-inner {
  position: relative;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  transition: transform 0.5s ease;

   width: min(92vw, 1100px);
  height: 82dvh; /* stabile su mobile moderno */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}


.image-modal.active .image-modal-inner {
  transform: translate(-50%, -50%) scale(1);
}

/* Immagine */
.image-modal-inner {
  width: min(92vw, 1100px);
  height: 82dvh;
  display: flex;
  flex-direction: column;
}


/* AREA TESTO */
.modal-content img {
  position: relative;
  z-index: 1;
}

.modal-content.show {
  opacity: 1;
}

/* Frecce */
/* =========================
   FRECCE SEMPRE VISIBILI
========================= */

/* =========================
   MODAL ARROWS PREMIUM
========================= */

.modal-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(6px);
  border: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 24px;
  color: #f5f1ea;
  cursor: pointer;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
  transition: all 0.3s ease;
}

.modal-prev { left: 30px; }
.modal-next { right: 30px; }

.modal-arrow:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.12);
}

@media (hover: none) {
  .modal-prev { left: 15px; }
  .modal-next { right: 15px; }
}

/* Mobile */
@media (hover: none) {
  .modal-arrow {
    opacity: 0.9;
    font-size: 28px;
  }

  .modal-prev { left: 15px; }
  .modal-next { right: 15px; }
}

.image-modal:hover .modal-arrow {
  opacity: 0.6;
}

.modal-arrow:hover {
  opacity: 1;
} 

/*.modal-close {
  position: fixed;
  top: 28px;
  right: 28px;
  z-index: 2147483647; 
  
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;

  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);

  color: #fff;
  font-size: 26px;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: all 0.25s ease;
}*/

/* CONTROLLI TOP ALLINEATI PERFETTAMENTE */
.modal-close,
.modal-counter {
  position: fixed;
  top: 24px; /* valore unico */
  height: 42px; /* stessa altezza */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2147483647;
}

/* CLOSE */
.modal-close {
  right: 28px;
  width: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

/* COUNTER */
.modal-counter {
  left: 28px;
  padding: 0 16px;
  border-radius: 30px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  font-size: 12px;
  letter-spacing: 2px;
  color: #f5f1ea;
}

.modal-close:hover {
  transform: scale(1.08);
}

.modal-close:hover {
  transform: scale(1.1);
}

.modal-close:hover {
  transform: rotate(90deg);
}

/* Caption */
.modal-caption {
  position: relative;
  z-index: 5;

  height: 100px;
  padding-top: 20px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  text-align: center;

  color: #f5f5f5;
  opacity: 1;
}

.modal-caption h3 {
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 8px;
}

.modal-caption p {
  font-size: 15px;
  line-height: 1.7;
  opacity: 0.85;
}

.image-modal:fullscreen .modal-close {
  z-index: 999999;
}


.image-modal:-webkit-full-screen .modal-close {
  z-index: 999999;
}

.image-modal:fullscreen .modal-close,
.image-modal:-webkit-full-screen .modal-close {
  position: fixed;
  z-index: 2147483647;
}

/* Responsive */
/* @media (max-width: 768px) */
@media (hover: none) {
  .modal-prev { left: 10px; }
  .modal-next { right: 10px; }

  .modal-arrow {
    font-size: 26px;
  }

  .modal-content {
    max-height: 65vh;
  }
}

/* =========================
   CONTATORE EDITORIALE
========================= */
/*.modal-counter {
  position: fixed;
  top: 28px;
  left: 28px;
  z-index: 2147483647;

  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  padding: 8px 16px;
  border-radius: 30px;

  font-size: 12px;
  letter-spacing: 3px;
  color: #f5f1ea;
}*/
/* =========================
   TRANSIZIONE CINEMATICA
========================= */

.modal-content {
  width: 100%;
  height: calc(100% - 100px);
  object-fit: contain;
  position: relative;
  z-index: 1;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);

  opacity: 0;
  transform: translateY(20px) scale(0.98);
  transition:
    opacity 0.5s ease,
    transform 0.6s cubic-bezier(.19,1,.22,1);

  will-change: transform, opacity;
}

.modal-content.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.image-modal::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* =========================
   PARALLAX MICRO
========================= */

.image-modal-inner {
  will-change: transform;
  transition: transform 0.4s ease;
}

/* Nasconde frecce se non servono */
.modal-arrow.hidden {
  display: none;
}

/* ottimizzazione */
.modal-content {
  will-change: transform, opacity;
}

/* =========================
   NAV PREMIUM MOBILE
========================= */

/* =========================
   NAV DEFINITIVA STABILE
========================= */

.nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: #000;
  z-index: 10000;
}

.nav-inner {
  max-width: 1400px;
  margin: auto;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

/* Logo */
.logo {
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 0.3em;
  color: #f5f1ea;
  font-size: 18px;
}

/* Desktop nav */
.nav-inner nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;      /* SPINGE TUTTO A DESTRA */
  flex-wrap: nowrap;      /* MAI A CAPO */
}

.nav-inner nav a {
  color: #f5f1ea;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.15em;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.nav-inner nav a:hover {
  opacity: 1;
}

/* =========================
   HAMBURGER
========================= */

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10001;
  margin-left: 24px;
}

.nav-toggle span {
  width: 26px;
  height: 2px;
  background: #fff;
  transition: 0.4s cubic-bezier(.19,1,.22,1);
}

/* Animazione X */
.nav-toggle.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* =========================
   MOBILE / TABLET / FOLD
========================= */

/* =========================
   DROPDOWN MENU ELEGANTE
========================= */
/* =========================
   NAV DROPDOWN PREMIUM
========================= */

@media (max-width: 1100px), (hover: none) {

  .nav-toggle {
    display: flex;
  }

  .nav-inner {
    position: relative;
  }

  .nav-inner nav {
    position: absolute;
    top: 100%;
    right: 20px;

    background: rgba(0,0,0,0.96);
    backdrop-filter: blur(14px);

    display: flex;
    flex-direction: column;
    gap: 20px;

    padding: 24px 32px;
    border-radius: 12px;

    box-shadow: 0 30px 80px rgba(0,0,0,0.6);

    opacity: 0;
    transform: translateY(-12px) scale(0.98);
    pointer-events: none;

    transition: 
      opacity 0.35s ease,
      transform 0.4s cubic-bezier(.19,1,.22,1);
  }

  .nav-inner nav.nav-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }

  .nav-inner nav a {
    font-family: "Cormorant Garamond", serif;
    font-size: 18px;
    letter-spacing: 1px;
    transition: opacity 0.3s ease;
  }

  .nav-inner nav a:hover {
    opacity: 0.6;
  }

}

body {
  padding-top: 80px;
}

.nav-toggle {
  flex-shrink: 0;
  position: relative;
  z-index: 10002;
  margin-left: 24px;
}

body.menu-open::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(4px);
  z-index: 9990;   /* più basso della navbar */
  pointer-events: none; /* NON intercetta click */
}

.image-modal {
  opacity: 0;
  visibility: hidden;
  transition: 
    opacity 0.6s ease,
    backdrop-filter 0.6s ease;
}

.image-modal.active {
  opacity: 1;
  visibility: visible;
}

.image-modal-inner {
  transform: translate(-50%, -50%) scale(0.95);
  opacity: 0;
  transition:
    transform 0.7s cubic-bezier(.19,1,.22,1),
    opacity 0.6s ease;
}

.image-modal.active .image-modal-inner {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.image-modal {
  perspective: 1400px;
}

.image-modal-inner {
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(.19,1,.22,1);
}

.image-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  /*background-image: url("images/leaf-texture.png");*/
  background-size: 600px;
  animation: leafMove 40s linear infinite;
}

@keyframes leafMove {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
  100% { transform: translateY(0px); }
}

/*.modal-content {
  animation: slowZoom 18s ease-in-out infinite alternate;
}*/

@keyframes slowZoom {
  from { transform: scale(1); }
  to { transform: scale(1.035); }
}

.image-modal::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(255,255,255,0.08),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* =========================
   MATERIA – VERSIONE INTEGRATA
========================= */

.materia-page {
  /* background: #f5f1ea; stesso fondo del sito */
  color: #1f2f2a;
  text-align: center;
}

/* HERO 
.materia-hero {
  padding: 160px 40px 120px;
  position: relative;
  overflow: hidden;
}

.materia-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #ebe7df;
  background:
    linear-gradient(to bottom,
      rgba(0,0,0,0.04),
      rgba(0,0,0,0)
    );
  pointer-events: none;
}

.materia-hero-inner {
  max-width: 900px;
  margin: auto;
}

.materia-hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(42px, 7vw, 64px);
  font-weight: 400;
  margin-bottom: 18px;
}*/

.materia-hero {
  height: 100vh;
  background: url("../images/Sessa.jpg") center/cover no-repeat;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.materia-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}

.materia-hero-content {
  position: relative;
  text-align: center;
  color: #f5f1ea;
}

.materia-hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 52px;
  margin-bottom: 20px;
}

.materia-hero p {
  text-transform: uppercase;
  font-size: 18px;
  letter-spacing: 0.2em;
}


.subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  opacity: 0.7;
}

/* CONTENUTO */
.materia-container {
  padding: 120px 40px;
  max-width: 900px;
  margin: auto;
}

.materia-block {
  margin-bottom: 120px;
}

.materia-block h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 34px;
  margin-bottom: 30px;
}

.materia-block p {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 18px;
  letter-spacing: 0.01em;
  margin-left: auto;
  margin-right: auto;
}

.emphasis {
  font-style: italic;
  opacity: 0.7;
}

.strong {
  font-weight: 500;
}

/* LISTA */
.materia-list {
  list-style: none;
  padding: 0;
  margin: 40px 0;
}

.materia-list li {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.4;
  opacity: 0.85;
}

/* IMMAGINE */
.materia-image {
  margin: 80px 0;
}

.materia-image {
  max-width: 900px;
  margin: 80px auto;
}

.materia-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  will-change: transform;
  transition: transform 1.2s ease;
}

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

/* MOBILE */
@media (max-width: 768px) {

  .materia-hero {
    padding: 120px 20px 80px;
  }

  .materia-container {
    padding: 80px 20px;
  }

  .materia-block {
    margin-bottom: 80px;
  }

}

.materia-block:nth-child(even) {
  background: #ebe7df;
  padding: 60px 40px;
  border-radius: 6px;
}

.materia-image img {
  box-shadow:
    0 40px 90px rgba(0,0,0,0.08);
}

@media (max-width: 768px) {

  .modal-close,
  .modal-counter {
    top: 16px;
    height: 36px;
  }

  .modal-close {
    right: 16px;
    width: 36px;
    font-size: 18px;
  }

  .modal-counter {
    left: 16px;
    font-size: 11px;
    padding: 0 12px;
  }

}

@media (max-width: 768px) {

  .image-modal-inner {
    height: 78dvh;
  }

  .modal-content {
    height: calc(100% - 85px);
  }

  .modal-caption {
    height: 85px;
  }

}

.modal-caption h3 {
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: #ffffff;
}

.modal-caption p {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.75);
}

.page-transition {
  opacity: 1;
  transition: opacity 0.6s ease;
}

.page-transition:not(.loaded) {
  opacity: 0;
}

/*****************/
/* Cambio lingua */
/*****************/
.lang-editorial {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 28px;   /* piccolo distacco dall’ultima voce */
  font-family: "Cormorant Garamond", serif;
  font-size: 14px;
  letter-spacing: 0.18em;
  white-space: nowrap;
}

.lang-link {
  text-decoration: none;
  color: rgba(255,255,255,0.35);
  transition: opacity 0.3s ease, color 0.3s ease;
  /* color: rgba(0,0,0,0.4); */
}

.lang-link.active {
  color: rgba(255,255,255,0.95);
}

.lang-link:hover {
  color: rgba(255,255,255,0.75);
}

.lang-separator {
  color: rgba(255,255,255,0.25);
}

@media (max-width: 1100px), (hover: none) {

  .lang-editorial {
    margin: 20px 0 0 0;
    justify-content: center;
  }

}

@media (hover: none), (max-width: 1024px) {
  .fade-up {
    opacity: 1 !important;
    transform: none !important;
  }
}