/* ══════════════════════════════════════════════════════════════
   COMMON.CSS – stili condivisi da tutte le pagine
   (font locali, icone, navbar, menu, footer, banner cookie)
══════════════════════════════════════════════════════════════ */

/* ── FONT OSPITATI IN LOCALE (nessuna chiamata a Google Fonts) ── */
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 300 400;
    font-display: swap;
    src: url('fonts/cormorant-garamond.woff2') format('woff2');
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: italic;
    font-weight: 300 400;
    font-display: swap;
    src: url('fonts/cormorant-garamond-italic.woff2') format('woff2');
}
@font-face {
    font-family: 'Jost';
    font-style: normal;
    font-weight: 200 400;
    font-display: swap;
    src: url('fonts/jost.woff2') format('woff2');
}

/* ── ICONE (Bootstrap Icons 1.11.3, solo quelle usate) ───────── */
@font-face {
    font-family: 'bootstrap-icons';
    font-display: block;
    src: url('fonts/bootstrap-icons.woff2') format('woff2');
}
.bi::before {
    display: inline-block;
    font-family: 'bootstrap-icons' !important;
    font-style: normal;
    font-weight: normal !important;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    vertical-align: -.125em;
    -webkit-font-smoothing: antialiased;
}
.bi-whatsapp::before      { content: "\f618"; }
.bi-instagram::before     { content: "\f437"; }
.bi-telephone::before     { content: "\f5c1"; }
.bi-envelope::before      { content: "\f32f"; }
.bi-chevron-left::before  { content: "\f284"; }
.bi-chevron-right::before { content: "\f285"; }
.bi-arrow-right::before   { content: "\f138"; }
.bi-arrow-down::before    { content: "\f128"; }
.bi-x-lg::before          { content: "\f659"; }
.bi-camera::before        { content: "\f220"; }
.bi-geo-alt::before       { content: "\f3e8"; }

/* ── RESET & VARIABILI ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --white: #fff;
    --black: #0a0a0a;
    --white-dim: rgba(255,255,255,0.55);
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-ui: 'Jost', 'Helvetica Neue', Arial, sans-serif;
}

html, body {
    background: var(--black);
    color: var(--white);
    font-family: var(--font-ui);
    -webkit-font-smoothing: antialiased;
}

.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ── NAVBAR ─────────────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 36px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, transparent 100%);
    transition: background 0.4s, padding 0.4s;
}
.navbar.scrolled {
    background: rgba(10,10,10,0.88);
    backdrop-filter: blur(10px);
    padding: 16px 36px;
}
.navbar-logo img {
    height: 36px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
}
.navbar.menu-open .navbar-logo {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.navbar-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    z-index: 101;
}
.navbar-menu-btn span {
    display: block;
    width: 24px;
    height: 1px;
    background: var(--white);
    transition: transform 0.3s, opacity 0.3s;
}
.navbar-menu-btn.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.navbar-menu-btn.open span:nth-child(2) { opacity: 0; }
.navbar-menu-btn.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── MENU A SCHERMO INTERO ───────────────────────────────────── */
.fullmenu {
    position: fixed;
    inset: 0;
    z-index: 95;
    background: var(--black);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 1.5rem 2rem;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}
.fullmenu.open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, visibility 0s;
}
.fullmenu-links {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.fullmenu-links a {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5.5vw, 5rem);
    font-weight: 300;
    color: var(--white);
    text-decoration: none;
    letter-spacing: 0.04em;
    padding: 0.12em 0;
    transition: color 0.2s, letter-spacing 0.3s;
}
.fullmenu-links a:hover,
.fullmenu-links a[aria-current="page"] { color: var(--white-dim); }
.fullmenu-links a:hover { letter-spacing: 0.12em; }
.fullmenu-links a.menu-gap { margin-top: 1.4rem; }

.fullmenu-contacts {
    margin-top: 3rem;
    display: flex;
    gap: 2rem;
    font-size: 1.3rem;
}
.fullmenu-contacts a { color: var(--white-dim); transition: color 0.2s; }
.fullmenu-contacts a:hover { color: var(--white); }

.fullmenu-legal {
    margin-top: 2rem;
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.35);
    text-align: center;
}
.fullmenu-legal a { color: rgba(255,255,255,0.45); text-decoration: none; }
.fullmenu-legal a:hover { color: var(--white); }

/* ── FOOTER ─────────────────────────────────────────────────── */
.site-footer {
    background: #060606;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 2rem clamp(1.5rem, 6vw, 7rem);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1.5rem;
}
.footer-left p {
    font-size: 11px;
    font-weight: 200;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.06em;
    line-height: 1.8;
}
.footer-left a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-left a:hover { color: var(--white); }
.footer-legal { margin-top: 4px; }
.footer-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}
.footer-links a {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--white); }

/* bottone "Gestisci cookie" usato come link */
.cookie-reopen {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font: inherit;
    letter-spacing: inherit;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}
.cookie-reopen:hover { color: var(--white); }

