/* --- Legal Document Page Styles (Terms, Privacy, etc.) --- */

.legal-main {
    background-color: #f8f9fa;
    padding: 3rem 1rem;
}

.legal-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #ffffff;
    padding: 3rem 4rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #dee2e6;
}

.legal-header h1 {
    font-size: 2.2rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.5rem;
}

.legal-header .subtitle {
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.legal-content section + section {
    margin-top: -12rem;
}

.legal-content h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #343a40;
    margin-top: 2rem; /* Default space for most sections */
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

/* --- THIS IS THE FIX --- */
/* Target only the h2 inside a section with our new class */
.legal-content .intro-paragraph-section h2 {
    margin-top: 0; /* Remove the top margin to close the gap */
}
/* --- END OF FIX --- */

.legal-content section:first-of-type h2 {
    margin-top: 0;
}

.legal-content p, .legal-content li {
    font-size: 1rem;
    line-height: 1.7;
    color: #495057;
    margin-bottom: 0.75rem;
}

.legal-content ul {
    list-style: none;
    padding-left: 0;
}

.legal-content li {
    padding-left: 1.5rem;
    position: relative;
}

.legal-content li::before {
    content: '•';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.legal-content a {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 500;
}
.legal-content a:hover {
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .legal-main {
        padding: 0;
    }
    .legal-container {
        padding: 2rem 1.5rem;
        border: none;
        box-shadow: none;
        border-radius: 0;
    }
    .legal-header h1 {
        font-size: 1.8rem;
    }
    .legal-content h2 {
        font-size: 1.25rem;
    }
}