/* CSS astratto e moderno per le pagine legali */

.legal-page {
    position: relative;
    padding: 60px 40px;
    background: transparent;
    overflow: hidden;
    max-width: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

/* Container principale con design astratto */
.legal-content-wrapper {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    background: linear-gradient(135deg, 
        rgba(110, 41, 32, 0.08) 0%,
        rgba(214, 194, 167, 0.12) 35%,
        rgba(255, 255, 255, 0.05) 70%,
        rgba(110, 41, 32, 0.06) 100%);
    border-radius: 30px 10px 40px 15px;
    padding: 50px 60px 60px 40px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Elementi decorativi astratti */
.legal-content-wrapper::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -30px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(214, 194, 167, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
}


/* Titolo principale con design asimmetrico */
.legal-page .page-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: #fff;
    position: relative;
    margin-bottom: 40px;
    padding-left: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    text-align: left !important;
    margin-bottom: 20px !important;
}

.legal-page .page-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 80%;
    background: linear-gradient(180deg, #d6c2a7 0%, rgba(214, 194, 167, 0.3) 100%);
    border-radius: 0 10px 10px 0;
}

.legal-page .page-title::after {
    display: none !important;
}

/* Data di aggiornamento con stile moderno */
.legal-page .last-updated {
    background: rgba(214, 194, 167, 0.15);
    border: 1px solid rgba(214, 194, 167, 0.3);
    border-radius: 25px 5px 25px 5px;
    padding: 12px 25px;
    margin-bottom: 50px;
    display: inline-block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
    backdrop-filter: blur(10px);
    position: relative;
    left: 30px;
    position: static !important;
    transform: none !important;
    text-align: left !important;
}

/* Override per i contenuti esistenti */
.legal-content h2 {
    border-bottom: none !important;
    animation-delay: 0.2s !important;
}

.legal-content h2:before {
    display: none !important;
}

.legal-content {
    position: relative;
    padding-left: 30px;
    line-height: 1.7;
    font-weight: 300;
}

.legal-content::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, 
        transparent 0%,
        rgba(214, 194, 167, 0.6) 20%,
        rgba(214, 194, 167, 0.8) 50%,
        rgba(214, 194, 167, 0.6) 80%,
        transparent 100%);
    border-radius: 2px;
}

/* Titoli di sezione con design organico */
.legal-content h2 {
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    color: #fff;
    margin: 45px 0 25px 0;
    padding: 20px 0 20px 25px;
    position: relative;
    background: linear-gradient(105deg, 
        rgba(214, 194, 167, 0.08) 0%,
        rgba(214, 194, 167, 0.15) 30%,
        transparent 70%);
    border-radius: 0 25px 0 15px;
    transform: translateX(-15px);
}

.legal-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 60%;
    background: linear-gradient(180deg, #d6c2a7 0%, rgba(214, 194, 167, 0.5) 100%);
    border-radius: 0 8px 8px 0;
}

/* Sottotitoli con stile minimalista */
.legal-content h3 {
    font-size: 1.3rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    margin: 30px 0 18px 15px;
    position: relative;
    padding-left: 20px;
}

.legal-content h3::before {
    content: '◦';
    position: absolute;
    left: 0;
    color: #d6c2a7;
    font-size: 1.5rem;
}

/* Paragrafi con spacing ottimizzato */
.legal-content p {
    margin-bottom: 22px;
    text-align: justify;
    padding-left: 15px;
    color: rgba(255, 255, 255, 0.9);
    hyphens: auto;
}

/* Liste con design personalizzato */
.legal-content ul {
    margin: 25px 0;
    padding-left: 35px;
    position: relative;
}

.legal-content li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 25px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.legal-content li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 0;
    height: 0;
    border-left: 6px solid #d6c2a7;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    transform: translateY(-50%);
}

/* Link con effetti avanzati */
.legal-content a {
    color: #d6c2a7;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(214, 194, 167, 0.4);
}

.legal-content a:hover {
    color: #fff;
    border-bottom-color: #fff;
    text-shadow: 0 0 8px rgba(214, 194, 167, 0.5);
}

/* Animazioni fluide */
@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.legal-content-wrapper {
    animation: floatIn 0.8s ease-out forwards;
}

.legal-content h2 {
    animation: floatIn 0.6s ease-out forwards;
    opacity: 0;
}

