/* Adattamento FSE del progetto esistente; nessuna composizione editoriale sostitutiva. */
:root,
.editor-styles-wrapper {
  --footer-background: var(--wp--preset--color--footer-background);
  --brand-gold: var(--wp--preset--color--brand-gold);
}
html, body { margin: 0; padding: 0; width: 100%; min-height: 100%; }
body { background: var(--wp--preset--color--background); color: var(--wp--preset--color--ink); font-family: var(--font-sans); }
.wp-site-blocks { margin: 0; padding: 0; }
.wp-site-blocks > *, .wp-block-template-part > :first-child { margin-block-start: 0; }
.wp-block-template-part { max-width: none; }
.wp-block-group.page-content { max-width: var(--wp--custom--museum--page-width); padding: var(--wp--custom--museum--page-padding); margin-inline: auto; }
.page-heading h1 { font-size: var(--wp--custom--museum--page-heading); }
.content-site { color: var(--wp--preset--color--editorial-ink); background: var(--wp--preset--color--editorial-background); }
.content-site .topbar { background: var(--wp--preset--color--header-background); }
.info-panel { background: var(--wp--preset--color--panel); }
.info-panel p > a { display: inline-block; min-height: var(--wp--custom--measure--px-24); padding-block: var(--wp--custom--space--px-4); }
.style-tile-sheet .swatch-box .swatch-name, .style-tile-sheet .swatch-box .swatch-hex { color: inherit; opacity: 1; margin: 0; }
.wp-block-group.topbar { margin: 0; }
.topbar > *, .header-actions > * { margin: 0; }
.wordmark > a { display: flex; align-items: center; gap: var(--wp--custom--space--px-12); color: inherit; text-decoration: none; }
.topbar .wordmark, .topbar .wordmark a { color: var(--brand-gold); }
.topbar p { line-height: inherit; }
.header-actions { flex-direction: row; }
.fse-visit a { text-decoration: none; }
/* I pulsanti editoriali e il campione della tavola condividono tutti gli stati. */
.style-tile-button,
.visit-heading > a.button,
.history-teaser a.button {
  display: inline-block;
  max-width: 100%;
  min-height: var(--wp--custom--measure--px-44);
  padding: var(--wp--custom--space--px-13) var(--wp--custom--space--px-22);
  background: var(--wp--preset--color--secondary);
  color: var(--wp--preset--color--white) !important;
  border: 0;
  border-radius: var(--wp--custom--measure--px-4);
  text-decoration: none !important;
  font-family: var(--font-sans);
  font-weight: var(--wp--custom--weight--semibold);
  font-size: var(--wp--custom--type--size-13);
  line-height: var(--wp--custom--leading--ratio-1-65);
  letter-spacing: var(--wp--custom--tracking--em-0-04);
  transition: background-color .2s, transform .15s;
}
.style-tile-button:hover,
.visit-heading > a.button:hover,
.history-teaser a.button:hover {
  background: var(--wp--custom--color--style-tile-style-tile-button-hover-background);
  color: var(--wp--preset--color--white) !important;
  transform: translateY(var(--wp--custom--space--minus-px-1));
}
.style-tile-button:focus-visible,
.visit-heading > a.button:focus-visible,
.history-teaser a.button:focus-visible {
  outline: var(--wp--custom--measure--px-3) solid var(--wp--custom--color--style-tile-style-tile-button-hover-background);
  outline-offset: var(--wp--custom--measure--px-4);
}
.motion-off .style-tile-button,
.motion-off .visit-heading > a.button,
.motion-off .history-teaser a.button { transition: none; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .style-tile-button,
  .visit-heading > a.button,
  .history-teaser a.button { transition: none; transform: none; }
}
.style-tile-action-link,
.fse-atlas:has(.story) .text-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--wp--custom--measure--px-44);
  max-width: 100%;
  color: var(--ink);
  font-size: var(--wp--custom--type--size-14);
  font-weight: var(--wp--custom--weight--semibold);
  text-decoration: underline;
  text-underline-offset: var(--wp--custom--measure--px-4);
  border-bottom: 0;
}
.style-tile-action-link:hover,
.fse-atlas:has(.story) .text-link:hover { color: var(--accent); }
.style-tile-action-link:focus-visible,
.fse-atlas:has(.story) .text-link:focus-visible {
  outline: var(--wp--custom--measure--px-3) solid var(--accent);
  outline-offset: var(--wp--custom--measure--px-4);
}
.fse-atlas, .fse-atlas > .wp-block-post-content { margin: 0; padding: 0; max-width: none; }
.fse-atlas .wp-block-post-content > * { margin-block: 0; }
.museum-stops-intro { padding: calc(var(--wp--custom--space--px-100) + var(--venafro-notice-height)) var(--wp--custom--space--vw-7) 0; }
.museum-stops-intro .breadcrumbs { margin: 0; }
.museum-stops-page .atlas-section { padding-top: var(--wp--custom--space--px-12); }
.museum-stops-page .atlas-head h2 { font-size: var(--wp--preset--font-size--large); line-height: var(--wp--custom--leading--ratio-1-2); margin: 0 0 var(--wp--custom--space--px-8); }
.museum-stops-page .atlas-head > div > p:last-child { margin: 0; }
.museum-stops-page .route-picker { margin-top: var(--wp--custom--space--px-16); }
.museum-stops-page .route-intro { margin: var(--wp--custom--space--px-12) 0 var(--wp--custom--space--px-16); min-height: 0; }
body.venafro-fse-atlas :where(h1, h2, h3, h4, h5, h6, p, li, a) { overflow-wrap: normal; }
.page-body > .wp-block-post-content { margin: 0; }
.page-body > .wp-block-post-content > :first-child { margin-block-start: 0; }
body:has(.history-article) { min-width: 0; }
.history-article p { font-size: var(--wp--preset--font-size--medium); line-height: var(--wp--custom--leading--ratio-1-6); }
.history-article h2 { font-size: var(--wp--preset--font-size--large); margin-top: var(--wp--preset--spacing--50); margin-bottom: var(--wp--preset--spacing--30); }
.history-article .wp-block-image { margin-block: var(--wp--preset--spacing--50); }
.history-article .wp-block-image img { display: block; width: 100%; height: auto; }
.history-article .history-source { font-size: var(--wp--preset--font-size--small); }
.history-article a:focus-visible { outline: var(--wp--custom--measure--px-3) solid var(--wp--preset--color--secondary-dark); outline-offset: var(--wp--custom--measure--px-4); }
.page-return p { margin: 0; }
.section-card h3 a { color: inherit; text-decoration: none; }
.section-card { position: relative; }
.section-card h3 a::after { content: ''; position: absolute; inset: 0; }
.it-footer figure.wp-block-image { margin: 0; }
.it-footer .wp-block-group { box-sizing: border-box; }
.it-footer-main, .it-footer { background: var(--footer-background); }
.it-footer-small-prints { background: var(--wp--preset--color--footer-bottom); color: var(--wp--preset--color--footer-muted); }
body.admin-bar .topbar { top: var(--wp-admin--admin-bar--height); }

