/*!
Theme Name: Palazzo Roncale
Theme URI: http://underscores.me/
Author: Underscores.me
Author URI: http://underscores.me/
Description: Description
Version: 1.0.0
Tested up to: 5.4
Requires PHP: 5.6
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: palazzo-roncale
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned.

Palazzo Roncale is based on Underscores https://underscores.me/, (C) 2012-2020 Automattic, Inc.
Underscores is distributed under the terms of the GNU GPL v2 or later.

Normalizing styles have been helped along thanks to the fine work of
Nicolas Gallagher and Jonathan Neal https://necolas.github.io/normalize.css/
*/

/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
# Generic
	- Normalize
	- Box sizing
# Base
	- Typography
	- Elements
	- Links
	- Forms
## Layouts
# Components
	- Navigation
	- Posts and pages
	- Comments
	- Widgets
	- Media
	- Captions
	- Galleries
# plugins
	- Jetpack infinite scroll
# Utilities
	- Accessibility
	- Alignments

--------------------------------------------------------------*/

/*--------------------------------------------------------------
# Generic
--------------------------------------------------------------*/

/* Normalize
--------------------------------------------- */

/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */

/* Document
	 ========================================================================== */

/**
 * 1. Correct the line height in all browsers.
 * 2. Prevent adjustments of font size after orientation changes in iOS.
 */
html {
	line-height: 1.15;
	-webkit-text-size-adjust: 100%;
}

/* Sections
	 ========================================================================== */

/**
 * Remove the margin in all browsers.
 */
body {
	margin: 0;
}

/**
 * Render the `main` element consistently in IE.
 */
main {
	display: block;
}

/**
 * Correct the font size and margin on `h1` elements within `section` and
 * `article` contexts in Chrome, Firefox, and Safari.
 */
h1 {
	font-size: 2em;
	margin: 0.67em 0;
}

/* Grouping content
	 ========================================================================== */

/**
 * 1. Add the correct box sizing in Firefox.
 * 2. Show the overflow in Edge and IE.
 */
hr {
	box-sizing: content-box;
	height: 0;
	overflow: visible;
}

/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 * 2. Correct the odd `em` font sizing in all browsers.
 */
pre {
	font-family: monospace, monospace;
	font-size: 1em;
}

/* Text-level semantics
	 ========================================================================== */

/**
 * Remove the gray background on active links in IE 10.
 */
a {
	background-color: transparent;
}

/**
 * 1. Remove the bottom border in Chrome 57-
 * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
 */
abbr[title] {
	border-bottom: none;
	text-decoration: underline;
	text-decoration: underline dotted;
}

/**
 * Add the correct font weight in Chrome, Edge, and Safari.
 */
b,
strong {
	font-weight: bolder;
}

/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 * 2. Correct the odd `em` font sizing in all browsers.
 */
code,
kbd,
samp {
	font-family: monospace, monospace;
	font-size: 1em;
}

/**
 * Add the correct font size in all browsers.
 */
small {
	font-size: 80%;
}

/**
 * Prevent `sub` and `sup` elements from affecting the line height in
 * all browsers.
 */
sub,
sup {
	font-size: 75%;
	line-height: 0;
	position: relative;
	vertical-align: baseline;
}

sub {
	bottom: -0.25em;
}

sup {
	top: -0.5em;
}

/* Embedded content
	 ========================================================================== */

/**
 * Remove the border on images inside links in IE 10.
 */
img {
	border-style: none;
}

/* Forms
	 ========================================================================== */

/**
 * 1. Change the font styles in all browsers.
 * 2. Remove the margin in Firefox and Safari.
 */
button,
input,
optgroup,
select,
textarea {
	font-family: inherit;
	font-size: 100%;
	line-height: 1.15;
	margin: 0;
}

/**
 * Show the overflow in IE.
 * 1. Show the overflow in Edge.
 */
button,
input {
	overflow: visible;
}

/**
 * Remove the inheritance of text transform in Edge, Firefox, and IE.
 * 1. Remove the inheritance of text transform in Firefox.
 */
button,
select {
	text-transform: none;
}

/**
 * Correct the inability to style clickable types in iOS and Safari.
 */
button,
[type="button"],
[type="reset"],
[type="submit"] {
	-webkit-appearance: button;
}

/**
 * Remove the inner border and padding in Firefox.
 */
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
	border-style: none;
	padding: 0;
}

/**
 * Restore the focus styles unset by the previous rule.
 */
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
	outline: 1px dotted ButtonText;
}

/**
 * Correct the padding in Firefox.
 */
fieldset {
	padding: 0.35em 0.75em 0.625em;
}

/**
 * 1. Correct the text wrapping in Edge and IE.
 * 2. Correct the color inheritance from `fieldset` elements in IE.
 * 3. Remove the padding so developers are not caught out when they zero out
 *		`fieldset` elements in all browsers.
 */
legend {
	box-sizing: border-box;
	color: inherit;
	display: table;
	max-width: 100%;
	padding: 0;
	white-space: normal;
}

/**
 * Add the correct vertical alignment in Chrome, Firefox, and Opera.
 */
progress {
	vertical-align: baseline;
}

