/*
Theme Name: Blankslate Child - Mara Angeli
Template: blankslate
*/

/* -----------------------------------------
   0. RESET E VARIABILI GLOBALI
----------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&display=swap');

:root {
  --bg-color: #fcfcfc;
  --text-color: #121212;
  --accent-color: #999;
  --spacing-lg: 5vw;
  --spacing-md: 5vw;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.syne-font {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
}

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

/* -----------------------------------------
   1. HERO SECTION MASSIVE
----------------------------------------- */
.hero-massive {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 8vw;
  position: relative;
  min-height: 100vh;
}

.hero-title {
  font-size: 17vw;
  line-height: 0.85;
  text-transform: uppercase;
  text-align: center;
  margin: 0;
  letter-spacing: -0.03em;
  position: relative;
  z-index: 2;
  animation: popUpScale 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

@keyframes popUpScale {
  0% {
    transform: translateY(150px) scale(0.8);
    opacity: 0;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.hero-image-half {
  width: 100vw;
  max-width: none;
  height: 70vh;
  overflow: hidden;
  position: relative;
  z-index: 1;
  margin-left: calc(-50vw + 50%);
  margin-top: -9vw;
  animation: fadeInImg 2s ease-out forwards;
  animation-delay: 0.5s;
  opacity: 0;
}

.hero-image-half img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.hero-image-half:hover img {
  transform: scale(1.03);
}

@keyframes fadeInImg {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* -----------------------------------------
   2. TOP GALLERY (PROPORZIONI ORIGINALI)
----------------------------------------- */
.top-gallery {
  display: flex;
  gap: 4vw; /* Un po' più di respiro tra i quadri */
  padding: var(--spacing-md);
  margin-top: var(--spacing-md);
  align-items: center; /* Centra i quadri verticalmente se hanno altezze diverse */
}

.top-gallery .img-wrapper {
  flex: 1;
  height: auto; /* Togliamo l'altezza fissa che tagliava i quadri! */
  display: flex;
  justify-content: center;
}

.top-gallery .img-wrapper a {
  display: block;
  width: 100%;
}

.top-gallery .img-wrapper img {
  width: 100%;
  height: auto; /* Mantiene la proporzione nativa del quadro */
  object-fit: contain; /* Assicura che nulla venga tagliato */
  filter: grayscale(20%); /* Puoi toglierlo se vuoi i colori reali in Home */
  transition: filter 0.3s ease;
}

.top-gallery .img-wrapper img:hover {
  filter: grayscale(0%); /* Torna a colori quando ci passi sopra col mouse */
}
/* -----------------------------------------
   3. MIDDLE TEXT SECTION
----------------------------------------- */
.middle-text-section {
  padding: var(--spacing-lg) var(--spacing-md);
  text-align: left;
  max-width: 100vw;
  margin: 0 auto;
  position: relative;
}

.chapter-number {
  display: block;
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem;
  color: var(--accent-color);
  margin-bottom: 2rem;
  font-weight: 600;
}

.huge-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1.1;
  font-weight: 600;
  margin: 0;
  max-width: 90%;
}

/* -----------------------------------------
   4. DOPPIA GALLERIA SCORREVOLE (MARQUEE)
----------------------------------------- */
.sliding-gallery-wrapper {
  padding: var(--spacing-md) 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2vw;
}

.sliding-row {
  width: 100vw;
  overflow: hidden;
}

.sliding-track {
  display: flex;
  width: max-content;
  gap: 2vw;
}

.slide-img {
  height: 40vh; /* Fissiamo l'altezza per allinearli nel nastro... */
  width: auto; /* ...ma lasciamo la larghezza libera di adattarsi alla proporzione! */
  max-width: none;
  object-fit: contain;
  flex-shrink: 0;
  box-shadow: 5px 5px 15px rgba(0,0,0,0.05); /* Ombra leggerissima per staccarli dallo sfondo */
}

.track-left {
  animation: scrollLeft 60s linear infinite;
}

.track-right {
  animation: scrollRight 60s linear infinite;
}

.track-left:hover,
.track-right:hover {
  animation-play-state: paused;
}

@keyframes scrollLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - 1vw)); }
}

@keyframes scrollRight {
  0% { transform: translateX(calc(-50% - 1vw)); }
  100% { transform: translateX(0); }
}

