/*
Theme Name: Farebene - La Memoria Viva delle Acli
Theme URI: https://www.farebene.info
Author: Redazione Farebene ACLI
Author URI: https://www.farebene.info
Description: Tema WordPress moderno su misura per www.farebene.info. Palette Petrolio e Arancio, simbolo storico integrato come elemento di continuita, sezioni dedicate a Memoria (Un Grande Compito, Storia Vissuta, Memorabilia, BibliotecAcli), Multimedia (Video, Podcast) e News & Archivio storico.
Version: 2.8.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: farebene-theme
*/

:root {
  --petrol-950: #06232B;
  --petrol-900: #09343F;
  --petrol-800: #0E4958;
  --petrol-700: #136375;
  --petrol-100: #E3EFF2;
  --petrol-50:  #F1F6F8;
  --orange-600: #D45612;
  --orange-500: #EA6820;
  --orange-100: #FDECE1;
  --paper:      #FAF9F6;
  --surface:    #FFFFFF;
  --ink-900:    #102329;
  --ink-700:    #364B52;
  --ink-500:    #647A82;
  --border:     #DCE5E8;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans:  'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --shadow-sm:  0 2px 10px rgba(9, 52, 63, 0.05);
  --shadow-md:  0 14px 34px rgba(9, 52, 63, 0.09);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--paper);
  color: var(--ink-900);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

img, iframe, video {
  max-width: 100%;
}

img {
  height: auto;
  display: block;
}

.fb-container {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 24px;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ---------------- HEADER ---------------- */
.fb-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

body.admin-bar .fb-header {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .fb-header {
    top: 46px;
  }
}

.fb-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 98px;
  padding-top: 8px;
  padding-bottom: 8px;
  gap: 22px;
}

.fb-brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.fb-brand-badge {
  width: 60px;
  height: 52px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  box-shadow: 0 3px 8px rgba(9, 52, 63, 0.06);
}

.fb-brand-badge img {
  max-height: 38px;
  width: auto;
}

.fb-brand-text {
  display: flex;
  flex-direction: column;
}

.fb-brand-title {
  font-family: var(--font-serif);
  font-size: 1.82rem;
  font-weight: 700;
  line-height: 1.04;
  color: var(--petrol-900);
  letter-spacing: -0.02em;
}

.fb-brand-sub {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin-top: 3px;
}

/* Navigation */
.fb-nav {
  display: flex;
  align-items: center;
}

.fb-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.fb-menu > li {
  position: relative;
}

.fb-menu > li > a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px 14px;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--ink-900);
  border-radius: var(--radius-sm);
}

.fb-menu > li > a:hover,
.fb-menu > li.current-menu-item > a,
.fb-menu > li.current-menu-ancestor > a {
  color: var(--petrol-700);
  background: var(--petrol-50);
}

.fb-menu > li.menu-item-has-children > a::after {
  content: "▾";
  font-size: 0.72rem;
  opacity: 0.65;
}

.fb-menu .sub-menu {
  list-style: none;
  margin: 0;
  padding: 8px;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 235px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.18s ease;
  z-index: 100;
}

.fb-menu > li:hover > .sub-menu,
.fb-menu > li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.fb-menu .sub-menu li a {
  display: block;
  padding: 9px 13px;
  font-size: 0.89rem;
  font-weight: 500;
  color: var(--ink-700);
  border-radius: 8px;
}

.fb-menu .sub-menu li a:hover {
  background: var(--petrol-50);
  color: var(--petrol-900);
  padding-left: 16px;
}

/* Discreet Header Search & Video CTA */
.fb-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fb-discreet-search {
  position: relative;
  display: flex;
  align-items: center;
}

.fb-search-toggle {
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink-500);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  opacity: 0.72;
  transition: opacity 0.2s, background-color 0.2s, color 0.2s;
}

.fb-search-toggle:hover {
  opacity: 1;
  color: var(--petrol-900);
  background: var(--petrol-50);
}

.fb-search-popover {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px;
  box-shadow: var(--shadow-md);
  width: 250px;
  z-index: 200;
}

.fb-discreet-search.is-open .fb-search-popover {
  display: block;
}

