/* ==========================================================================
   Karia Dashboard - Legal pages (Gizlilik Politikasi / Kullanim Sartlari)
   Bagimsiz dosya: cache-busting icin head.ejs uzerinden ?v= parametresiyle
   yuklenir.
   ========================================================================== */

.legal-page {
    padding: clamp(26px, 4vw, 54px) 0 clamp(56px, 7vw, 90px);
}

.legal-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(26px, 4vw, 44px);
    margin-bottom: clamp(22px, 3vw, 34px);
    border: 1px solid var(--border);
    border-radius: 24px;
    background:
        radial-gradient(640px 260px at 8% 0%, rgba(139, 92, 246, 0.22), transparent 68%),
        radial-gradient(520px 220px at 96% 18%, rgba(34, 211, 238, 0.16), transparent 70%),
        var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.legal-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.55), rgba(34, 211, 238, 0.45), transparent);
}

.legal-hero h1 {
    margin: 14px 0;
    font-size: clamp(2rem, 4.6vw, 3.2rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.legal-lead {
    max-width: 780px;
    margin-bottom: 22px;
    color: var(--muted);
    font-size: clamp(0.98rem, 1.4vw, 1.08rem);
    line-height: 1.7;
}

.legal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.legal-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    border: 1px solid rgba(129, 140, 248, 0.32);
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.14);
    color: #dbeafe;
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.3;
}

.legal-badge.is-accent {
    border-color: rgba(34, 211, 238, 0.3);
    background: rgba(34, 211, 238, 0.1);
    color: #a5f3fc;
}

.legal-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
    opacity: 0.85;
}

.legal-layout {
    display: grid;
    grid-template-columns: 268px minmax(0, 1fr);
    gap: clamp(20px, 3vw, 34px);
    align-items: start;
}

.legal-toc-card {
    position: sticky;
    top: 96px;
    padding: 20px 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.legal-toc-title {
    margin: 0 0 12px;
    color: #a5b4fc;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.legal-toc-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.legal-toc-link {
    display: flex;
    align-items: baseline;
    gap: 9px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.4;
    text-decoration: none;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.legal-toc-link span {
    color: #818cf8;
    font-size: 0.7rem;
    font-variant-numeric: tabular-nums;
}

.legal-toc-link:hover {
    color: #e9d5ff;
    background: rgba(139, 92, 246, 0.1);
}

.legal-toc-link.is-active {
    border-color: rgba(167, 139, 250, 0.35);
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.22), rgba(34, 211, 238, 0.08));
    box-shadow: inset 2px 0 0 #a78bfa;
    color: #f5f3ff;
}

.legal-toc-contact {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.legal-toc-contact p {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 0.8rem;
}

.legal-toc-contact .btn {
    width: 100%;
    justify-content: center;
    font-size: 0.8rem;
}

.legal-content {
    padding: clamp(22px, 3vw, 36px);
    border: 1px solid var(--border);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(18, 24, 40, 0.82), rgba(12, 17, 29, 0.78));
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.legal-section {
    margin-bottom: 26px;
    padding-bottom: 26px;
    border-bottom: 1px solid var(--border);
    scroll-margin-top: 100px;
}

.legal-section:last-of-type {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.legal-section h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 14px;
    color: #f5f3ff;
    font-size: clamp(1.15rem, 1.8vw, 1.38rem);
    letter-spacing: -0.02em;
}

.legal-section-num {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 9px;
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: 11px;
    background: rgba(139, 92, 246, 0.14);
    color: #c4b5fd;
    font-size: 0.78rem;
    font-weight: 800;
}

.legal-section p {
    margin: 0 0 12px;
    color: #c7cede;
    font-size: 0.95rem;
    line-height: 1.75;
}

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

.legal-section ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
}

.legal-section li {
    position: relative;
    padding-left: 24px;
    color: #c7cede;
    font-size: 0.94rem;
    line-height: 1.65;
}

.legal-section li::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 0.62em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a78bfa, #22d3ee);
    box-shadow: 0 0 8px rgba(167, 139, 250, 0.8);
}

.legal-section strong {
    color: #ede9fe;
    font-weight: 700;
}

.legal-section a {
    color: #93c5fd;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.legal-section a:hover {
    color: #bfdbfe;
}

.legal-callout {
    display: flex;
    gap: 14px;
    margin-top: 24px;
    padding: 18px 20px;
    border: 1px solid rgba(139, 92, 246, 0.28);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(34, 211, 238, 0.07));
}

.legal-callout-icon {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: 11px;
    background: rgba(139, 92, 246, 0.16);
    color: #c4b5fd;
}

.legal-callout-icon svg {
    width: 19px;
    height: 19px;
}

.legal-callout strong {
    display: block;
    margin-bottom: 4px;
    color: #f5f3ff;
    font-size: 0.95rem;
}

.legal-callout p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.65;
}

.legal-footer-note {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px dashed var(--border-strong);
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.6;
}

@media (max-width: 980px) {
    .legal-layout {
        grid-template-columns: 1fr;
    }

    .legal-toc-card {
        position: static;
    }

    .legal-toc-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }

    .legal-toc-link {
        padding: 6px 10px;
        border-color: var(--border);
        background: rgba(255, 255, 255, 0.03);
        font-size: 0.78rem;
    }

    .legal-toc-link span {
        display: none;
    }

    .legal-toc-contact {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .legal-toc-contact p {
        margin: 0;
    }

    .legal-toc-contact .btn {
        width: auto;
    }
}

@media (max-width: 620px) {
    .legal-hero {
        border-radius: 20px;
    }

    .legal-content {
        border-radius: 18px;
    }

    .legal-section h2 {
        align-items: flex-start;
    }

    .legal-callout {
        flex-direction: column;
    }
}
