/*
Theme Name: Benedetta Wedding
Theme URI: https://benedettadeiurewedding.it
Author: Roberto Di Lodovico
Description: Tema custom minimale per wedding planner – layout artistico + Gutenberg
Version: 1.2
*/

/* =========================================================
   RESET BASE
========================================================= */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Lora", serif;
  background: #fdfaf6;
  color: #333;
  line-height: 1.7;
}

/* =========================================================
   ACCESSIBILITÀ
========================================================= */
.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 10px;
  top: 10px;
  background: #000;
  color: #fff;
  padding: 10px;
  z-index: 9999;
}

/* H1 SEO invisibile */
.bw-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* =========================================================
   HEADER – STILE CASTELLA (DESKTOP)
========================================================= */

.bw-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.bw-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 22px 32px;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

/* =========================================================
   LOGO
========================================================= */

.bw-logo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.bw-logo img {
  height: 78px;
  width: auto;
  display: block;
}

/* =========================================================
   MENU DESKTOP
========================================================= */

.bw-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 40px;
}

.bw-menu a {
  font-size: 12.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: #1a1a1a;
}

.bw-menu a:hover {
  opacity: 0.7;
}

/* Avvicinamento al logo */
.bw-nav-left {
  justify-self: end;
  padding-right: 60px;
}

.bw-nav-right {
  justify-self: start;
  padding-left: 60px;
}

/* =========================================================
   HAMBURGER (STRUTTURA)
========================================================= */

.bw-hamburger {
  display: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;

  width: 28px;
  height: 18px;

  flex-direction: column;
  justify-content: space-between;
}

.bw-hamburger span {
  height: 2px;
  background: #1a1a1a;
  width: 100%;
  display: block;
}

/* =========================================================
   MENU MOBILE – OVERLAY
========================================================= */

.bw-mobile-menu {
  position: fixed;
  inset: 0;
  width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;

  background: rgba(253, 250, 246, 0.97);
  z-index: 9999;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.bw-mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* blocca scroll body */
body.bw-menu-open {
  overflow: hidden;
}

/* pulsante chiusura */
.bw-mobile-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: 0;
  font-size: 28px;
  cursor: pointer;
}

/* contenitore nav */
.bw-mobile-nav {
  min-height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 80px 20px;
}

/* =========================================================
   MENU MOBILE – LISTA
========================================================= */

.bw-mobile-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}

.bw-mobile-menu-list li + li {
  margin-top: 24px;
}

.bw-mobile-menu-list a {
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: #1a1a1a;
}

/* =========================================================
   BREAKPOINT MOBILE (UNICO, PULITO)
========================================================= */

@media (max-width: 1024px) {

  .bw-header-inner {
    grid-template-columns: auto 1fr auto;
  }

  .bw-nav-left,
  .bw-nav-right {
    display: none;
  }

  .bw-logo {
    justify-self: center;
  }

  .bw-hamburger {
    display: flex;
    justify-self: end;
  }
}

/* =========================================================
   DESKTOP – NASCONDE MENU MOBILE
========================================================= */

@media (min-width: 1025px) {
  .bw-mobile-menu {
    display: none;
  }
}

/* =========================================================
   SOCIAL MOBILE – ICONE INTEGRATE
========================================================= */

.bw-mobile-socials {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;

  margin-top: 48px;
}

.bw-mobile-socials a {
  color: #1a1a1a;
  text-decoration: none;
}

/* SVG icon */
.bw-icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
  opacity: 0.85;
}

/* Hover delicato */
.bw-mobile-socials a:hover .bw-icon {
  opacity: 0.6;
}

/* =========================================================
   ICONE SOCIAL – MENU MOBILE
   Fix visibilità + uniformità
========================================================= */

.bw-mobile-socials {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;              /* distanza orizzontale */
  margin-top: 48px;      /* separazione dal menu */
}

