/* ============================================
   SERVYLO LEGAL PAGES — v3 (UX/UI Enhanced)
   Prefix: lgl-
   ============================================ */

body { background: #f5f7fb; }

/* ---- Reading progress bar ---- */
.lgl-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 1100;
    background: transparent;
}
.lgl-progress__bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #0243f1, #6366f1);
    border-radius: 0 2px 2px 0;
    transition: width 0.1s linear;
}

/* ---- Hero ---- */
.lgl-hero { padding: 24px 0 0; }
.lgl-hero__inner { max-width: 1280px; margin: 0 auto; padding: 0 clamp(16px, 5vw, 64px); }
.lgl-hero__card {
    background: linear-gradient(135deg, #0243f1 0%, #2563eb 50%, #6366f1 100%);
    border-radius: 20px;
    padding: 44px 48px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px -20px rgba(2,67,241,.3);
}
.lgl-hero__card::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 40%, rgba(255,255,255,.12) 0, transparent 50%),
        radial-gradient(circle at 80% 60%, rgba(255,255,255,.06) 0, transparent 40%);
    pointer-events: none;
}
.lgl-hero__card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255,255,255,.04);
    pointer-events: none;
}

/* Breadcrumb */
.lgl-hero__breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}
.lgl-hero__breadcrumb a {
    color: rgba(255,255,255,.65);
    text-decoration: none;
    transition: color .2s;
}
.lgl-hero__breadcrumb a:hover { color: #fff; }
.lgl-hero__breadcrumb-sep {
    color: rgba(255,255,255,.4);
    font-size: 10px;
    display: flex;
    align-items: center;
}
.lgl-hero__breadcrumb span[aria-current] { color: #fff; }

.lgl-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.18);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 999px;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: .04em;
    position: relative;
    z-index: 1;
}
.lgl-hero__badge i { font-size: 16px; }
.lgl-hero__title {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 10px;
    letter-spacing: -.03em;
    line-height: 1.15;
    position: relative;
    z-index: 1;
}
.lgl-hero__subtitle {
    font-size: 15px;
    color: rgba(255,255,255,.8);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}
