/*
 * Villa Pojana — Stile comune del tema
 * ------------------------------------------------------------------
 * Estratto dal blocco <style> presente (quasi identico) in tutte le
 * pagine originali: variabili colore/font, reset, skip link, topbar,
 * header con stati allo scroll, navigazione, sezioni base, pair-block,
 * newsletter e footer.
 *
 * Selettori, variabili e valori sono invariati rispetto all'originale.
 * Gli stili specifici di ogni pagina (hero, griglie eventi, tabelle
 * orari, ecc.) restano nei rispettivi assets/css/{pagina}.css.
 */

:root {
  --bone: #F2EDE0;
  --bone-soft: #EDE6D2;
  --paper: #FAF6EC;
  --ink: #181613;
  --ink-soft: #2D2A24;
  --stone: #8C857A;
  --stone-light: #B8B1A2;
  --terracotta: #821715;
  --terracotta-deep: #7A2710;
  --terracotta-soft: #E8C9BA;
  --olive: #5C5A2C;
  --line: rgba(24, 22, 19, 0.12);
  --line-strong: rgba(24, 22, 19, 0.25);

  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-body: 'Manrope', -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bone);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* SKIP LINK (accessibilità) */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bone);
  padding: 12px 20px;
  font-weight: 500;
  z-index: 9999;
}
.skip:focus { left: 12px; top: 12px; }

/* TOP BAR */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99;
  background: rgba(24, 22, 19, 0.35);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--bone);
  padding: 10px 0;
  font-size: 12px;
  letter-spacing: 0.02em;
  transition: background 0.4s ease, border-color 0.4s ease;
}
body.scrolled .topbar {
  background: var(--ink);
  border-bottom-color: transparent;
}
.topbar-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar-left { color: var(--stone-light); }
.topbar-tools {
  display: flex;
  gap: 28px;
  align-items: center;
}
.topbar-tools button {
  color: var(--bone);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.topbar-tools button:hover { color: var(--terracotta-soft); }
.topbar-tools button:focus-visible {
  outline: 2px solid var(--terracotta-soft);
  outline-offset: 2px;
}

/* Selettore lingua (Polylang, header.php): stesso aspetto del pulsante
   "Cambia lingua" che sostituisce, ma con un <a> per ogni lingua disponibile. */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--bone);
  font-size: 12px;
  letter-spacing: 0.02em;
}
.lang-switch a {
  color: var(--bone);
  text-transform: uppercase;
  transition: color 0.2s;
}
.lang-switch a:hover,
.lang-switch a.active {
  color: var(--terracotta-soft);
}
.lang-switch a:focus-visible {
  outline: 2px solid var(--terracotta-soft);
  outline-offset: 2px;
}

/* HEADER */
.header {
  position: fixed;
  top: 38px;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(24, 22, 19, 0.18);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--paper);
  transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease, top 0.4s ease;
}
body.scrolled .header {
  background: rgba(242, 237, 224, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  color: var(--ink);
  top: 0;
}
.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 18px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 48px;
  transition: padding 0.4s ease;
}
body.scrolled .header-inner { padding: 14px 48px; }

/* LOGO */
.logo {
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo-img-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.logo-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 44px;
  object-fit: contain;
  transition: opacity 0.4s ease;
}
.logo-img--light { opacity: 1; }
.logo-img--dark  { opacity: 0; }
body.scrolled .logo-img--light { opacity: 0; }
body.scrolled .logo-img--dark  { opacity: 1; }
/* Marchio disegnato via CSS: non usato nel markup attuale (sostituito da
   .logo-img-wrap), mantenuto per fedeltà al CSS originale. */
.logo-mark {
  width: 44px;
  height: 44px;
  border: 1.5px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: border-color 0.4s ease;
}
.logo-mark::before {
  content: '';
  position: absolute;
  inset: 6px 6px 0 6px;
  border: 1.5px solid currentColor;
  border-bottom: none;
  transition: border-color 0.4s ease;
}
.logo-mark::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  height: 1.5px;
  background: currentColor;
  transition: background 0.4s ease;
}
.logo-text { line-height: 1.05; }
.logo-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.02em;
  font-variation-settings: 'opsz' 144, 'SOFT' 30;
}
.logo-sub {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  color: rgba(232, 201, 186, 0.75);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 3px;
  transition: color 0.4s ease;
}
body.scrolled .logo-sub { color: var(--stone); }

/* NAVIGAZIONE PRINCIPALE */
.nav {
  display: flex;
  gap: 32px;
  align-items: center;
}
/* wp_nav_menu() genera <li> attorno a ciascun link: azzeriamo il bullet,
   il resto del markup (<a>) resta identico all'originale. */
.nav li { list-style: none; }
.nav a {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  position: relative;
  padding: 6px 0;
  transition: color 0.2s;
}
.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 100%;
  height: 1.5px;
  background: var(--terracotta);
  transition: right 0.3s ease;
}
.nav a:hover::after,
.nav a:focus-visible::after,
.nav a.active::after { right: 0; }
.nav a:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 4px;
  border-radius: 2px;
}
body.scrolled .nav a.active { color: var(--terracotta); }

