/* Blog layout shared by blog/index.html and every article (AVRI blog pattern, see avri-core docs/BLOG.md).
   Brand: only the variables in :root change between projects. */
:root {
  --canvas: #F9FAF4; --band: #F1F2EA; --card: #FFFFFF; --ink: #161513; --soft: #635E57;
  --accent: #11774C; --accent-dark: #0B5C3A; --terra: #D95D39; --line: #E7E3DC;
  --cover: linear-gradient(135deg, #11774C 0%, #0B5C3A 55%, #D95D39 140%);
  --font: "Geist", system-ui, sans-serif; --font-title: "Geist", system-ui, sans-serif;
  --r-lg: 16px; --r-md: 12px; --r-sm: 8px; --stick: 24px;
  --ease: 350ms cubic-bezier(.4, 0, .2, 1);
}
* { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 17px/1.65 var(--font); }
a { color: var(--accent); }
img { max-width: 100%; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }
.hidden { display: none !important; }

/* header / footer */
header.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; }
header.top img { height: 34px; width: auto; display: block; }
.hr { display: flex; align-items: center; gap: 14px; }
.hr .links { display: flex; gap: 14px; }
.hr .links a { font-weight: 600; font-size: 15px; color: var(--ink); text-decoration: none; }
.menu { position: relative; display: none; }
.menu summary { cursor: pointer; list-style: none; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary i, .menu summary i::before, .menu summary i::after { display: block; width: 16px; height: 2px; background: var(--ink); border-radius: 2px; content: ""; }
.menu summary i { position: relative; }
.menu summary i::before { position: absolute; top: -5px; } .menu summary i::after { position: absolute; top: 5px; }
.menu[open] summary i { background: transparent; } .menu[open] summary i::before { top: 0; transform: rotate(45deg); } .menu[open] summary i::after { top: 0; transform: rotate(-45deg); }
.menu nav { position: absolute; right: 0; top: calc(100% + 6px); z-index: 6; display: grid; min-width: 220px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px -12px rgba(22,21,19,.2); }
.menu nav a { padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.menu nav a:hover { background: var(--canvas); }
@media (max-width: 640px) { .hr .links { display: none; } .menu { display: block; } }
.lang { position: relative; }
.lang summary { cursor: pointer; list-style: none; font-weight: 600; font-size: 14px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.lang summary::-webkit-details-marker { display: none; }
.lang nav { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; display: grid; min-width: 180px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px -12px rgba(22,21,19,.2); }
.lang nav a { display: flex; gap: 10px; padding: 6px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 14px; }
.lang nav a:hover, .lang nav a[aria-current] { background: var(--canvas); }
.lang nav b { width: 22px; color: var(--accent); }
footer.bottom { border-top: 1px solid var(--line); padding: 24px 0 48px; color: var(--soft); font-size: 14px; }
footer.bottom p { margin: 0 0 8px; max-width: 80ch; }
footer.bottom nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; }
footer.bottom nav a { color: var(--soft); }

/* shared bits */
.crumbs { font-size: 13px; color: var(--soft); margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; text-transform: uppercase; letter-spacing: .08em; }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 8px; opacity: .5; }
.crumbs a { color: var(--soft); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current] { color: var(--ink); font-weight: 700; }
.cat { display: inline-block; position: relative; padding-bottom: 6px; margin-bottom: 12px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.cat::after { content: ""; position: absolute; left: 0; bottom: 0; width: 20px; height: 2px; background: var(--terra); }
.meta { font-size: 13px; color: var(--soft); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 600; text-decoration: none; }
.cover { position: relative; overflow: hidden; background: var(--cover); }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 600ms cubic-bezier(.4, 0, .2, 1); }
.cover--brand::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% 20%, rgba(255,255,255,.22) 0 12%, transparent 13%), radial-gradient(circle at 78% 80%, rgba(255,255,255,.12) 0 22%, transparent 23%), repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 2px, transparent 2px 22px); }