/**
 * Remove the default vertical scrollbar in IE 10+.
 */
textarea {
	overflow: auto;
}

/**
 * 1. Add the correct box sizing in IE 10.
 * 2. Remove the padding in IE 10.
 */
[type="checkbox"],
[type="radio"] {
	box-sizing: border-box;
	padding: 0;
}

/**
 * Correct the cursor style of increment and decrement buttons in Chrome.
 */
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
	height: auto;
}

/**
 * 1. Correct the odd appearance in Chrome and Safari.
 * 2. Correct the outline style in Safari.
 */
[type="search"] {
	-webkit-appearance: textfield;
	outline-offset: -2px;
}

/**
 * Remove the inner padding in Chrome and Safari on macOS.
 */
[type="search"]::-webkit-search-decoration {
	-webkit-appearance: none;
}

/**
 * 1. Correct the inability to style clickable types in iOS and Safari.
 * 2. Change font properties to `inherit` in Safari.
 */
::-webkit-file-upload-button {
	-webkit-appearance: button;
	font: inherit;
}

/* Interactive
	 ========================================================================== */

/*
 * Add the correct display in Edge, IE 10+, and Firefox.
 */
details {
	display: block;
}

/*
 * Add the correct display in all browsers.
 */
summary {
	display: list-item;
}

/* Misc
	 ========================================================================== */

/**
 * Add the correct display in IE 10+.
 */
template {
	display: none;
}

/**
 * Add the correct display in IE 10.
 */
[hidden] {
	display: none;
}

/* Box sizing
--------------------------------------------- */

/* Inherit box-sizing to more easily change it's value on a component level.
@link http://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/ */
*,
*::before,
*::after {
	box-sizing: inherit;
}

html {
	box-sizing: border-box;
}

/*--------------------------------------------------------------
# Base
--------------------------------------------------------------*/

/* Typography
--------------------------------------------- */
body,
button,
input,
select,
optgroup,
textarea {
	color: #404040;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 1rem;
	line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	clear: both;
}

p {
	margin-bottom: 1.5em;
}

dfn,
cite,
em,
i {
	font-style: italic;
}

blockquote {
	margin: 0 1.5em;
}

address {
	margin: 0 0 1.5em;
}

pre {
	background: #eee;
	font-family: "Courier 10 Pitch", courier, monospace;
	line-height: 1.6;
	margin-bottom: 1.6em;
	max-width: 100%;
	overflow: auto;
	padding: 1.6em;
}

code,
kbd,
tt,
var {
	font-family: monaco, consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
}

abbr,
acronym {
	border-bottom: 1px dotted #666;
	cursor: help;
}

mark,
ins {
	background: #fff9c0;
	text-decoration: none;
}

big {
	font-size: 125%;
}

/* Elements
--------------------------------------------- */
body {
	background: #fff;
}

hr {
	background-color: #ccc;
	border: 0;
	height: 1px;
	margin-bottom: 1.5em;
}

ul,
ol {
	margin: 0 0 1.5em 3em;
}

ul {
	list-style: disc;
}

ol {
	list-style: decimal;
}

li > ul,
li > ol {
	margin-bottom: 0;
	margin-left: 1.5em;
}

dt {
	font-weight: 700;
}

dd {
	margin: 0 1.5em 1.5em;
}

/* Make sure embeds and iframes fit their containers. */
embed,
iframe,
object {
	max-width: 100%;
}

img {
	height: auto;
	max-width: 100%;
}

figure {
	margin: 1em 0;
}

table {
	margin: 0 0 1.5em;
	width: 100%;
}

/* Links
--------------------------------------------- */
a {
	color: #4169e1;
}

a:visited {
	color: #800080;
}

a:hover,
a:focus,
a:active {
	color: #191970;
}

a:focus {
	outline: thin dotted;
}

a:hover,
a:active {
	outline: 0;
}

/* Forms
--------------------------------------------- */
button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
	border: 1px solid;
	border-color: #ccc #ccc #bbb;
	border-radius: 3px;
	background: #e6e6e6;
	color: rgba(0, 0, 0, 0.8);
	line-height: 1;
	padding: 0.6em 1em 0.4em;
}

button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover {
	border-color: #ccc #bbb #aaa;
}

