/* =============================================
   COMMUNITY & LEGAL PAGES STYLES
   ============================================= */

/* Main Content Area */
.legal-content {
    min-height: 100vh;
    padding: 120px 0 60px;
}

.legal-wrapper {
    background: var(--dark-card);
    padding: 3rem 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    max-width: 900px;
    margin: 0 auto;
}

body.light-mode .legal-wrapper {
    background: var(--light);
}

/* Typography */
.legal-title {
    color: var(--primary);
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.last-updated {
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.legal-wrapper h2 {
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
}

.legal-wrapper h3 {
    color: var(--text-primary);
    font-size: 1.35rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.legal-wrapper p,
.legal-wrapper li {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 1rem;
}

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

.legal-wrapper li {
    margin-bottom: 0.75rem;
}

.legal-wrapper strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Info Boxes */
.info-box {
    background: linear-gradient(135deg, rgba(234, 72, 105, 0.1) 0%, rgba(234, 72, 105, 0.05) 100%);
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
}

body.light-mode .info-box {
    background: var(--primary-lighter);
}

.info-box p {
    margin-bottom: 0.75rem;
}

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

.success-box {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.1) 0%, rgba(39, 174, 96, 0.05) 100%);
    border-left: 4px solid var(--success);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
}

body.light-mode .success-box {
    background: rgba(39, 174, 96, 0.08);
}

.warning-box {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.1) 0%, rgba(243, 156, 18, 0.05) 100%);
    border-left: 4px solid var(--warning);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
}

body.light-mode .warning-box {
    background: rgba(243, 156, 18, 0.08);
}

.danger-box {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1) 0%, rgba(231, 76, 60, 0.05) 100%);
    border-left: 4px solid var(--danger);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
}

body.light-mode .danger-box {
    background: rgba(231, 76, 60, 0.08);
}

/* Emoji Styling */
.emoji {
    font-size: 1.5rem;
    margin-right: 0.5rem;
    display: inline-block;
    vertical-align: middle;
}

/* Language Content */
.language-content {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Active Nav Link */
.desktop-nav a.active {
    color: var(--primary);
    position: relative;
}

.desktop-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
}

/* Tables (for cookies page) */
.legal-wrapper table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: collapse;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.legal-wrapper table th,
.legal-wrapper table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(234, 72, 105, 0.1);
}

body.light-mode .legal-wrapper table th,
body.light-mode .legal-wrapper table td {
    border-bottom: 1px solid rgba(234, 72, 105, 0.2);
}

.legal-wrapper table th {
    background: rgba(234, 72, 105, 0.1);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

body.light-mode .legal-wrapper table th {
    background: var(--primary-lighter);
}

.legal-wrapper table td {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

.legal-wrapper table tr:hover {
    background: rgba(234, 72, 105, 0.03);
}

body.light-mode .legal-wrapper table tr:hover {
    background: rgba(234, 72, 105, 0.05);
}

/* Links in Legal Content */
.legal-wrapper a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.legal-wrapper a:hover {
    border-bottom-color: var(--primary);
}

/* Ordered Lists Styling */
.legal-wrapper ol {
    counter-reset: item;
    list-style: none;
    margin-left: 0;
}

.legal-wrapper ol > li {
    counter-increment: item;
    position: relative;
    padding-left: 2.5rem;
}

.legal-wrapper ol > li::before {
    content: counter(item) ".";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .legal-content {
        padding: 100px 0 40px;
    }

    .legal-wrapper {
        padding: 2rem 1.5rem;
        border-radius: var(--radius-lg);
    }

    .legal-title {
        font-size: 2rem;
    }

    .legal-wrapper h2 {
        font-size: 1.5rem;
    }

    .legal-wrapper h3 {
        font-size: 1.2rem;
    }

    .legal-wrapper table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .legal-wrapper table th,
    .legal-wrapper table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }

    .info-box,
    .success-box,
    .warning-box,
    .danger-box {
        padding: 1rem;
    }

    .emoji {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .legal-wrapper {
        padding: 1.5rem 1rem;
    }

    .legal-title {
        font-size: 1.75rem;
    }

    .legal-wrapper h2 {
        font-size: 1.35rem;
    }

    .legal-wrapper h3 {
        font-size: 1.15rem;
    }

    .legal-wrapper p,
    .legal-wrapper li {
        font-size: 0.95rem;
    }
}

/* Print Styles */
@media print {
    .bg-wrapper,
    header,
    .footer,
    .mobile-menu {
        display: none !important;
    }

    .legal-content {
        padding: 0;
    }

    .legal-wrapper {
        box-shadow: none;
        background: white;
        color: black;
    }

    .legal-wrapper h2,
    .legal-wrapper h3,
    .legal-wrapper p,
    .legal-wrapper li,
    .legal-wrapper strong {
        color: black;
    }

    .info-box,
    .success-box,
    .warning-box,
    .danger-box {
        border: 1px solid #ccc;
        background: white;
    }
}
