/**
 * Legal Pages Stylesheet
 * Path: public_html/assets/css/legal.css
 * 
 * Styles for Privacy Policy, Terms of Service, Legal Notice
 * Theme: Teal
 */

/* ========================================
   LEGAL PAGE CONTAINER
   ======================================== */

.legal-page {
    padding: 2rem 0 4rem;
    min-height: 100vh;
}

.legal-page .container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ========================================
   HEADER
   ======================================== */

.legal-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color, #e5e7eb);
}

.legal-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color, #111827);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.legal-header h1 i {
    color: var(--primary-color, #14b8a6);
}

.legal-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted, #6b7280);
    margin-bottom: 0.5rem;
}

.legal-update {
    font-size: 0.875rem;
    color: var(--text-muted, #9ca3af);
    font-style: italic;
}

/* ========================================
   TABLE OF CONTENTS
   ======================================== */

.legal-toc {
    background: var(--bg-secondary, #f9fafb);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 2.5rem;
}

.legal-toc h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color, #374151);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.legal-toc ol {
    columns: 2;
    column-gap: 2rem;
    list-style-position: inside;
    margin: 0;
    padding: 0;
}

.legal-toc li {
    font-size: 0.9rem;
    padding: 0.35rem 0;
    break-inside: avoid;
}

.legal-toc a {
    color: var(--primary-color, #14b8a6);
    text-decoration: none;
    transition: color 0.2s;
}

.legal-toc a:hover {
    color: var(--primary-hover, #0d9488);
    text-decoration: underline;
}

/* ========================================
   SECTIONS
   ======================================== */

.legal-section {
    margin-bottom: 2.5rem;
    scroll-margin-top: 100px;
}

.legal-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color, #111827);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color, #14b8a6);
}

.legal-section h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-color, #1f2937);
    margin: 1.5rem 0 0.75rem;
}

.legal-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color, #374151);
    margin: 1.25rem 0 0.5rem;
}

.legal-section p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-color, #4b5563);
    margin-bottom: 1rem;
}

.legal-section ul,
.legal-section ol {
    margin: 1rem 0 1.25rem 1.5rem;
    padding: 0;
}

.legal-section li {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-color, #4b5563);
    margin-bottom: 0.5rem;
}