/* ── BANNER COOKIE ──────────────────────────────────────────── */
.cookie-banner {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 9999;
    max-height: 100dvh;
    overflow-y: auto;
    background: rgba(10,10,10,0.97);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255,255,255,0.12);
    padding: 1.6rem clamp(1.2rem, 5vw, 4rem);
    font-family: var(--font-ui);
    color: var(--white);
    white-space: normal;
    animation: cookieSlideUp 0.4s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes cookieSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.cookie-close {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    cursor: pointer;
}
.cookie-close:hover { color: var(--white); }
.cookie-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}
.cookie-text { flex: 1; min-width: 220px; padding-right: 2rem; }
.cookie-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}
.cookie-short { display: none; }
.cookie-text p:not(.cookie-title) {
    font-size: 12px;
    font-weight: 300;
    line-height: 1.7;
    color: rgba(255,255,255,0.75);
    margin-bottom: 0.4rem;
}
.cookie-banner a {
    color: rgba(255,255,255,0.85);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.cookie-banner a:hover { color: var(--white); }
.cookie-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
/* Tutti i pulsanti hanno lo stesso peso grafico: "Rifiuta" non è
   meno visibile di "Accetta" (Linee guida Garante 10/06/2021). */
.cookie-btn {
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    border: 1px solid var(--white);
    background: var(--white);
    color: var(--black);
    padding: 11px 18px;
    min-width: 130px;
    cursor: pointer;
    transition: opacity 0.2s;
}
.cookie-btn:hover { opacity: 0.85; }
.cookie-btn:focus-visible,
.cookie-close:focus-visible,
.cookie-reopen:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }

.cookie-detail {
    max-width: 1100px;
    margin: 1.2rem auto 0;
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 0.6rem;
}
.cookie-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.cookie-toggle-row strong {
    display: block;
    font-size: 13px;
    font-weight: 400;
    margin-bottom: 2px;
}
.cookie-toggle-row span.cookie-desc {
    font-size: 11px;
    line-height: 1.5;
    color: rgba(255,255,255,0.6);
}
.toggle-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.toggle-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.toggle-track {
    position: absolute; inset: 0;
    background: rgba(255,255,255,0.18);
    border-radius: 22px;
    transition: background 0.25s;
}
.toggle-track::after {
    content: '';
    position: absolute;
    top: 3px; left: 3px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: rgba(255,255,255,0.7);
    transition: transform 0.25s, background 0.25s;
}
.toggle-switch input:checked + .toggle-track { background: rgba(255,255,255,0.9); }
.toggle-switch input:checked + .toggle-track::after { transform: translateX(18px); background: var(--black); }
.toggle-switch input:focus-visible + .toggle-track { outline: 2px solid var(--white); outline-offset: 2px; }
.toggle-disabled { opacity: 0.45; }
.cookie-detail .cookie-actions { margin-top: 1.2rem; }

/* ── PAGINE DI TESTO (privacy / cookie policy) ───────────────── */
.legal-page {
    max-width: 820px;
    margin: 0 auto;
    padding: 8rem 1.5rem 5rem;
}
.legal-page h1 {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(2.4rem, 6vw, 3.6rem);
    margin-bottom: 0.6rem;
}
.legal-page .legal-updated {
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    margin-bottom: 3rem;
}
.legal-page h2 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.6rem;
    margin: 2.6rem 0 0.9rem;
}
.legal-page p,
.legal-page li {
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.8;
    color: rgba(255,255,255,0.78);
}
.legal-page p { margin-bottom: 1rem; }
.legal-page ul { margin: 0 0 1rem 1.2rem; }
.legal-page li { margin-bottom: 0.4rem; }
.legal-page a { color: var(--white); text-underline-offset: 2px; }
.legal-page strong { font-weight: 400; color: var(--white); }
.legal-table-wrap { overflow-x: auto; margin: 0 0 1.4rem; }
.legal-page table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 0.85rem;
    font-weight: 300;
}
.legal-page th,
.legal-page td {
    text-align: left;
    vertical-align: top;
    padding: 0.7rem 0.8rem;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.8);
}
.legal-page th { font-weight: 400; color: var(--white); }
.legal-page .cookie-reopen { font-size: inherit; color: var(--white); }

/* ── MOBILE ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .navbar { padding: 18px 20px; }
    .navbar.scrolled { padding: 14px 20px; }
    .navbar-logo img { height: 28px; }

    .fullmenu-links a {
        font-size: clamp(2rem, 11vw, 2.8rem);
        padding: 0.25em 0;
    }
    .fullmenu-links a.menu-gap { margin-top: 1rem; }
    .fullmenu-contacts { margin-top: 2rem; font-size: 1.2rem; }

    .site-footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-links { justify-content: center; width: 100%; }

    .cookie-banner { padding: 0.9rem 1rem calc(0.9rem + env(safe-area-inset-bottom, 0px)); }
    .cookie-inner { gap: 0.8rem; }
    .cookie-close { top: 0.35rem; right: 0.35rem; }
    .cookie-text { padding-right: 2rem; }
    .cookie-title { font-size: 1.1rem; margin-bottom: 0.25rem; }
    .cookie-long { display: none; }
    .cookie-short { display: inline; }
    .cookie-text p:not(.cookie-title) { font-size: 11.5px; line-height: 1.55; margin-bottom: 0.25rem; }
    .cookie-actions { width: 100%; flex-wrap: nowrap; gap: 6px; }
    .cookie-btn { flex: 1 1 0; min-width: 0; padding: 10px 4px; font-size: 10px; letter-spacing: 0.08em; }
    .cookie-toggle-row { padding: 0.6rem 0; }
}

/* ── LINK "VAI AL CONTENUTO" (tastiera e lettori di schermo) ── */
.skip-link {
    position: fixed; left: 12px; top: -60px; z-index: 10000;
    background: #fff; color: #0a0a0a; padding: 10px 16px;
    font-family: var(--font-ui); font-size: 13px; text-decoration: none;
    border-radius: 4px; box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    transition: top 0.2s;
}
.skip-link:focus { top: 12px; outline: 2px solid #0a0a0a; outline-offset: 2px; }