.fb-search-form-compact {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fb-search-form-compact input[type="search"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 0.84rem;
  font-family: var(--font-sans);
  color: var(--ink-900);
  background: var(--paper);
}

.fb-search-form-compact input[type="search"]:focus {
  outline: none;
  border-color: var(--petrol-700);
}

.fb-search-form-compact button {
  background: var(--petrol-800);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 11px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.fb-btn-header {
  display: inline-flex;
  align-items: center;
  background: var(--petrol-900);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
}

.fb-btn-header:hover {
  background: var(--orange-500);
  color: #fff;
}

.fb-mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 11px;
  color: var(--petrol-900);
  cursor: pointer;
  font-size: 1.1rem;
}

/* ---------------- HERO ---------------- */
.fb-hero {
  position: relative;
  background: linear-gradient(135deg, var(--petrol-950) 0%, var(--petrol-900) 58%, var(--petrol-700) 100%);
  color: #FFFFFF;
  padding: 80px 0 88px;
  overflow: hidden;
  border-top: 4px solid var(--orange-500);
}

.fb-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.fb-hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 48px;
  align-items: center;
}

.fb-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #FCD6BE;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.fb-hero-kicker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange-500);
}

.fb-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.35rem, 4.4vw, 3.65rem);
  line-height: 1.12;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
  color: #FFFFFF;
}

.fb-hero h1 em,
.fb-hero-accent {
  font-style: normal;
  color: var(--orange-500);
}

.fb-hero-lead {
  font-size: clamp(1.08rem, 1.8vw, 1.28rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
  max-width: 640px;
  margin: 0 0 34px;
  font-weight: 400;
}

.fb-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.fb-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--orange-500);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(234, 104, 32, 0.28);
}

.fb-btn-primary:hover {
  background: var(--orange-600);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.fb-btn-outline-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-weight: 600;
  font-size: 0.96rem;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
}

.fb-btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: #FFFFFF;
  color: #FFFFFF;
}

/* Continuity Emblem Card in Hero */
.fb-continuity-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  text-align: center;
}

.fb-continuity-logo-box {
  width: 114px;
  height: 94px;
  margin: 0 auto 18px;
  background: var(--paper);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.fb-continuity-logo-box img {
  max-height: 64px;
  width: auto;
}

.fb-continuity-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #FCD6BE;
  margin-bottom: 6px;
}

.fb-continuity-card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.84);
}

/* ---------------- SECTIONS ---------------- */
.fb-section {
  padding: 76px 0;
}

.fb-section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 40px;
}

.fb-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--orange-500);
  margin-bottom: 8px;
}

.fb-section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 3vw, 2.45rem);
  color: var(--petrol-900);
  margin: 0;
  line-height: 1.2;
}

.fb-section-desc {
  color: var(--ink-700);
  max-width: 580px;
  margin: 8px 0 0;
  font-size: 1rem;
}

/* ---------------- MEMORIA BENTO GRID (6 PERCORSI SU 2 RIGHE - v2.8.0) ---------------- */
.fb-memoria-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.fb-mem-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
}

.fb-mem-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--orange-500);
}

.fb-mem-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--petrol-900);
  border-bottom: 3px solid var(--orange-500);
}

.fb-mem-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.fb-mem-card:hover .fb-mem-photo img {
  transform: scale(1.05);
}

.fb-mem-body {
  padding: 24px 24px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.fb-mem-body h3 {
  font-family: var(--font-serif);
  font-size: 1.34rem;
  line-height: 1.25;
  color: var(--petrol-900);
  margin: 0 0 10px;
}

.fb-mem-body p {
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--ink-700);
  margin: 0 0 18px;
  flex: 1;
}

.fb-mem-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--orange-500);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.fb-mem-card:hover .fb-mem-link {
  color: var(--petrol-900);
}

/* ---------------- MULTIMEDIA ---------------- */
.fb-multimedia {
  background: var(--petrol-950);
  color: #FFFFFF;
  padding: 80px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.fb-multimedia .fb-section-title {
  color: #FFFFFF;
}

.fb-multimedia .fb-section-desc {
  color: rgba(255, 255, 255, 0.78);
}

.fb-media-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 28px;
}

.fb-video-box,
.fb-podcast-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 26px;
}

.fb-video-frame {
  aspect-ratio: 16 / 9;
  background: var(--petrol-900);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.fb-video-frame iframe,
.fb-video-frame video,
.fb-video-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}

.fb-video-placeholder {
  text-align: center;
  padding: 28px;
}

.fb-play-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--orange-500);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 12px;
  box-shadow: 0 8px 24px rgba(234, 104, 32, 0.4);
}

.fb-media-badge {
  display: inline-block;
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #FCD6BE;
  margin-bottom: 8px;
}

.fb-video-box h3,
.fb-podcast-box h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  margin: 0 0 10px;
  color: #FFFFFF;
}

.fb-video-box p,
.fb-podcast-box p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.93rem;
  margin: 0 0 16px;
}