/* SVG base */
.bw-mobile-socials .bw-icon {
  width: 22px;
  height: 22px;

  fill: #1a1a1a;         /* colore forte */
  opacity: 0.85;

  transition: opacity 0.2s ease;
}

/* Hover (mobile safe) */
.bw-mobile-socials a:hover .bw-icon {
  opacity: 1;
}

/* Instagram leggermente più grande (equilibrio visivo) */
.bw-mobile-socials a[aria-label="Instagram"] .bw-icon {
  width: 24px;
  height: 24px;
}

/* =========================================================
   MENU HOVER – LINEA ANIMATA STILE CASTELLA
========================================================= */

.bw-menu a {
  position: relative;
}

/* Linea nascosta */
.bw-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;

  width: 0;
  height: 1px;

  background-color: #e57339;

  transition: width 0.35s ease;
}

/* Hover: linea che si estende da sinistra a destra */
.bw-menu a:hover::after {
  width: 100%;
}

/* =========================================================
   MENU MOBILE – MICRO SCALE + FADE (STILE CASTELLA)
========================================================= */

/* Stato base */
.bw-mobile-menu-list a {
  display: inline-block;
  opacity: 0.85;
  transform: scale(1);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

/* Hover / focus (desktop touch-capable) */
.bw-mobile-menu-list a:hover,
.bw-mobile-menu-list a:focus {
  opacity: 1;
  transform: scale(1.04);
}

/* Tap attivo (mobile reale) */
.bw-mobile-menu-list a:active {
  opacity: 1;
  transform: scale(0.96);
}

/* =========================================================
   HERO – STILE CASTELLA (COLLAGE 8 IMMAGINI)
========================================================= */

.bw-hero {
  position: relative;
  padding: 0 0 160px;
  background: #fdfaf6;
  overflow: hidden;
}

/* classe attivata via JS */
.bw-hero.is-visible {}

/* =========================================================
   CONTENITORE
========================================================= */

.bw-hero-inner {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  min-height: 720px;
}

/* Reset */
.bw-hero figure { margin: 0; }

.bw-hero img {
  width: 100%;
  height: auto;
  display: block;
}

/* =========================================================
   IMMAGINE PRINCIPALE (CENTRALE – DESKTOP)
========================================================= */

.bw-hero-main {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 2;

  /* stato iniziale animazione */
  opacity: 0;
  transform: translate(-50%, 30px);
  transition:
    transform 1.2s cubic-bezier(.22,.61,.36,1),
    opacity 1.2s ease;
}

/* stato visibile */
.bw-hero.is-visible .bw-hero-main {
  opacity: 1;
  transform: translate(-50%, 0);
}

.bw-hero-main img {
  width: 400px;
  max-width: 100%;
  filter: grayscale(100%) contrast(0.95);
  box-shadow: 0 18px 40px rgba(0,0,0,0.08);
}

/* =========================================================
   IMMAGINI SECONDARIE (DESKTOP)
========================================================= */

.bw-hero-img {
  position: absolute;
  width: 220px;
  z-index: 3;

  opacity: 0;
  transition:
    transform 1.1s cubic-bezier(.22,.61,.36,1),
    opacity 1.1s ease;
}

/* SINISTRA */
.bw-hero-img.img-1 {
  left: 0;
  top: 110px;
  width: 200px;
  transform: translateX(-60px);
}

.bw-hero-img.img-2 {
  left: 375px;
  top: 125px;
  width: 170px;
  transform: translateX(-60px);
}

/* DESTRA */
.bw-hero-img.img-3 {
  right: 400px;
  bottom: 260px;
  width: 145px;
  transform: translateX(60px);
}

.bw-hero-img.img-4 {
  right: 130px;
  top: 60px;
  width: 130px;
  z-index: 2;
  transform: translateX(60px);
}

/* BASSO */
.bw-hero-img.img-5 {
  right: -50px;
  bottom: 230px;
  width: 130px;
  transform: translateY(60px);
}

.bw-hero-img.img-6 {
  left: -50px;
  bottom: 190px;
  width: 180px;
  transform: translateY(60px);
}

.bw-hero-img.img-7 {
  right: 110px;
  top: 0;
  width: 340px;
  z-index: 2;
  transform: translateX(60px);
}

/* stato visibile */
.bw-hero.is-visible .bw-hero-img {
  opacity: 1;
  transform: translate(0,0);
}

/* delay elegante */
.bw-hero-main      { transition-delay: .05s; }
.img-1 { transition-delay: .15s; }
.img-2 { transition-delay: .25s; }
.img-3 { transition-delay: .35s; }
.img-4 { transition-delay: .45s; }
.img-5 { transition-delay: .55s; }
.img-6 { transition-delay: .65s; }
.img-7 { transition-delay: .75s; }

/* =========================================================
   SCRITTA DECORATIVA
========================================================= */

.bw-hero-script {
  position: absolute;
  top: 140px;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 42px;
  color: #e57339;
  z-index: 4;
  pointer-events: none;

  opacity: 0;
  transition: opacity 1.2s ease .9s;
}

.bw-hero.is-visible .bw-hero-script {
  opacity: 1;
}

/* =========================================================
   HOVER (DESKTOP)
========================================================= */

.bw-hero-img img {
  transition: transform 0.6s ease;
}

.bw-hero-img:hover img {
  transform: scale(1.04);
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1024px) {

  .bw-hero-inner { min-height: 640px; }

  .bw-hero-main img { width: 360px; }

  .bw-hero-img { width: 180px; }

  .bw-hero-script { font-size: 34px; }
}

/* =========================================================
   MOBILE – HERO COLLAGE CONTROLLABILE (3 IMMAGINI)
========================================================= */

@media (max-width: 768px) {

  .bw-hero {
    padding: 20px 0 120px;
  }

  .bw-hero-inner {
    position: relative;
    min-height: 520px;
  }

  /* NASCONDI TUTTE */
  .bw-hero-img {
    display: none !important;
  }

  /* =====================================================
     IMMAGINE PRINCIPALE – CENTRO REALE
     ⚠️ NON toccare left / transform
  ===================================================== */
  .bw-hero-main {
    position: absolute;
    top: 10px;              /* ↑↓ sposta SOLO verticalmente */
    left: 50%;
    transform: translateX(-50%);
    opacity: 1;
    z-index: 2;
  }

.bw-hero-main img {
  width: 240px;      /* ora cresce davvero */
  max-width: none;   /* 🔓 SBLOCCO */
}
  filter: grayscale(100%) contrast(0.95);
}


  /* =====================================================
     IMG 7 – DESTRA (LIBERA)
     → qui puoi spostarla
  ===================================================== */
  .bw-hero-img.img-7 {
    display: block !important;
    position: absolute;

    top: 10px;      /* ↑↓ */
    right: 30px;    /* ←→ */

    width: 250px;
    opacity: 1;
  }

  /* =====================================================
     IMG 6 – SINISTRA (LIBERA)
     → qui puoi spostarla
  ===================================================== */
  .bw-hero-img.img-6 {
    display: block !important;
    position: absolute;

    top: 260px;     /* ↑↓ */
    left: 0px;      /* ←→ */

    width: 180px;
    opacity: 1;
  }

  /* =====================================================
     SCRITTA DECORATIVA
  ===================================================== */
  .bw-hero-script {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    opacity: 1;
    text-align: center;
  }
}

