/**
 * Egonex Website - Legal Pages Styles
 * Stili specifici per pagine legali (Privacy Policy, Cookie Policy, etc.)
 */

/* ===== LEGAL HEADER ===== */
.legal-header {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    width: 100% !important;
}

/* Forza FIXED header su tutte le pagine legali */
body .legal-header {
    position: fixed !important;
    top: 0 !important;
    z-index: 9999 !important;
}

/* Aggiunge padding per compensare header fisso */
.legal-content {
    overflow-x: visible !important;
    padding-top: 100px !important; /* Spazio per header fisso */
}

/* Aggiunge padding anche al breadcrumb */
.breadcrumb {
    padding-top: 80px !important;
}

/* Assicura che il body non interferisca con sticky */
body:has(.legal-header) {
    overflow-x: visible !important;
}

/* Regola specifica per pagine legali */
body.legal-page,
body:has(.legal-header) {
    overflow-x: visible !important;
    max-width: none !important;
}

.legal-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.legal-header .logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.legal-header .logo-link:hover {
    opacity: 0.8;
}

.legal-header .logo {
    height: 40px;
    width: auto;
}

.legal-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 1rem;
    margin-left: auto;
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--text-secondary);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 40px;
}

.lang-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.lang-btn.active {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    color: var(--white);
}

.back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary-blue);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(68, 114, 196, 0.2);
}

.back-link:hover {
    background: #3a5ba3;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(68, 114, 196, 0.3);
}

.back-link:active {
    transform: translateY(0);
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    background: #f8fafc;
    padding: 0.75rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.9rem;
}

.breadcrumb .container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #3a5ba3;
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===== LEGAL CONTENT ===== */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    line-height: 1.7;
    color: var(--text-primary);
}

.legal-content h1 {
    color: var(--primary-blue);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.legal-content h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2.5rem 0 1.5rem 0;
    padding-top: 1.5rem;
    border-top: 2px solid #e2e8f0;
    position: relative;
}

.legal-content h2:first-of-type {
    border-top: none;
    padding-top: 0;
}

.legal-content h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem 0;
    color: var(--primary-blue);
}

.legal-content p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    font-size: 1rem;
}

.legal-content ul, 
.legal-content ol {
    margin: 1.25rem 0;
    padding-left: 2rem;
}

.legal-content li {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.legal-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.legal-content a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.legal-content a:hover {
    color: #3a5ba3;
    text-decoration: underline;
}

/* ===== LAST UPDATED BANNER ===== */
.last-updated {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    color: #0277bd;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-blue);
    margin-bottom: 2rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.last-updated::before {
    content: "📅";
    font-size: 1.2rem;
}

/* ===== SECTIONS ===== */
.legal-content section {
    margin-bottom: 2rem;
}

.legal-content section:last-child {
    margin-bottom: 0;
}

/* ===== INFO BOXES ===== */
.legal-content .info-box {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border-left: 4px solid var(--primary-blue);
}

.legal-content .info-box p {
    margin-bottom: 0.5rem;
}

.legal-content .info-box p:last-child {
    margin-bottom: 0;
}

/* ===== CONTACT INFO ===== */
.legal-content .contact-info {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border: 1px solid #e2e8f0;
}

.legal-content .contact-info p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.legal-content .contact-info p:last-child {
    margin-bottom: 0;
}

/* ===== LEGAL FOOTER ===== */
.legal-footer {
    background: #1a1a1a;
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid #333;
}

.legal-footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.legal-footer p {
    margin: 0;
    color: #9ca3af;
    font-size: 0.9rem;
}

/* Contact Box - Reduce spacing between lines */
.legal-content div[style*="background: #f8fafc"] p {
    margin: 0.25rem 0;
    line-height: 1.4;
}

.legal-content div[style*="background: #f8fafc"] p:first-child {
    margin-top: 0;
}

.legal-content div[style*="background: #f8fafc"] p:last-child {
    margin-bottom: 0;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .legal-header .container {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .legal-header .logo {
        height: 35px;
    }
    
    
    .breadcrumb {
        padding: 0.5rem 1rem;
    }
    
    .breadcrumb .container {
        flex-wrap: wrap;
    }
    
    .legal-content {
        padding: 1.5rem 1rem;
    }
    
    .legal-content h1 {
        font-size: 2rem;
    }
    
    .legal-content h2 {
        font-size: 1.3rem;
        margin: 2rem 0 1rem 0;
    }
    
    .legal-content h3 {
        font-size: 1.1rem;
    }
    
    .last-updated {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .legal-content ul, 
    .legal-content ol {
        padding-left: 1.5rem;
    }
    
    .legal-footer .container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .legal-content h1 {
        font-size: 1.75rem;
    }
    
    .legal-content h2 {
        font-size: 1.2rem;
    }
    
    .legal-content h3 {
        font-size: 1rem;
    }
    
}

/* ===== ACCESSIBILITY ===== */
.skip-link {
    position: absolute;
    top: -9999px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-blue);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 10px;
}

/* ===== PRINT STYLES ===== */
@media print {
    .legal-header,
    .breadcrumb,
    .legal-footer {
        display: none;
    }
    
    .legal-content {
        max-width: none;
        padding: 0;
    }
    
    .legal-content h1 {
        color: #000;
        font-size: 1.5rem;
    }
    
    .legal-content h2 {
        color: #000;
        font-size: 1.2rem;
        border-top: 1px solid #000;
    }
    
    .legal-content h3 {
        color: #000;
        font-size: 1.1rem;
    }
    
    .legal-content p,
    .legal-content li {
        color: #000;
    }
    
    .last-updated {
        background: #f0f0f0;
        color: #000;
        border: 1px solid #000;
    }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    .legal-header {
        background: rgba(26, 26, 26, 0.95);
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .breadcrumb {
        background: #1a1a1a;
        border-bottom-color: #333;
    }
    
    .legal-content {
        color: #e5e5e5;
    }
    
    .legal-content h2 {
        color: #e5e5e5;
        border-top-color: #333;
    }
    
    .legal-content h3 {
        color: var(--primary-blue);
    }
    
    .legal-content p,
    .legal-content li {
        color: #b3b3b3;
    }
    
    .last-updated {
        background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
        color: #93c5fd;
    }
    
    .info-box,
    .contact-info {
        background: #1a1a1a;
        border-color: #333;
    }
}