/* ---------------- blog index ---------------- */
.b-head { text-align: center; max-width: 720px; margin: 0 auto; padding: clamp(24px, 5vw, 48px) 0 28px; }
.b-head .crumbs { justify-content: center; margin-bottom: 20px; }
.over { color: var(--terra); font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.b-head h1 { font-family: var(--font-title); font-size: clamp(2rem, 1.4rem + 2.4vw, 2.75rem); line-height: 1.15; letter-spacing: -.03em; margin: 10px 0 14px; }
.b-head p { color: var(--soft); margin: 0; }

.hero { display: grid; grid-template-columns: 1.5fr 1fr; grid-template-rows: 300px 300px; gap: 24px; padding: 8px 0 60px; }
.hero[data-count="1"] { grid-template-columns: 1fr; grid-template-rows: 460px; }
.hero[data-count="2"] .h-card:nth-child(2) { grid-row: 1 / -1; }
.h-card { position: relative; display: flex; flex-direction: column; justify-content: flex-end; padding: 30px; border-radius: var(--r-md); overflow: hidden; color: #fff; text-decoration: none; border: 1px solid rgba(0,0,0,.05); transition: transform var(--ease), box-shadow var(--ease); }
.h-card--main { grid-row: 1 / -1; padding: 40px; }
.h-card .cover { position: absolute; inset: 0; }
.h-card .cover::after, .tile .cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,10,10,.88) 0%, rgba(10,10,10,.25) 65%, rgba(10,10,10,.05) 100%); }
.h-card > div:last-child { position: relative; z-index: 1; }
.h-card .cat::after, .tile .cat::after { background: #fff; }
.h-card h2 { font-family: var(--font-title); font-size: 22px; line-height: 1.25; letter-spacing: -.01em; margin: 0; }
.h-card--main h2 { font-size: clamp(24px, 1.2rem + 1.2vw, 32px); }
.h-card p { margin: 10px 0 0; font-size: 15px; color: #E9ECE6; max-width: 60ch; }
.h-card .meta, .tile .meta { color: #E5E7EB; margin-top: 10px; }
.h-card:hover, .h-card:focus-visible { transform: translateY(-2px); box-shadow: 0 15px 35px rgba(0,0,0,.12); }
.h-card:hover .cover img, .tile:hover .cover img { transform: scale(1.04); }

.picks { background: var(--band); border-block: 1px solid var(--line); padding: 72px 0; }
.sec-title { display: flex; align-items: center; justify-content: center; margin: 0 0 44px; font-family: var(--font-title); font-size: 26px; letter-spacing: -.02em; }
.sec-title::before, .sec-title::after { content: ""; flex: 1; max-width: 350px; height: 1px; background: var(--line); }
.sec-title::before { margin-right: 24px; } .sec-title::after { margin-left: 24px; }
.p-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.p-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease); }
.p-card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: 0 15px 35px rgba(0,0,0,.08); }
.p-card .cover { display: block; height: 200px; border-radius: var(--r-md); border: 1px solid var(--line); margin-bottom: 20px; }
.p-card:hover .cover img { transform: scale(1.06); }
.p-card .t { font-family: var(--font-title); font-size: 20px; font-weight: 700; line-height: 1.35; color: var(--ink); text-decoration: none; margin-bottom: 10px; }
.p-card .t:hover { color: var(--accent); }
.p-card p { color: var(--soft); font-size: 15px; line-height: 1.6; margin: 0 0 16px; flex-grow: 1; }
.more-link { display: inline-flex; gap: 6px; margin-top: 12px; color: var(--accent); font-weight: 700; font-size: 15px; text-decoration: none; }
.more-link span { transition: transform 300ms ease; }
.more-link:hover span { transform: translateX(4px); }

