/* Legal pages specific styles */

.legal-section {
    padding: 2rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 80vh;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    padding: 3rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.legal-content h1 {
    color: #333;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
    border-bottom: 3px solid #667eea;
    padding-bottom: 1rem;
}

.last-updated {
    text-align: center;
    color: #666;
    font-style: italic;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.legal-text {
    line-height: 1.8;
    color: #555;
}

.legal-text h2 {
    color: #333;
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-left: 1rem;
    border-left: 4px solid #667eea;
    background: linear-gradient(
        90deg,
        rgba(102, 126, 234, 0.1) 0%,
        transparent 100%
    );
    padding: 0.8rem 1rem;
    border-radius: 0 8px 8px 0;
}

.legal-text h3 {
    color: #444;
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.legal-text p {
    margin-bottom: 1rem;
    text-align: justify;
}

.legal-text ul {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.legal-text li {
    margin-bottom: 0.5rem;
    position: relative;
}

.legal-text li::before {
    content: '•';
    color: #667eea;
    font-weight: bold;
    position: absolute;
    left: -1rem;
}

.legal-text a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.legal-text a:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

.legal-text strong {
    color: #333;
    font-weight: 600;
}

/* Special styling for important sections */
.legal-text h2:first-of-type {
    margin-top: 0;
}

.legal-text p:first-of-type {
    font-size: 1.1rem;
    color: #444;
    font-weight: 500;
}

/* Contact information styling */
.legal-text ul:has(li:contains('Email')) {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

/* Emergency resources styling */
.legal-text h2:contains('Emergency') {
    background: linear-gradient(
        90deg,
        rgba(220, 53, 69, 0.1) 0%,
        transparent 100%
    );
    border-left-color: #dc3545;
}

.legal-text h2:contains('Emergency') + ul {
    background: #fff5f5;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #dc3545;
}

/* Warning signs styling */
.legal-text h2:contains('Warning Signs') {
    background: linear-gradient(
        90deg,
        rgba(255, 193, 7, 0.1) 0%,
        transparent 100%
    );
    border-left-color: #ffc107;
}

.legal-text h2:contains('Warning Signs') + ul {
    background: #fffbf0;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

/* Tips and resources styling */
.legal-text h2:contains('Tips') {
    background: linear-gradient(
        90deg,
        rgba(40, 167, 69, 0.1) 0%,
        transparent 100%
    );
    border-left-color: #28a745;
}

.legal-text h2:contains('Tips') + ul {
    background: #f8fff8;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

/* Legal actions */
.legal-actions {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e9ecef;
}

.back-button,
.contact-button {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    min-width: 150px;
}

.back-button:hover,
.contact-button:hover {
    background: linear-gradient(45deg, #5a6fd8, #6a4190);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.contact-button {
    background: linear-gradient(45deg, #28a745, #20c997);
}

.contact-button:hover {
    background: linear-gradient(45deg, #218838, #1ea085);
}

/* Table of contents (if needed) */
.toc {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-left: 4px solid #667eea;
}

.toc h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.toc ul {
    list-style: none;
    padding-left: 0;
}

.toc li {
    margin-bottom: 0.5rem;
}

.toc a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.toc a:hover {
    text-decoration: underline;
}

/* Print styles */
@media print {
    .legal-section {
        background: white;
        padding: 0;
    }

    .legal-content {
        box-shadow: none;
        border-radius: 0;
        padding: 1rem;
    }

    .legal-actions {
        display: none;
    }

    .legal-text h2 {
        page-break-after: avoid;
    }

    .legal-text ul {
        page-break-inside: avoid;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .legal-content {
        padding: 2rem 1.5rem;
        margin: 0 1rem;
    }

    .legal-content h1 {
        font-size: 2rem;
    }

    .legal-text h2 {
        font-size: 1.3rem;
        padding-left: 0.8rem;
    }

    .legal-text h3 {
        font-size: 1.1rem;
    }

    .legal-text ul {
        padding-left: 1.5rem;
    }

    .legal-actions {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .back-button,
    .contact-button {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .legal-content {
        padding: 1.5rem 1rem;
        margin: 0 0.5rem;
    }

    .legal-content h1 {
        font-size: 1.8rem;
    }

    .legal-text h2 {
        font-size: 1.2rem;
        padding: 0.6rem 0.8rem;
    }

    .legal-text p {
        text-align: left;
    }
}

/* Accessibility improvements */
.legal-text h2:focus,
.legal-text h3:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.legal-text a:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
    border-radius: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .legal-text h2 {
        border-left-color: #000;
        background: #f0f0f0;
    }

    .legal-text a {
        color: #0000ff;
    }

    .legal-text a:hover {
        color: #000080;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .back-button,
    .contact-button {
        transition: none;
    }

    .back-button:hover,
    .contact-button:hover {
        transform: none;
    }
}