button:active,
button:focus,
input[type="button"]:active,
input[type="button"]:focus,
input[type="reset"]:active,
input[type="reset"]:focus,
input[type="submit"]:active,
input[type="submit"]:focus {
	border-color: #aaa #bbb #bbb;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="range"],
input[type="date"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="datetime"],
input[type="datetime-local"],
input[type="color"],
textarea {
	color: #666;
	border: 1px solid #ccc;
	border-radius: 3px;
	padding: 3px;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="range"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="week"]:focus,
input[type="time"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="color"]:focus,
textarea:focus {
	color: #111;
}

select {
	border: 1px solid #ccc;
}

textarea {
	width: 100%;
}

/*--------------------------------------------------------------
# Layouts
--------------------------------------------------------------*/

/*--------------------------------------------------------------
# Components
--------------------------------------------------------------*/

/* Navigation
--------------------------------------------- */
.main-navigation {
	display: block;
	width: 100%;
}

.main-navigation ul {
	display: none;
	list-style: none;
	margin: 0;
	padding-left: 0;
}

.main-navigation ul ul {
	box-shadow: 0 3px 3px rgba(0, 0, 0, 0.2);
	float: left;
	position: absolute;
	top: 100%;
	left: -999em;
	z-index: 99999;
}

.main-navigation ul ul ul {
	left: -999em;
	top: 0;
}

.main-navigation ul ul li:hover > ul,
.main-navigation ul ul li.focus > ul {
	display: block;
	left: auto;
}

.main-navigation ul ul a {
	width: 200px;
}

.main-navigation ul li:hover > ul,
.main-navigation ul li.focus > ul {
	left: auto;
}

.main-navigation li {
	position: relative;
}

.main-navigation a {
	display: block;
	text-decoration: none;
}

/* Small menu. */
.menu-toggle,
.main-navigation.toggled ul {
	display: block;
}

@media screen and (min-width: 37.5em) {

	.menu-toggle {
		display: none;
	}

	.main-navigation ul {
		display: flex;
	}
}

.site-main .comment-navigation,
.site-main
.posts-navigation,
.site-main
.post-navigation {
	margin: 0 0 1.5em;
}

.comment-navigation .nav-links,
.posts-navigation .nav-links,
.post-navigation .nav-links {
	display: flex;
}

.comment-navigation .nav-previous,
.posts-navigation .nav-previous,
.post-navigation .nav-previous {
	flex: 1 0 50%;
}

.comment-navigation .nav-next,
.posts-navigation .nav-next,
.post-navigation .nav-next {
	text-align: end;
	flex: 1 0 50%;
}

/* Posts and pages
--------------------------------------------- */
.sticky {
	display: block;
}

.post,
.page {
	margin: 0 0 1.5em;
}

.updated:not(.published) {
	display: none;
}

.page-content,
.entry-content,
.entry-summary {
	margin: 1.5em 0 0;
}

.page-links {
	clear: both;
	margin: 0 0 1.5em;
}

/* Comments
--------------------------------------------- */
.comment-content a {
	word-wrap: break-word;
}

.bypostauthor {
	display: block;
}

/* Widgets
--------------------------------------------- */
.widget {
	margin: 0 0 1.5em;
}

.widget select {
	max-width: 100%;
}

/* Media
--------------------------------------------- */
.page-content .wp-smiley,
.entry-content .wp-smiley,
.comment-content .wp-smiley {
	border: none;
	margin-bottom: 0;
	margin-top: 0;
	padding: 0;
}

/* Make sure logo link wraps around logo image. */
.custom-logo-link {
	display: inline-block;
}

/* Captions
--------------------------------------------- */
.wp-caption {
	margin-bottom: 1.5em;
	max-width: 100%;
}

.wp-caption img[class*="wp-image-"] {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.wp-caption .wp-caption-text {
	margin: 0.8075em 0;
}

.wp-caption-text {
	text-align: center;
}

/* Galleries
--------------------------------------------- */
.gallery {
	margin-bottom: 1.5em;
	display: grid;
	grid-gap: 1.5em;
}

.gallery-item {
	display: inline-block;
	text-align: center;
	width: 100%;
}

.gallery-columns-2 {
	grid-template-columns: repeat(2, 1fr);
}

.gallery-columns-3 {
	grid-template-columns: repeat(3, 1fr);
}

.gallery-columns-4 {
	grid-template-columns: repeat(4, 1fr);
}

.gallery-columns-5 {
	grid-template-columns: repeat(5, 1fr);
}

.gallery-columns-6 {
	grid-template-columns: repeat(6, 1fr);
}

.gallery-columns-7 {
	grid-template-columns: repeat(7, 1fr);
}

.gallery-columns-8 {
	grid-template-columns: repeat(8, 1fr);
}

.gallery-columns-9 {
	grid-template-columns: repeat(9, 1fr);
}

.gallery-caption {
	display: block;
}

/*--------------------------------------------------------------
# Plugins
--------------------------------------------------------------*/

/* Jetpack infinite scroll
--------------------------------------------- */

/* Hide the Posts Navigation and the Footer when Infinite Scroll is in use. */
.infinite-scroll .posts-navigation,
.infinite-scroll.neverending .site-footer {
	display: none;
}

/* Re-display the Theme Footer when Infinite Scroll has reached its end. */
.infinity-end.neverending .site-footer {
	display: block;
}

/*--------------------------------------------------------------
# Utilities
--------------------------------------------------------------*/

/* Accessibility
--------------------------------------------- */

/* Text meant only for screen readers. */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: #f1f1f1;
	border-radius: 3px;
	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
	clip: auto !important;
	clip-path: none;
	color: #21759b;
	display: block;
	font-size: 0.875rem;
	font-weight: 700;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}

/* Do not show the outline on the skip link target. */
#primary[tabindex="-1"]:focus {
	outline: 0;
}

/* Alignments
--------------------------------------------- */
.alignleft {

	/*rtl:ignore*/
	float: left;

	/*rtl:ignore*/
	margin-right: 1.5em;
	margin-bottom: 1.5em;
}

