/* AcroVertical — foglio di stile unico del sito pubblico */

/* ---------- Font (serviti in locale) ---------- */
@font-face {
    font-family: "Saira";
    src: url("/assets/fonts/Saira-400-latin.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Saira";
    src: url("/assets/fonts/Saira-400-latin-ext.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "BankGothic";
    src: url("/assets/fonts/175BankGothic-Md-BT2.woff2") format("woff2");
    font-display: swap;
}
@font-face {
    font-family: "Playfair Display";
    src: url("/assets/fonts/PlayfairDisplay-700-latin.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}

/* ---------- Variabili ---------- */
:root {
    --orange: #e47b02;
    --orange-light: #ed8f0c;
    --ink: #1f2933;
    --text: #3e4c59;
    --muted: #52606d;
    --line: #7b8794;
    --surface: #f9f9fb;
    --white: #fff;
    --font-body: "Saira", sans-serif;
    --font-display: "BankGothic", Helvetica, Arial, sans-serif;
    --content-width: 1290px;
    --edge: 1.5rem;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--white);
    color: var(--text);
    font: 400 18px/1.6 var(--font-body);
}
main { flex: 1; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--orange); }
a:hover { color: var(--orange-light); }
p { margin: 0 0 1.6em; }
h1, h2, h3, h4 {
    margin: 0 0 .5em;
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.5;
    color: var(--ink);
}
h1 { font-size: 32px; }
h2 { font-size: 28px; }
h3 { font-size: 24px; }
h4 { font-size: 22px; color: var(--text); }
hr { border: 0; border-top: 1px solid #eee; margin: 1.5rem 0; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.container {
    width: 100%;
    max-width: var(--content-width);
    margin-inline: auto;
    padding-inline: var(--edge);
}
.visually-hidden {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 1000;
    padding: .5em 1em; background: var(--ink); color: var(--white);
}
.skip-link:focus { left: 0; color: var(--white); }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* ---------- Header e menu ---------- */
.site-header { background: var(--white); position: relative; z-index: 50; }
.header-inner { display: flex; align-items: center; min-height: 60px; }
.menu, .submenu { list-style: none; margin: 0; padding: 0; }
.main-nav .menu { display: flex; flex-wrap: wrap; }
.main-nav .menu > li { position: relative; display: flex; align-items: center; }
.main-nav a {
    display: block;
    padding: .6em .6em;
    font: 400 19px/1.6 var(--font-display);
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text);
    white-space: nowrap;
}
.main-nav a[aria-current="page"] { color: var(--ink); }
.main-nav a:hover { color: var(--orange); }
.submenu-toggle {
    width: 1em; height: 1.6em; margin-left: -.5em; margin-right: .3em; padding: 0;
    border: 0; background: none; color: var(--text);
}
.submenu-toggle::before {
    content: ""; display: block; width: .4em; height: .4em; margin: 0 auto;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: translateY(-25%) rotate(45deg);
}
.main-nav .submenu {
    position: absolute; top: 100%; left: 0; min-width: 200px;
    background: var(--ink); box-shadow: 0 2px 13px rgba(0, 0, 0, .1);
    opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: opacity .2s, transform .2s, visibility .2s;
}
.main-nav .has-submenu:hover > .submenu,
.main-nav .has-submenu:focus-within > .submenu,
.main-nav .has-submenu.is-open > .submenu { opacity: 1; visibility: visible; transform: none; }
.main-nav .submenu a {
    padding: 1em; font-size: 12px; color: var(--surface);
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.main-nav .submenu a:hover { background: var(--orange); color: var(--white); }
.main-nav .submenu a[aria-current="page"] { background: var(--text); color: var(--white); }

.menu-open {
    display: none; margin-left: auto; padding: .4em .6em;
    border: 0; background: none; color: var(--muted);
}
.menu-open span { display: block; width: 24px; height: 2px; margin: 5px 0; background: currentColor; }

/* Pannello laterale (mobile) */
.drawer { position: fixed; inset: 0; z-index: 200; }
.drawer-overlay { position: absolute; inset: 0; background: rgba(9, 12, 16, .6); }
.drawer-panel {
    position: absolute; top: 0; right: 0; bottom: 0; width: min(90%, 400px);
    padding: 0 1.5em 1.5em; overflow-y: auto; background: var(--white);
}
.drawer-close {
    display: block; margin-left: auto; padding: .4em .2em;
    border: 0; background: none; font-size: 32px; line-height: 1; color: var(--ink);
}
.mobile-nav li { position: relative; }
.mobile-nav a {
    display: block; padding: 1em 0; border-bottom: 1px solid var(--line);
    font: 400 14px/1.6 var(--font-display); text-transform: uppercase;
    text-decoration: none; color: var(--ink);
}
.mobile-nav a[aria-current="page"] { color: var(--orange); }
.mobile-nav .submenu-toggle {
    position: absolute; top: 0; right: 0; width: 3em; height: 3.6em; margin: 0;
    border-left: 1px solid var(--line); color: var(--ink);
}
.mobile-nav .submenu { display: none; padding-left: 1em; }
.mobile-nav .is-open > .submenu { display: block; }
.mobile-nav .is-open > .submenu-toggle::before { transform: translateY(25%) rotate(225deg); }

/* ---------- Contenuto ---------- */
.content { margin-top: 20px; margin-bottom: 5rem; }
.content > h1:first-child:not(.page-title-image) { margin-top: 18px; }
.page-title-image { margin: 0; }
.page-title-image img { margin-inline: auto; }
.figure-center { margin: 0 0 1.5rem; }
.figure-center img { margin-inline: auto; }
figure { margin: 0; }
.full-img img { width: 100%; }
.spacer { height: var(--h, 3rem); }

/* Colonne generiche */
.columns { display: flex; gap: 2em; margin-bottom: 1.75em; }
.columns > * { flex: 1; min-width: 0; }
.columns.middle { align-items: center; }

/* ---------- Pulsanti ---------- */
.button {
    display: inline-block; padding: 10px 18px; border-radius: 3px;
    background: #443d3d; color: var(--white);
    font: 700 14px/1.3 "Playfair Display", Georgia, serif;
    text-transform: uppercase; text-decoration: none;
}
.button:hover { background: #827979; color: var(--white); }

/* ---------- Slider ---------- */
.slider { position: relative; width: 100%; margin-bottom: 2.5rem; overflow: hidden; background: var(--ink); }
.slider-track { position: relative; aspect-ratio: 2 / 1; max-height: 720px; width: 100%; }
.slide {
    position: absolute; inset: 0; display: flex; align-items: center;
    opacity: 0; visibility: hidden; transition: opacity .6s, visibility .6s;
}
.slide.is-active { opacity: 1; visibility: visible; }
.slide-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide-card {
    position: relative; width: 450px; max-width: 90%; margin-left: 80px; padding: 40px;
    background: var(--white); box-shadow: 0 2px 13px rgba(0, 0, 0, .15);
}
.slide-title { margin: 0 0 .4em; font-size: 30px; line-height: 1.3; color: #1a1a1a; }
.slide-icon { height: 45px; width: auto; margin-bottom: 1rem; }
.slide-card p { margin-bottom: 1.2em; font-size: 20px; line-height: 1.2; color: #8c8c8c; }
.slider-arrow {
    position: absolute; top: 50%; width: 48px; height: 48px; margin-top: -24px;
    border: 0; background: none; color: var(--white); opacity: .8;
}
.slider-arrow:hover { opacity: 1; }
.slider-arrow::before {
    content: ""; display: block; width: 18px; height: 18px; margin: auto;
    border-left: 2px solid currentColor; border-bottom: 2px solid currentColor;
}
.slider-prev { left: 12px; }
.slider-prev::before { transform: rotate(45deg); }
.slider-next { right: 12px; }
.slider-next::before { transform: rotate(-135deg); }

/* ---------- Riquadri circolari ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2em; margin-top: 4rem; }
.tile { display: block; text-align: center; text-decoration: none; color: #000; }
.tile img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; transition: transform .3s; }
.tile:hover img { transform: scale(1.03); }
.tile-label {
    display: block; margin-top: .5em;
    font: 400 22px/1.4 var(--font-display); text-transform: uppercase; color: #000;
}
.tile:hover .tile-label { color: var(--orange); }

/* ---------- Gallerie ---------- */
.gallery { display: flex; flex-wrap: wrap; gap: .5em; margin-bottom: 1.5rem; }
.gallery figure { flex: 1 1 calc((100% - .5em * (var(--cols) - 1)) / var(--cols)); min-width: 0; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }

/* Immagini che si ingrandiscono */
a[data-lightbox] { display: inline-block; cursor: zoom-in; }
.lightbox { padding: 0; border: 0; background: none; max-width: 95vw; max-height: 95vh; overflow: visible; }
.lightbox::backdrop { background: rgba(0, 0, 0, .85); }
.lightbox img { max-width: 95vw; max-height: 95vh; width: auto; height: auto; }
.lightbox-close {
    position: fixed; top: 10px; right: 16px; border: 0; background: none;
    color: var(--white); font-size: 40px; line-height: 1;
}

/* ---------- Home ---------- */
.home-hero {
    position: relative; min-height: 91vh; padding: 1.5rem var(--edge) 3rem;
    display: flex; flex-direction: column; overflow: hidden;
}
.home-hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.home-hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(255, 255, 255, .5); }
.home-inner { position: relative; z-index: 2; width: 100%; max-width: var(--content-width); margin-inline: auto; }
.home-faq { position: absolute; top: 0; right: 0; width: 150px; }
.home-logo { margin: 5.5rem auto 0; max-width: 1024px; padding-left: 3rem; }
.home-logo img { width: 100%; }
.home-tiles { grid-template-columns: repeat(5, 1fr); margin-top: 8rem; }
.home-tiles .tile img { width: 75%; margin-inline: auto; }

/* ---------- Pagine specifiche ---------- */
.paths { text-align: center; margin: 4rem 0 5.5rem; }
.paths img { width: 99px; margin: 0 auto 1rem; }
.paths a { color: var(--ink); text-decoration: none; }
.paths a:hover { color: var(--orange); }
.paths h2 { margin: 0; }
.partners { display: flex; justify-content: center; align-items: center; gap: 4em; flex-wrap: wrap; margin-top: 3.5rem; }

.method { display: flex; gap: 2em; margin-top: 6rem; }
.method > * { flex: 1; min-width: 0; }
.method h2 { margin-bottom: 27px; }
.method h4 { margin-bottom: 100px; }
.brochure { position: relative; text-align: center; }
.brochure > a img { width: 100%; }
.brochure p { margin-top: 1em; }
.brochure .download-icon { position: absolute; top: 0; right: 0; width: 100px; }

.sedi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2em; text-align: center; }
.sedi img { width: 100%; margin-bottom: 1rem; }

.contacts h2 { display: inline; }
.contacts .contact-icon { display: inline; width: 30px; margin-right: .3em; vertical-align: baseline; }
.contacts ul { margin: .8em 0 0; padding-left: 2.5em; }
.contacts a { color: #000; text-decoration: none; }
.contacts a:hover { color: orange; }

.faq h2 { margin-top: 1.2em; }
.faq p { margin-bottom: 1em; }

.show { display: flex; gap: 2em; align-items: center; margin-bottom: 3rem; }
.show > :first-child { flex: 0 0 20%; text-align: center; }
.show > :first-child img { margin-inline: auto; }
.show > :last-child { flex: 1; margin: 0; }

.collab { display: flex; gap: 2em; align-items: center; }
.collab > * { flex: 1; min-width: 0; }
.collab figure { padding: 20px; text-align: center; }
.collab figure img { margin: 30px auto 0; }
.collab figcaption { margin-top: .5em; font-size: 16px; }

.under-construction { padding: 8rem 0; text-align: center; font-size: 42px; }

.error-page { padding: 6rem 0; text-align: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--white); font-size: 16px; }
.footer-inner {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
    gap: .5rem 2rem; padding-top: 10px; padding-bottom: 15px;
}
.footer-inner p { margin: 10px 0; }
.footer-links { display: flex; gap: 1rem; }

.scroll-up {
    position: fixed; right: 30px; bottom: 50px; z-index: 40; width: 2.4em; height: 2.4em;
    display: grid; place-items: center; border: 2px solid currentColor; color: var(--text);
    background: rgba(255, 255, 255, .7);
}
.scroll-up[hidden] { display: none; }
.scroll-up::before {
    content: ""; width: .6em; height: .6em; margin-top: .25em;
    border-left: 2px solid currentColor; border-top: 2px solid currentColor; transform: rotate(45deg);
}
.scroll-up:hover { color: var(--orange); }

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
    .main-nav { display: none; }
    .menu-open { display: block; }
    .content { margin-bottom: 3rem; }
    .slide-card { margin-left: 40px; padding: 24px; width: 380px; }
    .slide-title { font-size: 24px; }
    .slide-card p { font-size: 16px; }
    .home-faq { width: 22%; }
    .home-logo { padding-left: 0; }
    .home-tiles { margin-top: 4rem; gap: 1em; }
    .home-tiles .tile-label { font-size: 16px; }
}

/* ---------- Telefono ---------- */
@media (max-width: 767px) {
    .content { margin-bottom: 2rem; }
    .columns, .method, .show, .collab { flex-direction: column; }
    .tiles, .sedi { grid-template-columns: 1fr; }
    .tiles { margin-top: 2.5rem; }
    .tile img { max-width: 420px; margin-inline: auto; }
    .gallery figure { flex-basis: calc((100% - .5em) / 2); }
    .gallery[style*="--cols:1"] figure { flex-basis: 100%; }

    /* La scheda dello slider va sotto l'immagine */
    .slider { background: var(--white); }
    .slider-track { aspect-ratio: auto; max-height: none; display: grid; }
    .slide { position: relative; grid-area: 1 / 1; flex-direction: column; align-items: stretch; }
    .slide-bg { position: static; aspect-ratio: 2 / 1; height: auto; }
    .slide-card { width: auto; max-width: none; margin: 0; padding: 20px var(--edge); box-shadow: none; }
    .slider-arrow { top: 25vw; }

    .home-hero { min-height: 100vh; }
    .home-logo { margin-top: 4.5rem; }
    .home-tiles { grid-template-columns: repeat(2, 1fr); margin-top: 3rem; }
    .home-tiles .tile img { width: 60%; max-width: 160px; }
    .method { margin-top: 3rem; }
    .method h4 { margin-bottom: 2rem; }
    .text-right { text-align: left; }
    .under-construction { font-size: 28px; padding: 4rem 0; }
    .footer-inner { justify-content: center; text-align: center; }
    .scroll-up { right: 16px; bottom: 80px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .slide, .tile img, .main-nav .submenu { transition: none; }
}