/* -----------------------------------------
   4B. PRE-FOOTER TEXT SECTION
----------------------------------------- */
.pre-footer-section {
  padding: var(--spacing-lg) var(--spacing-md);
  text-align: left;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

.pre-footer-label {
  display: block;
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  color: var(--accent-color);
  margin-bottom: 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pre-footer-text {
  font-size: clamp(1.8rem, 4vw, 3.2rem); /* Più piccolo e leggibile rispetto all'huge-title */
  line-height: 1.25;
  font-weight: 600;
  margin: 0;
  color: var(--text-color);
  max-width: 85%; /* Evita che il testo tocchi il margine destro dello schermo */
}

/* Responsive per mobile */
@media (max-width: 768px) {
  .pre-footer-section {
    padding: 15vw 5vw;
  }
  .pre-footer-text {
    max-width: 100%;
    font-size: 7.5vw;
  }
}

/* -----------------------------------------
   HEADER HOME (Layout a 3 parti)
----------------------------------------- */
.split-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2vw 5vw;
  position: absolute;
  width: 100%;
  box-sizing: border-box;
  z-index: 100;
}

.header-left ul,
.header-right ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.header-left li,
.header-right li {
  display: block;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.logo-center {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  color: #000;
}

/* Link header: stessa famiglia del logo, zero sottolineatura */
.header-left a,
.header-right a {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  line-height: 1.7em;
  color: var(--text-color);
  transition: opacity 0.2s ease;
}

.header-left a:hover,
.header-right a:hover {
  opacity: 0.45;
}

/* Voce attiva: sottolineatura sottile, non il default del browser */
.header-right a.active-underline {
  border-bottom: 2px solid var(--text-color);
  padding-bottom: 3px;
}

/* -----------------------------------------
   HEADER INTERNO (Layout Standard)
----------------------------------------- */
.standard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2vw 5vw;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.standard-header .logo {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  color: #000;
}

.standard-header nav ul {
  display: flex;
  gap: 2vw;
  list-style: none;
}

.standard-header a {
  text-decoration: none;
  color: #000;
  text-transform: uppercase;
  font-size: 0.9rem;
}

/* -----------------------------------------
   MENU MOBILE (HAMBURGER ZERO-JS)
   — Nascosti di default, attivi solo su mobile
----------------------------------------- */
.menu-toggle-checkbox,
.hamburger-icon,
.mobile-menu-overlay {
  display: none;
}

/* -----------------------------------------
   5. RESPONSIVE MOBILE (max-width: 768px)
   — Tutto il mobile in un unico blocco
----------------------------------------- */
@media (max-width: 768px) {

  /* Hero */
  .hero-massive {
    flex-direction: column;
    text-align: center;
    padding-top: 15vw;
  }

  .hero-title {
    font-size: 18vw;
    margin-bottom: 5vw;
  }

  .hero-image-half {
    width: 100%;
    height: 50vh;
    margin-top: 0;
  }

  /* Top Gallery */
  .top-gallery {
    flex-direction: column;
    gap: 10vw; /* Più spazio verticale tra i quadri su mobile */
  }

  .top-gallery .img-wrapper {
    height: auto;
    width: 100%;
  }

  .slide-img {
    height: 30vh; /* Nastro trasportatore un po' più basso su telefono per non invadere tutto */
    width: auto;
  }

  /* Header */
  .split-header,
  .standard-header {
    justify-content: space-between;
    padding: 5vw;
    width: 100%;
    box-sizing: border-box;
  }

  /* Nascondi i menu desktop */
  .desktop-only {
    display: none !important;
  }

  /* Hamburger */
  .hamburger-icon {
    display: flex;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 1000;
    position: relative;
  }

  .hamburger-icon span {
    display: block;
    width: 30px;
    height: 2px;
    background-color: #121212;
    transition: all 0.3s ease-in-out;
  }

  /* Overlay menu mobile */
  .mobile-menu-overlay {
    display: flex;
    position: fixed;
    top: 0;
    left: -100%;
    width: 100vw;
    height: 100vh;
    background: #fcfcfc;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    transition: left 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 998;
  }

  .mobile-menu-overlay a {
    font-family: 'Syne', sans-serif;
    font-size: 2.5rem;
    text-decoration: none !important;
    color: #121212 !important;
    text-transform: uppercase;
    font-weight: 600;
  }

  /* Apertura menu */
  .menu-toggle-checkbox:checked ~ .mobile-menu-overlay {
    left: 0;
  }

  /* Trasformazione hamburger → X */
  .menu-toggle-checkbox:checked + .hamburger-icon span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .menu-toggle-checkbox:checked + .hamburger-icon span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle-checkbox:checked + .hamburger-icon span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

/* -----------------------------------------
   6. FOOTER
----------------------------------------- */
.site-footer {
  background-color: var(--bg-color);
  padding: var(--spacing-lg) 5vw 2vw 5vw;
  border-top: 1px solid #eaeaea;
  display: flex;
  flex-direction: column;
  gap: 5vw;
}

/* Testo */
.footer-massive-text h2 {
  font-size: 1.5vw;
  line-height: 0.85;
  margin: 0;
  text-transform: uppercase;
  color: var(--text-color);
  letter-spacing: -0.03em;
}

/* Griglia contatti */
.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 4vw;
  margin-top: 2vw;
}

.footer-column {
  flex: 1;
  min-width: 0;
}

.footer-column h3 {
  font-size: 1.2rem;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  color: var(--accent-color);
  letter-spacing: 0.05em;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-column a {
  text-decoration: none;
  color: var(--text-color);
  font-size: 1rem;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.footer-column a:hover {
  opacity: 0.5;
}

/* Riga inferiore (Copyright e Back to top) */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2vw;
  padding-top: 2vw;
  border-top: 1px solid #eaeaea;
  font-size: 0.85rem;
  color: var(--accent-color);
}

.back-to-top {
  text-decoration: none;
  color: var(--text-color);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* -----------------------------------------
   RESPONSIVE FOOTER (max-width: 768px)
----------------------------------------- */
@media (max-width: 768px) {
  .site-footer {
    padding-top: 15vw;
    gap: 10vw;
  }

  .footer-massive-text h2 {
    font-size: 22vw;
  }

  .footer-content {
    flex-direction: column;
    gap: 8vw;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}

/* -----------------------------------------
   7. PAGINA SINGOLO QUADRO (SPLIT SCREEN)
----------------------------------------- */
.single-artwork-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100vw;
  background-color: var(--bg-color);
  padding-top: 10vh; /* Spazio per l'header */
  box-sizing: border-box;
}

/* Colonna Sinistra (Il Quadro) */
.artwork-visual {
  width: 55%;
  height: 90vh;
  position: sticky; /* Rimane fisso mentre la destra scorre */
  top: 10vh;
  padding: 2vw;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* object-fit: contain fa in modo che il quadro non venga mai tagliato */
.artwork-full-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 10px 20px 40px rgba(0,0,0,0.1); /* Leggera ombra per staccarlo dallo sfondo */
}

/* Colonna Destra (I Dettagli) */
.artwork-info {
  width: 45%;
  padding: 5vw 8vw 10vw 4vw;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.back-link {
  text-decoration: none;
  color: var(--accent-color);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  margin-bottom: 4vw;
  display: inline-block;
  transition: color 0.3s ease;
}

.back-link:hover {
  color: var(--text-color);
}

.artwork-title {
  font-size: clamp(3rem, 6vw, 6rem);
  line-height: 0.9;
  text-transform: uppercase;
  margin: 0 0 3vw 0;
  color: var(--text-color);
  letter-spacing: -0.02em;
}

/* Griglia per i dettagli tecnici */
.artwork-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2vw;
  margin-bottom: 4vw;
  border-top: 1px solid #eaeaea;
  border-bottom: 1px solid #eaeaea;
  padding: 2vw 0;
}

.meta-item {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-family: 'Syne', sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--accent-color);
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}

.meta-value {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-color);
}

/* La descrizione */
.artwork-description {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #444;
}

.artwork-description p {
  margin-bottom: 1.5rem;
}

/* -----------------------------------------
   RESPONSIVE SINGOLO QUADRO (Mobile)
----------------------------------------- */
@media (max-width: 768px) {
  .single-artwork-wrapper {
    flex-direction: column;
    padding-top: 15vw;
  }

  .artwork-visual {
    width: 100%;
    position: relative; /* Togliamo lo sticky su mobile */
    top: 0;
    height: auto;
    padding: 5vw;
  }

  .artwork-info {
    width: 100%;
    padding: 5vw;
  }
  
  .artwork-meta {
    grid-template-columns: 1fr; /* Colonna singola per i meta su telefono */
    gap: 4vw;
  }
}

/* -----------------------------------------
   8. PAGINA CONTATTI (SPLIT LAYOUT)
   Copia questo blocco alla fine del tuo style.css
----------------------------------------- */
.contact-page-wrapper {
  padding-top: 10vh; /* Spazio per l'header */
  background-color: var(--bg-color);
  min-height: 100vh;
}

/* Immagine orizzontale in alto */
.contact-hero {
  width: 100%;
  height: 40vh;
  overflow: hidden;
}

.contact-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Griglia principale a due colonne */
.contact-content-split {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  padding: 8vw 5vw;
  gap: 5vw;
}

/* --- COLONNA SINISTRA --- */
.contact-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5vw;
}

.contact-headline {
  font-size: clamp(2rem, 4.5vw, 5rem);
  line-height: 1;
  text-transform: uppercase;
  margin: 0;
  color: var(--text-color);
  letter-spacing: -0.02em;
}

.contact-info-grid {
  display: flex;
  gap: 8vw;
}

.info-column h3 {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: var(--text-color);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.info-column p, 
.info-column li, 
.info-column a {
  font-size: 1rem;
  color: var(--text-color);
  text-decoration: none;
  line-height: 1.8;
  margin: 0;
  padding: 0;
  list-style: none;
}

.info-column a:hover {
  color: var(--accent-color);
}

.info-column ul {
  padding: 0;
  margin: 0;
}

/* --- COLONNA DESTRA (FORM) --- */
.contact-right {
  flex: 1;
  padding-top: 1vw; /* Allineamento ottico con il testo a sinistra */
}

.minimal-contact-form {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--text-color); /* Solo il bordo inferiore, come Ginevra */
  padding: 10px 0;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--text-color);
  resize: none; /* Niente ridimensionamento brutto della textarea */
}

