/* ==========================================================================
   LEGAL PAGES STYLES - Privacy Policy & Terms of Service
   ========================================================================== */

/* Legal Hero Section */
.legal-hero {
    background: linear-gradient(
        135deg, 
        var(--warm-cream) 0%,
        var(--primary-gold-light) 30%,
        var(--primary-gold) 100%
    );
    padding: 8rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.legal-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="0.5" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="75" r="0.3" fill="%23ffffff" opacity="0.08"/><circle cx="50" cy="10" r="0.4" fill="%23ffffff" opacity="0.06"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.legal-hero-content {
    position: relative;
    z-index: 2;
}

.legal-hero h1 {
    font-family: var(--heading-font);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--deep-charcoal);
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--deep-charcoal);
    margin-bottom: 2rem;
    opacity: 0.8;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.last-updated {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(50, 34, 34, 0.1);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    color: var(--deep-charcoal);
    font-size: 0.9rem;
    border: 1px solid rgba(50, 34, 34, 0.15);
}

.last-updated .material-icons-outlined {
    font-size: 1.1rem;
}

/* Legal Content Layout */
.legal-content {
    padding: 6rem 0;
    background: var(--white);
    min-height: 80vh;
}

.legal-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Sidebar Table of Contents */
.legal-sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.toc-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(200, 160, 80, 0.1);
    position: relative;
    overflow: hidden;
}

.toc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-gold) 0%, var(--primary-gold-dark) 100%);
}

.toc-card h3 {
    font-family: var(--heading-font);
    font-size: 1.3rem;
    color: var(--deep-charcoal);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 0.75rem;
}

.toc-list a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.toc-list a:hover {
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--primary-gold-dark) 100%);
    color: var(--white);
    transform: translateX(-4px);
    box-shadow: 0 2px 8px rgba(200, 160, 80, 0.3);
}

.toc-list a:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--primary-gold);
    transition: height 0.3s ease;
    border-radius: 2px;
}

.toc-list a:hover:before {
    height: 80%;
}

/* Main Legal Content */
.legal-main {
    background: var(--white);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(200, 160, 80, 0.1);
}

.legal-section {
    margin-bottom: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(200, 160, 80, 0.15);
}

.legal-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.legal-section h2 {
    font-family: var(--heading-font);
    font-size: 2rem;
    color: var(--deep-charcoal);
    margin-bottom: 1.5rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 0.75rem;
}

.legal-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-gold) 0%, var(--primary-gold-dark) 100%);
    border-radius: 2px;
}

.legal-section h3 {
    font-family: var(--heading-font);
    font-size: 1.4rem;
    color: var(--deep-charcoal);
    margin: 2rem 0 1rem;
    font-weight: 600;
}

.legal-section h4 {
    font-family: var(--heading-font);
    font-size: 1.1rem;
    color: var(--deep-charcoal);
    margin: 1.5rem 0 0.75rem;
    font-weight: 600;
}

.legal-section p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    text-align: justify;
}

.legal-section ul, .legal-section ol {
    padding-right: 1.5rem;
    margin-bottom: 1.5rem;
}

.legal-section li {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-align: justify;
}

.legal-section li strong {
    color: var(--deep-charcoal);
    font-weight: 600;
}

/* Special Content Boxes */
.info-box {
    background: linear-gradient(135deg, rgba(200, 160, 80, 0.08) 0%, rgba(200, 160, 80, 0.04) 100%);
    border: 1px solid rgba(200, 160, 80, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    position: relative;
}

.info-box::before {
    content: 'ℹ️';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.2rem;
}

.warning-box {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.08) 0%, rgba(255, 193, 7, 0.04) 100%);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    position: relative;
}

.warning-box::before {
    content: '⚠️';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.2rem;
}

/* Contact Section in Legal Pages */
.legal-contact-section {
    background: linear-gradient(
        135deg, 
        var(--warm-cream) 0%,
        var(--primary-gold-light) 30%,
        var(--primary-gold) 100%
    );
    border-radius: 16px;
    padding: 2.5rem;
    margin-top: 3rem;
    text-align: center;
    color: var(--deep-charcoal);
}

.legal-contact-section h3 {
    color: var(--deep-charcoal);
    margin-bottom: 1rem;
}

.legal-contact-section p {
    color: var(--deep-charcoal);
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

.contact-details {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(50, 34, 34, 0.1);
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(50, 34, 34, 0.15);
    color: var(--deep-charcoal);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .legal-wrapper {
        grid-template-columns: 250px 1fr;
        gap: 3rem;
    }
    
    .legal-main {
        padding: 2.5rem;
    }
    
    .legal-hero h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .legal-hero {
        padding: 6rem 0 3rem;
    }
    
    .legal-hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .legal-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .legal-sidebar {
        position: static;
        order: 2;
    }
    
    .legal-main {
        padding: 2rem;
        order: 1;
    }
    
    .toc-card {
        padding: 1.5rem;
    }
    
    .legal-section {
        margin-bottom: 3rem;
        padding-bottom: 2rem;
    }
    
    .legal-section h2 {
        font-size: 1.75rem;
    }
    
    .contact-details {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .legal-hero {
        padding: 5rem 0 2.5rem;
    }
    
    .legal-hero h1 {
        font-size: 2rem;
    }
    
    .legal-main {
        padding: 1.5rem;
    }
    
    .legal-section h2 {
        font-size: 1.5rem;
    }
    
    .legal-section h3 {
        font-size: 1.25rem;
    }
    
    .toc-card {
        padding: 1.25rem;
    }
    
    .last-updated {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .legal-contact-section {
        padding: 2rem 1.5rem;
    }
}

/* Print Styles */
@media print {
    .legal-hero {
        background: none !important;
        color: black !important;
        padding: 2rem 0 1rem;
    }
    
    .legal-hero h1 {
        color: black !important;
    }
    
    .hero-subtitle, .last-updated {
        color: black !important;
    }
    
    .legal-wrapper {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .legal-sidebar {
        display: none;
    }
    
    .legal-main {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .legal-section {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