.alignright {

	/*rtl:ignore*/
	float: right;

	/*rtl:ignore*/
	margin-left: 1.5em;
	margin-bottom: 1.5em;
}

.aligncenter {
	clear: both;
	display: block;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: 1.5em;
}
/* =============================================
   HEADER — Palazzo Roncale
   ============================================= */

:root {
	--pr-rosso:   #9E1622;
	--pr-nero:    #1a1a1a;
	--pr-bianco:  #ffffff;
	--pr-avorio:  #f5f2ec;
	--pr-grigio:  #6b6b6b;
	--pr-font-serif: 'Cormorant Garamond', Georgia, serif;
	--pr-font-sans:  'Jost', 'Helvetica Neue', Arial, sans-serif;
}

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Jost:wght@300;400;500;600&display=swap');

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

body {
	margin: 0;
	font-family: var(--pr-font-sans);
	font-weight: 300;
	color: var(--pr-nero);
	background: var(--pr-bianco);
}

/* ─── HEADER ─── */
.site-header {
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 999;
	transition: background 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
	padding: 0;
}

/* Header con admin bar */
.admin-bar .site-header {
	top: 32px;
}
@media screen and (max-width: 782px) {
	.admin-bar .site-header { top: 46px; }
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.2rem 3rem;
	max-width: 100%;
	transition: padding 0.35s ease;
}

/* Header trasparente (default) */
.site-header {
	background: transparent;
}

/* Header scrollato — diventa bianco con ombra */
.site-header.scrolled {
	background: rgba(255, 255, 255, 0.97);
	box-shadow: 0 1px 0 rgba(0,0,0,0.08);
	backdrop-filter: blur(8px);
}
.site-header.scrolled .header-inner {
	padding-top: 0.75rem;
	padding-bottom: 0.75rem;
}

/* Offset contenuto per header fisso */
#page { padding-top: 0; }

/* ─── LOGO ─── */
.site-branding {
	flex-shrink: 0;
}
.custom-logo-link {
	display: block;
	text-decoration: none;
}
.site-logo {
	height: 56px;
	width: auto;
	display: block;
	transition: height 0.35s ease;
}
.site-header.scrolled .site-logo {
	height: 44px;
}
.site-name-text {
	font-family: var(--pr-font-serif);
	font-size: 1.2rem;
	font-weight: 400;
	color: var(--pr-rosso);
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

/* ─── NAVIGAZIONE DESKTOP ─── */
.main-navigation {
	display: flex;
	align-items: center;
}
.main-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 2rem;
}
.main-navigation ul li { position: relative; }

.main-navigation ul li a {
	font-family: var(--pr-font-sans);
	font-size: 0.72rem;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--pr-nero);
	text-decoration: none;
	padding: 0.25rem 0;
	position: relative;
	transition: color 0.2s;
}
.main-navigation ul li a::after {
	content: '';
	position: absolute;
	bottom: -2px; left: 0; right: 0;
	height: 1.5px;
	background: var(--pr-rosso);
	transform: scaleX(0);
	transition: transform 0.25s ease;
	transform-origin: left;
}
.main-navigation ul li a:hover { color: var(--pr-rosso); }
.main-navigation ul li a:hover::after,
.main-navigation ul li.current-menu-item a::after { transform: scaleX(1); }
.main-navigation ul li.current-menu-item a { color: var(--pr-rosso); }

/* Su sfondo scuro (hero) le voci diventano bianche — solo su .has-hero */
.has-hero .site-header:not(.scrolled) .main-navigation ul li a {
	color: var(--pr-bianco);
}
.has-hero .site-header:not(.scrolled) .main-navigation ul li a::after {
	background: var(--pr-bianco);
}
.has-hero .site-header:not(.scrolled) .main-navigation ul li a:hover { color: rgba(255,255,255,0.75); }

/* ─── HAMBURGER MOBILE ─── */
.menu-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
}
.menu-toggle span {
	display: block;
	width: 24px;
	height: 2px;
	background: var(--pr-bianco);
	transition: background 0.3s, transform 0.3s;
}
.site-header.scrolled .menu-toggle span { background: var(--pr-nero); }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
	.header-inner { padding: 1rem 1.5rem; }

	.main-navigation {
		display: none;
		position: fixed;
		top: 0; left: 0; right: 0; bottom: 0;
		background: var(--pr-nero);
		flex-direction: column;
		justify-content: center;
		align-items: center;
		z-index: 998;
	}
	.main-navigation.is-open { display: flex; }
	.main-navigation ul {
		flex-direction: column;
		gap: 2rem;
		text-align: center;
	}
	.main-navigation ul li a {
		font-size: 1.1rem;
		color: var(--pr-bianco) !important;
	}
	.menu-toggle { display: flex; z-index: 1000; }
}


/* ─── FIX HEADER DEFAULT (pagine senza hero) ─── */
/* Header default: bordo sottile visibile su sfondi chiari */
.site-header {
    border-bottom: 1px solid rgba(0,0,0,0.08);
}
/* Su pagine has-hero il bordo sparisce */
.has-hero .site-header {
    border-bottom: none;
}