/* CTA "Acquista biglietti" */
.cta-primary {
  background: var(--paper);
  color: var(--ink);
  padding: 12px 22px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.cta-primary:hover {
  background: var(--terracotta);
  color: var(--paper);
  transform: translateY(-1px);
}
body.scrolled .cta-primary {
  background: var(--ink);
  color: var(--paper);
}
body.scrolled .cta-primary:hover {
  background: var(--terracotta);
  color: var(--paper);
}
.cta-primary:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
}

/* SEZIONE BASE */
.section {
  max-width: 1440px;
  margin: 0 auto;
  padding: 100px 48px;
}
/* Sezioni che seguono subito quella precedente, senza spazio extra. */
.section.no-padding-top { padding-top: 0; }
.section.no-padding-bottom { padding-bottom: 0; }

/* Sezione a tutta larghezza con sfondo "bone-soft" (es. "Come arrivare"
   in "Visita", "Famiglie" in "Educazione"): il contenuto resta allineato
   alle altre sezioni grazie a .section-bleed-inner. */
.section-bleed {
  max-width: none;
  padding: 100px 0;
  background: var(--bone-soft);
}
.section-bleed-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 48px;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 56px;
  gap: 60px;
}
.section-eyebrow {
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--terracotta);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-eyebrow::before {
  content: '';
  width: 24px;
  height: 1.5px;
  background: var(--terracotta);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 60px);
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.025em;
  max-width: 680px;
  font-variation-settings: 'opsz' 144, 'SOFT' 30;
}
.section-title em {
  font-style: italic;
  color: var(--terracotta);
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
}
.section-link {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 4px;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}
.section-link:hover {
  color: var(--terracotta);
  border-color: var(--terracotta);
}

/* GRIGLIA EVENTI (condivisa tra la home, vp/griglia-eventi, e la
   pagina "Calendario", vp/eventi-grid). .event-title e .event-price
   sono specifici di ciascuna pagina e restano in home.css/calendario.css. */
.events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.event-card {
  background: var(--paper);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.3s, border-color 0.3s;
  cursor: pointer;
}
.event-card:hover {
  transform: translateY(-4px);
  border-color: var(--ink);
}
.event-image {
  display: block;
  aspect-ratio: 3/2;
  position: relative;
  overflow: hidden;
}
.event-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.event-content {
  padding: 24px 26px 28px;
}
.event-date-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.event-date {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--terracotta);
  text-transform: uppercase;
  font-weight: 600;
}
.event-tag {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--stone);
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  padding: 3px 9px;
  border-radius: 1px;
}
.event-meta {
  font-size: 13px;
  color: var(--stone);
  display: flex;
  gap: 16px;
}
.event-meta span { display: flex; align-items: center; gap: 6px; }

/* PAIR BLOCKS (coppie di riquadri scuro/chiaro) */
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.pair-block {
  padding: 56px 48px 52px;
  display: flex;
  flex-direction: column;
  min-height: 360px;
  position: relative;
  overflow: hidden;
}
.pair-block.dark {
  background: var(--ink);
  color: var(--bone);
}
.pair-block.light {
  background: var(--paper);
  border: 1px solid var(--line);
}
.pair-block .section-eyebrow { color: var(--terracotta-soft); }
.pair-block.light .section-eyebrow { color: var(--terracotta); }
.pair-block.dark .section-eyebrow::before { background: var(--terracotta-soft); }

.pair-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 3.5vw, 46px);
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 18px 0 18px;
  font-variation-settings: 'opsz' 60, 'SOFT' 30;
}
.pair-title em {
  font-style: italic;
  font-variation-settings: 'opsz' 60, 'SOFT' 100;
}
.pair-block.dark .pair-title em { color: var(--terracotta-soft); }
.pair-block.light .pair-title em { color: var(--terracotta); }

.pair-desc {
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 28px;
  max-width: 440px;
  flex-grow: 1;
}
.pair-block.dark .pair-desc { color: var(--stone-light); }
.pair-block.light .pair-desc { color: var(--ink-soft); }

.pair-link {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 4px;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.pair-block.dark .pair-link { color: var(--terracotta-soft); }
.pair-block.light .pair-link { color: var(--terracotta); }

/* SEZIONI EDITORIALI (immagine + testo, usate da home e "Scopri") */
.editorial {
  background: var(--bone-soft);
  padding: 0;
  margin: 60px 0;
}
.editorial-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 120px 48px;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 80px;
  align-items: center;
}
.editorial-image {
  aspect-ratio: 5/6;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  position: relative;
  overflow: hidden;
}
.editorial-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.editorial-image-meta {
  position: absolute;
  bottom: 18px;
  left: 18px;
  right: 18px;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--stone);
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
}
.editorial-content {
  max-width: 540px;
}
.editorial-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 4.2vw, 60px);
  line-height: 1.02;
  font-weight: 400;
  letter-spacing: -0.025em;
  margin-bottom: 28px;
  font-variation-settings: 'opsz' 144, 'SOFT' 30;
}
.editorial-title em {
  font-style: italic;
  color: var(--terracotta);
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
}
.editorial-text {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 24px;
  font-weight: 400;
  font-variation-settings: 'opsz' 24, 'SOFT' 50;
}
.editorial-pullquote {
  border-left: 2px solid var(--terracotta);
  padding: 4px 0 4px 24px;
  margin: 32px 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  line-height: 1.45;
  color: var(--terracotta-deep);
  font-variation-settings: 'opsz' 24, 'SOFT' 100;
}

