body {
scroll-behavior: smooth;
position: relative;
font-family: "Momo Trust Sans", sans-serif;
font-optical-sizing: auto;
font-weight: var(--fw-300);
font-style: normal;
color:var(--dark);
}

a {
  color: var(--dark);
  text-decoration: none;
}

b, strong {
  font-weight: var(--fw-700);
}

/* Icon font: definizione canonica e varianti peso */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: var(--fw-400);
  font-size: 2rem; /* preferred icon size */
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

/* Varianti di peso */
.material-symbols-outlined.weight-300 { font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24; }
.material-symbols-outlined.weight-700 { font-variation-settings: 'FILL' 0, 'wght' 700, 'GRAD' 0, 'opsz' 24; }
/* COLORI: variabili e classi riutilizzabili */

:root {
  /* Colori principali */
  --primary: #52101D; 
  --primary-90: rgba(82, 16, 29, 0.9);
  --accent: #D2B48C; 
  --accent-50: #eadddd;
  --white: #ffffff;
  --light: #F9F8F6;
  --dark: #1e1e1e;
  --fondo: rgba(210, 180, 140, 0.25);
  /* Font weights centralizzati */
  --fw-100: 100;
  --fw-200: 200;
  --fw-300: 300;
  --fw-400: 400;
  --fw-500: 500;
  --fw-600: 600;
  --fw-700: 700;
  --fw-800: 800;
  --fw-900: 900;
    /* Fonts */
  --font-title: "Prata", serif;
}

/* Titoli */
.font-title, h1, h2, h3, h4, h5, h6 {font-family: var(--font-title);}

/* Classi utility compatte */
.fondo-bg { background-color: var(--fondo); }

/* Utility font-weight classes */
.fw-100 { font-weight: var(--fw-100); }
.fw-200 { font-weight: var(--fw-200); }
.fw-300 { font-weight: var(--fw-300); }
.fw-400 { font-weight: var(--fw-400); }
.fw-500 { font-weight: var(--fw-500); }
.fw-600 { font-weight: var(--fw-600); }
.fw-700 { font-weight: var(--fw-700); }
.fw-800 { font-weight: var(--fw-800); }
.fw-900 { font-weight: var(--fw-900); }

/* Semantic aliases */
.fw-light { font-weight: var(--fw-300); }
.fw-regular { font-weight: var(--fw-400); }
.fw-medium { font-weight: var(--fw-500); }
.fw-semibold { font-weight: var(--fw-600); }
.fw-bold { font-weight: var(--fw-800); }
.fw-black { font-weight: var(--fw-900); }

/* Utility per testo in colore */
.text-accent { color: var(--accent); }

hr {
margin-top:2rem;
padding-top:2rem;
border-top:1px solid var(--primary);
}

/* Navigation */

nav {
  height: 15vh;
  color:var(--white);
  display: flex;
  align-items: center; 
  z-index: 9999;
  background-color: transparent;
  transition: background-color 0.35s ease, height 0.35s ease, box-shadow 0.35s ease;
}