/* Hamburger: scuro di default, bianco su hero */
.menu-toggle span {
    background: var(--pr-nero);
}
.has-hero .menu-toggle span {
    background: var(--pr-bianco);
}
.site-header.scrolled .menu-toggle span {
    background: var(--pr-nero);
}

/* Logo bianco su pagine hero */
.has-hero .site-header:not(.scrolled) .site-logo {
    filter: brightness(0) invert(1);
}

/* ─── FIX PADDING HEADER FISSO ─── */
/* L'header fisso alto ~96px: il contenuto deve scendere di conseguenza */
#page {
    padding-top: 96px;
}
/* Con admin bar aggiunge altri 32px */
.admin-bar #page {
    padding-top: 128px;
}
@media screen and (max-width: 782px) {
    .admin-bar #page {
        padding-top: 142px;
    }
}
/* Pagine con hero: nessun padding (il hero copre tutta l'altezza) */
.has-hero #page {
    padding-top: 0;
}

/* ═══════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════ */

/* ─── FOOTER MAIN (sfondo nero) ─── */
.site-footer {
    font-family: var(--pr-font-sans);
}

.footer-main {
    background: #111;
    color: rgba(255,255,255,0.75);
    padding: 4rem 0 2rem;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 3rem;
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

/* ─── COLONNE ─── */
.footer-col {
    flex: 1;
}
.footer-col--info {
    flex: 1.6;
}
.footer-col--social {
    flex: 0.5;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
}

/* ─── LOGO ─── */
.footer-logo-link {
    display: inline-block;
    margin-bottom: 1.5rem;
}
.footer-logo {
    height: 72px;
    width: auto;
}

/* ─── INDIRIZZO E CONTATTI ─── */
.footer-address {
    font-style: normal;
    font-size: 0.85rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.65);
    margin-bottom: 1.2rem;
}
.footer-contact {
    font-size: 0.82rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.65);
}
.footer-contact strong {
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.72rem;
}
.footer-contact a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-contact a:hover {
    color: var(--pr-rosso);
}

/* ─── TITOLI COLONNE ─── */
.footer-heading {
    font-family: var(--pr-font-serif);
    font-size: 1rem;
    font-weight: 400;
    color: rgba(255,255,255,0.9);
    margin: 0 0 1.2rem;
    letter-spacing: 0.02em;
}

/* ─── LINK FOOTER ─── */
.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer-links li {
    margin-bottom: 0.6rem;
}
.footer-links li::before {
    content: '›';
    color: var(--pr-rosso);
    margin-right: 0.5rem;
    font-size: 0.9rem;
}
.footer-links a {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.2s;
}
.footer-links a:hover {
    color: rgba(255,255,255,1);
}

/* ─── SOCIAL ─── */
.footer-social {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.25rem;
}
.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 50%;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}
.footer-social-link:hover {
    border-color: var(--pr-rosso);
    color: var(--pr-rosso);
}

/* ─── PRIVACY POLICY BAR ─── */
.footer-bottom-links {
    margin-top: 3rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
}
.footer-bottom-links .footer-inner {
    display: flex;
    align-items: center;
}
.footer-privacy-btn {
    display: inline-block;
    font-size: 0.72rem;
    font-family: var(--pr-font-sans);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.65);
    border: 1px solid rgba(255,255,255,0.35);
    padding: 0.4rem 1rem;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}
.footer-privacy-btn:hover {
    border-color: var(--pr-rosso);
    color: var(--pr-bianco);
}

/* ─── FOOTER BAR (rosso) ─── */
.footer-bar {
    background: var(--pr-rosso);
    padding: 0.9rem 0;
}
.footer-bar .footer-inner {
    display: flex;
    align-items: center;
}
.footer-copyright {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.85);
    letter-spacing: 0.04em;
    margin: 0;
}

/* ─── FOOTER RESPONSIVE ─── */
@media (max-width: 1024px) {
    .footer-inner {
        flex-wrap: wrap;
        gap: 2rem;
    }
    .footer-col--info { flex: 100%; }
    .footer-col { flex: 1; min-width: 140px; }
    .footer-col--social {
        flex: 100%;
        justify-content: flex-start;
        flex-direction: row;
        gap: 1rem;
    }
    .footer-social { flex-direction: row; }
}
@media (max-width: 600px) {
    .footer-inner { padding: 0 1.5rem; }
    .footer-col { flex: 100%; }
    .footer-col--social { flex: 100%; }
}

/* ─── FIX HEADER ALIGNMENT + FONT SIZE ─── */
/* Spinge la nav sul bordo destro */
.main-navigation {
    margin-left: auto;
}
/* Riduce gap tra voci e font size come nel riferimento */
.main-navigation ul {
    gap: 2.5rem;
}
.main-navigation ul li a {
    font-size: 0.62rem;
    letter-spacing: 0.14em;
}
/* Fix: header full width */
.site-header {
    width: 100%;
    left: 0;
    right: 0;
}

/* ─── FIX: override _s width:100% sulla nav ─── */
#site-navigation.main-navigation {
    width: auto !important;
    margin-left: auto;
}

/* ─── FIX FONT SIZE NAV — allineato al riferimento (16px, 400, 1px) ─── */
#site-navigation.main-navigation ul li a {
    font-size: 16px !important;
    font-weight: 400 !important;
    letter-spacing: 1px !important;
}

