/* Legal & Documentation Styles - Premium B2C Edition */
:root {
    --legal-bg: #f8fafc;
    --legal-card-bg: #ffffff;
    --legal-accent: #5A9352;
    --legal-text: #1e293b;
    --legal-text-muted: #64748b;
    --legal-border: #e2e8f0;
}

.legal-page {
    background-color: var(--legal-bg);
    color: var(--legal-text);
    font-family: 'Inter', sans-serif;
    line-height: 1.8;
}

.legal-hero {
    padding: 140px 0 80px;
    background: radial-gradient(circle at top right, rgba(90, 147, 82, 0.05), transparent),
                radial-gradient(circle at bottom left, rgba(226, 71, 1, 0.03), transparent);
    background-color: #fff;
    border-bottom: 1px solid var(--legal-border);
    text-align: center;
}

.legal-title {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.update-date-pill {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(90, 147, 82, 0.1);
    color: var(--legal-accent);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.legal-container {
    display: flex;
    gap: 40px;
    padding: 60px 20px 120px;
    max-width: 1280px;
    margin: 0 auto;
}

/* Smart Sidebar */
.legal-sidebar {
    width: 300px;
    position: sticky;
    top: 100px;
    height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 20px;
}

.legal-sidebar::-webkit-scrollbar {
    width: 4px;
}
.legal-sidebar::-webkit-scrollbar-thumb {
    background: var(--legal-border);
    border-radius: 10px;
}

.legal-nav-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--legal-text-muted);
    margin-bottom: 20px;
    font-weight: 700;
}

.legal-nav ul {
    list-style: none;
    padding: 0;
}

.legal-nav li {
    margin-bottom: 4px;
}

.legal-nav a {
    text-decoration: none;
    color: var(--legal-text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 10px;
    display: block;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.legal-nav a:hover {
    background: rgba(0,0,0,0.03);
    color: var(--legal-text);
}

.legal-nav a.active {
    background: var(--legal-accent);
    color: #fff;
    box-shadow: 0 4px 12px rgba(90, 147, 82, 0.2);
}

/* Content Master Container */
.legal-content {
    flex: 1;
    background: var(--legal-card-bg);
    padding: 80px;
    border-radius: 32px;
    border: 1px solid var(--legal-border);
    box-shadow: 0 20px 50px rgba(0,0,0,0.03);
}

.article-section {
    margin-bottom: 60px;
    scroll-margin-top: 120px;
}

.article-section h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--legal-text);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.article-section h2::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--legal-accent);
    border-radius: 4px;
}

.article-section h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 32px 0 16px;
    color: var(--legal-text);
}

.legal-content p {
    margin-bottom: 1.5rem;
    color: #475569;
    font-size: 1.05rem;
}

.legal-content ul, .legal-content ol {
    margin-bottom: 2rem;
    padding-left: 1.2rem;
}

.legal-content li {
    margin-bottom: 12px;
    color: #475569;
}

.important-callout {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    padding: 24px;
    border-radius: 16px;
    margin: 32px 0;
    color: #9a3412;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.6;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: var(--container-padding);
    width: 56px;
    height: 56px;
    background: #fff;
    color: var(--legal-text);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--legal-border);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    z-index: 1000;
    cursor: pointer;
}

@media (min-width: 1248px) {
    .back-to-top {
        right: calc((100% - var(--container-max-width)) / 2 + var(--container-padding));
    }
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-8px);
    background: var(--legal-accent);
    color: #fff;
    border-color: var(--legal-accent);
}

@media (max-width: 1024px) {
    .legal-sidebar { display: none; }
    .legal-content { padding: 40px; border-radius: 0; border: none; }
    .legal-container { padding: 0; }
    .legal-title { font-size: 2.2rem; }
}

@media (max-width: 768px) {
    .legal-hero { padding: 120px 20px 60px; }
    .legal-content { padding: 30px 20px; }
}