/* =========================================================
   HOME INTRO – 3 COLONNE
========================================================= */

.bw-home-intro {
  padding: 10px 32px;
  background: #fdfaf6;
}

.bw-intro-grid {
  max-width: 1200px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 80px;

  text-align: center;
}

.bw-intro-item h3 {
  font-family: "Playfair Display", serif;
  font-size: 26px;
  margin: 12px 0 16px;
  color: #111;
}

.bw-intro-item p {
  font-size: 15px;
  line-height: 1.8;
  color: #555;
  max-width: 320px;
  margin: 0 auto;
}

.bw-intro-eyebrow {
  display: block;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #e57339;
  margin-bottom: 10px;
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 900px) {

  .bw-home-intro {
    padding: 80px 24px;
  }

  .bw-intro-grid {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .bw-intro-item h3 {
    font-size: 24px;
  }

  .bw-intro-item p {
    font-size: 14px;
  }
}

/* HOME – riduzione distanza hero → colonne */

body.home .bw-hero {
  padding-bottom: 40px;
}

/* =========================================================
   HOME – SEZIONE HI, WELCOME (STILE CASTELLA)
========================================================= */

.bw-welcome {
  background: #faf9f3;
  padding: 120px 0;
}

.bw-welcome-inner {
  max-width: 1200px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 100px;
}

/* ================= IMMAGINE ================= */

.bw-welcome-image img {
  width: 100%;
  max-width: 480px;
  border-radius: 50%;
  display: block;
}

/* ================= TESTO ================= */

.bw-welcome-content {
  max-width: 480px;
}

.bw-welcome-subtitle {
  display: block;
  font-size: 11px;
  letter-spacing: 0.25em;
  color: #e57339;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.bw-welcome-title {
  font-size: 42px;
  margin: 0 0 24px;
}

.bw-welcome-content p {
  font-size: 15px;
  line-height: 1.8;
  color: #333;
  margin-bottom: 40px;
}

/* Firma */
.bw-welcome-sign {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 36px;
}

/* =========================================================
   RESPONSIVE – TABLET
========================================================= */

@media (max-width: 1024px) {

  .bw-welcome-inner {
    gap: 60px;
  }

  .bw-welcome-title {
    font-size: 36px;
  }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

  .bw-welcome {
    padding: 80px 0;
  }

  .bw-welcome-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .bw-welcome-image img {
    margin: 0 auto 40px;
    max-width: 300px;
  }

  .bw-welcome-content {
    margin: 0 auto;
  }

  .bw-welcome-sign {
    font-size: 30px;
  }
}

/* =========================================================
   HOME – INTRO TESTUALE (STILE CASTELLA)
========================================================= */

.bw-home-castella-intro {
  max-width: 900px;
  margin: 0 auto 90px;
  padding: 0 20px;
  text-align: center;
}

/* soprattitolo */
.bw-home-castella-intro .bw-intro-eyebrow {
  display: block;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #e57339;
  margin-bottom: 14px;
}

/* titolo principale */
.bw-home-castella-intro h3 {
  font-family: "Playfair Display", serif;
  font-size: 34px;
  letter-spacing: 0.08em;
  margin: 0 0 18px;
}

/* testo descrittivo */
.bw-home-castella-intro .bw-intro-text {
  font-size: 15px;
  line-height: 1.8;
  color: #555;
  max-width: 720px;
  margin: 0 auto;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 768px) {

  .bw-home-castella-intro {
    margin-bottom: 60px;
  }

  .bw-home-castella-intro h3 {
    font-size: 26px;
  }
}

/* =========================================================
   HOME – GALLERIA STILE CASTELLA
   Layout editoriale a 3 colonne + micro-effetti
========================================================= */

.bw-home-castella-gallery {
  padding: 100px 0 140px;
  background: #fdfaf6;
}

/* =========================================================
   GRIGLIA PRINCIPALE
========================================================= */

.bw-castella-grid {
  max-width: 1400px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  column-gap: 80px;
}

/* =========================================================
   COLONNE – RESET TOTALE
========================================================= */

.bw-castella-col {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.bw-castella-col figure {
  margin: 0;

  /* micro fade-in */
  opacity: 0;
  transform: translateY(12px);
  animation: bwFadeUp 0.9s ease forwards;
}

.bw-castella-col img {
  width: 100%;
  height: auto;
  display: block;

  /* micro-hover */
  transition:
    transform 0.45s ease,
    box-shadow 0.45s ease;
}

/* =========================================================
   MICRO-HOVER (ELEGANTE)
========================================================= */

.bw-castella-col figure:hover img {
  transform: scale(1.035);
  box-shadow: 0 14px 36px rgba(0,0,0,0.08);
}

/* =========================================================
   COLONNA SINISTRA – 2 IMMAGINI
========================================================= */

.bw-castella-col.col-left figure:nth-child(2) {
  margin-top: 30px;
}

/* leggero ritardo */
.bw-castella-col.col-left figure {
  animation-delay: .15s;
}

/* =========================================================
   COLONNA CENTRALE – 2 IMMAGINI SFALSATE
========================================================= */

.bw-castella-col.col-center {
  padding-top: 0;
}

.bw-castella-col.col-center figure:nth-child(2) {
  margin-top: 30px;
}

/* centrale leggermente più protagonista */
.bw-castella-col.col-center figure {
  animation-delay: .3s;
}

/* =========================================================
   COLONNA DESTRA – 3 IMMAGINI (RITMO COSTANTE)
========================================================= */

.bw-castella-col.col-right figure:nth-child(2),
.bw-castella-col.col-right figure:nth-child(3) {
  margin-top: 30px;
}

.bw-castella-col.col-right figure {
  animation-delay: .45s;
}

/* =========================================================
   KEYFRAMES – FADE UP SOFT
========================================================= */

@keyframes bwFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   ACCESSIBILITÀ – RIDOTTA ANIMAZIONE
========================================================= */

@media (prefers-reduced-motion: reduce) {
  .bw-castella-col figure {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .bw-castella-col img {
    transition: none;
  }
}

/* =========================================================
   RESPONSIVE – TABLET
========================================================= */

@media (max-width: 1024px) {

  .bw-castella-grid {
    column-gap: 48px;
  }

  .bw-home-castella-gallery {
    padding: 80px 0 120px;
  }

  .bw-castella-col.col-center figure:nth-child(2) {
    margin-top: 48px;
  }

  .bw-castella-col.col-right figure:nth-child(2),
  .bw-castella-col.col-right figure:nth-child(3) {
    margin-top: 48px;
  }
}

/* =========================================================
   MOBILE – STACK ELEGANTE
========================================================= */

@media (max-width: 768px) {

  .bw-home-castella-gallery {
    padding: 70px 0;
  }

  .bw-castella-grid {
    display: flex;
    flex-direction: column;
    gap: 48px;
  }

  .bw-castella-col {
    gap: 24px;
    padding-top: 0;
  }

  .bw-castella-col figure {
    margin: 0 !important;
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* ======================================================
   HOME – NEWSLETTER (CF7 SAFE MODE)
====================================================== */

.bw-home-newsletter {
  padding: 120px 0;
  background: #fdfaf6;
  border-top: 1px solid rgba(0,0,0,0.08);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.bw-newsletter-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

/* testi */
.bw-newsletter-subtitle {
  display: block;
  font-size: 12px;
  letter-spacing: 0.25em;
  margin-bottom: 16px;
  color: #777;
}

.bw-newsletter-title {
  font-size: 28px;
  font-weight: 400;
  margin-bottom: 48px;
}

/* ======================================================
   CF7 – STRUTTURA FORZATA
====================================================== */

.bw-newsletter-col {
  width: 100%;
}

/* forza CF7 */
.bw-newsletter-col .wpcf7,
.bw-newsletter-col .wpcf7 form {
  width: 100%;
}

/* layout verticale stabile */
.bw-newsletter-col .wpcf7 form {
  display: flex;
  flex-direction: column;
  gap: 32px; /* ← SPAZIO TRA INPUT E BOTTONE */
  align-items: stretch;
}

/* reset CF7 */
.wpcf7 p,
.wpcf7-spinner {
  margin: 0;
}

/* ======================================================
   INPUT EMAIL
====================================================== */

.bw-newsletter-col input[type="email"] {
  width: 100%;
  height: 48px;
  text-align: center;
  border: 1px solid #d6d0c8;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
}

/* ======================================================
   BOTTONE – FULL WIDTH (ANTI-BUG)
====================================================== */

.bw-newsletter-col input[type="submit"] {
  width: 100%;              /* 🔒 NON PUÒ PIÙ DECENTRARSI */
  height: 48px;
  border: 1px solid #e57339;
  background: transparent;
  color: #e57339;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .3s ease;
}

.bw-newsletter-col input[type="submit"]:hover {
  background: #e57339;
  color: #fff;
}

/* ======================================================
   MOBILE
====================================================== */

@media (max-width: 768px) {

  .bw-home-newsletter {
    padding: 80px 24px;
  }

  .bw-newsletter-title {
    font-size: 22px;
  }
}

/* ======================================================
   NEWSLETTER – MOBILE FULL WIDTH
====================================================== */

@media (max-width: 768px) {

  .bw-newsletter-col input[type="email"],
  .bw-newsletter-col input[type="submit"] {
    width: 100%;
  }

  .bw-newsletter-col .wpcf7 form {
    gap: 28px; /* leggermente più compatto su mobile */
  }
}

/* =========================================================
   HOME – GALLERIA QUADRATA STILE CASTELLA
========================================================= */

.bw-home-square-gallery {
  padding: 80px 0 100px;
  background: #fdfaf6;
  overflow: hidden;
}

.bw-square-gallery-inner {
  max-width: 1400px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
}

/* singola immagine */
.bw-square-gallery-inner figure {
  margin: 0;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1; /* 🔒 QUADRATO PERFETTO */
}

.bw-square-gallery-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;

  transition: transform 0.6s ease, opacity 0.6s ease;
}

/* micro-hover elegante */
.bw-square-gallery-inner figure:hover img {
  transform: scale(1.06);
  opacity: 0.95;
}

/* =========================================================
   RESPONSIVE – TABLET
========================================================= */

@media (max-width: 1024px) {
  .bw-square-gallery-inner {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

/* =========================================================
   MOBILE – GRID 2 COLONNE
========================================================= */

@media (max-width: 768px) {

  .bw-home-square-gallery {
    padding: 60px 0 80px;
  }

  .bw-square-gallery-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

/* =========================================================
   FOOTER – STILE CASTELLA
========================================================= */

/* CONTROLLO DIMENSIONE ICONE SOCIAL */
:root {
  --bw-footer-social-size: 28px; /* ← cambia qui */
}

.bw-footer {
  padding: 80px 0;
  background: #fdfaf6;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.bw-footer-inner {
  max-width: 1400px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.bw-footer-col {
  font-size: 13px;
  color: #1a1a1a;
}

.bw-footer-left {
  text-align: left;
}

.bw-footer-right {
  text-align: right;
}

.bw-footer-center {
  text-align: center;
}

/* LOGO */
.bw-footer-logo {
  width: 190px;
  height: auto;
  display: block;
  margin: 0 auto 20px;
}

/* SOCIAL */
.bw-footer-socials {
  display: flex;
  justify-content: center;
  gap: 22px;
}

.bw-footer-socials a {
  display: inline-flex;
}

/* ICONE – STESSO STILE CASTELLA */
.bw-footer-socials .bw-icon {
  width: var(--bw-footer-social-size);
  height: var(--bw-footer-social-size);
  fill: none;
  stroke: #e57339;
  stroke-width: 1.6;
  transition: transform .3s ease, stroke .3s ease;
}

.bw-footer-socials a:hover .bw-icon {
  transform: translateY(-2px);
  stroke: #1a1a1a;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 900px) {

  .bw-footer-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .bw-footer-left,
  .bw-footer-right {
    text-align: center;
  }
}

/* =========================================================
   ABOUT – SERVICES GRID (Castella inspired)
   Pagina: Chi sono
========================================================= */

.bw-about-services {
  /* =====================================================
     CONTROLLO DESKTOP
  ===================================================== */
  --bw-icon-size: 144px;        /* icone desktop */
  --bw-title-size: 18px;       /* titoli servizi desktop */
  --bw-text-size: 14px;        /* testo servizi desktop */

  padding: clamp(70px, 8vw, 120px) 0;
  background: #fdfaf6;
  text-align: center;
}

/* ---------------------------------------------------------
   Header sezione
--------------------------------------------------------- */

.bw-about-services__header h2 {
  font-family: "Playfair Display", serif;
  font-weight: 500;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  margin: 0;
  color: #1a1a1a;
}

.bw-about-services__header span {
  display: inline-block;
  margin-top: 12px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #e57339;
}

/* ---------------------------------------------------------
   Griglia servizi
--------------------------------------------------------- */

.bw-about-services__grid {
  margin-top: clamp(50px, 6vw, 80px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(40px, 4vw, 70px);
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------------------------------------------------------
   Card servizio
--------------------------------------------------------- */

.bw-about-service {
  max-width: 280px;
  margin-inline: auto;
}

/* Icona */
.bw-about-service img {
  width: var(--bw-icon-size);
  height: auto;
  margin-bottom: 18px;
  opacity: 0.9;
}

/* Titolo servizio */
.bw-about-service h3 {
  font-family: "Playfair Display", serif;
  font-weight: 500;
  font-size: var(--bw-title-size);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 12px;
  color: #1a1a1a;
}

/* Testo servizio */
.bw-about-service p {
  font-size: var(--bw-text-size);
  line-height: 1.9;
  margin: 0;
  color: #1a1a1a;
  opacity: 0.85;
}

/* ---------------------------------------------------------
   RESPONSIVE
--------------------------------------------------------- */

@media (max-width: 900px) {
  .bw-about-services__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =========================================================
   MOBILE – CONTROLLO DIMENSIONI
========================================================= */

@media (max-width: 560px) {
  .bw-about-services {
    --bw-icon-size: 146px;     /* icone mobile */
    --bw-title-size: 17px;    /* titoli servizi mobile */
    --bw-text-size: 14px;     /* testo servizi mobile */
  }

  .bw-about-services__grid {
    grid-template-columns: 1fr;
    gap: 46px;
  }
}

/* =========================================================
   CONTACT – HEADER EDITORIALE
========================================================= */

.bw-contact-section {
  padding: clamp(70px, 8vw, 120px) 0;
  background: #fdfaf6;
}

.bw-contact-header {
  max-width: 760px;
  margin: 0 auto 56px;
  text-align: center;
}

.bw-contact-header h2 {
  font-family: "Playfair Display", serif;
  font-weight: 500;
  font-size: clamp(34px, 4.2vw, 48px);
  line-height: 1.1;
  margin: 0;
  color: #1a1a1a;
}

.bw-contact-eyebrow {
  display: block;
  margin-top: 14px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #e57339;
}

.bw-contact-header p {
  margin: 18px auto 0;
  max-width: 640px;
  font-size: 15px;
  line-height: 1.8;
  color: #1a1a1a;
  opacity: 0.85;
}

/* =========================================================
   CONTACT FORM – STRUTTURA STABILE (FINAL)
========================================================= */

.bw-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

/* colonne */
.bw-form-grid .bw-col {
  width: 100%;
}

/* colonna full */
.bw-form-grid .bw-col-full {
  grid-column: 1 / -1;
}

/* input */
.bw-form-grid input[type="text"],
.bw-form-grid input[type="email"],
.bw-form-grid input[type="tel"] {
  width: 100%;
  padding: 16px;
  border: 1px solid rgba(229,115,57,0.45);
  background: transparent;
  font-size: 14px;
  border-radius: 2px;
  box-sizing: border-box;
}

/* submit */
.bw-form-grid input[type="submit"] {
  width: 100%;
  padding: 18px;
  background: transparent;
  border: 1px solid #e57339;
  color: #e57339;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  box-sizing: border-box;
}

/* mobile */
@media (max-width: 680px) {
  .bw-form-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   CONTACT FORM – LARGHEZZA CONTROLLATA (FINAL)
========================================================= */

.bw-contact-form--narrow {
  max-width: 900px;          /* prova anche 820px se lo vuoi più elegante */
  margin-left: auto;
  margin-right: auto;
}

/* su mobile resta fluido */
@media (max-width: 680px) {
  .bw-contact-form--narrow {
    max-width: 100%;
    padding-inline: 16px;
  }
}

/* =========================================================
   GALLERY – 4 colonne editoriali (Castella inspired)
========================================================= */

.bw-gallery-section {
  padding: clamp(80px, 10vw, 140px) 0;
  background: #fdfaf6;
}

/* Header */
.bw-gallery-header {
  max-width: 760px;
  margin: 0 auto 72px;
  text-align: center;
}

.bw-gallery-header h2 {
  font-family: "Playfair Display", serif;
  font-weight: 500;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.1;
  margin: 0;
  color: #1a1a1a;
}

.bw-gallery-eyebrow {
  display: block;
  margin-top: 14px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #e57339;
}

.bw-gallery-header p {
  margin: 18px auto 0;
  max-width: 640px;
  font-size: 15px;
  line-height: 1.8;
  color: #1a1a1a;
  opacity: 0.85;
}

/* Grid 4 colonne */
.bw-gallery-grid {
  max-width: 1400px;
  margin: 0 auto;
  padding-inline: 24px;

  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}

/* Immagini */
.bw-gallery-grid figure {
  margin: 0;
  overflow: hidden;
}

.bw-gallery-grid img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.8s ease, opacity 0.8s ease;
}

/* Hover leggerissimo */
.bw-gallery-grid figure:hover img {
  transform: scale(1.035);
  opacity: 0.92;
}

/* Tablet */
@media (max-width: 1200px) {
  .bw-gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tablet small */
@media (max-width: 900px) {
  .bw-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 560px) {
  .bw-gallery-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

/* ================= LIGHTBOX CLOSE ================= */

.bw-lightbox-close {
  position: absolute;
  top: 28px;
  right: 32px;

  color: #ffffff;
  font-size: 38px;
  font-weight: 300;
  line-height: 1;

  cursor: pointer;
  z-index: 10;

  transition: opacity .3s ease, transform .3s ease;
}

.bw-lightbox-close:hover {
  opacity: 0.7;
  transform: scale(1.05);
}


/* ======================================================
   HOME – Titolo gallery Instagram (effetto editoriale)
====================================================== */

.bw-home-square-gallery {
  text-align: center;
}

.bw-square-gallery-header {
  max-width: 1200px;
  margin: 0 auto 36px;
}

/* Titolo */
.bw-square-gallery-header h3 {
  font-family: "Playfair Display", serif;
  font-weight: 500;
  font-size: clamp(22px, 3vw, 30px);
  color: #1a1a1a;
  margin: 0;
  position: relative;

  /* effetto ingresso */
  opacity: 0;
  transform: translateY(8px);
  animation: bwFadeUp 0.8s ease forwards;
}

/* Linea decorativa sotto il titolo */
.bw-square-gallery-header h3::after {
  content: "";
  display: block;
  width: 42px;
  height: 1px;
  background-color: #e57339;
  margin: 14px auto 0;
  opacity: 0.8;
}

/* Hover leggerissimo (desktop) */
@media (hover: hover) {
  .bw-square-gallery-header h3:hover {
    opacity: 0.85;
  }
}

/* Animazione */
@keyframes bwFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
