/* Legal Pages Styles */
.legal-container {
    max-width: 920px;
    margin: 0 auto;
    padding: 40px 24px;
}

.legal-header {
    margin-bottom: 40px;
}

.legal-header h1 {
    font-size: 48px;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .legal-header h1 {
        font-size: 36px;
    }
}

.legal-meta {
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.3);
    padding: 20px 24px;
    border-radius: 12px;
    margin-bottom: 32px;
}

.legal-meta p {
    margin: 0;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.legal-meta strong {
    color: white;
    font-weight: 600;
}

.legal-meta a {
    color: #f97316;
    text-decoration: none;
    transition: color 0.2s;
}

.legal-meta a:hover {
    color: #fb923c;
}

.legal-intro {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px 28px;
    border-radius: 16px;
    margin-bottom: 48px;
}

.legal-intro p {
    margin: 0;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
}

.legal-intro ul {
    margin: 12px 0 12px 20px;
    padding-left: 16px;
    list-style-type: disc;
    color: rgba(255, 255, 255, 0.85);
}

.legal-intro li {
    margin-bottom: 4px;
    font-size: 15px;
}

/* Table of contents */
.legal-toc {
    margin-bottom: 40px;
    padding: 20px 24px;
    border-radius: 14px;
    background: radial-gradient(circle at top left, rgba(249, 115, 22, 0.18), transparent 55%),
                rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.5);
}

.legal-toc h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: white;
}

.legal-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 6px 16px;
}

.legal-toc li {
    margin: 0;
    font-size: 14px;
}

.legal-toc a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(226, 232, 240, 0.9);
    text-decoration: none;
    padding: 4px 0;
    border-radius: 999px;
    transition: color 0.15s ease, transform 0.15s ease;
}

.legal-toc a::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.9);
}

.legal-toc a:hover {
    color: #f97316;
    transform: translateX(2px);
}

.legal-content h2 {
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin-top: 48px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(249, 115, 22, 0.3);
}

.legal-content h2:first-child {
    margin-top: 0;
}

.legal-content p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 15px;
}

.legal-content ul,
.legal-content ol {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    margin-bottom: 20px;
    padding-left: 24px;
}

.legal-content ul {
    list-style-type: disc;
}

.legal-content ol {
    list-style-type: decimal;
}

.legal-content li {
    margin-bottom: 12px;
    font-size: 15px;
}

.legal-content li strong {
    color: white;
    font-weight: 600;
}

.legal-content code {
    background: rgba(249, 115, 22, 0.15);
    padding: 3px 8px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #fb923c;
    border: 1px solid rgba(249, 115, 22, 0.2);
}

.legal-content em {
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

/* Contact Section at the end */
.legal-contact {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(234, 88, 12, 0.1));
    border: 1px solid rgba(249, 115, 22, 0.3);
    padding: 28px 32px;
    border-radius: 16px;
    margin-top: 48px;
}

.legal-contact h2 {
    font-size: 24px;
    color: white;
    margin-top: 0;
    margin-bottom: 16px;
    border: none;
    padding: 0;
}

.legal-contact p {
    margin-bottom: 12px;
}

.legal-contact a {
    color: #fb923c;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.legal-contact a:hover {
    color: #f97316;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: #f97316;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #ea580c;
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.5);
}

/* Mobile menu: drawer from the right */
#mobile-menu-wrapper.mobile-menu-open #mobile-menu {
    transform: translateX(0);
}

#mobile-menu-wrapper.mobile-menu-open #mobile-menu-backdrop {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 768px) {
    .legal-container {
        padding: 32px 16px;
    }
    
    .legal-content h2 {
        font-size: 24px;
        margin-top: 36px;
    }
    
    .back-to-top {
        bottom: 24px;
        right: 24px;
        width: 44px;
        height: 44px;
    }
}
