/* =========================================
   COOKIE BANNER — APPLE MINIMAL STYLE
========================================= */

.cookie-banner {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 9999;
    max-width: 840px;
    width: calc(100% - 32px);

    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border-radius: 20px;

    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.14),
        0 0 0 1px rgba(255, 255, 255, 0.9);

    padding: 16px 18px;
    display: none; /* mostrato via JS */
    opacity: 0;
    transform-origin: center bottom;
    transition: opacity .35s ease, transform .35s ease;
}

.cookie-banner.show {
    display: block;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.cookie-banner-inner {
    display: flex;
    gap: 16px;
    align-items: center;
}

.cookie-banner-text h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 6px;
}

.cookie-banner-text p {
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.4;
    margin-bottom: 6px;
}

.cookie-banner-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 140px;
}

.cookie-btn {
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
    white-space: nowrap;
}

.cookie-btn-primary {
    background: linear-gradient(180deg, #111827, #020617);
    color: #f9fafb;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.35);
}

.cookie-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.45);
}

.cookie-btn-secondary {
    background: rgba(243, 244, 246, 0.9);
    color: #111827;
    border-color: rgba(209, 213, 219, 0.9);
}

.cookie-btn-secondary:hover {
    background: rgba(229, 231, 235, 0.95);
}

.cookie-preferences-toggle {
    background: transparent;
    border: none;
    padding: 0;
    color: #2563eb;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
}

/* PANNELLO PREFERENZE */

.cookie-preferences {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(209, 213, 219, 0.7);
    display: none;
    animation: cookieSlideUp .28s ease-out;
}

.cookie-preferences.show {
    display: block;
}

.cookie-preferences h4 {
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: #111827;
}

.cookie-pref-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.cookie-pref-row strong {
    font-size: 0.9rem;
    color: #111827;
}

.cookie-pref-row p {
    font-size: 0.82rem;
    color: #6b7280;
    margin-top: 2px;
}

.cookie-chip {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    background: rgba(229, 231, 235, 0.9);
    color: #111827;
}

.cookie-chip-fixed {
    border: 1px solid rgba(209, 213, 219, 0.9);
}

/* SWITCH */

.cookie-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #e5e7eb;
    border-radius: 999px;
    transition: .2s;
}

.cookie-slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background-color: white;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(15, 23, 42, 0.35);
    transition: .2s;
}

.cookie-switch input:checked + .cookie-slider {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
}

.cookie-switch input:checked + .cookie-slider::before {
    transform: translateX(18px);
}

.cookie-pref-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* RESPONSIVE */

@keyframes cookieSlideUp {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .cookie-banner {
        bottom: 12px;
        padding: 18px 16px;
        width: calc(100% - 20px);
        border-radius: 16px;
        left: 50%;
        transform: translateX(-50%);
    }

    .cookie-banner-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        text-align: left;
        width: 100%;
    }

    .cookie-banner-text h3 {
        font-size: 1rem;
    }

    .cookie-banner-text p {
        font-size: 0.88rem;
    }

    .cookie-banner-buttons {
        flex-direction: column;
        width: 100%;
        gap: 10px;
        justify-content: flex-start;
    }

    .cookie-btn {
        width: 100%;
        text-align: center;
        padding: 10px 18px;
        font-size: 0.95rem;
    }

    .cookie-preferences {
        padding-top: 12px;
    }

    .cookie-pref-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* FOOTER LINK EXTRA STYLE (SE NON GIÀ PRESENTE) */

.footer-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    padding-bottom: 1px;
    cursor: pointer;
}

.footer-link:hover {
    border-bottom-color: rgba(148, 163, 184, 0.8);
}

.footer-cookie-btn {
    background: none;
    border: none;
    font: inherit;
    padding: 0;
}
/* =========================================
   PRIVACY & COOKIE POLICY PAGE — APPLE STYLE
========================================= */

.legal-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 80px 24px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display",
                 "SF Pro Text", Inter, Roboto, sans-serif;
    color: #1a1a1a;
    line-height: 1.65;
}

.legal-page h1 {
    font-size: clamp(2.2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 18px;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, #111827, #4b5563);
    -webkit-background-clip: text;
    color: transparent;
}

.legal-page h2 {
    font-size: clamp(1.6rem, 3vw, 2rem);
    margin-top: 48px;
    margin-bottom: 16px;
    font-weight: 600;
}

.legal-page h3 {
    font-size: 1.2rem;
    margin-top: 32px;
    margin-bottom: 10px;
    font-weight: 600;
}

.legal-page p {
    margin-bottom: 18px;
    font-size: 1.05rem;
    color: #374151;
}

.legal-page ul {
    margin: 12px 0 28px 22px;
}

.legal-page ul li {
    margin-bottom: 10px;
    font-size: 1.02rem;
    color: #4b5563;
}

.legal-highlight-box {
    margin: 40px 0;
    padding: 22px 26px;
    background: rgba(243, 244, 246, 0.75);
    border-radius: 18px;
    border: 1px solid rgba(209, 213, 219, 0.5);
    backdrop-filter: blur(10px);
}

.legal-small {
    font-size: 0.9rem;
    color: #6b7280;
}

/* Link */
.legal-page a {
    color: #2563eb;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.legal-page a:hover {
    border-bottom-color: #2563eb;
}

/* Mobile */
@media (max-width: 768px) {
    .footer{
        margin-top:0px !important ;
    }
    .legal-page {
        padding: 60px 16px;
    }
    .legal-page h1 {
        margin-bottom: 10px;
    }
    .legal-page h2 {
        margin-top: 36px;
    }
}