.legal-content h2:nth-of-type(1) { animation-delay: 0.2s; }
.legal-content h2:nth-of-type(2) { animation-delay: 0.3s; }
.legal-content h2:nth-of-type(3) { animation-delay: 0.4s; }
.legal-content h2:nth-of-type(4) { animation-delay: 0.5s; }
.legal-content h2:nth-of-type(5) { animation-delay: 0.6s; }
.legal-content h2:nth-of-type(6) { animation-delay: 0.7s; }

/* Elementi decorativi aggiuntivi */
.legal-content-wrapper .floating-element {
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(214, 194, 167, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.legal-content-wrapper .floating-element:nth-child(1) {
    top: 20%;
    right: 10%;
    animation-delay: 0s;
}

.legal-content-wrapper .floating-element:nth-child(2) {
    bottom: 30%;
    left: 5%;
    animation-delay: 2s;
    width: 80px;
    height: 80px;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.6;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .legal-page {
        padding: 30px 15px;
    }
    
    .legal-content-wrapper {
        padding: 30px 25px 40px 20px;
        border-radius: 20px 8px 25px 12px;
    }
    
    .legal-page .page-title {
        padding-left: 15px;
        margin-bottom: 30px;
    }
    
    .legal-page .last-updated {
        left: 15px;
        padding: 10px 20px;
    }
    
    .legal-content {
        padding-left: 20px;
    }
    
    .legal-content h2 {
        transform: translateX(-10px);
        padding: 15px 0 15px 20px;
    }
    
    .legal-content ul {
        padding-left: 25px;
    }
}

@media (max-width: 480px) {
    .legal-content-wrapper {
        padding: 25px 15px 30px 15px;
        border-radius: 15px 5px 20px 8px;
    }
    
    .legal-content {
        padding-left: 15px;
    }
    
    .legal-content h2 {
        transform: translateX(-5px);
        padding-left: 15px;
    }
}

/* Sovrascrittura degli stili esistenti per garantire il nuovo design */
.legal-page {
    max-width: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

/* Assicura che il titolo mantenga il nostro stile */
.legal-page .page-title {
    text-align: left !important;
    margin-bottom: 20px !important;
}

.legal-page .page-title::after {
    display: none !important;
}

/* Reset per la data di aggiornamento */
.legal-page .last-updated {
    position: static !important;
    transform: none !important;
    background: rgba(214, 194, 167, 0.15) !important;
    text-align: left !important;
}

/* Override per i contenuti esistenti */
.legal-content h2 {
    border-bottom: none !important;
    animation-delay: 0.2s !important;
}

.legal-content h2:before {
    display: none !important;
}

/* Fix per i link nel footer */
.minimalist-footer {
    margin-top: 50px;
}

/* Miglioramenti per la scrollbar personalizzata nel contenuto */
.legal-content-wrapper {
    scrollbar-width: thin;
    scrollbar-color: rgba(214, 194, 167, 0.5) transparent;
}

.legal-content-wrapper::-webkit-scrollbar {
    width: 6px;
}

.legal-content-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.legal-content-wrapper::-webkit-scrollbar-thumb {
    background: rgba(214, 194, 167, 0.3);
    border-radius: 3px;
}

.legal-content-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(214, 194, 167, 0.5);
}

/* Assicura compatibilità con le animazioni esistenti */
.animate-fade-in {
    animation: floatIn 0.8s ease-out forwards !important;
}

.animate-slide-up {
    animation: floatIn 0.6s ease-out forwards !important;
}

/* Footer styles per le pagine legali */
.minimalist-footer {
    background-color: #6e292038;
    padding: 20px 0;
    margin: 50px 0 20px 60px;
    border-radius: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.minimalist-footer .footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 15px;
}

.minimalist-footer .copyright {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.minimalist-footer .legal-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.minimalist-footer .legal-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    position: relative;
}

.minimalist-footer .legal-links a:hover {
    color: rgba(255, 255, 255, 0.95);
}

.minimalist-footer .legal-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.7);
    transition: width 0.3s ease;
}

.minimalist-footer .legal-links a:hover::after {
    width: 100%;
}

.minimalist-footer .legal-links a:not(:last-child)::before {
    content: '|';
    position: absolute;
    right: -12px;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

/* Responsive per il footer */
@media (max-width: 768px) {
    .minimalist-footer {
        margin-left: 0;
        padding: 15px 0;
    }
    
    .minimalist-footer .footer-content {
        gap: 10px;
    }
    
    .minimalist-footer .legal-links {
        gap: 15px;
    }
    
    .minimalist-footer .legal-links a:not(:last-child)::before {
        right: -9px;
    }
}
