/* =========================================================
   IL MAGGIO DI ACCETTURA — Stile editoriale
   ========================================================= */

/* ---------- FONTS ---------- */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=EB+Garamond:ital,wght@0,400;0,500;1,400;1,500&family=Inter:wght@300;400;500;600&display=swap');

/* ---------- TOKENS ---------- */
:root {
  --white:      #FFFFFF;
  --black:      #111111;
  --green:      #1E4A14;
  --green-mid:  #2D6B1E;
  --gold:       #A8791B;
  --gold-soft:  #C9920A;
  --muted:      #6B6B6B;
  --border:     #E8E8E8;
  --bg:         #F7F5F2;

  --font-title: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-body:  'EB Garamond', Georgia, 'Times New Roman', serif;
  --font-ui:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --transition: 240ms ease;
  --container:  1160px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--white);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.75;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }
button, input { font: inherit; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- ANIMAZIONI ---------- */
@keyframes slowZoom {
  from { transform: scale(1); }
  to   { transform: scale(1.06); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: .5; }
  50%       { opacity: 1; }
}

/* =========================================================
   HEADER
   ========================================================= */
.hdr {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: 72px;
  display: flex;
  align-items: center;
  padding: 0 48px;
  justify-content: space-between;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 var(--border);
}

.hdr.scrolled {
  background: var(--white);
}

/* Logo */
.logo-wrap { text-decoration: none; flex-shrink: 0; }

.logo-wrap img {
  height: 48px;
  width: auto;
  display: block;
}

/* Fallback testo se non c'è logo */
.logo-main {
  font-family: var(--font-title);
  font-size: 20px;
  color: var(--green);
  line-height: 1;
}
.logo-sub {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3px;
}

/* Nav desktop */
.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 4px;
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
  cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
  color: var(--black);
  background: var(--bg);
}

/* Dropdown */
.nav-dropdown { position: relative; }

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  min-width: 240px;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  box-shadow: 0 12px 40px rgba(0,0,0,.10);
}

.dropdown-menu a {
  display: block;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 400;
  color: var(--black);
  padding: 11px 20px;
  transition: background var(--transition), color var(--transition);
}

.dropdown-menu a:hover {
  background: var(--bg);
  color: var(--green);
}

/* Toggle mobile */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--black);
  font-size: 26px;
  line-height: 1;
}

/* ---------- MENU MOBILE ---------- */
.mob-nav {
  display: none;
  flex-direction: column;
  position: fixed;
  inset: 72px 0 0 0;
  z-index: 999;
  background: var(--white);
  overflow-y: auto;
  padding: 0 32px 48px;
}

.mob-nav.open { display: flex; }

.mob-nav > a {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 500;
  color: var(--black);
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.mob-nav > a:hover { color: var(--green); }

.mob-section {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 500;
  color: var(--black);
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.mob-section::after {
  content: '+';
  font-size: 20px;
  font-weight: 300;
  color: var(--muted);
  transition: transform var(--transition);
}

.mob-section.open::after {
  transform: rotate(45deg);
}

.mob-group {
  display: none;
  flex-direction: column;
}

.mob-group.open { display: flex; }

.mob-group a {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);
  padding: 12px 0 12px 16px;
  border-bottom: 1px solid #F2F2F2;
}

.mob-group a:hover { color: var(--green); }

/* =========================================================
   HERO HOME
   ========================================================= */
.hero-home {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-bottom: 96px;
  padding-top: 72px;
  overflow: hidden;
}

.hero-home .bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  /* Minimo filtro — la foto respira */
  filter: brightness(.82);
  animation: slowZoom 22s ease-in-out infinite alternate;
}

.hero-home .ov {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.55) 0%,
    rgba(0,0,0,.18) 50%,
    transparent 100%
  );
}

.hero-home .content {
  position: relative;
  z-index: 2;
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
  animation: fadeUp 1.2s ease both;
}

.eyebrow {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
  margin-bottom: 20px;
}

.hero-h1 {
  font-family: var(--font-title);
  font-size: clamp(52px, 9vw, 108px);
  font-weight: 400;
  font-style: italic;
  color: #fff;
  line-height: .96;
  margin-bottom: 8px;
}

.hero-h2 {
  font-family: var(--font-title);
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 400;
  color: rgba(255,255,255,.82);
  margin-bottom: 32px;
  line-height: 1.1;
}

.hero-sub {
  font-family: var(--font-body);
  font-size: clamp(17px, 2vw, 22px);
  font-style: italic;
  color: rgba(255,255,255,.78);
  max-width: 52ch;
  margin-bottom: 44px;
  line-height: 1.6;
}

.cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-oro {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  color: var(--black);
  background: #fff;
  padding: 14px 32px;
  border-radius: 999px;
  border: none;
  transition: background var(--transition), transform var(--transition);
  text-decoration: none;
}

.btn-oro:hover {
  background: var(--bg);
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: transparent;
  padding: 14px 32px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35);
  transition: all var(--transition);
  text-decoration: none;
}

.btn-ghost:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.7);
  transform: translateY(-1px);
}

.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.6));
}
.scroll-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,.6);
  animation: pulse 2s infinite;
}

/* =========================================================
   INTRO QUOTE
   ========================================================= */
.home-quote {
  padding: 96px 48px;
  background: var(--bg);
  text-align: center;
}

.oro-line {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 auto 32px;
  max-width: 280px;
}

.oro-line::before,
.oro-line::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.oro-star {
  font-size: 12px;
  color: var(--gold);
}

.home-quote__text {
  font-family: var(--font-body);
  font-size:clamp(18px, 2.2vw, 26px);
  font-style: italic;
  font-weight: 400;
  color: var(--black);
  line-height: 1.72;
  max-width: 72ch;
  margin: 0 auto 32px;
}

.home-quote__link {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--green);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: color var(--transition);
}

.home-quote__link:hover { color: var(--gold); }

/* =========================================================
   3 MOMENTI
   ========================================================= */
.home-moments {
  padding: 96px 48px;
  background: var(--white);
}

.home-moments__label {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  margin-bottom: 12px;
}

.home-moments__title {
  font-family: var(--font-title);
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 400;
  font-style: italic;
  color: var(--black);
  text-align: center;
  margin-bottom: 56px;
  line-height: 1.08;
}

.momenti-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: var(--container);
  margin: 0 auto;
}

.moment {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  height: 480px;
  display: block;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition);
}

.moment:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
}

.moment img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Foto luminose */
  filter: brightness(.88);
  transition: transform 800ms ease, filter 400ms ease;
}

.moment:hover img {
  transform: scale(1.04);
  filter: brightness(.80);
}

.moment__ov {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.72) 0%,
    rgba(0,0,0,.2) 50%,
    transparent 100%
  );
}

.moment__body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px;
}

.moment__date {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
  margin-bottom: 10px;
}

.moment__title {
  font-family: var(--font-title);
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 400;
  font-style: italic;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.15;
}

.moment__desc {
  font-family: var(--font-body);
  font-size: 16px;
  font-style: italic;
  color: rgba(255,255,255,.75);
  line-height: 1.6;
}

/* =========================================================
   FASI GRIGLIA
   ========================================================= */
.fasi-section {
  padding: 96px 48px;
  background: var(--bg);
}

.fasi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: var(--container);
  margin: 0 auto;
}

.fase-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  text-decoration: none;
  display: block;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  transition: transform var(--transition), box-shadow var(--transition);
}

.fase-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,.15);
}

.fase-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  filter: brightness(.9);
  transition: transform 600ms ease, filter 400ms ease;
}

.fase-card:hover img {
  transform: scale(1.05);
  filter: brightness(.78);
}

.fase-ov {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.78) 0%,
    rgba(0,0,0,.3) 55%,
    transparent 100%
  );
}

.fase-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 18px 20px;
}

.fase-title {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 400;
  font-style: italic;
  color: #fff;
  margin-bottom: 5px;
  line-height: 1.2;
  transition: color var(--transition);
}

.fase-card:hover .fase-title { color: rgba(255,255,255,.9); }

.fase-data {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .06em;
  color: rgba(255,255,255,.65);
}

.fase-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold-soft);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 360ms ease;
}

.fase-card:hover .fase-bar,
.fase-card.current .fase-bar { transform: scaleX(1); }

.fase-card.current {
  box-shadow: 0 0 0 2px var(--gold-soft), 0 8px 24px rgba(0,0,0,.15);
}

/* =========================================================
   PROGETTO 365 STRIP
   ========================================================= */
.home-p365 {
  position: relative;
  overflow: hidden;
  padding: 120px 48px;
  text-align: center;
}

.home-p365__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(6px) brightness(.35);
  transform: scale(1.06);
}

.home-p365__ov {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
}

.home-p365__inner {
  position: relative;
  z-index: 2;
}

.home-p365__inner h2 {
  font-family: var(--font-title);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 400;
  font-style: italic;
  color: #fff;
  margin-bottom: 20px;
}

.home-p365__inner p {
  font-family: var(--font-body);
  font-size: clamp(17px, 2vw, 22px);
  font-style: italic;
  color: rgba(255,255,255,.8);
  max-width: 56ch;
  margin: 0 auto 40px;
  line-height: 1.7;
}

