/* Legal Pages Styling - Privacy Policy and Terms of Use */

/* Hero Section for Legal Pages */
.legal-hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 70%, var(--primary-light) 100%);
    position: relative;
    padding: 6rem 0 4rem;
    overflow: hidden;
    text-align: center;
}

.legal-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect fill="none" width="100" height="100"/><rect fill="rgba(255,255,255,0.05)" width="50" height="50"/><rect fill="rgba(255,255,255,0.05)" x="50" y="50" width="50" height="50"/></svg>');
    opacity: 0.3;
}

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

.legal-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: white;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    position: relative;
    display: inline-block;
}

.legal-hero h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: white;
    border-radius: 2px;
}

.legal-hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Legal Content Styling */
.legal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    padding: 3rem;
    margin-top: -2rem;
    position: relative;
    z-index: 10;
    margin-bottom: 4rem;
}

.legal-content h2 {
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin: 2.5rem 0 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid rgba(67, 97, 238, 0.1);
    position: relative;
}

.legal-content h2:first-child {
    margin-top: 0;
}

.legal-content h2::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 2px;
    background: var(--primary);
}

.legal-content h3 {
    font-size: 1.4rem;
    color: var(--dark);
    margin: 1.8rem 0 1rem;
}

.legal-content p {
    margin-bottom: 1.2rem;
    line-height: 1.7;
    color: var(--gray);
    font-size: 1.05rem;
}

.legal-content ul, .legal-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.legal-content li {
    margin-bottom: 0.8rem;
    color: var(--gray);
    line-height: 1.6;
}

.legal-content a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px dashed rgba(67, 97, 238, 0.5);
}

.legal-content a:hover {
    color: var(--primary-dark);
    border-bottom: 1px solid var(--primary-dark);
}

.legal-content strong {
    color: var(--dark);
    font-weight: 600;
}

/* Special Elements */
.legal-content address {
    background: rgba(67, 97, 238, 0.05);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    line-height: 1.6;
    color: var(--gray);
    border-left: 3px solid var(--primary);
}

.legal-content blockquote {
    background: rgba(67, 97, 238, 0.05);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--dark);
    border-left: 3px solid var(--primary);
}

/* Table Styling */
.legal-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

.legal-content th {
    background-color: var(--primary);
    color: white;
    text-align: left;
    padding: 1rem;
    font-weight: 600;
}

.legal-content td {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.legal-content tr:nth-child(even) {
    background-color: rgba(67, 97, 238, 0.03);
}

.legal-content tr:last-child td {
    border-bottom: none;
}

/* Table of Contents */
.legal-toc {
    background: rgba(67, 97, 238, 0.03);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    border-left: 3px solid var(--primary);
}

.legal-toc h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--primary-dark);
    font-size: 1.3rem;
}

.legal-toc ul {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 0;
}

.legal-toc li {
    margin-bottom: 0.5rem;
    padding-left: 1.2rem;
    position: relative;
}

.legal-toc li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary);
}

.legal-toc a {
    color: var(--gray);
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: none;
}

.legal-toc a:hover, .legal-toc a.active {
    color: var(--primary);
    font-weight: 500;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    font-size: 1.5rem;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .legal-hero {
        padding: 5rem 0 3rem;
    }
    
    .legal-hero h1 {
        font-size: 2.5rem;
    }
    
    .legal-content {
        padding: 2rem;
        margin-top: -1.5rem;
    }
    
    .legal-content h2 {
        font-size: 1.6rem;
    }
    
    .legal-content h3 {
        font-size: 1.3rem;
    }
    
    .legal-toc {
        padding: 1.2rem;
    }
    
    .back-to-top {
        width: 45px;
        height: 45px;
        right: 20px;
        bottom: 20px;
    }
}

@media (max-width: 576px) {
    .legal-hero h1 {
        font-size: 2rem;
    }
    
    .legal-hero p {
        font-size: 1rem;
    }
    
    .legal-content {
        padding: 1.5rem;
        margin-top: -1rem;
    }
    
    .legal-content h2 {
        font-size: 1.4rem;
    }
    
    .legal-content h3 {
        font-size: 1.2rem;
    }
    
    .legal-toc {
        padding: 1rem;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        right: 15px;
        bottom: 15px;
        font-size: 1.2rem;
    }
}