/* ==========================================================================
   BLOG – ta pati kreminė + espreso ruda paletė kaip skaičiuoklėje, Instrument Sans, suapvalintos nuotraukos.
   Viskas scoped po body.theme-blog (įkeliama po warm-theme.css), todėl
   skaičiuoklės ir kitų puslapių dizainas nesikeičia.
   ========================================================================== */

body.theme-blog {
    --bg: #EEE2CE;
    --surface: #FBF6EC;
    --surface-2: #F3E9D6;
    --accent: #3A2116;
    --accent-soft: #E3D0AC;
    --text: #2A2019;
    --muted: #7A6853;
    --line: rgba(58, 33, 22, 0.14);
    --shadow: 0 24px 48px -12px rgba(58, 33, 22, 0.22), 0 2px 6px rgba(58, 33, 22, 0.08);
    --shadow-sm: 0 8px 20px -6px rgba(58, 33, 22, 0.18);
    --font-sans: "Instrument Sans", -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --r: 22px;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
}

body.theme-blog .site-nav { max-width: 1240px; }
body.theme-blog .site-footer { max-width: 1240px; }
body.theme-blog .site-footer__note { color: var(--muted); }

body.theme-blog em { font-style: italic; font-weight: 500; }

/* ---------- Bendri elementai ---------- */

.bl, .bp { max-width: 1240px; margin: 0 auto; padding: 8px 32px 72px; }
/* base.css taiko linijas visoms <section> – blog'e valdome patys */
.bl section, .bp section { border-top: 0; padding-top: 0; margin-top: 0; }

.bl-tag {
    display: flex; align-items: center; gap: 10px;
    margin: 0 0 10px;
    font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
    color: var(--muted);
}
.bl-tag span { font-weight: 500; letter-spacing: .04em; text-transform: none; font-size: 12px; }
.bl-tag span::before { content: ""; display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: currentColor; vertical-align: middle; margin-right: 10px; opacity: .7; }

.bl-link {
    display: inline-block;
    font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    color: var(--accent); text-decoration: none;
    border-bottom: 1px solid currentColor; padding-bottom: 3px;
}
.bl-link:hover { opacity: .7; }

.bl-btn {
    display: inline-block;
    background: var(--accent); color: var(--surface);
    padding: 13px 26px; border-radius: 999px;
    font-size: 14px; font-weight: 600; text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}
.bl-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.bl-btn--block { display: block; text-align: center; margin-top: 16px; }

.bl-card__img svg, .bl-card__img img,
.bl-feat__img svg, .bl-feat__img img,
.bp-cover svg, .bp-cover img,
.bp-promo__img svg, .bp-promo__img img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Blog pagrindinis ---------- */

.bl .bl-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding: 28px 0 32px; }
.bl-hero__title {
    margin: 0;
    font-family: var(--font-sans);
    font-size: clamp(40px, 7vw, 84px);
    font-weight: 500; line-height: .98; letter-spacing: -.02em;
    color: var(--accent);
}
.bl-hero__side { max-width: 280px; padding-bottom: 8px; }
.bl-hero__side p { margin: 0 0 16px; font-size: 14px; line-height: 1.5; color: var(--text); }