.fb-podcast-list {
  list-style: none;
  padding: 0;
  margin: 18px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fb-podcast-item {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fb-podcast-item:hover {
  border-color: var(--orange-500);
  background: rgba(255, 255, 255, 0.09);
}

.fb-podcast-item-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: #FFFFFF;
}

.fb-podcast-item-meta {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.65);
}

/* ---------------- NEWS & ARCHIVIO ---------------- */
.fb-legacy-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px 6px 8px;
  margin-bottom: 12px;
}

.fb-legacy-banner img {
  height: 22px;
  width: auto;
}

.fb-legacy-banner span {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--petrol-800);
  letter-spacing: 0.03em;
}

.fb-tabs {
  display: inline-flex;
  background: var(--petrol-50);
  border: 1px solid var(--border);
  padding: 4px;
  border-radius: 10px;
  gap: 4px;
}

.fb-tab-btn {
  background: transparent;
  border: none;
  padding: 9px 18px;
  border-radius: 7px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-700);
  cursor: pointer;
}

.fb-tab-btn.is-active {
  background: var(--petrol-900);
  color: #FFFFFF;
}

.fb-tab-panel {
  display: none;
}

.fb-tab-panel.is-active {
  display: block;
}

.fb-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.fb-post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.fb-post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.fb-post-thumb {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--petrol-900), var(--petrol-700));
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fb-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fb-post-thumb-fallback {
  opacity: 0.22;
  width: 64px;
}

.fb-post-body {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.fb-post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--ink-500);
  margin-bottom: 10px;
}

.fb-cat-pill {
  background: var(--orange-100);
  color: var(--orange-600);
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.fb-post-card h3 {
  font-family: var(--font-serif);
  font-size: 1.24rem;
  line-height: 1.32;
  margin: 0 0 10px;
  color: var(--petrol-900);
}

.fb-post-card p {
  font-size: 0.92rem;
  color: var(--ink-700);
  margin: 0 0 16px;
  flex: 1;
}

.fb-read-more {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--petrol-700);
}

.fb-read-more:hover {
  color: var(--orange-500);
}

.fb-archive-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.fb-archive-bar p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-700);
}

/* ---------------- INTERNAL PAGES & ARTICLES ---------------- */
.fb-page-banner {
  background: linear-gradient(135deg, var(--petrol-950), var(--petrol-800));
  color: #FFFFFF;
  padding: 56px 0;
  border-top: 4px solid var(--orange-500);
}

.fb-page-banner h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.6vw, 2.85rem);
  margin: 8px 0 10px;
  line-height: 1.18;
}

.fb-page-banner p {
  color: rgba(255, 255, 255, 0.84);
  max-width: 680px;
  margin: 0;
}

.fb-article-wrap {
  max-width: 840px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 46px;
  box-shadow: var(--shadow-sm);
}

.fb-entry-content {
  font-size: 1.06rem;
  line-height: 1.82;
  color: var(--ink-900);
}

.fb-entry-content h2,
.fb-entry-content h3,
.fb-entry-content h4 {
  font-family: var(--font-serif);
  color: var(--petrol-900);
  margin-top: 1.8em;
  margin-bottom: 0.6em;
}

.fb-entry-content a {
  color: var(--petrol-700);
  text-decoration: underline;
}

.fb-entry-content blockquote,
.wp-block-quote {
  margin: 28px 0;
  padding: 18px 24px;
  border-left: 4px solid var(--orange-500);
  background: var(--petrol-50);
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--petrol-900);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.wp-block-embed__wrapper {
  position: relative;
}

.fb-related-section {
  max-width: 1220px;
  margin: 56px auto 0;
}

.fb-pagination {
  margin-top: 42px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.fb-pagination .page-numbers {
  padding: 9px 15px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
}

.fb-pagination .page-numbers.current {
  background: var(--petrol-900);
  color: #FFFFFF;
  border-color: var(--petrol-900);
}

/* Contact Page Grid */
.fb-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
  max-width: 1020px;
  margin: 0 auto;
}

.fb-contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px;
  box-shadow: var(--shadow-sm);
}

.fb-form-field {
  margin-bottom: 16px;
}

.fb-form-field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--petrol-900);
  margin-bottom: 6px;
}

.fb-form-field input,
.fb-form-field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  background: var(--paper);
}

.fb-form-field input:focus,
.fb-form-field textarea:focus {
  outline: none;
  border-color: var(--petrol-700);
  background: #FFFFFF;
}