/* Effetto focus sui campi */
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-bottom: 2px solid var(--text-color); /* Si inspessisce quando ci scrivi */
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--accent-color);
  font-weight: 300;
}

/* Bottone di invio */
.submit-btn {
  background: transparent;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  align-self: flex-start; /* Lo allinea a sinistra invece di espanderlo */
  padding: 0 0 5px 0;
  color: var(--text-color);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 768px) {
  .contact-page-wrapper {
    padding-top: 15vw;
  }
  .contact-hero {
    height: 30vh;
  }
  .contact-content-split {
    flex-direction: column;
    padding: 10vw 5vw;
    gap: 15vw;
  }
  .contact-headline {
    font-size: 11vw;
  }
  .contact-info-grid {
    flex-direction: column;
    gap: 8vw;
  }
}

/* -----------------------------------------
   9. PAGINA ABOUT (NUOVO LAYOUT EDITORIALE)
----------------------------------------- */
.about-page-wrapper {
  width: 100vw;
  background-color: var(--bg-color);
  overflow: hidden;
}

/* Sezione 1: Split Screen Hero */
.about-intro-split {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.about-intro-visual {
  flex: 1;
  position: relative;
}

.about-intro-visual img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-intro-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10vw 8vw;
  box-sizing: border-box;
}

