/*
Theme Name:   SSF-theme
Template:     twentytwentyfive
Version:      2.0.0
Description:  A child theme of Your Theme
Author:       Your Name
*/

/* ---------- FONT: CANVA SANS ---------- */

@font-face {
  font-family: "Canva Sans";
  src: url("https://db.onlinewebfonts.com/t/274507bb1293902e80e0d824d978be9e.eot");
  src: url("https://db.onlinewebfonts.com/t/274507bb1293902e80e0d824d978be9e.eot?#iefix") format("embedded-opentype"),
       url("https://db.onlinewebfonts.com/t/274507bb1293902e80e0d824d978be9e.woff2") format("woff2"),
       url("https://db.onlinewebfonts.com/t/274507bb1293902e80e0d824d978be9e.woff") format("woff"),
       url("https://db.onlinewebfonts.com/t/274507bb1293902e80e0d824d978be9e.ttf") format("truetype"),
       url("https://db.onlinewebfonts.com/t/274507bb1293902e80e0d824d978be9e.svg#Canva Sans") format("svg");
  font-weight: 100 900;
  font-display: swap;
}

/* ---------- LAYOUT BASE ---------- */

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  overflow: hidden;           /* lo scroll avviene nel main */
  display: flex;
  flex-direction: column;
  font-family: "Canva Sans", sans-serif;
}

/* ---------- TIPOGRAFIA BASE ---------- */

h1, h2, h3, h4, h5, h6 {
  font-family: "Canva Sans", sans-serif;
  font-weight: 700;
  line-height: 1.1;
}

p {
  line-height: 1.35;
}

strong, b {
  font-weight: 700;
}

/* ---------- HEADER ---------- */

header {
  /* era fixed, ora rimane nel flow normale */
  width: 100%;
  background-color: transparent;
  /*border-bottom: 1px solid white;*/
  padding-bottom: 0!important;
}
header > .wp-block-group {
  padding-bottom: 0!important;
}

.page-id-316 .wp-block-site-logo a img {
  filter: invert(1);
}

.home header {
  background-color: rgba(0, 0, 0, 0);
}

/* ---------- FOOTER ---------- */

footer {
  /* tolto position: fixed */
  position: sticky;
  width: 100%;
  z-index: 10;
  bottom: 0;
  /* background: rgba(0, 0, 0);
  border-top: 1px solid white; */
  /*backdrop-filter: blur(4px);*/
}

/* ---------- MAIN: AREA SCROLLABILE TRA HEADER E FOOTER ---------- */

/* MAIN fa da “contenitore” per il canvas */
main {
  flex: 1 0 auto;
  overflow-y: auto;
  box-sizing: border-box;
  margin: 0;
  position: relative;  /* <– AGGIUNGI QUESTO */
}

/* Il canvas vive dentro main e scorre con lui */
canvas {
  display: block;
  position: absolute;   /* o relative, ma absolute è comodo come “sfondo” */
  left: 0;
  top: 0;
  margin: 0 !important;
  /* niente position: fixed qui */
}

.home main  {
  max-width: var(--wp--style--global--wide-size);
  margin: 0 auto;
}

/* On small screens (<782px): allow natural scroll (già così) */
@media (max-width: 781px) {
  main {
    overflow-y: auto;
  }
}

#main,
.site,
.site-content {
  position: relative;
}

/* ---------- RIMOZIONE SCROLLBAR BODY/MAIN ---------- */

body,
main {
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* Internet Explorer 10+ */
}

body::-webkit-scrollbar,
main::-webkit-scrollbar {
  display: none;                  /* Safari and Chrome */
}

/* ---------- COLONNE SCROLLABILI ---------- */

.wp-block-columns .wp-block-column {
  overflow-y: auto;
  box-sizing: border-box;
  padding-right: 1rem; /* evita che la scrollbar copra il contenuto */
}

/* (Facoltativo) migliora l'aspetto dello scroll */
.wp-block-columns .wp-block-column::-webkit-scrollbar {
  width: 8px;
}

.wp-block-columns .wp-block-column::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

/* Nasconde la scrollbar in modo cross-browser */
.no-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.scrollable-columns .wp-block-column {
  padding-bottom: 1.5rem; /* ensures space at bottom for scroll */
}

/* ---------- FOCUS / ACCESSIBILITÀ ---------- */

:where(.wp-site-blocks *:focus) {
  outline: none;
}

/* ---------- LINK & HOVER (VERSIONE FINALE RESET) ---------- */

/* Prima versione (rimane ma viene sovrascritta più sotto) */
a {
  display: inline-block;
  transform: scale(1);
  animation: none;
  transition: transform 0s linear;
  text-decoration: none !important;
}

a:hover {
  /*animation: zoom-grow 500s linear forwards;*/
}

/* Effetto zoom (non attivo) */
@keyframes zoom-grow {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(100); /* Won’t be reached unless hover is held for long */
  }
}

.wp-block-post-featured-image:hover :where(img) {
  filter: invert(0);
}

.wp-block-post-featured-image :where(img) {
  filter: invert(1);
  transition: filter 0s;
}

/* ---------- IMMAGINI ACF ---------- */

.acf-view img {
  width: 100%;
  height: auto;
}

/* ---------- FADE-IN COLUMNS ---------- */

.wp-block-column.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.wp-block-column.fade-in.in-view {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }
.delay-4 { transition-delay: 0.8s; }

/* ---------- MASCHERA SFUMATA TOP/BOTTOM ---------- */

.wp-block-column.faded {
  position: relative;
  overflow-y: auto;
  -webkit-mask-image: linear-gradient(to bottom,
    transparent 0px,
    black 20px,
    black calc(100% - 20px),
    transparent 100%);
  mask-image: linear-gradient(to bottom,
    transparent 0px,
    black 20px,
    black calc(100% - 20px),
    transparent 100%);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

/* ---------- BARBA CONTAINER & CANVAS ---------- */

[data-barba="container"] {
  will-change: transform, opacity;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

canvas {
  /* display: block;
  left: 0;
  top: 0;
  position: fixed;
  margin: 0 !important; */
}

/* ---------- RESET LINK / FOCUS FINALI ---------- */

/* Reset default link styles */
a {
  text-decoration: underline;
  text-decoration-thickness: initial;
  text-underline-offset: initial;
}

/* Reset focus outline */
:where(.wp-site-blocks *:focus) {
  outline-width: initial;
  outline-style: initial;
  outline-offset: initial;
}

/* ---------- NAVIGAZIONE / MENU ---------- */

/* Remove submenu bottom margin */
.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation-item:not(:last-child) {
  margin-bottom: 0;
}

/* Reset outline offset on menu items */
.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content {
  outline-offset: 0;
}

/* Reset submenu outline offset */
.wp-block-navigation .wp-block-navigation-item ul.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
  outline-offset: 0;
}

/* ---------- TESTO / WRAP / MORE-LINK ---------- */

h1, h2, h3, h4, h5, h6,
blockquote, caption, figcaption, p {
  text-wrap: normal; /* Or `wrap` */
  cursor: default;
}

/* Reset .more-link display */
.more-link {
  display: inline; /* Or `inline-block` as fallback */
}



.is-style-text-subtitle {
padding-right: 10vw;
}


:root :where(p.has-background),
.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content  {
    padding: 0!important;
}

nav {
  background-color: var(--wp--preset--color--news);
}