/**
 * Cathedral DHO - Legal Pages Styles
 * Styles for Privacy Policy, Terms of Service, Cookie Policy
 */

/* Reset and base */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary, #1a1a1a);
    background: var(--bg-primary, #f8f8f6);
}

/* Navigation */
.legal-nav {
    position: sticky;
    top: 0;
    background: white;
    border-bottom: 1px solid var(--border-color, #e5e5e5);
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
}

.logo-tagline {
    font-size: 12px;
    color: var(--text-secondary, #666);
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    color: var(--text-secondary, #666);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-primary, #1a1a1a);
}

/* Main container */
.legal-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 24px;
}

.legal-content {
    background: white;
    border-radius: 12px;
    padding: 48px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Header */
.legal-header {
    text-align: center;
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-color, #e5e5e5);
}

.legal-header h1 {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: var(--text-primary, #1a1a1a);
}

.legal-meta {
    color: var(--text-secondary, #666);
    font-size: 14px;
    margin: 0;
}

/* Table of Contents */
.legal-toc {
    background: var(--bg-secondary, #f5f5f5);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 48px;
}

.legal-toc h2 {
    font-size: 18px;
    margin: 0 0 16px 0;
}

.legal-toc ol {
    margin: 0;
    padding-left: 20px;
}

.legal-toc li {
    margin-bottom: 8px;
}

.legal-toc a {
    color: var(--primary-color, #0066cc);
    text-decoration: none;
}

.legal-toc a:hover {
    text-decoration: underline;
}

/* Sections */
section {
    margin-bottom: 48px;
    scroll-margin-top: 80px;
}

section:last-child {
    margin-bottom: 0;
}

section h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color, #e5e5e5);
}

section h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 24px 0 12px 0;
    color: var(--text-primary, #1a1a1a);
}

section h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 16px 0 8px 0;
}

section p {
    margin: 0 0 16px 0;
}

section ul, section ol {
    margin: 0 0 16px 0;
    padding-left: 24px;
}

section li {
    margin-bottom: 8px;
}

section a {
    color: var(--primary-color, #0066cc);
}

/* Info box */
.info-box {
    background: var(--bg-secondary, #f5f5f5);
    border-left: 4px solid var(--primary-color, #0066cc);
    border-radius: 0 8px 8px 0;
    padding: 16px 20px;
    margin: 16px 0;
}

.info-box p {
    margin: 4px 0;
}

.info-box p:last-child {
    margin-bottom: 0;
}

/* Warning box */
.warning-box {
    background: #fff8e6;
    border-left: 4px solid #f5a623;
    border-radius: 0 8px 8px 0;
    padding: 16px 20px;
    margin: 16px 0;
}

.warning-box h4 {
    margin: 0 0 8px 0;
    color: #b8860b;
}

.warning-box p {
    margin: 0;
    color: #8b6914;
}

/* Tables */
.legal-table, .cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}

.legal-table th, .legal-table td,
.cookie-table th, .cookie-table td {
    padding: 12px 16px;
    text-align: left;
    border: 1px solid var(--border-color, #e5e5e5);
}

.legal-table th, .cookie-table th {
    background: var(--bg-secondary, #f5f5f5);
    font-weight: 600;
}

.legal-table tr:hover, .cookie-table tr:hover {
    background: var(--bg-secondary, #f5f5f5);
}

.no-cookies {
    text-align: center;
    color: var(--text-secondary, #666);
    font-style: italic;
}

/* Rights grid */
.rights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.right-card {
    background: var(--bg-secondary, #f5f5f5);
    border-radius: 8px;
    padding: 20px;
}

.right-card h4 {
    margin: 0 0 8px 0;
    font-size: 15px;
    color: var(--text-primary, #1a1a1a);
}

.right-card p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary, #666);
}

/* Browser instructions */
.browser-instructions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.browser-card {
    background: white;
    border: 1px solid var(--border-color, #e5e5e5);
    border-radius: 8px;
    padding: 16px;
}

.browser-card h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
}

.browser-card p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary, #666);
}

/* Consent manager */
.consent-manager {
    background: var(--bg-secondary, #f5f5f5);
    border-radius: 8px;
    padding: 24px;
    margin: 24px 0;
    text-align: center;
}

.consent-manager h3 {
    margin: 0 0 12px 0;
}

.consent-manager p {
    margin: 0 0 16px 0;
    color: var(--text-secondary, #666);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color, #0066cc);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover, #0055aa);
}

/* Footer */
.legal-footer {
    background: white;
    border-top: 1px solid var(--border-color, #e5e5e5);
    padding: 24px;
    margin-top: 48px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-container p {
    margin: 0;
    color: var(--text-secondary, #666);
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-secondary, #666);
    text-decoration: none;
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--text-primary, #1a1a1a);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .nav-links {
        gap: 16px;
    }

    .legal-content {
        padding: 24px;
    }

    .legal-header h1 {
        font-size: 28px;
    }

    section h2 {
        font-size: 20px;
    }

    .rights-grid {
        grid-template-columns: 1fr;
    }

    .browser-instructions {
        grid-template-columns: 1fr;
    }

    .footer-container {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .legal-table, .cookie-table {
        font-size: 12px;
    }

    .legal-table th, .legal-table td,
    .cookie-table th, .cookie-table td {
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .legal-container {
        padding: 24px 16px;
    }

    .legal-content {
        padding: 20px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}
