/* =========================================
   ZYN TRADE - Legal Pages Premium Theme
   ========================================= */

/* Legal Page Layout */
.legal-page {
    min-height: 100vh;
    padding: calc(var(--navbar-height, 70px) + 3rem) 0 5rem;
    background: linear-gradient(135deg, #0a0f1e 0%, #111827 50%, #0a0f1e 100%);
    position: relative;
    overflow: hidden;
}

.legal-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(0, 212, 255, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(124, 58, 237, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* Page Header */
.legal-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.legal-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 1rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #00d4ff;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.legal-badge i {
    font-size: 0.9rem;
}

.legal-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
    font-family: 'Orbitron', sans-serif;
}

.legal-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

.legal-updated {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Table of Contents */
.legal-toc {
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.legal-toc-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.legal-toc-title i {
    color: #00d4ff;
}

.legal-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    columns: 2;
    column-gap: 1.5rem;
}

.legal-toc-list li {
    margin-bottom: 0.5rem;
    break-inside: avoid;
}

.legal-toc-list a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.legal-toc-list a::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(0, 212, 255, 0.5);
    transition: all 0.3s ease;
}

.legal-toc-list a:hover {
    color: #00d4ff;
}

.legal-toc-list a:hover::before {
    background: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* Content Card */
.legal-card {
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.legal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00d4ff, #7c3aed);
}

/* Section Headers */
.legal-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.legal-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.legal-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.legal-section-title .section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(124, 58, 237, 0.2));
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #00d4ff;
}

.legal-section p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.legal-section p:last-child {
    margin-bottom: 0;
}

/* Lists */
.legal-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.legal-list li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.legal-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d4ff, #7c3aed);
}

.legal-list.numbered {
    counter-reset: list-counter;
}

.legal-list.numbered li {
    counter-increment: list-counter;
}

.legal-list.numbered li::before {
    content: counter(list-counter);
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: rgba(0, 212, 255, 0.15);
    color: #00d4ff;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 2px;
}

/* Alert Boxes */
.legal-alert {
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.legal-alert-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.legal-alert-content {
    flex: 1;
}

.legal-alert-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.legal-alert-text {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.9;
}

.legal-alert.warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.legal-alert.danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.legal-alert.info {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    color: #00d4ff;
}

.legal-alert.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

/* CTA Section */
.legal-cta {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(124, 58, 237, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    margin-top: 2rem;
}

.legal-cta-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
}

.legal-cta-text {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1.5rem;
}

.legal-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #00d4ff, #7c3aed);
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.legal-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
    color: #fff;
}

.legal-btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.legal-btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #00d4ff;
}

/* Navigation */
.legal-nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.legal-nav a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.legal-nav a:hover {
    color: #00d4ff;
}

/* FAQ Specific Styles */
.faq-section {
    margin-bottom: 2.5rem;
}

.faq-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-section-title i {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(124, 58, 237, 0.2));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00d4ff;
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: rgba(0, 212, 255, 0.2);
}

.faq-item.active {
    border-color: rgba(0, 212, 255, 0.3);
    background: rgba(0, 212, 255, 0.03);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    color: #fff;
    font-weight: 500;
    transition: all 0.3s ease;
}

.faq-question:hover {
    color: #00d4ff;
}

.faq-question i {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
    color: #00d4ff;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer-content {
    padding: 0 1.5rem 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
}

.faq-answer-content ul,
.faq-answer-content ol {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.faq-answer-content li {
    margin-bottom: 0.5rem;
}

/* Animations */
.legal-fade-in {
    animation: legalFadeIn 0.6s ease forwards;
    opacity: 0;
}

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

.legal-fade-in:nth-child(1) { animation-delay: 0.1s; }
.legal-fade-in:nth-child(2) { animation-delay: 0.2s; }
.legal-fade-in:nth-child(3) { animation-delay: 0.3s; }
.legal-fade-in:nth-child(4) { animation-delay: 0.4s; }
.legal-fade-in:nth-child(5) { animation-delay: 0.5s; }

/* Responsive */
@media (max-width: 768px) {
    .legal-page {
        padding-top: calc(var(--navbar-height, 70px) + 2rem);
    }

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

    .legal-card {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .legal-toc-list {
        columns: 1;
    }

    .legal-section-title {
        font-size: 1.1rem;
    }
}