/* =========================================================
   INNER HERO (pagine interne)
   ========================================================= */
.inner-hero {
  position: relative;
  height: 420px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding-bottom: 56px;
  margin-top: 72px;
}

.inner-hero .ibg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.78);
}

.inner-hero .iov {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0,0,0,.18) 50%,
    rgba(0,0,0,.62) 100%
  );
}

.inner-hero .icontent {
  position: relative;
  z-index: 2;
  width: min(860px, calc(100% - 96px));
  margin: 0 auto;
}

.inner-hero .ieyebrow {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
  margin-bottom: 12px;
}

.inner-hero h1 {
  font-family: var(--font-title);
  font-size: clamp(32px, 5vw, 58px);
  font-weight: 400;
  font-style: italic;
  color: #fff;
  line-height: 1.08;
  text-shadow: 0 2px 24px rgba(0,0,0,.3);
}

.inner-hero .idate { font-size: 20px !important; font-weight: 400; color: rgba(255,255,255,.75); margin-top: 14px; }

/* =========================================================
   ARTICLE
   ========================================================= */
.article-outer { background: var(--white); }

.article-inner {
  max-width: 700px;
  margin: 0 auto;
  padding: 72px 24px 96px;
}

.article-inner h1 {
  font-family: var(--font-title);
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 400;
  font-style: italic;
  color: var(--black);
  margin-bottom: 8px;
  line-height: 1.1;
}

.art-date { font-size: 20px !important; font-weight: 400; color: var(--muted); margin-bottom: 48px; }

.article-inner p {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.78;
  color: var(--black);
  margin-bottom: 24px;
}

.article-inner strong { font-weight: 500 !important; font-style: italic !important; }

.article-inner em {
  font-style: italic;
}

.article-inner h2 {
  font-family: var(--font-title);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 400;
  font-style: italic;
  color: var(--green);
  margin: 52px 0 16px;
  line-height: 1.2;
}

.art-img {
  width: 100%;
  border-radius: 6px;
  margin: 40px 0 10px;
  display: block;
}

.art-caption {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .04em;
  color: var(--muted);
  margin-bottom: 32px;
}

.pull-quote {
  border-left: 2px solid var(--gold);
  padding: 20px 32px;
  margin: 48px 0;
  background: var(--bg);
  border-radius: 0 6px 6px 0;
}

.pull-quote p {
  font-family: var(--font-body);
  font-size: 22px;
  font-style: italic;
  font-weight: 400;
  color: var(--green);
  margin: 0;
  line-height: 1.65;
}

/* =========================================================
   PREV / NEXT
   ========================================================= */
.page-nav {
  background: var(--bg);
  padding: 32px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  border-top: 1px solid var(--border);
}

.page-nav a {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  color: var(--green);
  text-decoration: none;
  transition: color var(--transition);
}

.page-nav a:hover { color: var(--gold); }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  background: var(--black);
  padding: 72px 48px 32px;
  border-top: none;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 48px;
  max-width: var(--container);
  margin-inline: auto;
}

.footer-brand .fb-name {
  font-family: var(--font-title);
  font-size: 22px;
  font-style: italic;
  font-weight: 400;
  color: #fff;
  margin-bottom: 6px;
}

.footer-brand .fb-sub {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 400;
  color: rgba(255,255,255,.45);
}

.footer-col h4 {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 400;
  color: rgba(255,255,255,.65);
  text-decoration: none;
  line-height: 2.2;
  transition: color var(--transition);
}

.footer-col a:hover { color: #fff; }

.footer-copy {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 24px;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 400;
  color: rgba(255,255,255,.3);
  max-width: var(--container);
  margin-inline: auto;
}

/* =========================================================
   ART CARD GRID (hub pages)
   ========================================================= */
.art-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: var(--container);
  margin: 0 auto;
}

.art-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  display: block;
  transition: transform var(--transition), box-shadow var(--transition);
}

.art-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,.10);
}

.art-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  filter: brightness(.95);
  transition: transform 500ms ease, filter 300ms ease;
}

.art-card:hover img {
  transform: scale(1.03);
  filter: brightness(.88);
}

.art-card-body { padding: 22px 24px 26px; }

.art-card-title {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 400;
  font-style: italic;
  color: var(--black);
  margin-bottom: 10px;
  line-height: 1.2;
}

.art-card-desc {
  font-family: var(--font-body);
  font-size: 17px;
  font-style: italic;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.art-card-link {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  color: var(--green);
  letter-spacing: .02em;
}

/* =========================================================
   PROGETTO 365 — GALLERIA
   ========================================================= */
.p365-controls {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 16px 48px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  position: sticky;
  top: 72px;
  z-index: 100;
}

.p365-search {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 18px;
}

.p365-search input {
  border: none;
  background: transparent;
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--black);
  width: 100%;
  outline: none;
}