/* ═══════════════════════════════════════════════
   SINGLE MOSTRA
═══════════════════════════════════════════════ */

/* ─── HERO ─── */
.mostra-hero {
    position: relative;
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
    padding-bottom: 7rem;
}
.mostra-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.65) 100%);
}
.mostra-hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    padding: 0 2rem;
    color: #fff;
}
.mostra-hero__title {
    font-family: var(--pr-font-serif);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 400;
    line-height: 1.15;
    margin: 0 0 0.5rem;
    color: #fff;
}
.mostra-hero__subtitle {
    font-family: var(--pr-font-serif);
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 400;
    font-style: italic;
    margin: 0 0 1.2rem;
    color: rgba(255,255,255,0.9);
}
.mostra-hero__dates {
    font-family: var(--pr-font-sans);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.85);
    margin: 0;
}

/* ─── INTRO (due colonne: curatore | lead) ─── */
.mostra-intro {
    padding: 5rem 0;
    border-bottom: 1px solid #eee;
}
.mostra-intro__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 3rem;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: start;
}
.mostra-intro__curatore {
    font-family: var(--pr-font-serif);
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #555;
}
.mostra-intro__lead {
    font-family: var(--pr-font-serif);
    font-size: clamp(1.3rem, 2.2vw, 1.75rem);
    line-height: 1.5;
    color: var(--pr-nero);
}

/* ─── DESCRIZIONE ─── */
.mostra-body {
    padding: 4rem 0;
    border-bottom: 1px solid #eee;
}
.mostra-body__inner {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 3rem;
    font-family: var(--pr-font-sans);
    font-size: 0.95rem;
    line-height: 1.8;
    color: #333;
}
.mostra-body__inner p { margin-bottom: 1.2em; }

/* ─── GALLERIA ─── */
.mostra-gallery {
    background: var(--pr-rosso);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}
.mostra-gallery__track {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}
.mostra-gallery__slide {
    display: none;
    justify-content: center;
}
.mostra-gallery__slide.active {
    display: flex;
}
.mostra-gallery__slide img {
    max-width: 60%;
    max-height: 500px;
    object-fit: cover;
    display: block;
}
.mostra-gallery__controls {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}
.mostra-gallery__controls button {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: color 0.2s;
    font-family: var(--pr-font-sans);
    letter-spacing: 0.1em;
}
.mostra-gallery__controls button:hover { color: #fff; }

/* ─── INFO PRATICHE ─── */
.mostra-info {
    padding: 5rem 0;
    background: var(--pr-avorio);
}
.mostra-info__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 3rem;
}
.mostra-info__heading {
    font-family: var(--pr-font-serif);
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--pr-nero);
    margin: 0 0 2.5rem;
    letter-spacing: 0.02em;
}
.mostra-info__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}
.mostra-info__item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.mostra-info__label {
    font-family: var(--pr-font-sans);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--pr-rosso);
}
.mostra-info__value {
    font-family: var(--pr-font-sans);
    font-size: 0.9rem;
    line-height: 1.6;
    color: #333;
}

/* ─── RESPONSIVE MOSTRA ─── */
@media (max-width: 768px) {
    .mostra-intro__inner {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1.5rem;
    }
    .mostra-body__inner { padding: 0 1.5rem; }
    .mostra-info__inner { padding: 0 1.5rem; }
    .mostra-gallery__slide img { max-width: 90%; }
    .mostra-hero { padding-bottom: 4rem; }
}

/* ─── TOPBAR ─── */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    background: var(--pr-rosso);
    height: 50px;
    display: flex;
    align-items: center;
    padding: 0 3rem;
}
.topbar span {
    font-family: var(--pr-font-sans);
    font-size: 0.78rem;
    color: rgba(255,255,255,0.9);
    letter-spacing: 0.02em;
}

/* Con admin bar la topbar scende di 32px */
.admin-bar .topbar {
    top: 32px;
}
@media screen and (max-width: 782px) {
    .admin-bar .topbar {
        top: 46px;
    }
}

/* L'header fisso si sposta sotto la topbar */
.site-header {
    top: 50px !important;
}
.admin-bar .site-header {
    top: 82px !important;
}
@media screen and (max-width: 782px) {
    .admin-bar .site-header {
        top: 96px !important;
    }
}

/* Il contenuto della pagina scende di topbar + header */
#page {
    padding-top: 146px !important;
}
.admin-bar #page {
    padding-top: 178px !important;
}
.has-hero #page {
    padding-top: 0 !important;
}

/* ═══════════════════════════════════════════════
   HEADER HEIGHT FIX — header più compatto
   Target: logo 44px, padding 0.75rem → ~68px totale
   Topbar 50px + header 68px = 118px → offset pagina 120px
═══════════════════════════════════════════════ */

/* Riduce altezza logo */
.site-logo {
    height: 44px !important;
}
.site-header.scrolled .site-logo {
    height: 36px !important;
}