/* ---------------- FOOTER (NO NEWSLETTER) ---------------- */
.fb-footer {
  background: var(--petrol-950);
  color: rgba(255, 255, 255, 0.82);
  padding: 64px 0 32px;
  border-top: 4px solid var(--orange-500);
}

.fb-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.fb-footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.fb-footer-logo-badge {
  width: 52px;
  height: 44px;
  background: var(--paper);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}

.fb-footer-logo-badge img {
  max-height: 32px;
  width: auto;
}

.fb-footer-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  color: #FFFFFF;
  font-weight: 700;
}

.fb-footer h4 {
  color: #FFFFFF;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 0 0 16px;
}

.fb-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fb-footer ul a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.92rem;
}

.fb-footer ul a:hover {
  color: var(--orange-500);
}

.fb-footer-bottom {
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 1024px) {
  .fb-memoria-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .fb-hero-grid,
  .fb-media-grid,
  .fb-contact-grid {
    grid-template-columns: 1fr;
  }
  .fb-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .fb-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 840px) {
  .fb-mobile-toggle {
    display: inline-flex;
  }
  .fb-nav {
    display: none;
    position: absolute;
    top: 98px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    box-shadow: var(--shadow-md);
  }
  .fb-nav.is-open {
    display: block;
  }
  .fb-menu {
    flex-direction: column;
    align-items: stretch;
  }
  .fb-menu .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding-left: 14px;
    background: var(--paper);
  }
  .fb-btn-header {
    display: none;
  }
}

@media (max-width: 600px) {
  .fb-memoria-grid,
  .fb-posts-grid,
  .fb-footer-grid {
    grid-template-columns: 1fr;
  }
  .fb-article-wrap,
  .fb-contact-card {
    padding: 24px 20px;
  }
}


/* ---------------- EDITORIAL ADSENSE SLOTS (v2.2.2) ---------------- */
/* Impedisce qualsiasi banner indesiderato sopra la testata (.fb-header) */
body > ins.adsbygoogle,
body > .google-auto-placed,
.fb-header ~ ins.adsbygoogle[data-anchor-status],
ins.adsbygoogle[data-ad-status="unfilled"] {
  display: none !important;
}

.fb-ad-wrap {
  margin: 42px auto 0;
  width: 100%;
  max-width: 980px;
  text-align: center;
}

.fb-ad-wrap--single {
  max-width: 840px;
  margin: 34px auto 0;
}

.fb-ad-wrap--archive {
  max-width: 980px;
  margin: 38px auto 8px;
}

.fb-ad-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px 18px;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(9, 52, 63, 0.03);
}

.fb-ad-label {
  display: block;
  font-size: 0.67rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-500);
  margin-bottom: 10px;
  line-height: 1;
  text-align: center;
}

/* Importante: display:block (non flex) permette a Google AdSense di calcolare e centrare bene il banner */
.fb-ad-inner {
  display: block;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  overflow: hidden;
}

.fb-ad-inner ins.adsbygoogle,
.fb-ad-inner iframe {
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
  max-width: 100% !important;
}

.fb-ad-placeholder-box {
  width: 100%;
  padding: 22px 16px;
  border: 1px dashed var(--petrol-700);
  border-radius: 8px;
  background: var(--petrol-50);
  color: var(--petrol-900);
  font-size: 0.86rem;
  font-weight: 600;
  text-align: center;
}


/* ---------------- MENU UNIFORME IN HOMEPAGE ---------------- */
body.home .fb-menu > li.current-menu-item > a,
body.home .fb-menu > li.current-menu-ancestor > a {
  background: transparent;
  color: var(--ink-900);
}
body.home .fb-menu > li.current-menu-item > a:hover,
body.home .fb-menu > li.current-menu-ancestor > a:hover {
  background: var(--petrol-50);
  color: var(--petrol-700);
}

/* ---------------- HERO HISTORICAL PHOTO & CAROUSEL (v2.3.0) ---------------- */
.fb-hero-showcase {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin-left: auto;
}

/* Effetto doppia cornice d'archivio inclinata leggerissima dietro la foto */
.fb-hero-showcase::before {
  content: "";
  position: absolute;
  inset: 10px -8px -10px 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transform: rotate(1.6deg);
  pointer-events: none;
  z-index: 0;
}

.fb-hero-frame {
  position: relative;
  z-index: 1;
  background: var(--paper);
  padding: 10px;
  border-radius: 18px;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.fb-hero-slides {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 11px;
  overflow: hidden;
  background: var(--petrol-950);
}

.fb-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.65s ease, visibility 0.65s ease;
  margin: 0;
}

.fb-hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.fb-hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.01);
  transition: transform 5s ease;
}