.p365-search input::placeholder { color: var(--muted); }
.p365-search .search-icon { color: var(--muted); font-size: 14px; flex-shrink: 0; }

.p365-jump {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.p365-jump input[type=number] {
  width: 68px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--black);
  background: var(--bg);
  text-align: center;
  outline: none;
}

.p365-jump button {
  padding: 9px 22px;
  background: var(--black);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
}

.p365-jump button:hover { background: var(--green); }

.p365-counter {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.p365-main { background: var(--bg); min-height: 60vh; padding: 0 0 60px; }

.search-results-bar {
  background: var(--green);
  color: #fff;
  padding: 10px 48px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  display: none;
}

.search-results-bar.visible { display: block; }

.clear-search {
  background: none;
  border: none;
  color: rgba(255,255,255,.75);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 13px;
  margin-left: 16px;
}

.p365-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 48px;
}

.gallery-card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(0,0,0,.10);
}

.gallery-card-img-wrap { position: relative; overflow: hidden; }

.gallery-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  filter: brightness(.95);
  transition: transform 400ms ease, filter 300ms ease;
}

.gallery-card:hover img {
  transform: scale(1.04);
  filter: brightness(.85);
}

.gallery-card-num {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0,0,0,.55);
  color: rgba(255,255,255,.9);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 999px;
}

.gallery-card-body { padding: 14px 16px 16px; }

.gallery-card-title {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 400;
  font-style: italic;
  color: var(--black);
  line-height: 1.3;
  margin-bottom: 4px;
}

.gallery-card-autore {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.p365-gallery-wrap.detail-mode { display: none; }
.p365-detail { display: none; }
.p365-detail.active { display: block; }

.detail-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 56px 24px 72px;
}

.detail-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 12px;
}

.detail-nav-btn {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  color: var(--green);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition);
}

.detail-nav-btn:hover { color: var(--gold); }
.detail-nav-btn:disabled { color: var(--border); cursor: default; }

.detail-close {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
}

.detail-num {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.detail-title {
  font-family: var(--font-title);
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 400;
  font-style: italic;
  color: var(--black);
  line-height: 1.1;
  margin-bottom: 8px;
}

.detail-autore {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 28px;
}

.detail-img-wrap {
  margin-bottom: 10px;
  border-radius: 8px;
  overflow: hidden;
}

.detail-img-wrap img {
  width: 100%;
  display: block;
  max-height: 640px;
  object-fit: contain;
  background: var(--bg);
}

.detail-credit {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 32px;
  text-align: right;
}

.detail-testo {
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.78;
  color: var(--black);
}

.detail-testo p { margin-bottom: 20px; }

.p365-empty {
  text-align: center;
  padding: 96px 20px;
  display: none;
}

.p365-empty h3 {
  font-family: var(--font-title);
  font-size: 28px;
  font-style: italic;
  color: var(--muted);
  margin-bottom: 12px;
}

.p365-empty p {
  font-family: var(--font-body);
  font-size: 18px;
  font-style: italic;
  color: var(--muted);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 960px) {
  .hdr { padding: 0 24px; }
  .site-nav { display: none; }
  .nav-toggle { display: block; }

  .hero-home { padding-bottom: 72px; }
  .inner-hero { height: 320px; }
  .inner-hero .icontent { width: calc(100% - 48px); }

  .momenti-grid { grid-template-columns: 1fr; }
  .home-moments { padding: 72px 24px; }
  .moment { height: 320px; }

  .fasi-grid { grid-template-columns: repeat(2, 1fr); }
  .fasi-section { padding: 72px 24px; }

  .home-quote { padding: 72px 24px; }
  .home-p365 { padding: 96px 24px; }

  .footer { padding: 56px 24px 28px; }
  .footer-inner { flex-direction: column; gap: 32px; }

  .art-grid { grid-template-columns: 1fr; }

  .page-nav { padding: 24px; }

  .p365-controls { padding: 14px 24px; top: 72px; }
  .p365-gallery { padding: 24px; gap: 14px; }
  .gallery-card img { height: 150px; }
  .detail-wrap { padding: 40px 24px 56px; }
  .search-results-bar { padding: 10px 24px; }
}

@media (max-width: 640px) {
  .fasi-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .cta-row { flex-direction: column; align-items: flex-start; }
  .p365-gallery { grid-template-columns: 1fr 1fr; gap: 12px; }
  .art-grid { grid-template-columns: 1fr; }
}

@media (min-width: 641px) and (max-width: 960px) {
  .art-grid { grid-template-columns: 1fr 1fr; }
}