.rest { padding: 72px 0; }
.filter { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin: 0 0 32px; }
.t-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.tile a { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 240px; padding: 26px; border-radius: var(--r-md); overflow: hidden; color: #fff; text-decoration: none; border: 1px solid var(--line); transition: box-shadow var(--ease), border-color var(--ease); }
.tile .cover { position: absolute; inset: 0; }
.tile a > div:last-child { position: relative; z-index: 1; }
.tile h3 { font-family: var(--font-title); font-size: 20px; line-height: 1.35; margin: 0; }
.tile a:hover { border-color: var(--accent); box-shadow: 0 15px 35px rgba(0,0,0,.08); }
.t-grid .is-dup { display: none; }
.filtering .hero, .filtering .picks { display: none; }
.filtering .t-grid .is-dup { display: block; }
.filtering .t-grid .is-out { display: none; }
.empty { color: var(--soft); text-align: center; }

/* ---------------- article ---------------- */
.a-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 50px; align-items: start; padding: 8px 0 64px; }
.a-main { min-width: 0; }
.a-main > .crumbs { margin: 0 0 20px; }
.a-cover { aspect-ratio: 16 / 9; max-height: 500px; width: 100%; border-radius: var(--r-md); border: 1px solid var(--line); box-shadow: 0 8px 28px rgba(0,0,0,.05); margin: 0 0 28px; }
.a-cover:hover img { transform: scale(1.02); }
.a-main h1 { font-family: var(--font-title); font-size: clamp(28px, 1.2rem + 1.6vw, 40px); line-height: 1.2; letter-spacing: -.03em; margin: 0 0 14px; }
.a-lead { color: var(--soft); font-size: 1.1rem; margin: 0 0 18px; }
.a-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-bottom: 18px; margin-bottom: 32px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--soft); }
.a-meta span { display: inline-flex; align-items: center; gap: 6px; }
.a-meta svg { width: 15px; height: 15px; flex: none; color: var(--accent); }
.a-meta a { color: var(--accent); text-decoration: none; font-weight: 600; }
.read-in { display: flex; align-items: center; gap: 10px; margin: -14px 0 28px; font-size: 14px; color: var(--soft); }
.lang--read summary::after { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 0 3px 8px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.lang--read nav { left: 0; right: auto; }
.toc-m { display: none; }
article { font-size: 17px; line-height: 1.8; }
article p { margin: 0 0 22px; }
article h2 { font-family: var(--font-title); font-size: 24px; line-height: 1.3; letter-spacing: -.02em; margin: 40px 0 14px; padding-left: 12px; border-left: 3px solid var(--terra); }
article h3 { font-size: 19px; line-height: 1.35; margin: 30px 0 10px; }
article ul, article ol { padding-left: 1.3em; margin: 0 0 22px; }
article li { margin-bottom: 8px; }
article strong { color: var(--ink); }
article blockquote { margin: 28px 0; padding: 20px 24px; border-left: 4px solid var(--accent); background: var(--card); border-radius: 0 var(--r-sm) var(--r-sm) 0; box-shadow: 0 4px 16px rgba(0,0,0,.04); }
article blockquote p { margin: 0; font-style: italic; color: var(--soft); }
article code { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: .92em; }
.table { overflow-x: auto; margin: 0 0 24px; }
table { border-collapse: collapse; width: 100%; background: #fff; border: 1px solid var(--line); font-size: 15px; line-height: 1.55; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; background: var(--canvas); }
article .cta { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--r-lg); padding: 20px 22px; margin: 32px 0; }
article .cta h2 { margin: 0 0 6px; padding: 0; border: 0; font-size: 1.2rem; }
article .cta p { color: var(--soft); margin: 0 0 14px; }
.related { margin-top: 56px; }
.related .sec-title { justify-content: flex-start; font-size: 22px; margin-bottom: 24px; }
.related .sec-title::before { display: none; }
.related .t-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }

/* sticky sidebar + reusable boxes */
.side { align-self: stretch; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
/* cuprinsul e ultimul în sidebar și rămâne vizibil cât citești */
.side .toc { position: sticky; top: var(--stick); max-height: calc(100vh - var(--stick) - 16px); overflow-y: auto; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; transition: border-color 300ms ease, box-shadow 300ms ease; }
.box:hover { border-color: var(--accent); box-shadow: 0 6px 24px rgba(0,0,0,.05); }
.box-b { padding: 20px 22px; }
.box-t { display: block; margin: 0 0 16px; padding-bottom: 6px; border-bottom: 2px solid var(--accent); font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; font-size: 14px; line-height: 1.45; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 10px; padding: 6px 8px; margin: 0 -8px; border-radius: 6px; color: var(--soft); text-decoration: none; }
.toc a::before { content: counter(toc, decimal-leading-zero); color: var(--terra); font-weight: 700; font-size: 12px; padding-top: 1px; }
.toc a:hover { color: var(--ink); background: var(--canvas); }
.toc a[aria-current] { color: var(--ink); font-weight: 600; background: var(--band); }
.ep { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.ep li + li { padding-top: 16px; border-top: 1px solid var(--line); }
.ep a { display: flex; gap: 14px; align-items: center; color: inherit; text-decoration: none; }
.ep .cover { width: 72px; height: 72px; flex: none; border-radius: 6px; border: 1px solid var(--line); }
.ep b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 1.4; transition: color 200ms ease; }
.ep small { display: block; margin-top: 4px; font-size: 12px; color: var(--soft); }
.ep a:hover b { color: var(--accent); }
.ep a:hover img { transform: scale(1.08); }
.box--cta { position: relative; background: linear-gradient(135deg, #fff 0%, var(--canvas) 100%); border: 1px dashed rgba(17,119,76,.4); }
.badge { display: inline-block; margin-bottom: 12px; padding: 3px 8px; border-radius: 4px; border: 1px solid rgba(17,119,76,.25); background: rgba(17,119,76,.08); color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.box h3 { font-size: 17px; line-height: 1.3; margin: 0 0 8px; }
.box p { font-size: 14px; line-height: 1.55; color: var(--soft); margin: 0 0 16px; }
.btn--block { display: flex; width: 100%; }
.btn--accent { background: var(--accent); box-shadow: 0 4px 14px rgba(17,119,76,.2); transition: background 250ms ease, transform 250ms ease; }
.btn--accent:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn--line { background: transparent; color: var(--ink); border: 1px solid var(--line); min-height: 40px; font-size: 14px; }
.btn--line:hover { border-color: var(--accent); background: var(--canvas); }
.video { position: relative; display: block; width: 100%; height: 170px; padding: 0; border: 0; cursor: pointer; text-align: left; color: #fff; background: #000; font: inherit; }
.video .cover { position: absolute; inset: 0; }
.video .cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.78) 0%, rgba(0,0,0,.15) 60%); }
.video .play { position: absolute; left: 50%; top: 38%; z-index: 1; translate: -50% -50%; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--terra); box-shadow: 0 4px 14px rgba(0,0,0,.3); transition: transform 300ms ease, background 300ms ease; }
.video .play svg { width: 16px; height: 16px; margin-left: 2px; }
.video:hover .play { transform: scale(1.12); background: #fff; color: var(--ink); }
.video .vi { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 1; }
.video .vi b { display: block; font-size: 14px; line-height: 1.3; }
.video .vi small { font-size: 12px; color: #D6DAD3; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-block; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--canvas); color: var(--soft); font-size: 13px; text-decoration: none; transition: all 220ms ease; }
.tag:hover, .tag[aria-current] { background: var(--accent); border-color: var(--accent); color: #fff; }

@media (max-width: 991px) {
  .a-grid { grid-template-columns: 1fr; gap: 40px; }
  .side { position: static; }
  .side .toc { display: none; }
  .toc-m { display: block; margin: 0 0 28px; }
  .toc-m summary { cursor: pointer; font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
  .toc-m ol { margin-top: 12px; }
  .hero, .hero[data-count] { grid-template-columns: 1fr; grid-template-rows: none; }
  .h-card, .hero[data-count="2"] .h-card:nth-child(2) { grid-row: auto; min-height: 280px; }
  .h-card--main { min-height: 400px; }
  .p-grid, .t-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .p-grid, .t-grid, .related .t-grid { grid-template-columns: 1fr; }
  .h-card, .h-card--main { padding: 24px; }
  .h-card--main { min-height: 340px; }
  .sec-title::before, .sec-title::after { max-width: 60px; }
  .picks, .rest { padding: 48px 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