/* Stato "ridotto": applicato via JS (classe .navbar-scrolled) allo scroll verticale */
nav.navbar-scrolled {
  height: 8vh;
  background-color: var(--primary-90) !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

/* Testo del brand ("Falseum - Museo del falso..."): nascosto quando la navbar è ridotta */
.navbar-brand-text {
  opacity: 1;
  max-width: 400px;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 0.25s ease, max-width 0.35s ease, margin 0.35s ease, padding 0.35s ease;
}

nav.navbar-scrolled .navbar-brand-text {
  opacity: 0;
  max-width: 0;
  padding: 0 !important;
  margin: 0 !important;
  pointer-events: none;
}

/* Il logo si rimpicciolisce leggermente insieme alla navbar */
nav.navbar-scrolled .logo img {
  height: 4vh;
}

/* Assicura che il link non si restringa e mantenga le proporzioni dell'immagine */
.logo a {
  display: block;
  flex-shrink: 0; 
}

.logo img {
  height: 7vh; /* Modifica questa altezza per rimpicciolire o ingrandire entrambi insieme */
  width: auto;
  display: block;
  transition: height 0.35s ease;
}

/* Gestione del testo a fianco */
.logo .font-title {
  line-height: 1.2; /* Riduce lo spazio tra le due righe per un aspetto più compatto */
  white-space: nowrap; /* Impedisce che il testo vada a capo in 3 o più righe sui piccoli schermi */
}


/* Navbar  */

.navbar-nav {
  gap: 1rem;
}

.navbar-nav .menu-item {
  position: relative; /* Spostato qui per far funzionare correttamente l'::after */
}

.navbar-nav .menu-item a {
  font-size: 0.9rem;
  font-weight: var(--fw-400);
  color: var(--white); /* Corretto il refuso --ccent in --white (o usa var(--accent)) */
  text-decoration: none;
  transition: color 0.2s ease;
}

.navbar-nav .menu-item a:hover {
  color: var(--white);
}

/* Linea animata sotto l'elemento di menu */
.navbar-nav .menu-item::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--white);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease-in-out;
}

.navbar-nav .menu-item:hover::after {
  transform: scaleX(1);
}

/* Header */

header {
position: relative;
background-color:var(--dark);
width:100%;
}

header .container {
position: relative;
z-index: 2;
}

/* Heroes */

.herohome {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden; 

}

.herohome-media {
    position: absolute;
    top: 0%;
    right: 0;
    width: 60%;
    height: 130%;
    object-fit: cover;
    z-index: 0;
    
    /* Effetto Parallax diagonale */
    animation: heroParallax ease-out;
    animation-timeline: scroll(root);
    animation-range: entry 0% cover 100%;
}

@keyframes heroParallax {
    from {
        transform: translateY(0%);
    }
    to {
        transform: translateY(20%);
    }
}

.herohome-overlay {
position:absolute;
inset:0;
z-index:1;
pointer-events:none;
background-image: linear-gradient(90deg, rgba(82, 16, 29, 1) 40%, rgba(0, 0, 0, 0) 80%);
}

.herohome > .row {
position:relative;
z-index:2;
}

.herohome .claim {
    font-size: 8rem;
    font-weight: var(--fw-400);
    line-height: .8;
}

/* Variante herohome per le pagine interne */

.herohome--interna .herohome-media {
    position: absolute;
    top: 0%;
    right: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    
    /* Effetto Parallax diagonale */
    animation: heroParallax ease-out;
    animation-timeline: scroll(root);
    animation-range: entry 0% cover 100%;
}

.herohome--interna .herohome-overlay {
background-image: linear-gradient(90deg, rgba(82, 16, 29, 0.9) 40%, rgba(0, 0, 0, 0) 90%);
}

.herohome--interna .claim {
    font-size: 6rem;
    line-height: 1;
}

.bg-cover {
background-size: cover;
background-repeat: no-repeat;
background-attachment: fixed;
}

.immagine.bg-cover,
.appuntamento .immagine.bg-cover {
background-attachment: scroll;
background-position: center;
min-height: 18rem;
border-radius: 1rem;
}

.categoria-border-top {
    border-top: 2px solid var(--accent);
    display: block;

    a {
        transition: color 0.2s ease-in-out;

        &:hover {
            color: var(--accent) !important;
        }
    }
}

@media (max-width: 768px) {
.herohome {
height:100%;padding:10vh 0;
}
}

/* Card */

.col > a {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: var(--dark);
}

.col .immagine.bg-cover {
	position: relative;
	isolation: isolate;
	height: 20rem;
	flex-shrink: 0;
	order: -1;
	overflow: hidden;
	border-radius: 1rem;
}

/* layer immagine, separato dal contenuto */
.col .immagine.bg-cover .bg-cover-img {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	z-index: 0;
	transition: transform 0.5s ease-in-out;
}