.bl-feat {
    position: relative; display: block; text-decoration: none; color: inherit;
    border-radius: var(--r); overflow: hidden;
}
.bl-feat__img { aspect-ratio: 21 / 9; background: var(--surface-2); }
.bl-feat__img svg, .bl-feat__img img { transition: transform .6s ease; }
.bl-feat:hover .bl-feat__img svg, .bl-feat:hover .bl-feat__img img { transform: scale(1.03); }
.bl-feat__card {
    position: absolute; left: 20px; bottom: 20px;
    width: min(440px, calc(100% - 40px));
    background: var(--surface); border-radius: 18px; padding: 24px 26px 22px;
    box-shadow: var(--shadow);
}
.bl-feat__card h2 { margin: 0 0 10px; font-size: 24px; line-height: 1.2; font-weight: 500; letter-spacing: -.01em; color: var(--accent); border: 0; padding: 0; text-transform: none; }
.bl-feat__desc {
    margin: 0 0 16px; font-size: 14px; line-height: 1.55; color: var(--muted);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.bl .bl-sekcija { margin-top: 64px; }
.bl-sekcija__top { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.bl-sekcija__top h2, .bp-related h2, .bl-why h2 {
    margin: 0; font-size: 26px; font-weight: 500; letter-spacing: -.01em; color: var(--accent);
    border: 0; padding: 0; text-transform: none;
}

.bl-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bl-chip {
    font: inherit; font-size: 13px; font-weight: 500;
    padding: 9px 18px; border-radius: 12px; cursor: pointer;
    background: var(--surface-2); color: var(--text); border: 0;
    transition: background .15s ease, color .15s ease;
}
.bl-chip:hover { background: var(--accent-soft); }
.bl-chip.is-active { background: var(--accent); color: var(--surface); }

.bl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 24px; }
.bl-card { display: block; color: inherit; text-decoration: none; }
.bl-card[hidden] { display: none; }
.bl-card__img { aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; background: var(--surface-2); margin-bottom: 16px; }
.bl-card__img svg, .bl-card__img img { transition: transform .5s ease; }
.bl-card:hover .bl-card__img svg, .bl-card:hover .bl-card__img img { transform: scale(1.04); }
.bl-card h3 { margin: 0 0 8px; font-size: 19px; line-height: 1.25; font-weight: 500; letter-spacing: -.005em; color: var(--accent); }
.bl-card__desc {
    margin: 0 0 10px; font-size: 14px; line-height: 1.55; color: var(--muted);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.bl-card__date { margin: 0; font-size: 12px; color: var(--muted); }

.bl .bl-why { margin-top: 72px; padding-top: 40px; border-top: 1px solid var(--line); }
.bl-why__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 24px; }
.bl-why h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; color: var(--accent); }
.bl-why p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted); }

.bl .bl-cta {
    display: flex; align-items: center; justify-content: space-between; gap: 32px;
    margin-top: 72px; padding: 44px 48px;
    background: var(--accent); color: var(--surface); border-radius: 28px;
}
.bl-cta h2 { margin: 0 0 8px; font-size: clamp(24px, 3vw, 34px); font-weight: 500; line-height: 1.15; letter-spacing: -.01em; color: var(--surface); border: 0; padding: 0; text-transform: none; }
.bl-cta p { margin: 0; font-size: 14px; opacity: .8; }
.bl-cta .bl-btn { background: var(--surface); color: var(--accent); white-space: nowrap; flex-shrink: 0; }
.bl-tuscia { padding: 48px 0; color: var(--muted); }

/* ---------- Straipsnis ---------- */

.bp-back {
    display: inline-flex; gap: 8px; align-items: center;
    margin: 12px 0 28px; padding: 8px 14px 8px 12px; border-radius: 999px;
    font-size: 13px; font-weight: 500; color: var(--text); text-decoration: none;
    background: var(--surface-2);
}
.bp-back:hover { background: var(--accent-soft); }

.bp-head { max-width: 860px; }
.bp-head h1 {
    margin: 0 0 14px; font-family: var(--font-sans);
    font-size: clamp(30px, 4.4vw, 48px); line-height: 1.08; font-weight: 500; letter-spacing: -.02em; color: var(--accent);
}
.bp-sub { margin: 0 0 22px; font-size: 17px; line-height: 1.55; color: var(--muted); max-width: 720px; }
.bp-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); max-width: 860px; padding-bottom: 22px; }
.bp-meta__who { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 500; }
.bp-avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--surface); font-size: 14px; font-weight: 600; }