.lgl-hero__date {
    font-size: 12.5px;
    color: rgba(255,255,255,.55);
    margin-top: 14px;
    position: relative;
    z-index: 1;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.lgl-hero__date i { font-size: 14px; }

/* ---- Mobile TOC ---- */
.lgl-toc-mobile {
    display: none;
    max-width: 1280px;
    margin: 16px auto 0;
    padding: 0 16px;
}
.lgl-toc-mobile__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    transition: all .2s;
    box-shadow: 0 2px 8px rgba(15,23,42,.06);
}
.lgl-toc-mobile__toggle:hover { border-color: #0243f1; }
.lgl-toc-mobile__toggle-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.lgl-toc-mobile__toggle-left i { font-size: 18px; color: #0243f1; }
.lgl-toc-mobile__chevron {
    font-size: 14px;
    color: #94a3b8;
    transition: transform .25s ease;
}
.lgl-toc-mobile__toggle.open .lgl-toc-mobile__chevron { transform: rotate(180deg); }
.lgl-toc-mobile__list {
    display: none;
    list-style: none;
    padding: 8px 0;
    margin: 8px 0 0;
    background: #fff;
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(15,23,42,.08);
    overflow: hidden;
}
.lgl-toc-mobile__list li a {
    display: block;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    text-decoration: none;
    transition: all .2s;
    border-left: 3px solid transparent;
}
.lgl-toc-mobile__list li a:hover,
.lgl-toc-mobile__list li a.active {
    background: #f0f4ff;
    color: #0243f1;
    border-left-color: #0243f1;
}

/* ---- Layout ---- */
.lgl-content { padding: 28px 0 60px; }
.lgl-content__inner { max-width: 1280px; margin: 0 auto; padding: 0 clamp(16px, 5vw, 64px); }
.lgl-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
}

/* ---- Table of contents (desktop) ---- */
.lgl-toc {
    position: sticky;
    top: 90px;
    align-self: start;
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(15,23,42,.04), 0 8px 24px -12px rgba(15,23,42,.08);
    border: 1px solid rgba(0,0,0,.03);
}
.lgl-toc__title {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    margin: 0 0 16px;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.lgl-toc__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.lgl-toc__list a {
    font-size: 13px;
    color: #475569;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    font-weight: 500;
    transition: all .2s ease;
    border-left: 2px solid transparent;
}
.lgl-toc__num {
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
    min-width: 18px;
    transition: color .2s;
}
.lgl-toc__list a:hover,
.lgl-toc__list a.active {
    background: #f0f4ff;
    color: #0243f1;
    border-left-color: #0243f1;
}
.lgl-toc__list a:hover .lgl-toc__num,
.lgl-toc__list a.active .lgl-toc__num { color: #0243f1; }

/* ---- Content card ---- */
.lgl-content__card {
    background: #fff;
    border-radius: 20px;
    padding: 48px 52px;
    box-shadow: 0 1px 3px rgba(15,23,42,.04), 0 8px 24px -12px rgba(15,23,42,.08);
    border: 1px solid rgba(0,0,0,.03);
}

/* Section blocks with dividers */
.lgl-section {
    padding-bottom: 32px;
    margin-bottom: 32px;
    border-bottom: 1px solid #f1f5f9;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .5s ease, transform .5s ease;
}
.lgl-section--visible {
    opacity: 1;
    transform: translateY(0);
}
.lgl-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.lgl-content__card h2 {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 16px;
    letter-spacing: -.02em;
    scroll-margin-top: 80px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.lgl-content__card h2::before {
    content: '';
    width: 4px;
    height: 24px;
    border-radius: 2px;
    background: linear-gradient(180deg, #0243f1, #6366f1);
    flex-shrink: 0;
}
.lgl-content__card h3 {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 24px 0 8px;
}
.lgl-content__card p {
    font-size: 15px;
    color: #475569;
    line-height: 1.85;
    margin: 0 0 14px;
}
.lgl-content__card p:last-child { margin-bottom: 0; }
.lgl-content__card ul {
    margin: 0 0 14px;
    padding-left: 0;
    list-style: none;
}
.lgl-content__card ul:last-child { margin-bottom: 0; }
.lgl-content__card ul li {
    font-size: 15px;
    color: #475569;
    line-height: 1.85;
    margin-bottom: 10px;
    padding-left: 24px;
    position: relative;
}
.lgl-content__card ul li::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 11px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #0243f1;
}
.lgl-content__card ul li:last-child { margin-bottom: 0; }
.lgl-content__card a {
    color: #0243f1;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid rgba(2,67,241,.2);
    transition: border-color .2s, color .2s;
}
.lgl-content__card a:hover { border-color: #0243f1; color: #0235c9; }
.lgl-content__card strong { color: #0f172a; font-weight: 600; }

/* ---- Back to top ---- */
.lgl-back-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #0243f1;
    color: #fff;
    border: none;
    box-shadow: 0 8px 24px -4px rgba(2,67,241,.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: all .3s ease;
    z-index: 900;
}
.lgl-back-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.lgl-back-top:hover {
    background: #0235c9;
    transform: translateY(-3px);
    box-shadow: 0 12px 32px -4px rgba(2,67,241,.5);
}

/* ---- Responsive ---- */
@media (max-width: 991px) {
    .lgl-layout { grid-template-columns: 1fr; }
    .lgl-toc { display: none; }
    .lgl-toc-mobile { display: block; }
    .lgl-hero__card { padding: 32px 28px; }
}
@media (max-width: 768px) {
    .lgl-hero__title { font-size: 24px; }
    .lgl-hero__subtitle { font-size: 14px; }
    .lgl-hero__inner, .lgl-content__inner { padding: 0 16px; }
    .lgl-content__card { padding: 28px 24px; border-radius: 16px; }
    .lgl-content__card h2 { font-size: 17px; }
    .lgl-content__card p,
    .lgl-content__card ul li { font-size: 14px; line-height: 1.8; }
    .lgl-section { padding-bottom: 24px; margin-bottom: 24px; }
    .lgl-back-top { bottom: 20px; right: 20px; width: 44px; height: 44px; font-size: 18px; }
    .lgl-hero__breadcrumb { font-size: 12px; }
}

/* ---- Print ---- */
@media print {
    .sv-header, .sv-footer, .lgl-toc, .lgl-toc-mobile, .lgl-back-top, .lgl-progress, .sv-skip-link { display: none !important; }
    .lgl-hero__card { background: none !important; box-shadow: none !important; color: #000 !important; padding: 0 !important; }
    .lgl-hero__card * { color: #000 !important; }
    .lgl-hero__badge { border: 1px solid #000; background: none !important; }
    .lgl-content__card { box-shadow: none !important; border: none !important; padding: 0 !important; }
    .lgl-section { opacity: 1 !important; transform: none !important; border-bottom: 1px solid #ddd !important; }
    .lgl-layout { grid-template-columns: 1fr !important; }
    body { background: #fff !important; }
}