.legal-section li strong {
    color: var(--text-color, #1f2937);
}

.legal-section a {
    color: var(--primary-color, #14b8a6);
    text-decoration: none;
}

.legal-section a:hover {
    text-decoration: underline;
}

/* ========================================
   INFO BOX
   ======================================== */

.legal-info-box {
    background: var(--bg-secondary, #f3f4f6);
    border-left: 4px solid var(--primary-color, #14b8a6);
    padding: 1.25rem 1.5rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
}

.legal-info-box p {
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}

.legal-info-box p:last-child {
    margin-bottom: 0;
}

/* ========================================
   HIGHLIGHT BOX
   ======================================== */

.legal-highlight {
    background: linear-gradient(135deg, #ccfbf1 0%, #99f6e4 100%);
    border: 1px solid var(--primary-color, #14b8a6);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.legal-highlight.warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
}

.legal-highlight p {
    margin-bottom: 0.75rem;
}

.legal-highlight p:last-child {
    margin-bottom: 0;
}

.legal-highlight ul {
    margin: 0.75rem 0 0.5rem 1.25rem;
}

/* ========================================
   TABLES
   ======================================== */

.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
    font-size: 0.875rem;
}

.legal-table th,
.legal-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border: 1px solid var(--border-color, #e5e7eb);
}

.legal-table th {
    background: var(--bg-secondary, #f3f4f6);
    font-weight: 600;
    color: var(--text-color, #374151);
}

.legal-table td {
    color: var(--text-color, #4b5563);
}

.legal-table tr:nth-child(even) td {
    background: var(--bg-tertiary, #f9fafb);
}

/* ========================================
   RIGHTS GRID
   ======================================== */

.legal-rights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.legal-right-card {
    background: var(--bg-secondary, #f9fafb);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 10px;
    padding: 1.25rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.legal-right-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.legal-right-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-color, #14b8a6);
    margin: 0 0 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legal-right-card h4 i {
    font-size: 1rem;
}

.legal-right-card p {
    font-size: 0.875rem;
    margin: 0;
    color: var(--text-muted, #6b7280);
}

/* ========================================
   BILINGUAL LAYOUT
   ======================================== */

.legal-bilingual .legal-bilingual-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.legal-lang-block {
    padding: 0 1rem;
}

.legal-lang-block:first-child {
    border-right: 1px solid var(--border-color, #e5e7eb);
    padding-left: 0;
}

.legal-lang-block:last-child {
    padding-right: 0;
}

/* ========================================
   FOOTER
   ======================================== */

.legal-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color, #e5e7eb);
    text-align: center;
}

.legal-footer p {
    font-size: 0.9rem;
    color: var(--text-muted, #6b7280);
}

.legal-footer a {
    color: var(--primary-color, #14b8a6);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.legal-footer a:hover {
    text-decoration: underline;
}

.legal-footer .separator {
    margin: 0 1rem;
    color: var(--border-color, #d1d5db);
}

/* ========================================
   DARK THEME
   ======================================== */

.theme-dark .legal-header {
    border-bottom-color: var(--dark-border, #374151);
}

.theme-dark .legal-header h1 {
    color: var(--dark-text, #f9fafb);
}

.theme-dark .legal-toc {
    background: var(--dark-bg-secondary, #1f2937);
    border-color: var(--dark-border, #374151);
}

.theme-dark .legal-toc h3 {
    color: var(--dark-text, #e5e7eb);
}

.theme-dark .legal-section h2 {
    color: var(--dark-text, #f9fafb);
}

.theme-dark .legal-section h3,
.theme-dark .legal-section h4 {
    color: var(--dark-text, #e5e7eb);
}

.theme-dark .legal-section p,
.theme-dark .legal-section li {
    color: var(--dark-text-muted, #9ca3af);
}

.theme-dark .legal-section li strong {
    color: var(--dark-text, #e5e7eb);
}

.theme-dark .legal-info-box {
    background: var(--dark-bg-secondary, #1f2937);
}

.theme-dark .legal-highlight {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.15) 0%, rgba(13, 148, 136, 0.1) 100%);
}

.theme-dark .legal-highlight.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.1) 100%);
}

.theme-dark .legal-table th {
    background: var(--dark-bg-secondary, #1f2937);
    color: var(--dark-text, #e5e7eb);
}

.theme-dark .legal-table td {
    color: var(--dark-text-muted, #9ca3af);
    border-color: var(--dark-border, #374151);
}

.theme-dark .legal-table tr:nth-child(even) td {
    background: var(--dark-bg-tertiary, #111827);
}

.theme-dark .legal-right-card {
    background: var(--dark-bg-secondary, #1f2937);
    border-color: var(--dark-border, #374151);
}

.theme-dark .legal-right-card p {
    color: var(--dark-text-muted, #9ca3af);
}

.theme-dark .legal-lang-block:first-child {
    border-right-color: var(--dark-border, #374151);
}

.theme-dark .legal-footer {
    border-top-color: var(--dark-border, #374151);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .legal-header h1 {
        font-size: 1.75rem;
    }

    .legal-toc ol {
        columns: 1;
    }

    .legal-section h2 {
        font-size: 1.25rem;
    }

    .legal-rights-grid {
        grid-template-columns: 1fr;
    }

    .legal-bilingual .legal-bilingual-row {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .legal-lang-block:first-child {
        border-right: none;
        border-bottom: 1px solid var(--border-color, #e5e7eb);
        padding: 0 0 1.5rem;
        margin-bottom: 1.5rem;
    }

    .legal-lang-block:last-child {
        padding: 0;
    }

    .legal-table {
        font-size: 0.8rem;
    }

    .legal-table th,
    .legal-table td {
        padding: 0.5rem;
    }

    .legal-footer .separator {
        display: block;
        margin: 0.5rem 0;
    }

    .legal-footer a {
        display: block;
        margin: 0.5rem 0;
    }
}

@media (max-width: 480px) {
    .legal-page .container {
        padding: 0 1rem;
    }

    .legal-header h1 {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .legal-info-box {
        padding: 1rem;
    }

    .legal-highlight {
        padding: 1rem;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .legal-page {
        padding: 0;
    }

    .legal-header {
        border-bottom: 1px solid #000;
    }

    .legal-toc {
        background: #f5f5f5;
        page-break-after: always;
    }

    .legal-section {
        page-break-inside: avoid;
    }

    .legal-section h2 {
        page-break-after: avoid;
    }

    .legal-info-box {
        border: 1px solid #ccc;
        background: #f9f9f9;
    }

    .legal-footer {
        display: none;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}