.bp-cover { aspect-ratio: 21 / 9; border-radius: var(--r); overflow: hidden; background: var(--surface-2); margin-bottom: 48px; }
.bp-cover + .bp-caption { margin: -36px 0 36px; }
.bp-caption { margin: 0; font-size: 11px; letter-spacing: .02em; color: var(--muted); }
.bp-caption a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(58, 33, 22, .3); }
.bp-caption a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.bp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 64px; align-items: start; }

.bp-content { font-size: 17px; line-height: 1.75; color: var(--text); max-width: 760px; }
.bp-content > :first-child { margin-top: 0; }
.bp-content p { margin: 0 0 20px; font-size: inherit; line-height: inherit; font-family: inherit; }
.bp-content h2 {
    margin: 52px 0 16px; padding: 0; border: 0; scroll-margin-top: 24px;
    font-family: var(--font-sans); font-size: 28px; line-height: 1.2; font-weight: 500; letter-spacing: -.015em;
    text-transform: none; color: var(--accent);
}
.bp-content h3 { margin: 32px 0 10px; scroll-margin-top: 24px; font-size: 20px; font-weight: 600; color: var(--accent); }
.bp-content ul, .bp-content ol { margin: 0 0 22px; padding-left: 22px; font-size: inherit; line-height: inherit; font-family: inherit; }
.bp-content li { margin-bottom: 8px; }
.bp-content li::marker { color: var(--muted); }
.bp-content a { color: var(--accent); text-decoration-color: rgba(58, 33, 22, .35); text-underline-offset: 3px; }
.bp-content a:hover { text-decoration-color: var(--accent); }
.bp-content strong { color: var(--accent); font-weight: 600; }
.bp-content hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.bp-content blockquote { margin: 28px 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--accent); color: var(--text); font-style: italic; }

.bp-content table {
    display: table; width: 100%;
    margin: 26px 0 30px; border-collapse: separate; border-spacing: 0;
    font-size: 15px; line-height: 1.45; font-family: inherit;
    background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
}
.bp-content th, .bp-content td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.bp-content th { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
.bp-content tr:last-child td { border-bottom: 0; }
.bp-content td:not(:first-child) { font-variant-numeric: tabular-nums; }

.bp .bp-faq { margin-top: 56px; padding-top: 36px; border-top: 1px solid var(--line); max-width: 760px; }
.bp-faq h2 { margin: 0 0 18px; scroll-margin-top: 24px; font-size: 28px; font-weight: 500; letter-spacing: -.015em; color: var(--accent); border: 0; padding: 0; text-transform: none; }
.bp-faq details { background: var(--surface); border-radius: 16px; margin-bottom: 10px; }
.bp-faq summary { cursor: pointer; list-style: none; padding: 18px 54px 18px 22px; font-size: 16px; font-weight: 600; color: var(--accent); position: relative; }
.bp-faq summary::-webkit-details-marker { display: none; }
.bp-faq summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-size: 22px; font-weight: 400; color: var(--muted); transition: transform .2s ease; }
.bp-faq details[open] summary::after { content: "–"; }
.bp-faq details p { margin: 0; padding: 0 22px 20px; font-size: 15px; line-height: 1.65; color: var(--text); }

/* ---------- Dešinė lipni kolona ---------- */