.fb-hero-slide.is-active img {
  transform: scale(1.05);
}

/* Filtri fotografici opzionali configurabili da Personalizza */
.fb-filter-sepia-soft .fb-hero-slide img {
  filter: sepia(0.28) contrast(1.05) brightness(0.97);
}

.fb-filter-bw-contrast .fb-hero-slide img {
  filter: grayscale(1) contrast(1.14) brightness(0.96);
}

/* Sfumatura morbida in basso per rendere sempre leggibile la didascalia */
.fb-hero-slide-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 32px 16px 13px;
  background: linear-gradient(to top, rgba(6, 35, 43, 0.86) 0%, rgba(6, 35, 43, 0.42) 60%, transparent 100%);
  color: #FFFFFF;
  font-size: 0.82rem;
  line-height: 1.4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.fb-hero-slide-caption span {
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.fb-hero-slide-caption a {
  color: #FFFFFF;
  text-decoration: none;
}

.fb-hero-slide-caption a:hover {
  color: #FCD6BE;
  text-decoration: underline;
}

/* Frecce e pallini del carosello (mostrati solo quando ci sono 2+ foto) */
.fb-hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(9, 52, 63, 0.68);
  backdrop-filter: blur(4px);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.fb-hero-arrow:hover {
  background: var(--orange-500);
  border-color: var(--orange-500);
}

.fb-hero-arrow--prev {
  left: 10px;
}

.fb-hero-arrow--next {
  right: 10px;
}

.fb-hero-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 6px 2px;
}

.fb-hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: rgba(9, 52, 63, 0.25);
  cursor: pointer;
  transition: width 0.25s ease, background-color 0.25s ease;
}

.fb-hero-dot.is-active {
  width: 22px;
  background: var(--orange-500);
}

@media (max-width: 1024px) {
  .fb-hero-showcase {
    max-width: 640px;
    margin: 8px auto 0;
  }
}


/* ---------------- FILIGRANA LOGO FAREBENE SULLE IMMAGINI (v2.4.0) ---------------- */
.fb-wm-box {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 12px;
}

.fb-wm-box--inline {
  display: inline-block;
  max-width: 100%;
  margin: 18px 0;
  vertical-align: middle;
}

.fb-wm-box img.fb-wm-photo {
  display: block;
  width: 100%;
  height: auto;
}

.fb-wm-mark {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 9px;
  background: rgba(250, 249, 246, 0.84);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(9, 52, 63, 0.14);
  box-shadow: 0 3px 10px rgba(6, 28, 35, 0.14);
  transition: opacity 0.25s ease;
}

.fb-wm-mark img {
  width: auto !important;
  height: 22px !important;
  max-height: 22px !important;
  max-width: none !important;
  margin: 0 !important;
  display: block !important;
}

.fb-wm-mark-text {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--petrol-900);
  line-height: 1;
  white-space: nowrap;
}

/* Posizioni configurabili */
.fb-wm-pos--bottom-right {
  right: 12px;
  bottom: 12px;
}

.fb-wm-pos--bottom-left {
  left: 12px;
  bottom: 12px;
}

.fb-wm-pos--top-right {
  right: 12px;
  top: 12px;
}

.fb-wm-pos--top-left {
  left: 12px;
  top: 12px;
}

.fb-wm-pos--center {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 12px 18px;
  border-radius: 14px;
}

.fb-wm-pos--center img {
  height: 36px !important;
  max-height: 36px !important;
}

/* Stile filigrana: badge sobrio vs trasparenza sfumata */
.fb-wm-style--subtle .fb-wm-mark {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(9, 52, 63, 0.12);
  box-shadow: 0 2px 8px rgba(6, 28, 35, 0.09);
}

.fb-wm-style--ghost .fb-wm-mark {
  background: transparent;
  backdrop-filter: none;
  border: none;
  box-shadow: none;
  padding: 4px;
}

.fb-wm-style--ghost .fb-wm-mark-text {
  color: #FFFFFF;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75);
}

@media (max-width: 600px) {
  .fb-wm-mark {
    padding: 5px 8px;
    gap: 6px;
  }
  .fb-wm-mark img {
    height: 18px !important;
    max-height: 18px !important;
  }
  .fb-wm-mark-text {
    font-size: 0.62rem;
  }
  .fb-wm-pos--bottom-right { right: 8px; bottom: 8px; }
  .fb-wm-pos--bottom-left  { left: 8px; bottom: 8px; }
  .fb-wm-pos--top-right    { right: 8px; top: 8px; }
  .fb-wm-pos--top-left     { left: 8px; top: 8px; }
}