/* Riduce padding header-inner */
.header-inner {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}
.site-header.scrolled .header-inner {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

/* Offset pagina aggiornato: topbar 50px + header ~68px = 118px */
#page {
    padding-top: 120px !important;
}
.admin-bar #page {
    padding-top: 152px !important;
}
@media screen and (max-width: 782px) {
    .admin-bar #page {
        padding-top: 166px !important;
    }
}

/* Pagine con hero (body.has-hero): nessun padding — il hero parte da sotto il menu */
.has-hero #page {
    padding-top: 0 !important;
}

/* Hero mostra: compensa l'altezza combinata topbar + header */
.mostra-hero {
    margin-top: 0 !important;
}

/* ═══════════════════════════════════════════════
   TEMPLATE STANDARD — header sempre bianco
   Il template per le pagine comuni ha l'header
   sempre solido (bianco). Solo la homepage (body.home.has-hero)
   mantiene l'header trasparente.
═══════════════════════════════════════════════ */

/* Header: sempre bianco e solido di default */
.site-header {
    background: rgba(255,255,255,0.97) !important;
    box-shadow: 0 1px 0 rgba(0,0,0,0.08) !important;
}

/* Solo sulla homepage con hero: trasparente prima dello scroll */
body.home.has-hero .site-header:not(.scrolled),
body.has-hero.front-page .site-header:not(.scrolled) {
    background: transparent !important;
    box-shadow: none !important;
}

/* Su tutte le pagine non-hero: voce menu scura */
body:not(.has-hero) .main-navigation ul li a {
    color: var(--pr-nero) !important;
}
body:not(.has-hero) .main-navigation ul li a:hover {
    color: var(--pr-rosso) !important;
}

/* ─── PAGE HERO (immagine sotto il menu, piena larghezza) ─── */
.page-hero {
    width: 100%;
    height: 60vh;
    min-height: 320px;
    max-height: 560px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: flex-end;
}
.page-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.55) 100%);
}
.page-hero__content {
    position: relative;
    z-index: 2;
    padding: 2.5rem 3rem;
    width: 100%;
}
.page-hero__title {
    font-family: var(--pr-font-serif);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 300;
    color: var(--pr-bianco);
    margin: 0;
    line-height: 1.15;
}

/* ─── PAGE TITLE BAR (senza immagine) ─── */
.page-title-bar {
    width: 100%;
    background: var(--pr-avorio, #f5f0e8);
    border-bottom: 1px solid rgba(0,0,0,0.08);
}
.page-title-bar__inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem;
}
.page-title-bar__title {
    font-family: var(--pr-font-serif);
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 300;
    color: var(--pr-nero);
    margin: 0;
    line-height: 1.2;
}

/* ─── PAGE CONTENT ─── */
.page-content {
    padding: 4rem 0;
}
.page-content__inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 3rem;
    font-family: var(--pr-font-serif);
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--pr-nero);
}
.page-content__inner p { margin-bottom: 1.5em; }
.page-content__inner h2 {
    font-size: 1.8rem;
    font-weight: 300;
    margin: 2em 0 0.75em;
}

/* ─── MOSTRA HERO: parte sotto il menu (non sovrapposto) ─── */
/* Il #page ha già padding-top:120px, il hero parte subito lì */
.mostra-hero {
    min-height: calc(100vh - 120px) !important;
}
.admin-bar .mostra-hero {
    min-height: calc(100vh - 152px) !important;
}

/* ─── HOME HERO ─── */
.home-hero {
    width: 100%;
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--pr-nero);
    position: relative;
    display: flex;
    align-items: flex-end;
    padding-bottom: 8rem;
}
.home-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.7) 100%);
}
.home-hero__content {
    position: relative;
    z-index: 2;
    padding: 0 3rem;
    width: 100%;
    max-width: 900px;
}
.home-hero__title {
    font-family: var(--pr-font-serif);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 300;
    color: var(--pr-bianco);
    margin: 0 0 0.5rem;
    line-height: 1.1;
}
.home-hero__subtitle {
    font-family: var(--pr-font-sans);
    font-size: 1rem;
    font-weight: 300;
    color: rgba(255,255,255,0.8);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0;
}

/* ─── FIX OFFSET #page: il body è già spostato 32px dall'admin bar ─── */
/* Sia con che senza admin bar, il padding-top corretto è uguale:       */
/* topbar (50px) + header (69px) = 119px                                */
#page {
    padding-top: 119px !important;
}
.admin-bar #page {
    padding-top: 119px !important;
}
.has-hero #page {
    padding-top: 0 !important;
}

/* ═══════════════════════════════════════════════
   HEADER 120px — tutto in px
   Logo 56px + padding 32px×2 = 120px esatti
   #page offset: topbar 50px + header 120px = 170px
═══════════════════════════════════════════════ */

.site-logo {
    height: 56px !important;
}
.site-header.scrolled .site-logo {
    height: 40px !important;
}

.header-inner {
    padding-top: 32px !important;
    padding-bottom: 32px !important;
    padding-left: 48px !important;
    padding-right: 48px !important;
}
.site-header.scrolled .header-inner {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

/* Offset pagina: topbar 50 + header 120 = 170px */
#page {
    padding-top: 170px !important;
}
.admin-bar #page {
    padding-top: 170px !important;
}
.has-hero #page {
    padding-top: 0 !important;
}

