/* Cookie Banner Styles */
        .cookie-banner {
		    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: rgba(26, 26, 26, 0.95);
            border-top: 1px solid rgba(255, 215, 0, 0.3);
            padding: 20px;
            z-index: 10000;
            backdrop-filter: blur(20px);
            transform: translateY(100%);
            transition: transform 0.4s ease;
            box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
            /* Escludi dal rendering finché non è visibile — previene che sia LCP candidate */
            content-visibility: hidden;
        }

        .cookie-banner.show {
            transform: translateY(0);
            content-visibility: visible;
        }

        .cookie-content {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 20px;
            flex-wrap: wrap;
        }

        .cookie-text {
            flex: 1;
            min-width: 300px;
            color: #e0e0e0;
            line-height: 1.5;
        }

        .cookie-text a {
           color: #ffd700;
            text-decoration: none;
            font-size: 0.85rem;
            transition: color 0.3s ease;
        }

        .cookie-text a:hover {
		color: #ffd700;
            text-decoration: underline;
        }

        .cookie-actions {
            display: flex;
            gap: 12px;
            align-items: center;
            flex-wrap: wrap;
        }

        .cookie-btn {
            padding: 12px 20px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            font-size: 14px;
            transition: all 0.3s ease;
            white-space: nowrap;
        }

        .cookie-btn-accept {
            background: linear-gradient(135deg, #FFD700, #FFA500);
            color: #0f0f0f;
        }

        .cookie-btn-accept:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
        }

        .cookie-btn-reject {
            background: transparent;
            color: #e0e0e0;
            border: 1px solid rgba(255, 255, 255, 0.3);
        }

        .cookie-btn-reject:hover {
            background: rgba(255, 255, 255, 0.1);
            border-color: rgba(255, 255, 255, 0.5);
        }

        .cookie-btn-settings {
            background: transparent;
            color: #FFD700;
            border: 1px solid #FFD700;
        }

        .cookie-btn-settings:hover {
            background: rgba(255, 215, 0, 0.1);
        }

        /* Language Switcher */
        .cookie-lang-switcher {
            display: flex;
            gap: 8px;
            margin-left: 15px;
        }

        .cookie-lang-btn {
            padding: 6px 10px;
            background: transparent;
            border: 1px solid rgba(255, 255, 255, 0.3);
            color: #e0e0e0;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
            transition: all 0.3s ease;
        }

        .cookie-lang-btn.active {
            background: #FFD700;
            color: #0f0f0f;
            border-color: #FFD700;
        }

        .cookie-lang-btn:hover:not(.active) {
            border-color: rgba(255, 255, 255, 0.5);
        }

        /* Cookie Settings Modal */
        .cookie-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            z-index: 10001;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .cookie-modal.show {
            display: flex;
        }

        .cookie-modal-content {
            background: #1a1a1a;
            border: 1px solid rgba(255, 215, 0, 0.3);
            border-radius: 16px;
            padding: 30px;
            max-width: 600px;
            width: 100%;
            max-height: 80vh;
            overflow-y: auto;
            position: relative;
        }

        .cookie-modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 25px;
            padding-bottom: 15px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .cookie-modal-title {
            color: #FFD700;
            font-size: 1.4rem;
            font-weight: 600;
        }

        .cookie-modal-close {
            background: none;
            border: none;
            color: #e0e0e0;
            font-size: 24px;
            cursor: pointer;
            padding: 5px;
        }

        .cookie-category {
            margin-bottom: 25px;
            padding: 20px;
            background: rgba(255, 255, 255, 0.02);
            border-radius: 12px;
            border: 1px solid rgba(255, 255, 255, 0.05);
        }

        .cookie-category-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
        }

        .cookie-category-title {
            color: #ffffff;
            font-weight: 600;
            font-size: 1.1rem;
        }

        .cookie-category-description {
            color: #a0a0a0;
            font-size: 0.9rem;
            line-height: 1.5;
            margin-bottom: 15px;
        }

        .cookie-category-details {
            font-size: 0.85rem;
            color: #888;
            margin-top: 10px;
        }

        .cookie-toggle {
            position: relative;
            display: inline-block;
            width: 50px;
            height: 24px;
            flex-shrink: 0;
        }

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

        .cookie-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #333;
            transition: 0.3s;
            border-radius: 24px;
        }

        .cookie-slider:before {
            position: absolute;
            content: "";
            height: 18px;
            width: 18px;
            left: 3px;
            bottom: 3px;
            background-color: white;
            transition: 0.3s;
            border-radius: 50%;
        }

        input:checked + .cookie-slider {
            background-color: #FFD700;
        }

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

        input:disabled + .cookie-slider {
            background-color: #666;
            cursor: not-allowed;
        }

        .cookie-modal-actions {
            display: flex;
            gap: 12px;
            justify-content: flex-end;
            margin-top: 25px;
            padding-top: 20px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }

        @media (max-width: 768px) {
            .cookie-content {
                flex-direction: column;
                text-align: center;
            }

            .cookie-actions {
                justify-content: center;
                width: 100%;
                flex-wrap: wrap;
            }
.cookie-btn {
        flex: none;
        min-width: 90px; /* Ancora più piccolo */
          }

            .cookie-lang-switcher {
                margin-left: 0;
                margin-top: 10px;
                justify-content: center;
            }

            .cookie-modal-content {
                margin: 10px;
                padding: 20px;
            }

            .cookie-modal-actions {
                flex-direction: column;
            }

            /* Fixed mobile toggle positioning */
            .cookie-category-header {
                align-items: flex-start;
                gap: 15px;
            }

            .cookie-category-title {
                flex: 1;
                margin-right: 10px;
                font-size: 1rem;
            }

            .cookie-toggle {
                margin-top: 2px;
                min-width: 50px;
            }
        }

        /* Extra small screens */
        @media (max-width: 480px) {
            .cookie-category {
                padding: 15px;
            }
		
            .cookie-category-header {
                flex-wrap: nowrap;
                align-items: center;
                gap: 10px;
            }

            .cookie-category-title {
                font-size: 0.95rem;
                line-height: 1.3;
            }

            .cookie-toggle {
                width: 44px;
                height: 22px;
                min-width: 44px;
            }

            .cookie-slider:before {
                height: 16px;
                width: 16px;
                left: 3px;
                bottom: 3px;
            }

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

        /* Toast notification styles */
        @keyframes slideIn {
            from { transform: translateX(100%); }
            to { transform: translateX(0); }
        }
        @keyframes slideOut {
            from { transform: translateX(0); }
            to { transform: translateX(100%); }
        }
/* Layout bottoni banner su schermi stretti */
@media (max-width: 600px) {
    .cookie-actions {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        width: 100%;
    }

    .cookie-btn-settings,
    .cookie-btn-reject,
    .cookie-btn-accept {
        flex: 1 1 calc(50% - 8px);
        min-width: 120px;
        max-width: calc(50% - 8px);
        text-align: center;
    }

    .cookie-lang-switcher {
        order: -1;
        width: 100%;
        justify-content: center;
        margin: 0 0 4px 0;
    }
}