/* Il pannello usa il blocco Navigation nativo: focus, Esc e interattività del core. */
.museum-navigation { color: var(--wp--preset--color--editorial-ink); font-family: var(--font-sans); }
.topbar .museum-navigation .wp-block-navigation__responsive-container-open {
  display: inline-flex; align-items: center; gap: var(--wp--custom--space--px-18); min-height: var(--wp--custom--measure--px-44);
  padding: var(--wp--custom--space--px-9) var(--wp--custom--space--px-15); border: var(--wp--custom--measure--px-1) solid var(--wp--custom--color--museum-topbar-museum-navigation-wp-block-navigation-responsive-container); border-radius: var(--wp--custom--measure--px-4);
  background: var(--wp--custom--color--museum-topbar-museum-navigation-wp-block-navigation-responsive-container-2); color: var(--wp--custom--color--museum-topbar-museum-navigation-wp-block-navigation-responsive-container-3); font: var(--wp--custom--weight--regular) var(--wp--custom--type--size-13) var(--font-sans);
}
.museum-navigation .wp-block-navigation__responsive-container-open::before { content: 'Menu'; }
.museum-navigation .wp-block-navigation__responsive-container-open svg { width: var(--wp--custom--measure--px-20); height: var(--wp--custom--measure--px-20); }
.museum-navigation .wp-block-navigation__responsive-container.is-menu-open {
  position: fixed; inset: 0; width: 100%; max-width: none; height: var(--wp--custom--measure--dvh-100);
  padding: 0; margin: 0; background: var(--wp--custom--color--museum-museum-navigation-wp-block-navigation-responsive-container-is-men) !important; overflow: auto; z-index: 100000;
}
.museum-navigation .wp-block-navigation__responsive-close { max-width: none; width: 100%; margin: 0; min-height: var(--wp--custom--measure--dvh-100); }
.museum-navigation .wp-block-navigation__responsive-dialog {
  position: relative; margin: 0 0 0 auto; width: min(var(--wp--custom--measure--px-660), 100%); min-height: var(--wp--custom--measure--dvh-100);
  background: var(--wp--preset--color--editorial-background); color: var(--wp--custom--color--languages-menu-sheet-nav-language-switcher-color);
  padding: clamp(var(--wp--custom--space--px-24), var(--wp--custom--space--vw-5), var(--wp--custom--space--px-56)); box-sizing: border-box;
}
body .museum-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
  display: block; padding: 0; align-items: stretch; min-height: 0;
}
.museum-navigation .wp-block-navigation__responsive-container-close {
  position: absolute; top: clamp(var(--wp--custom--measure--px-24), var(--wp--custom--measure--vw-5), var(--wp--custom--measure--px-56)); right: clamp(var(--wp--custom--measure--px-24), var(--wp--custom--measure--vw-5), var(--wp--custom--measure--px-56));
  display: inline-flex; align-items: center; gap: var(--wp--custom--space--px-12); min-height: var(--wp--custom--measure--px-44);
  padding: var(--wp--custom--space--px-9) var(--wp--custom--space--px-15); border: var(--wp--custom--measure--px-1) solid var(--wp--custom--color--museum-topbar-museum-navigation-wp-block-navigation-responsive-container); border-radius: var(--wp--custom--measure--px-4);
  background: var(--wp--custom--color--museum-topbar-museum-navigation-wp-block-navigation-responsive-container-2); color: var(--wp--custom--color--museum-topbar-museum-navigation-wp-block-navigation-responsive-container-3); font: var(--wp--custom--weight--regular) var(--wp--custom--type--size-13) var(--font-sans);
}
.museum-navigation .wp-block-navigation__responsive-container-close::before { content: 'Chiudi'; }
html[lang^='en'] .museum-navigation .wp-block-navigation__responsive-container-close::before { content: 'Close'; }
.museum-navigation .fse-menu-title { padding-block: var(--wp--custom--space--px-12); margin: 0 var(--wp--custom--space--px-110) var(--wp--custom--space--px-32) 0; color: var(--wp--custom--color--museum-museum-navigation-fse-menu-title-color); font: var(--wp--custom--weight--regular) var(--wp--custom--type--size-11)/var(--wp--custom--leading--ratio-1-5) var(--font-sans); letter-spacing: var(--wp--custom--tracking--em-0-18); }
.museum-navigation .wp-block-navigation__container { display: block; width: 100%; margin: 0; padding: 0; counter-reset: museum-menu; }
.museum-navigation .wp-block-navigation-item { display: block; width: 100%; }
body .museum-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation-item__content {
  display: grid; grid-template-columns: var(--wp--custom--measure--px-26) minmax(0, 1fr) var(--wp--custom--measure--px-25); gap: var(--wp--custom--space--px-14);
  align-items: center; width: 100%; box-sizing: border-box;
  padding: var(--wp--custom--space--px-20) 0; border-bottom: var(--wp--custom--measure--px-1) solid var(--wp--custom--color--museum-body-museum-navigation-wp-block-navigation-responsive-container-i);
  font: var(--wp--custom--weight--semibold) var(--wp--custom--type--size-24)/var(--wp--custom--leading--ratio-1-2) var(--font-sans); text-decoration: none; color: var(--wp--custom--color--languages-menu-sheet-nav-language-switcher-color);
}
.museum-navigation .wp-block-navigation-item:not(.is-reading) > a::before { counter-increment: museum-menu; content: counter(museum-menu, decimal-leading-zero); }
.museum-navigation .wp-block-navigation-item.is-reading > a::before { content: ''; }
.museum-navigation .wp-block-navigation-item__content::before { color: var(--wp--custom--color--museum-museum-navigation-wp-block-navigation-item-content-before-color); font-size: var(--wp--custom--type--size-13); }
.museum-navigation .wp-block-navigation-item__content::after { content: '↗'; color: var(--wp--custom--color--museum-museum-navigation-wp-block-navigation-item-content-before-color); font-size: var(--wp--custom--type--size-13); }
.museum-navigation .wp-block-navigation-item__content:hover,
.museum-navigation .wp-block-navigation-item__content[aria-current] { color: var(--wp--custom--color--museum-museum-navigation-wp-block-navigation-item-content-hover-color); }
.museum-navigation .wp-block-navigation-item__content:focus-visible { outline: var(--wp--custom--measure--px-3) solid var(--wp--custom--color--museum-museum-navigation-wp-block-navigation-item-content-focus-visible-); outline-offset: var(--wp--custom--measure--px-5); }