/* Mostra hero: riempie il viewport dalla fine del menu */
.mostra-hero {
    min-height: calc(100vh - 170px) !important;
}
.admin-bar .mostra-hero {
    min-height: calc(100vh - 202px) !important;
}

/* Rimuove border-bottom dall'header per ottenere esattamente 120px */
.site-header {
    border-bottom: none !important;
}
/* Il separatore riappare solo nell'header scrollato */
.site-header.scrolled {
    box-shadow: 0 1px 4px rgba(0,0,0,0.10) !important;
}

/* Rimuove border-bottom dall'header per ottenere esattamente 120px */
.site-header {
    border-bottom: none !important;
}
.site-header.scrolled {
    box-shadow: 0 1px 4px rgba(0,0,0,0.10) !important;
}

/* Safari adaptive tab bar — background html esplicito bianco.
   Safari campiona html background come colore primario della toolbar,
   prima di leggere qualsiasi elemento fixed. */
html {
    background-color: #ffffff !important;
    color-scheme: light;
}

/* Safari adaptive tab bar: background html esplicito bianco */
html {
    background-color: #ffffff !important;
    color-scheme: light;
}

/* ═══════════════════════════════════════════════
   LAYOUT FINALE — topbar dentro header, header static
   .header-inner sticky → identico al sito di riferimento
   Nessun elemento rosso fixed a top:0 → Safari OK
═══════════════════════════════════════════════ */

/* Header: flusso normale della pagina (non fixed) */
.site-header {
    position: static !important;
    top: auto !important;
    width: 100%;
    background: transparent !important;
    box-shadow: none !important;
    border-bottom: none !important;
}

/* Topbar: statica dentro l'header */
.topbar {
    position: static !important;
    top: auto !important;
    height: 50px;
    background: var(--pr-rosso);
    display: flex;
    align-items: center;
    padding: 0 48px;
    width: 100%;
    box-sizing: border-box;
    z-index: auto;
}

/* Header-inner: sticky — si blocca al top dopo che la topbar esce */
.header-inner {
    position: sticky !important;
    top: 0 !important;
    z-index: 999 !important;
    background: rgba(255, 255, 255, 0.97) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    padding-top: 32px !important;
    padding-bottom: 32px !important;
    padding-left: 48px !important;
    padding-right: 48px !important;
}

/* Con admin bar: sticky si blocca a 32px (altezza admin bar) */
.admin-bar .header-inner {
    top: 32px !important;
}

/* #page: nessun padding-top, l'header è nel flusso normale */
#page {
    padding-top: 0 !important;
}
.admin-bar #page {
    padding-top: 0 !important;
}
.has-hero #page {
    padding-top: 0 !important;
}

/* Voce menu: colore scuro (header sempre bianco) */
.main-navigation ul li a {
    color: var(--pr-nero) !important;
}
.main-navigation ul li a:hover {
    color: var(--pr-rosso) !important;
}

/* Logo: dimensioni scrolled */
.site-header.scrolled .site-logo {
    height: 40px !important;
}
.site-header.scrolled .header-inner {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
}

/* Mostra hero: riempie viewport dalla fine dell'header static */
.mostra-hero {
    min-height: calc(100vh - 170px) !important;
    width: 100%;
}


/* ═══════════════════════════════════════════════
   LAYOUT STICKY DEFINITIVO
   .topbar  → static (scorre via)
   .site-header → sticky (rimane visibile)
   Nessun fixed → Safari OK
═══════════════════════════════════════════════ */

/* Topbar: flusso normale, nessun positioning speciale */
.topbar {
    position: static !important;
    top: auto !important;
    height: 50px;
    background: var(--pr-rosso);
    display: flex;
    align-items: center;
    padding: 0 48px;
    box-sizing: border-box;
    z-index: auto;
}

/* Header: sticky — si blocca al top dopo che la topbar è uscita */
.site-header {
    position: sticky !important;
    top: 0 !important;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 999;
    background: rgba(255, 255, 255, 0.97) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    border-bottom: none !important;
}

/* Con admin bar: sticky si blocca a 32px */
.admin-bar .site-header {
    top: 32px !important;
}

/* Header-inner: layout interno, non sticky */
.header-inner {
    position: static !important;
    top: auto !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 32px 48px !important;
    box-sizing: border-box;
    background: transparent !important;
    box-shadow: none !important;
}

/* Logo scrolled: riduce quando header è in stato scrolled */
.site-header.scrolled .site-logo {
    height: 40px !important;
}
.site-header.scrolled .header-inner {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}
.site-header.scrolled {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
}

/* #page: nessun padding, tutto scorre naturalmente */
#page {
    padding-top: 0 !important;
}
.admin-bar #page {
    padding-top: 0 !important;
}
.has-hero #page {
    padding-top: 0 !important;
}

/* Voci menu: scure (header sempre bianco) */
.main-navigation ul li a {
    color: var(--pr-nero) !important;
}
.main-navigation ul li a:hover {
    color: var(--pr-rosso) !important;
}

/* Mostra hero */
.mostra-hero {
    min-height: calc(100vh - 170px) !important;
}
