/* ===== Legal pages (Privacy, Terms, Security) — shared theme ===== */
:root {
    --legal-bg: #020617;
    --legal-surface: #0b1120;
    --legal-card: rgba(15, 23, 42, 0.7);
    --legal-border: rgba(148, 163, 184, 0.18);
    --legal-text: #e2e8f0;
    --legal-muted: rgba(148, 163, 184, 0.85);
    --legal-blue: #60a5fa;
    --legal-purple: #c4b5fd;
}

.legal-hero {
    position: relative;
    overflow: hidden;
    padding: 6rem 1.5rem 4.5rem;
    background:
        radial-gradient(circle at 15% 20%, rgba(59, 130, 246, 0.35) 0%, transparent 45%),
        radial-gradient(circle at 85% 30%, rgba(124, 58, 237, 0.30) 0%, transparent 50%),
        linear-gradient(140deg, #020617 0%, #0b1120 50%, #1e1b4b 100%);
    color: #f8fafc;
    text-align: center;
}
.legal-hero::before {
    content: '';
    position: absolute; inset: 0;
    background:
        linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(circle at center, black 35%, transparent 80%);
    pointer-events: none;
}
.legal-hero-inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }
.legal-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 1.1rem; border-radius: 999px;
    background: rgba(59, 130, 246, 0.16);
    border: 1px solid rgba(96, 165, 250, 0.4);
    color: #bfdbfe;
    font-size: 0.82rem; font-weight: 600;
    backdrop-filter: blur(10px);
    margin-bottom: 1.25rem;
}
.legal-hero h1 {
    font-size: clamp(2.2rem, 4.5vw, 3.6rem);
    font-weight: 900; line-height: 1.08;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
}
.legal-hero h1 .grad {
    background: linear-gradient(135deg, #60a5fa, #a78bfa, #f0abfc);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.legal-hero p {
    font-size: 1.05rem;
    color: rgba(226, 232, 240, 0.78);
    max-width: 580px; margin: 0 auto;
}
.legal-meta {
    margin-top: 1.5rem;
    font-size: 0.82rem;
    color: rgba(148, 163, 184, 0.65);
    display: flex; justify-content: center; gap: 1.2rem; flex-wrap: wrap;
}
.legal-meta i { margin-right: 0.35rem; color: #60a5fa; }

/* Body */
.legal-body { background: linear-gradient(180deg, #020617 0%, #0b1120 100%); padding: 4rem 1.5rem 6rem; }
.legal-wrap {
    max-width: 880px; margin: 0 auto;
    display: grid; gap: 1.5rem;
    grid-template-columns: 220px 1fr;
}
@media (max-width: 880px) { .legal-wrap { grid-template-columns: 1fr; } }

.legal-toc {
    position: sticky; top: 1.5rem;
    align-self: start;
    background: var(--legal-card);
    border: 1px solid var(--legal-border);
    border-radius: 14px;
    padding: 1.1rem 1rem;
    backdrop-filter: blur(14px);
}
.legal-toc h3 {
    color: #f1f5f9; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
    font-weight: 700; margin-bottom: 0.85rem;
}
.legal-toc a {
    display: block; padding: 0.5rem 0.65rem; border-radius: 8px;
    color: var(--legal-muted); font-size: 0.86rem; text-decoration: none;
    transition: all 0.18s ease;
}
.legal-toc a:hover {
    background: rgba(59, 130, 246, 0.12);
    color: #c7d2fe;
    transform: translateX(2px);
}
.legal-content {
    background: var(--legal-card);
    border: 1px solid var(--legal-border);
    border-radius: 16px;
    padding: 2.25rem 2.25rem 2.5rem;
    backdrop-filter: blur(14px);
    color: var(--legal-text);
    line-height: 1.72;
    font-size: 0.96rem;
}
@media (max-width: 880px) { .legal-content { padding: 1.5rem 1.4rem 2rem; } }

.legal-content h2 {
    color: #f1f5f9; font-size: 1.45rem; font-weight: 800;
    margin: 2.25rem 0 0.9rem; letter-spacing: -0.015em;
    padding-bottom: 0.5rem; border-bottom: 1px solid var(--legal-border);
    scroll-margin-top: 1.5rem;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 {
    color: #cbd5e1; font-size: 1.08rem; font-weight: 700;
    margin: 1.5rem 0 0.55rem;
}
.legal-content p { margin-bottom: 1rem; color: rgba(226, 232, 240, 0.88); }
.legal-content ul { margin: 0 0 1rem 1.2rem; }
.legal-content li { margin-bottom: 0.4rem; color: rgba(226, 232, 240, 0.85); }
.legal-content a { color: #93c5fd; text-decoration: none; border-bottom: 1px dashed rgba(147, 197, 253, 0.4); }
.legal-content a:hover { color: #c7d2fe; border-bottom-color: #c7d2fe; }
.legal-content strong { color: #f1f5f9; }
.legal-content code {
    background: rgba(15, 23, 42, 0.6);
    padding: 0.15rem 0.45rem;
    border-radius: 5px;
    border: 1px solid var(--legal-border);
    font-size: 0.88em;
    color: #fcd34d;
}

.legal-notice {
    margin-top: 1rem;
    padding: 1rem 1.15rem;
    background: rgba(234, 179, 8, 0.08);
    border: 1px solid rgba(234, 179, 8, 0.35);
    border-radius: 12px;
    color: #fde68a;
    font-size: 0.9rem;
    display: flex; gap: 0.7rem; align-items: flex-start;
}
.legal-notice i { color: #fbbf24; font-size: 1.1rem; margin-top: 0.15rem; }

.legal-cta {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(124, 58, 237, 0.15));
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 14px;
    text-align: center;
}
.legal-cta h3 { color: #f1f5f9; font-size: 1.15rem; font-weight: 700; margin-bottom: 0.5rem; }
.legal-cta p { color: rgba(226, 232, 240, 0.8); margin-bottom: 1rem; font-size: 0.92rem; }
.legal-cta .btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff; text-decoration: none; border-radius: 999px;
    font-weight: 600; font-size: 0.92rem;
    transition: transform 0.2s ease;
    border: 0;
}
.legal-cta .btn:hover { transform: translateY(-2px); }
/* NOTE: navbar/dropdown/mobile-menu styles are in style.css + detail-page.css */
/* ============================================================
   (Duplicate navbar block removed — handled by shared CSS)
   ============================================================ */

/* Top utility strip */
.topbar {
    background: #0f172a;
    color: rgba(226, 232, 240, 0.78);
    font-size: 0.78rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
    position: sticky;
    top: 0;
    z-index: 2001;
}
.topbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.topbar a, .topbar span {
    color: rgba(226, 232, 240, 0.78);
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}
.topbar a:hover { color: #60a5fa; }
.topbar-left, .topbar-right {
    display: flex;
    gap: 1.4rem;
    flex-wrap: wrap;
}
.topbar i { font-size: 0.8rem; opacity: 0.85; }

/* Make navbar account for topbar */
body:has(.topbar) .navbar { top: 32px; }

/* === Dropdown mega-menus === */
.nav-menu .has-dropdown {
    position: relative;
}
.nav-menu .has-dropdown > .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.dropdown-arrow {
    font-size: 0.62rem !important;
    opacity: 0.55;
    transition: transform 0.25s ease, opacity 0.25s ease;
    margin-left: 0.1rem;
}
.has-dropdown:hover .dropdown-arrow,
.has-dropdown:focus-within .dropdown-arrow {
    transform: rotate(180deg);
    opacity: 1;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 16px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    min-width: 320px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
    backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(59, 130, 246, 0.18);
    border-radius: 16px;
    padding: 0.6rem;
    box-shadow:
        0 24px 48px -12px rgba(15, 23, 42, 0.18),
        0 8px 16px -4px rgba(15, 23, 42, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0.22s;
    z-index: 2000;
}
.dropdown-menu.wide {
    min-width: 520px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.has-dropdown:hover > .dropdown-menu,
.has-dropdown:focus-within > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
    transition-delay: 0s;
}

/* Bridge the 16px gap so the dropdown stays open while moving the cursor */
.dropdown-menu::before {
    content: "";
    position: absolute;
    top: -16px;
    left: 0;
    right: 0;
    height: 16px;
}

.dropdown-item {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 0.7rem 0.85rem;
    border-radius: 12px;
    text-decoration: none;
    color: #334155;
    transition: background 0.18s, transform 0.18s;
    line-height: 1.35;
}
.dropdown-item:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(139, 92, 246, 0.06));
    transform: translateX(2px);
}
.dropdown-item .di-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(139, 92, 246, 0.10));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    flex-shrink: 0;
    font-size: 0.95rem;
}
.dropdown-item:hover .di-icon {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
}
.dropdown-item .di-text strong,
.dropdown-item .di-text .di-title {
    display: block;
    font-weight: 700;
    font-size: 0.92rem;
    color: #0f172a;
    margin-bottom: 0.1rem;
}
.dropdown-item .di-text small {
    color: #64748b;
    font-size: 0.78rem;
}

/* === Primary CTA button on the right === */
.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.62rem 1.15rem;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 50%, #7c3aed 100%);
    color: #ffffff !important;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none;
    box-shadow: 0 8px 18px -6px rgba(99, 102, 241, 0.55);
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    margin-left: 0.5rem;
}
.nav-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
    opacity: 0;
    transition: opacity 0.25s;
}
.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px -8px rgba(99, 102, 241, 0.7);
    filter: brightness(1.06);
}
.nav-cta:hover::before { opacity: 1; }
.nav-cta i { font-size: 0.78rem; transition: transform 0.2s; }
.nav-cta:hover i { transform: translateX(3px); }

/* === Hide topbar + dropdowns below 1024px (mobile drawer takes over) === */
@media (max-width: 1024px) {
    .topbar { display: none; }
    body:has(.topbar) .navbar { top: 0; }
    .nav-cta { display: none; }
    .dropdown-menu { display: none !important; }
}

/* On the smaller-laptop breakpoint, allow the menu to be a touch tighter */
@media (min-width: 1025px) and (max-width: 1280px) {
    .nav-menu { gap: 0.18rem; }
    .nav-link { padding: 0.6rem 0.78rem !important; font-size: 0.82rem !important; }
    .nav-cta { padding: 0.55rem 1rem; font-size: 0.8rem; }
}