/* Sezione 2: Biografia */
.about-bio-section {
  padding: 10vw 5vw;
  background-color: #f7f7f7;
}

.about-bio-container {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  gap: 8vw;
  align-items: center;
}

.bio-portrait-wrapper {
  flex: 0 0 350px;
}

.bio-portrait-wrapper img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.06);
}

.bio-text-wrapper {
  flex: 1;
}

/* Sezione 3: Awards e Critiche */
.about-awards-section {
  padding: 10vw 5vw;
  max-width: 1300px;
  margin: 0 auto;
}

.awards-header {
  margin-bottom: 6vw;
}

.awards-header h2 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.05;
  margin: 0;
  text-transform: uppercase;
  color: var(--text-color);
}

.awards-content {
  display: flex;
  gap: 6vw;
}

.awards-list {
  flex: 1;
}

.awards-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.awards-list li {
  margin-bottom: 1.2rem;
  font-size: 1rem;
  color: #444;
  border-bottom: 1px solid #eaeaea;
  padding-bottom: 0.8rem;
  line-height: 1.5;
}

.awards-quotes {
  flex: 1.3;
}

.critic-quote {
  border-left: 3px solid var(--accent-color);
  padding-left: 2rem;
  margin-bottom: 4rem;
}

.critic-quote p {
  font-style: italic;
  font-size: 1.05rem;
  line-height: 2.1;
  color: #444;
  margin-bottom: 1.5rem;
}