.col .immagine.bg-cover:hover .bg-cover-img {
	transform: scale(1.1);
}

/* overlay scuro */
.col .immagine.bg-cover::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.5) 50%);
	z-index: 1;
	pointer-events: none;
	transition: all 0.5s ease-in-out;
}

.col .immagine.bg-cover:hover::after {
	background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.8) 50%);
}

/* contenuto testuale, sopra a tutto */
.card-content {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	z-index: 2;
	padding: 0 2rem;
	gap: 1rem;
}

.col h3 {
	color: var(--white);
	margin: 0 !important;
	font-size: 2rem;
	line-height: 1.2;
	transition: all 0.5s ease;
	padding: 0;
	flex-shrink: 0;
  width:70%;
}

.card-excerpt {
	display: grid;
	grid-template-rows: 0fr;
	opacity: 0;
	transition: all 0.25s ease;
}

.col .immagine.bg-cover:hover .card-excerpt {
	grid-template-rows: 1fr;
	opacity: 1;
}

.card-excerpt-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
	min-height: 0;
	color: var(--accent);
	font-size: 1rem;
	line-height: 1.5;
	padding-top: 1rem;
  padding-bottom: 1rem;
	border-top: 2px solid var(--accent);
}

.col .immagine.bg-cover:hover .card-excerpt {
	max-height: 8rem;
	opacity: 1;
}

/* CONTENT */

.sezione {
position:relative;
padding: 15vh 0;
}

/* BARS */

.bar {
border-left:1px solid var(--accent-50);
padding:2rem 5rem;
}

/* BTN */

/* MORE BIANCO */

.morebianco {
padding:.5rem 1rem;
transition: 0.25s;
color:var(--primary);
font-weight: var(--fw-400);
font-size:1rem;
border:1px solid var(--primary);
border-radius:0;
}

.morebianco:hover {
border:1px solid var(--primary);
background-color: var(--primary); 
}

.morebianco span {
cursor: pointer;
display: inline-block;
position: relative;
transition: 0.25s;
}

.morebianco span:after {
font-family: 'Material Symbols Outlined';
content: '\f8ce';
position: absolute;
opacity: 0;
top: 0;
right: 0;
transition: 0.25s;
font-variation-settings: 'FILL' 0, 'wght' 200, 'GRAD' 0, 'opsz' 24;
}

.morebianco:hover span {
left:0;
padding-right: 2rem;
color:var(--white);
}

.morebianco:hover span:after {
opacity: 1;
right: 0;
color:var(--white);
}

.morebianco:hover span:before {
opacity: 0;
right: 0;
color:var(--dark);
}

.hoverable-element {
  border: 1px solid #000;
  background: #fff;
  padding: 1rem;
  position: relative;
  transition: transform 0.5s;
}

.hoverable-element::before,
.hoverable-element::after {
  content: "";
  position: absolute;
  border: inherit;
  transition: inherit;
}

.hoverable-element::before {
  height: .5rem;
  top: 100%;
  left: -1px;
  right: -1px;
  transform-origin: top left;
  transform: skewX(45deg) scaleY(var(--s, 0));
}

.hoverable-element::after {
  width: .5rem;
  left: 100%;
  top: -1px;
  bottom: 0;
  border-bottom:none;
  transform-origin: bottom left;
  transform: skewY(45deg) scaleX(var(--s, 0));
}

.hoverable-element:hover {
  transform: translate(-0.5rem, -0.5rem);
  --s: 1;
}

/* FOOT */

footer {
  padding: 10vh 0;
  position: relative;
  color: var(--white);
  line-height: 1;
}

/* Gestione del logo all'interno del footer */
footer .logo a {
  display: inline-block;
  vertical-align: middle; /* Allinea correttamente il link nel flusso del testo */
}

footer .logo img {
  height: 8vh; 
  width: auto;
  display: block;
}