.bp-side { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 16px; max-height: calc(100vh - 48px); overflow-y: auto; scrollbar-width: none; }
.bp-side::-webkit-scrollbar { display: none; }
.bp-box { background: var(--surface); border-radius: 20px; padding: 22px 22px 20px; }
.bp-box__title { margin: 0 0 14px; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

.bp-toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.bp-toc a {
    display: block; padding: 7px 12px; margin-left: -12px; border-radius: 10px;
    font-size: 14px; line-height: 1.35; color: var(--muted); text-decoration: none;
    transition: background .15s ease, color .15s ease;
}
.bp-toc a:hover { color: var(--accent); }
.bp-toc a.is-active { background: var(--surface-2); color: var(--accent); font-weight: 600; }

.bp-share__row { display: flex; gap: 8px; }
.bp-ico {
    display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
    background: var(--surface-2); color: var(--accent); border: 0; cursor: pointer; text-decoration: none;
    transition: background .15s ease, color .15s ease;
}
.bp-ico:hover { background: var(--accent); color: var(--surface); }
.bp-share__ok { margin: 12px 0 0; font-size: 12px; color: var(--accent); font-weight: 500; }

.bp-promo { padding: 12px 12px 22px; background: var(--surface); box-shadow: var(--shadow-sm); }
.bp-promo__img { aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; margin-bottom: 18px; }
.bp-promo .bl-tag, .bp-promo h3, .bp-promo p, .bp-promo .bl-btn { margin-left: 10px; margin-right: 10px; }
.bp-promo h3 { margin-top: 0; margin-bottom: 8px; font-size: 20px; line-height: 1.2; font-weight: 500; letter-spacing: -.01em; color: var(--accent); }
.bp-promo p { margin-bottom: 0; font-size: 14px; line-height: 1.55; color: var(--muted); }
.bp-promo .bl-tag { margin-bottom: 8px; }
.bp-promo .bl-btn--block { margin-top: 16px; }

.bp-toc-m { display: none; background: var(--surface); border-radius: 16px; margin-bottom: 28px; }
.bp-toc-m summary { cursor: pointer; padding: 15px 20px; font-size: 14px; font-weight: 600; color: var(--accent); list-style: none; }
.bp-toc-m summary::-webkit-details-marker { display: none; }
.bp-toc-m summary::after { content: "+"; float: right; font-weight: 400; color: var(--muted); }
.bp-toc-m[open] summary::after { content: "–"; }
.bp-toc-m ol { margin: 0; padding: 0 20px 16px 38px; font-size: 14px; line-height: 1.5; }
.bp-toc-m li { margin-bottom: 6px; }
.bp-toc-m a { color: var(--text); text-decoration: none; }

.bp .bp-related { margin-top: 88px; padding-top: 44px; border-top: 1px solid var(--line); }
.bp-related h2 { margin-bottom: 26px; }

/* ---------- Planšetė ir telefonas ---------- */

@media (max-width: 1060px) {
    .bp-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; }
}

@media (max-width: 860px) {
    .bl, .bp { padding: 4px 18px 56px; }
    .bl .bl-hero { flex-direction: column; align-items: flex-start; gap: 18px; padding: 16px 0 24px; }
    .bl-hero__side { max-width: none; padding-bottom: 0; }
    .bl-feat { background: var(--surface); }
    .bl-feat__img { aspect-ratio: 4 / 3; }
    .bl-feat__card { position: static; width: auto; border-radius: 0; box-shadow: none; padding: 20px 20px 22px; }
    .bl-feat__card h2 { font-size: 21px; }
    .bl-grid { grid-template-columns: 1fr; gap: 32px; }
    .bl-why__row { grid-template-columns: 1fr; gap: 22px; }
    .bl .bl-cta { flex-direction: column; align-items: flex-start; padding: 32px 26px; gap: 22px; }

    .bp-cover { aspect-ratio: 4 / 3; margin-bottom: 28px; }
    .bp-layout { grid-template-columns: minmax(0, 1fr); gap: 36px; }
    .bp-side { position: static; max-height: none; overflow: visible; }
    .bp-content table { display: block; overflow-x: auto; }
    .bp-content th, .bp-content td { white-space: nowrap; }
    .bp-toc { display: none; }
    .bp-toc-m { display: block; }
    .bp-content { font-size: 16px; }
    .bp-content h2 { font-size: 24px; margin-top: 40px; }
    .bp-sub { font-size: 16px; }
}

@media (min-width: 861px) and (max-width: 1060px) {
    .bl-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .bl-feat__img svg, .bl-feat__img img, .bl-card__img svg, .bl-card__img img { transition: none; }
}