.critic-quote footer {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-color);
  margin-top: 1.5rem;
}

.critic-quote footer span {
  font-weight: 400;
  color: #777;
}

/* Stili Testo Comuni About */
.about-subtitle {
  display: block;
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  color: var(--accent-color);
  margin-bottom: 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.about-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.5rem, 4vw, 4rem);
  line-height: 1.1;
  font-weight: 600;
  margin: 0 0 2.5rem 0;
  color: var(--text-color);
}

.about-body {
  font-size: 1.1rem;
  line-height: 1.9;
  color: #444;
}

.about-body p {
  margin-bottom: 1.5rem;
}

/* Responsive Mobile About */
@media (max-width: 900px) {
  .about-intro-split {
    flex-direction: column;
  }
  .about-intro-visual {
    height: 50vh;
    flex: none;
  }
  .about-bio-container {
    flex-direction: column;
    text-align: center;
  }
  .bio-portrait-wrapper {
    flex: none;
    width: 250px;
    margin: 0 auto;
  }
  .awards-content {
    flex-direction: column;
    gap: 10vw;
  }
}

/* -----------------------------------------
   10. PAGINA GALLERIA (MASONRY CSS PURE)
----------------------------------------- */

.gallery-page-wrapper {
  padding: 15vh 5vw 10vh 5vw;
  background-color: var(--bg-color);
  min-height: 100vh;
}

.gallery-header {
  margin-bottom: 5vw;
  text-align: center;
}

/* LA MAGIA DEL MASONRY IN 2 RIGHE */
.masonry-grid {
  column-count: 3; /* 3 colonne su desktop */
  column-gap: 2vw; /* Spazio tra le colonne */
}

.masonry-item {
  break-inside: avoid; /* IMPEDISCE che il quadro venga tagliato a metà tra due colonne */
  margin-bottom: 2vw;
  position: relative;
  overflow: hidden;
  opacity: 0; /* Partono invisibili per l'animazione di entrata */
  animation: fadeUpMasonry 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.masonry-item img {
  width: 100%;
  height: auto; /* MANTIENE LE PROPORZIONI ORIGINALI INTONSE */
  display: block;
  transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

.item-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(18, 18, 18, 0.65); /* Filtro scuro elegante */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.5s ease;
  text-align: center;
  padding: 2vw;
  box-sizing: border-box;
}

.item-overlay h3 {
  color: #fff;
  font-size: 1.8rem;
  margin: 0 0 1rem 0;
  text-transform: uppercase;
  transform: translateY(20px);
  transition: transform 0.5s ease;
  letter-spacing: -0.02em;
}

.item-overlay .view-text {
  color: var(--accent-color);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transform: translateY(20px);
  transition: transform 0.5s ease;
  transition-delay: 0.1s; /* Piccolissimo ritardo rispetto al titolo per un effetto premium */
}

/* Effetti di Hover del Mouse */
.masonry-item:hover img {
  transform: scale(1.05); /* Lo zoom dolce del quadro */
}

.masonry-item:hover .item-overlay {
  opacity: 1;
}

.masonry-item:hover .item-overlay h3,
.masonry-item:hover .item-overlay .view-text {
  transform: translateY(0);
}

/* Animazione iniziale al caricamento della pagina */
@keyframes fadeUpMasonry {
  0% { transform: translateY(40px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@media (max-width: 1024px) {
  .masonry-grid {
    column-count: 2; /* 2 colonne su iPad */
  }
}

@media (max-width: 768px) {
  .gallery-page-wrapper {
    padding-top: 25vw;
  }

  .masonry-grid {
    column-count: 1; /* 1 colonna singola gigante su telefono */
    column-gap: 0;
  }

  .masonry-item {
    margin-bottom: 8vw;
  }

  /* Siccome su telefono NON esiste l'hover (devi cliccare col dito),
     forziamo il titolo ad essere sempre visibile sotto forma di sfumatura in basso */
  .item-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(18,18,18,0.8) 0%, transparent 40%);
    justify-content: flex-end; /* Spinge il testo in basso */
    padding-bottom: 6vw;
  }

  .item-overlay h3,
  .item-overlay .view-text {
    transform: translateY(0); /* Rimuove lo scorrimento dal basso */
  }

  .item-overlay .view-text {
    color: #fff; /* Maggior contrasto su mobile */
  }
}