/* Shared styles for public legal pages (Privacy Policy, Terms & Conditions) */

:root {
    --primary-color: #00BC7D;
    --primary-hover: #009966;
    --primary-bg: #e5f7f5;
    --bg-light: #f5f7fa;
    --text-dark: #101828;
    --text-muted: #4A5565;
    --text-muted-2: #6A7282;
    --border-color: #e7eaee;
    --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary-color);
}

/* ---------- Top bar ---------- */
.legal-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.legal-topbar-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.legal-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.legal-brand img {
    height: 36px;
    width: auto;
}

.legal-brand span {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-dark);
}

.legal-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
    text-decoration: none;
    background: white;
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.legal-back:hover {
    color: var(--primary-hover);
    border-color: var(--primary-color);
    background: var(--primary-bg);
}

/* ---------- Hero ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.legal-hero {
    max-width: 1080px;
    margin: 0 auto;
    padding: 56px 24px 8px;
    text-align: center;
    animation: fadeInUp 0.5s ease-out;
}

.legal-hero-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 20px;
    box-shadow: 0 10px 24px rgba(0, 188, 125, 0.28);
}

.legal-hero h1 {
    font-weight: 700;
    font-size: 2.4rem;
    margin: 0 0 10px;
}

.legal-hero p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto;
}

.legal-updated {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--primary-bg);
    color: var(--primary-hover);
    font-size: 0.85rem;
    font-weight: 600;
}

/* ---------- Layout ---------- */
.legal-wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 40px 24px 100px;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
    align-items: start;
}

/* ---------- TOC ---------- */
.legal-toc {
    position: sticky;
    top: 90px;
    background: white;
    border-radius: 18px;
    box-shadow: var(--card-shadow);
    padding: 20px;
    animation: fadeInUp 0.6s ease-out;
}

.legal-toc-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted-2);
    margin: 0 0 12px 8px;
}

.legal-toc a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.15s ease;
}

.legal-toc a:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.legal-toc a.active {
    background: var(--primary-bg);
    color: var(--primary-hover);
}

.legal-toc a i {
    width: 16px;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.8;
}

/* ---------- Content card ---------- */
.legal-card {
    background: white;
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    padding: 8px 40px;
    animation: fadeInUp 0.7s ease-out;
}

.legal-section {
    padding: 32px 0;
    border-bottom: 1px solid var(--border-color);
    scroll-margin-top: 90px;
}

.legal-section:last-child {
    border-bottom: none;
}

.legal-section-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.legal-section-icon {
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: var(--primary-bg);
    color: var(--primary-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.legal-section h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-dark);
}

.legal-section p {
    color: var(--text-muted);
    line-height: 1.75;
    margin: 0 0 12px;
}

.legal-section ul {
    color: var(--text-muted);
    line-height: 1.75;
    margin: 0 0 12px;
    padding-left: 20px;
}

.legal-section li {
    margin-bottom: 6px;
}

.legal-section li strong {
    color: var(--text-dark);
}

.legal-note {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--primary-color);
    border-radius: 12px;
    padding: 14px 18px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.legal-note i {
    color: var(--primary-hover);
    margin-right: 8px;
}

/* ---------- Contact card ---------- */
.legal-contact {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-radius: 18px;
    padding: 24px 28px;
    color: white;
    margin-top: 32px;
    animation: fadeInUp 0.8s ease-out;
}

.legal-contact-text h3 {
    margin: 0 0 4px;
    font-weight: 700;
    font-size: 1.1rem;
}

.legal-contact-text p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.legal-contact-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: var(--primary-hover);
    font-weight: 700;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: transform 0.2s ease;
}

.legal-contact-btn:hover {
    transform: translateY(-2px);
    color: var(--primary-hover);
}

/* ---------- Footer ---------- */
.legal-footer {
    text-align: center;
    color: var(--text-muted-2);
    font-size: 0.85rem;
    padding: 0 24px 48px;
}

.legal-footer a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    margin: 0 8px;
}

.legal-footer a:hover {
    color: var(--primary-hover);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .legal-wrap {
        grid-template-columns: 1fr;
    }

    .legal-toc {
        position: static;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 6px;
        padding: 12px;
    }

    .legal-toc-title {
        display: none;
    }

    .legal-toc a {
        white-space: nowrap;
    }

    .legal-card {
        padding: 8px 22px;
    }

    .legal-hero h1 {
        font-size: 1.8rem;
    }

    .legal-contact {
        flex-direction: column;
        text-align: center;
    }

    .legal-contact-btn {
        margin-left: 0;
    }
}