/* FASCIA DI STATO (home e "Visita") */
.status-strip {
  background: var(--ink);
  color: var(--bone);
  padding: 18px 0;
}
.status-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  letter-spacing: 0.01em;
}
.status-left {
  display: flex;
  gap: 36px;
  align-items: center;
}
.status-open {
  display: flex;
  align-items: center;
  gap: 10px;
}
.status-dot {
  width: 8px;
  height: 8px;
  background: #8AC23E;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(138, 194, 62, 0.25);
}
.status-dot.closed {
  background: var(--stone);
  box-shadow: 0 0 0 3px rgba(168, 162, 150, 0.25);
}
.status-divider { color: var(--stone); }
.status-link {
  color: var(--terracotta-soft);
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}

/* NEWSLETTER */
.newsletter {
  background: var(--terracotta);
  color: var(--paper);
  padding: 0;
  margin-top: 80px;
}
.newsletter-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 100px 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.newsletter-eyebrow {
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--terracotta-soft);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 18px;
}
.newsletter-title {
  font-family: var(--font-display);
  font-size: clamp(38px, 4vw, 54px);
  line-height: 1.02;
  font-weight: 400;
  letter-spacing: -0.025em;
  font-variation-settings: 'opsz' 60, 'SOFT' 50;
}
.newsletter-title em {
  font-style: italic;
  font-variation-settings: 'opsz' 60, 'SOFT' 100;
}
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 440px;
}
.newsletter-input-row {
  display: flex;
  border-bottom: 1.5px solid var(--paper);
  padding-bottom: 8px;
}
.newsletter-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--paper);
  font-family: inherit;
  font-size: 16px;
  padding: 10px 0;
  outline: none;
}
.newsletter-input::placeholder { color: var(--terracotta-soft); }
.newsletter-input:focus-visible { outline: none; }
.newsletter-submit {
  background: transparent;
  color: var(--paper);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 10px 0 10px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.newsletter-consent {
  font-size: 12px;
  color: var(--terracotta-soft);
  line-height: 1.5;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.newsletter-consent input {
  margin-top: 4px;
  accent-color: var(--paper);
}

/* FOOTER */
.footer {
  background: var(--ink);
  color: var(--bone);
  padding: 80px 0 32px;
}
.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 48px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.footer-brand .logo-mark {
  border-color: var(--bone);
}
.footer-brand .logo-mark::before, .footer-brand .logo-mark::after {
  background: var(--bone);
  border-color: var(--bone);
}
.footer-brand-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-variation-settings: 'opsz' 24, 'SOFT' 30;
}
.footer-address {
  font-size: 13px;
  line-height: 1.8;
  color: var(--stone-light);
  margin-bottom: 24px;
}
.footer-contact {
  font-size: 13px;
  line-height: 1.8;
}
.footer-contact a:hover { color: var(--terracotta-soft); }

.footer-col-title {
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--stone);
  text-transform: uppercase;
  margin-bottom: 18px;
  font-weight: 600;
}
.footer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-list a {
  font-size: 14px;
  color: var(--bone);
  transition: color 0.2s;
}
.footer-list a:hover { color: var(--terracotta-soft); }

.footer-bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--stone);
  letter-spacing: 0.02em;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-badges {
  display: flex;
  gap: 28px;
}
.footer-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--olive);
  border-radius: 50%;
}

/* RESPONSIVE (regole comuni a header/topbar/nav/sezioni/newsletter/footer) */
@media (max-width: 1100px) {
  .section,
  .header-inner,
  .topbar-inner,
  .newsletter-inner,
  .footer-inner {
    padding-left: 32px;
    padding-right: 32px;
  }
  .nav { gap: 22px; }
  .pair,
  .newsletter-inner,
  .footer-top {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .editorial-inner { grid-template-columns: 1fr; gap: 48px; }
  .status-inner,
  .filter-inner { padding-left: 32px; padding-right: 32px; }
}
@media (max-width: 640px) {
  .nav { display: none; }
  .topbar-left { display: none; }
  .topbar-tools { gap: 14px; }
  .header-inner,
  .topbar-inner {
    padding-left: 20px;
    padding-right: 20px;
  }
  .section {
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 60px;
    padding-bottom: 60px;
  }
  .section-header {
    flex-direction: column;
    align-items: start;
    gap: 24px;
  }
  .filter-inner { padding-left: 20px; padding-right: 20px; }
}

/* STATI DI FOCUS (accessibilità, WCAG 2.1 AA) */
*:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
}