/* I template a blocchi non limitano la scena React né le sezioni editoriali. */
body.venafro-fse-tour { background: var(--wp--preset--color--tour-background); }
.venafro-fse-tour #root { margin: 0; max-width: none; }
.venafro-fse-tour .wp-site-blocks { min-height: var(--wp--custom--measure--vh-100); }
.venafro-fse-tour .wp-block-venafro-tour { padding: 0; }
@media (max-width: 768px) {
  .wp-block-group.page-content { padding: var(--wp--custom--space--px-100) var(--wp--custom--space--px-20) var(--wp--custom--space--px-44); }
  .page-heading h1 { font-size: var(--wp--custom--type--size-48); }
  .fse-visit { display: none; }
  .topbar .museum-navigation .wp-block-navigation__responsive-container-open { min-width: var(--wp--custom--measure--px-77); font-size: var(--wp--custom--type--size-12); padding: var(--wp--custom--space--px-8) var(--wp--custom--space--px-10); gap: var(--wp--custom--space--px-10); }
  .museum-navigation .wp-block-navigation-item__content { font-size: var(--wp--custom--type--size-27); }
}
@media (max-width: 639px) {
  .wordmark > a { gap: var(--wp--custom--space--px-8); }
  html[lang^='en'] .section-cards { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .museum-navigation *, .museum-navigation *::before, .museum-navigation *::after { transition: none; animation: none; }
}
