/*
Theme Name: ISJ Botoșani
Description: Temă ușoară pentru Inspectoratul Școlar Județean Botoșani. Fără page builder, un singur fișier CSS, fonturi găzduite local.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: isj
*/

/* ---------- Fonturi (găzduite local, fără Google Fonts) ---------- */
@font-face { font-family: "Atkinson Next"; src: url(assets/fonts/atkinson-latin.woff2) format("woff2"); font-weight: 200 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Atkinson Next"; src: url(assets/fonts/atkinson-ro.woff2) format("woff2"); font-weight: 200 800; font-display: swap; unicode-range: U+0100-0107, U+010C-010D, U+0118-011B, U+0141-0144, U+0150-0151, U+0158-0163, U+016E-0171, U+0179-017E, U+0218-021B; }
@font-face { font-family: "Source Serif"; src: url(assets/fonts/sourceserif-latin.woff2) format("woff2"); font-weight: 200 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Source Serif"; src: url(assets/fonts/sourceserif-ro.woff2) format("woff2"); font-weight: 200 900; font-display: swap; unicode-range: U+0100-0107, U+010C-010D, U+0118-011B, U+0141-0144, U+0150-0151, U+0158-0163, U+016E-0171, U+0179-017E, U+0218-021B; }

/* ---------- Tokeni ---------- */
:root {
	--ink: #13365c;        /* albastru instituțional */
	--ink-deep: #0c2541;
	--ink-soft: #e6edf5;
	--text: #1a2330;
	--muted: #586474;
	--rule: #d8dee5;
	--wash: #f3f5f7;
	--paper: #ffffff;
	--ro-blue: #002b7f;
	--ro-yellow: #fcd116;
	--ro-red: #ce1126;
	--focus: #fcd116;

	--serif: "Source Serif", Georgia, "Times New Roman", serif;
	--sans: "Atkinson Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	--step--1: 0.875rem;
	--step-0: 1.0625rem;
	--step-1: 1.25rem;
	--step-2: 1.5rem;
	--step-3: 2rem;
	--step-4: 2.625rem;

	--wrap: 76rem;
	--gutter: clamp(1rem, 3vw, 2rem);
	--radius: 4px;
}

/* ---------- Bază ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body { margin: 0; background: var(--paper); color: var(--text); font: 400 var(--step-0)/1.6 var(--sans); }
img, svg, video, iframe, object { max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--ro-blue); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 5px var(--ink); border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.2; color: var(--ink-deep); margin: 1.6em 0 0.5em; text-wrap: balance; }
h1 { font-size: var(--step-4); letter-spacing: -0.01em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p, ul, ol, table, figure { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }
.muted { color: var(--muted); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: #fff; padding: 0.6rem 1rem; }
.skip-link:focus { top: 1rem; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 46rem; padding-block: 3rem 4rem; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li + li { margin-top: 0.35rem; }

/* ---------- Antet ---------- */
.tricolor { display: flex; height: 5px; }
.tricolor span { flex: 1; }
.tricolor span:nth-child(1) { background: var(--ro-blue); }
.tricolor span:nth-child(2) { background: var(--ro-yellow); }
.tricolor span:nth-child(3) { background: var(--ro-red); }

.site-header { background: var(--paper); border-bottom: 1px solid var(--rule); }
.header-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.5rem; padding-block: 1rem; }
.brand { display: flex; align-items: center; gap: 0.9rem; text-decoration: none; color: var(--ink-deep); }
.brand-logo { width: 94px; height: auto; }
.brand-name { display: flex; flex-direction: column; font-family: var(--serif); font-weight: 600; font-size: 1.55rem; line-height: 1.1; }
.brand:hover .brand-name { color: var(--ro-blue); }
.gov { justify-self: start; padding-left: 1.5rem; border-left: 1px solid var(--rule); }
.gov img { display: block; width: 138px; }
.header-side { display: flex; flex-direction: column; align-items: flex-end; gap: 0.6rem; }
.header-contact { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.15rem 1rem; font-size: var(--step--1); line-height: 1.5; }
.header-search { display: flex; width: 21rem; }
.header-search input { flex: 1; min-width: 0; padding: 0.5rem 0.7rem; font: inherit; font-size: 0.95rem; border: 1px solid var(--muted); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); }
.header-search button { font: inherit; font-weight: 700; font-size: 0.95rem; border: 0; background: var(--ink); color: #fff; padding: 0.5rem 0.9rem; border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer; }
.header-contact a { color: var(--text); text-decoration: none; }
.header-contact a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Meniu principal ---------- */
.primary-nav { background: var(--ink); color: #fff; }
.nav-inner { display: flex; align-items: center; gap: 0.75rem; min-height: 3.25rem; }
.primary-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; flex: 1; }
.primary-nav .menu > li { position: relative; display: flex; align-items: center; }
.primary-nav .menu > li > a { display: block; padding: 0.95rem 0.8rem; color: #fff; text-decoration: none; font-weight: 600; font-size: 0.97rem; }
.primary-nav .menu > li > a:hover,
.primary-nav .menu > li.current-menu-item > a,
.primary-nav .menu > li.current-menu-ancestor > a,
.primary-nav .menu > li > a[aria-current="page"],
.primary-nav .menu > li:has(.sub-menu a[aria-current="page"]) > a { background: var(--ink-deep); box-shadow: inset 0 -3px 0 var(--ro-yellow); }
.sub-toggle { appearance: none; border: 0; background: transparent; color: #fff; width: 1.75rem; height: 2.25rem; margin-left: -0.6rem; cursor: pointer; }
.sub-toggle::before { content: ""; display: block; width: 0.45rem; height: 0.45rem; margin: auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.primary-nav .sub-menu { list-style: none; margin: 0; padding: 0.4rem 0; position: absolute; top: 100%; left: 0; z-index: 50; min-width: 17rem; max-width: 22rem; background: var(--paper); border: 1px solid var(--rule); border-top: 3px solid var(--ro-yellow); box-shadow: 0 10px 24px rgb(12 37 65 / 0.14); display: none; }
.primary-nav .sub-menu .sub-menu { top: -0.45rem; left: 100%; border-top-width: 1px; }
.primary-nav .sub-menu li { position: relative; }
.primary-nav .sub-menu a { display: block; padding: 0.5rem 1rem; color: var(--text); text-decoration: none; font-size: 0.95rem; line-height: 1.35; }
.primary-nav .sub-menu a:hover { background: var(--ink-soft); color: var(--ink-deep); }
.primary-nav .sub-menu .sub-toggle { display: none; }
@media (hover: hover) and (min-width: 64.01rem) {
	.primary-nav li:hover > .sub-menu { display: block; }
}
.primary-nav li:focus-within > .sub-menu,
.primary-nav li.is-open > .sub-menu { display: block; }

.nav-search { display: none; margin-left: auto; }
.nav-search input { width: 10.5rem; border: 1px solid rgb(255 255 255 / 0.35); border-right: 0; background: rgb(255 255 255 / 0.1); color: #fff; padding: 0.45rem 0.7rem; font: inherit; font-size: 0.95rem; border-radius: var(--radius) 0 0 var(--radius); }
.nav-search input::placeholder { color: rgb(255 255 255 / 0.75); }
.nav-search button { border: 0; background: var(--ro-yellow); color: var(--ink-deep); font: inherit; font-weight: 700; font-size: 0.95rem; padding: 0.45rem 0.8rem; border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer; }
.nav-toggle { display: none; }

/* ---------- Așezare pagini ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 3.5rem; padding-block: 2.5rem 4rem; }
.secondary { min-width: 0; }
.layout--wide { grid-template-columns: minmax(0, 1fr); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-bottom: 2px solid var(--ink); padding-bottom: 0.5rem; margin-bottom: 0.25rem; }
.section-title { margin: 0; font-size: var(--step-4); }
.section-link { font-weight: 600; white-space: nowrap; }
.archive-head { border-bottom: 2px solid var(--ink); padding-bottom: 0.75rem; margin-bottom: 0.25rem; }
.archive-desc { color: var(--muted); margin-top: 0.5rem; }
.archive-desc p:last-child { margin: 0; }

/* ---------- Linkuri „Editează” (doar pentru editori autentificați) ---------- */
.isj-edit { display: inline-flex; align-items: center; gap: 0.35rem; margin: 0.5rem 0; padding: 0.15rem 0.6rem; font-size: 0.8rem; font-weight: 600; color: var(--ink); background: var(--paper); border: 1px dashed var(--ink); border-radius: 99px; text-decoration: none; }
.isj-edit::before { content: "✎"; }
.isj-edit:hover { background: var(--ink-soft); }
.home-buttons + .isj-edit { margin-top: 0.6rem; }

/* ---------- Butoane prima pagină ---------- */
.home-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem; margin-top: 2rem; }
.home-button { position: relative; display: flex; flex-direction: column; gap: 0.3rem; padding: 1.2rem 3.25rem 1.2rem 1.4rem; background: var(--ink); color: #fff; text-decoration: none; border-radius: var(--radius); border-left: 6px solid var(--ro-yellow); }
.home-button::after { content: ""; position: absolute; right: 1.4rem; top: 50%; width: 0.7rem; height: 0.7rem; border-top: 2px solid var(--ro-yellow); border-right: 2px solid var(--ro-yellow); transform: translateY(-50%) rotate(45deg); }
.home-button:hover { background: var(--ink-deep); color: #fff; }
.home-button:hover .home-button-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.home-button-title { font-family: var(--serif); font-size: var(--step-2); font-weight: 600; line-height: 1.2; }
.home-button-desc { font-size: var(--step--1); color: #d3deea; }
.layout--home { padding-top: 2.25rem; }

/* ---------- Registrul de documente (elementul distinctiv) ---------- */
.register { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.reg-item { display: grid; grid-template-columns: 4.75rem minmax(0, 1fr); gap: 1.25rem; align-items: start; padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.reg-date { display: flex; flex-direction: column; align-items: flex-start; border-left: 3px solid var(--ro-yellow); padding-left: 0.65rem; line-height: 1; }
.reg-day { font-family: var(--serif); font-size: 2.1rem; font-weight: 600; color: var(--ink-deep); font-variant-numeric: lining-nums tabular-nums; }
.reg-month { margin-top: 0.3rem; font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.reg-title { display: block; font-size: 1.08rem; font-weight: 600; line-height: 1.4; color: var(--text); text-decoration: none; }
.reg-title:hover { color: var(--ink); text-decoration: underline; }
.reg-title:visited { color: #4a3f6b; }
.reg-meta { display: block; margin-top: 0.25rem; font-size: var(--step--1); color: var(--muted); }
.register--lead .reg-item:first-child .reg-title { font-family: var(--serif); font-size: var(--step-2); line-height: 1.25; font-weight: 600; }
.register--lead .reg-item:first-child .reg-day { font-size: 2.6rem; }
.more { margin-top: 1.5rem; }
.empty { color: var(--muted); padding: 1.5rem 0; }

.button, .entry .isj-btn { display: inline-block; background: var(--ink); color: #fff; text-decoration: none; font-weight: 600; padding: 0.65rem 1.1rem; border-radius: var(--radius); }
.button:hover, .entry .isj-btn:hover { background: var(--ink-deep); color: #fff; }

/* ---------- Titlurile articolelor: afișate cu majuscule ---------- */
/* Doar afișarea; titlurile salvate în WordPress rămân neschimbate. */
.reg-title,
.single-post .article-title,
.post-nav a {
	text-transform: uppercase;
	letter-spacing: 0.015em;
}
.post-nav a span { text-transform: none; letter-spacing: 0; }
.single-post .article-title { font-size: 1.5rem; line-height: 1.3; letter-spacing: 0.01em; max-width: 46rem; }
.reg-title { font-size: 1rem; line-height: 1.45; }
.register--lead .reg-item:first-child .reg-title { font-size: var(--step-1); line-height: 1.3; letter-spacing: 0.01em; }

/* ---------- Coloana laterală ---------- */
.home-notes { margin-bottom: 2rem; }
.home-notes h2, .home-notes h3 { font-size: var(--step-1); margin-top: 0; }
.home-notes .isj-box { background: var(--ink-soft); border-left: 4px solid var(--ro-yellow); padding: 1rem 1.1rem; margin-bottom: 1.25rem; }
.home-notes .isj-box h2, .home-notes .isj-box h3 { font-family: var(--sans); font-size: 1rem; font-weight: 700; line-height: 1.4; margin: 0 0 0.5rem; }
.home-notes .isj-box :last-child { margin-bottom: 0; }
.home-notes figure { margin-bottom: 1rem; }
.home-notes .isj-btn { display: block; text-align: center; margin-bottom: 0.5rem; }

.side-menus { border-top: 2px solid var(--ink); }
.side-menu { border-bottom: 1px solid var(--rule); }
.side-menu summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.85rem 0; font-family: var(--serif); font-size: 1.12rem; font-weight: 600; color: var(--ink-deep); }
.side-menu summary::-webkit-details-marker { display: none; }
.side-menu summary::after { content: ""; flex: none; width: 0.5rem; height: 0.5rem; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); transition: transform 0.15s; }
.side-menu[open] summary::after { transform: rotate(-135deg); }
.side-menu-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.side-menu-list a { display: block; padding: 0.35rem 0; color: var(--text); text-decoration: none; font-size: 0.97rem; line-height: 1.4; }
.side-menu-list a:hover { color: var(--ink); text-decoration: underline; }
.side-menu-list a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.side-menu:has(a[aria-current="page"]) summary { color: var(--ro-blue); }
.side-menu-list .sub-menu { list-style: none; padding-left: 0.9rem; border-left: 1px solid var(--rule); margin: 0.2rem 0 0.4rem; }
.widgets .widget { margin-top: 2rem; }
.widget-title { font-size: var(--step-1); margin: 0 0 0.75rem; }

/* ---------- Articol / pagină ---------- */
.breadcrumb { font-size: var(--step--1); color: var(--muted); margin-bottom: 1rem; }
.article-head { border-bottom: 1px solid var(--rule); padding-bottom: 1.25rem; margin-bottom: 1.75rem; }
.article-cat { display: inline-block; font-size: var(--step--1); font-weight: 700; text-decoration: none; color: var(--ink); background: var(--ink-soft); padding: 0.2rem 0.6rem; border-radius: 99px; margin-bottom: 0.75rem; }
.article-title { margin: 0; font-size: var(--step-4); }
.article-meta { margin: 0.75rem 0 0; color: var(--muted); font-size: var(--step--1); }
.article-image { margin: 0 0 1.75rem; }

.entry { max-width: 46rem; overflow-wrap: anywhere; }
.entry > *:first-child { margin-top: 0; }
.entry h2 { font-size: var(--step-2); }
.entry h3 { font-size: var(--step-1); }
.entry ul, .entry ol { padding-left: 1.4rem; }
.entry li + li { margin-top: 0.3rem; }
.entry img { border-radius: 2px; }
.entry a[href$=".pdf"]::after, .entry a[href$=".PDF"]::after { content: " (PDF)"; font-size: 0.8em; color: var(--muted); }
.entry a[href$=".doc"]::after, .entry a[href$=".docx"]::after { content: " (Word)"; font-size: 0.8em; color: var(--muted); }
.entry a[href$=".xls"]::after, .entry a[href$=".xlsx"]::after { content: " (Excel)"; font-size: 0.8em; color: var(--muted); }
.entry blockquote { margin: 1.5rem 0; padding: 0.25rem 0 0.25rem 1.25rem; border-left: 3px solid var(--ro-yellow); color: var(--muted); }
.entry table { width: 100%; border-collapse: collapse; font-size: 0.95rem; display: block; overflow-x: auto; }
.entry th, .entry td { border: 1px solid var(--rule); padding: 0.5rem 0.65rem; text-align: left; vertical-align: top; }
.entry th { background: var(--wash); font-weight: 700; }
.entry iframe { width: 100%; border: 0; }
.entry .wp-caption, .entry figure { max-width: 100%; }
.entry .wp-caption-text, .entry figcaption { font-size: var(--step--1); color: var(--muted); margin-top: 0.4rem; }
.entry .alignleft { float: left; margin: 0.3rem 1.5rem 1rem 0; }
.entry .alignright { float: right; margin: 0.3rem 0 1rem 1.5rem; }
.entry .aligncenter { display: block; margin-inline: auto; }
.entry .isj-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 2rem; }
.entry ul.isj-links { list-style: none; padding: 0; }
.entry ul.isj-links li { padding: 0.55rem 0; border-bottom: 1px solid var(--rule); margin: 0; }
.entry ul.isj-links a { font-weight: 600; }
.pdf-embed object { width: 100%; height: 80vh; border: 1px solid var(--rule); }
.link-list { list-style: none; padding: 0; border-top: 1px solid var(--rule); }
.link-list li { border-bottom: 1px solid var(--rule); }
.link-list a { display: block; padding: 0.7rem 0; font-weight: 600; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.post-nav a { text-decoration: none; font-weight: 600; line-height: 1.4; }
.post-nav span { display: block; font-weight: 400; font-size: var(--step--1); color: var(--muted); margin-bottom: 0.2rem; }
.post-nav-next { text-align: right; grid-column: 2; }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 1rem 0 0; }
.chips a { display: block; font-size: var(--step--1); padding: 0.3rem 0.75rem; border: 1px solid var(--rule); border-radius: 99px; text-decoration: none; }
.chips a:hover { border-color: var(--ink); }

.pagination ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0; margin: 1.5rem 0 0; }
.pagination a, .pagination span { display: block; min-width: 2.5rem; text-align: center; padding: 0.45rem 0.7rem; border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; }
.pagination .current { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 700; }
.pagination .dots { border: 0; }

.search-form { display: flex; gap: 0.5rem; margin: 1rem 0 2rem; }
.search-form label { flex: 1; }
.search-field { width: 100%; padding: 0.6rem 0.75rem; font: inherit; border: 1px solid var(--muted); border-radius: var(--radius); }
.search-submit { font: inherit; font-weight: 700; border: 0; background: var(--ink); color: #fff; padding: 0.6rem 1rem; border-radius: var(--radius); cursor: pointer; }

/* Formulare Contact Form 7 */
.wpcf7 input:not([type=submit]):not([type=checkbox]):not([type=radio]):not([type=file]), .wpcf7 select, .wpcf7 textarea { width: 100%; padding: 0.6rem 0.75rem; font: inherit; border: 1px solid var(--muted); border-radius: var(--radius); background: #fff; }
.wpcf7 input[type=submit] { font: inherit; font-weight: 700; border: 0; background: var(--ink); color: #fff; padding: 0.7rem 1.3rem; border-radius: var(--radius); cursor: pointer; }

/* ---------- Tipuri de documente (toate articolele) ---------- */
.entry a[href*="drive.google.com/file"]::after, .entry a[href*="docs.google.com"]::after { content: " (Google Drive)"; font-size: 0.8em; color: var(--muted); }
.entry a[href*="drive.google.com/drive/folders"]::after { content: " (dosar Google Drive)"; font-size: 0.8em; color: var(--muted); }
.entry a.no-type::after { content: none; }

/* ---------- Dosar de concurs / pagini cu etape ---------- */
.isj-lead { font-size: var(--step-1); color: var(--muted); margin-bottom: 1.25rem; }
.isj-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin: 0 0 2rem; }
.isj-actions .isj-btn { padding: 0.8rem 1.25rem; font-size: 1.05rem; }
.isj-actions .isj-btn::after { content: none; }

.isj-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0; margin: 0 0 2.25rem; padding: 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.isj-facts div { padding: 0.9rem 1.25rem 0.9rem 0; }
.isj-facts div + div { padding-left: 1.25rem; border-left: 1px solid var(--rule); }
.isj-facts dt { font-size: var(--step--1); color: var(--muted); }
.isj-facts dd { margin: 0.15rem 0 0; font-weight: 700; color: var(--ink-deep); line-height: 1.35; }

.entry ol.isj-steps { list-style: none; counter-reset: step; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; padding: 0; margin: 0 0 2.5rem; }
.isj-steps li { counter-increment: step; position: relative; margin: 0; padding: 0 0.6rem 0 0; }
.isj-steps li::before { content: ""; position: absolute; top: 1.05rem; left: 2.4rem; right: 0.4rem; height: 2px; background: var(--rule); }
.isj-steps li:last-child::before { content: none; }
.isj-steps a { display: block; text-decoration: none; color: var(--text); }
.isj-steps a::before { content: counter(step); display: grid; place-items: center; width: 2.1rem; height: 2.1rem; margin-bottom: 0.55rem; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); font-family: var(--serif); font-weight: 700; position: relative; }
.isj-steps .step-name { display: block; font-weight: 700; line-height: 1.3; font-size: 0.94em; overflow-wrap: normal; }
.isj-steps .step-date { display: block; font-size: var(--step--1); color: var(--muted); margin-top: 0.15rem; }
.isj-steps a:hover .step-name { text-decoration: underline; color: var(--ink); }
.isj-steps li.is-done a::before { background: var(--ink); color: #fff; }
.isj-steps li.is-done::before { background: var(--ink); }
.isj-steps li.is-current a::before { background: var(--ro-yellow); border-color: var(--ro-yellow); color: var(--ink-deep); box-shadow: 0 0 0 4px rgb(252 209 22 / 0.3); }
.isj-steps li.is-current .step-name::after { content: "în desfășurare"; display: block; width: fit-content; margin-top: 0.35rem; font-size: 0.78rem; font-weight: 700; color: var(--ink-deep); background: rgb(252 209 22 / 0.35); padding: 0.1rem 0.5rem; border-radius: 99px; }

.entry .isj-stage { padding: 1.75rem 0 0.75rem; border-top: 1px solid var(--rule); scroll-margin-top: 1rem; }
.entry .isj-stage > h2 { margin-top: 0; }
.entry .isj-stage.is-current { border-top: 3px solid var(--ro-yellow); }
.entry .isj-stage h3 { font-family: var(--sans); font-size: 1rem; font-weight: 700; color: var(--muted); margin: 1.5rem 0 0.4rem; }

.entry ul.isj-docs { list-style: none; padding: 0; margin: 0 0 1rem; }
.entry ul.isj-docs li { margin: 0; padding: 0.6rem 0 0.6rem 1.6rem; border-bottom: 1px solid var(--rule); position: relative; }
.entry ul.isj-docs li::before { content: ""; position: absolute; left: 0.1rem; top: 0.85rem; width: 0.85rem; height: 1.05rem; border: 1.5px solid var(--ink); border-radius: 1px 5px 1px 1px; }
.entry ul.isj-docs li:first-child { border-top: 1px solid var(--rule); }
.entry ul.isj-docs a { font-weight: 600; }

.entry .isj-note { background: var(--ink-soft); border-left: 4px solid var(--ro-yellow); padding: 1rem 1.25rem; margin: 0 0 1.25rem; }
.entry .isj-note p { margin: 0.2rem 0; }

.entry details.isj-more { border: 1px solid var(--rule); border-radius: var(--radius); margin: 1rem 0; }
.entry details.isj-more > summary { cursor: pointer; padding: 0.8rem 1rem; font-weight: 700; color: var(--ink); }
.entry details.isj-more[open] > summary { border-bottom: 1px solid var(--rule); }
.entry details.isj-more > :not(summary) { margin-inline: 1rem; }
.entry details.isj-more > p:first-of-type { margin-top: 0.9rem; }
.entry ol[type="a"] { list-style-type: lower-alpha; }
.entry .isj-cols h3 { margin-top: 0.5rem; }

@media (max-width: 52rem) {
	.entry ol.isj-steps { grid-auto-flow: row; grid-template-columns: 1fr; gap: 0; }
	.isj-steps li { padding: 0 0 1rem 3rem; }
	.isj-steps .step-name { font-size: 1em; }
	.isj-steps li::before { top: 2.3rem; bottom: 0; left: 1.0rem; right: auto; width: 2px; height: auto; }
	.isj-steps a::before { position: absolute; left: 0; top: 0; margin: 0; }
	.isj-steps a { min-height: 2.1rem; padding-top: 0.2rem; }
	.isj-facts div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); }
}

/* ---------- Tabel din Google Sheets ---------- */
.entry:has(.isj-table-wrap), .entry:has(.isjh) { max-width: none; }
.entry:has(.isj-table-wrap) > :not(.isj-table-wrap):not(.isj-table-tools):not(.isjh) { max-width: 46rem; }
.isj-table-tools { display: flex; flex-wrap: wrap; align-items: end; gap: 0.5rem 1.25rem; margin: 1.5rem 0 1rem; }
.isj-table-tools label { flex-basis: 100%; font-weight: 700; font-size: var(--step--1); }
.isj-table-tools input { flex: 1 1 18rem; max-width: 34rem; min-width: 0; padding: 0.65rem 0.8rem; font: inherit; border: 1px solid var(--muted); border-radius: var(--radius); }
.isj-table-count { margin: 0; color: var(--muted); font-size: var(--step--1); padding-bottom: 0.7rem; }
.isj-table-wrap { overflow: auto; max-height: 75vh; border: 1px solid var(--rule); border-radius: var(--radius); }
.isj-table-wrap:focus-visible { outline-offset: 0; }
.entry table.isj-table { display: table; width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.92rem; margin: 0; }
.entry .isj-table th, .entry .isj-table td { overflow-wrap: normal; word-break: normal; border: 0; border-bottom: 1px solid var(--rule); padding: 0.6rem 0.75rem; vertical-align: top; text-align: left; }
.entry .isj-table thead th { position: sticky; top: 0; z-index: 1; background: var(--ink); color: #fff; padding: 0; }
.isj-table thead button { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 0.4rem; width: 100%; padding: 0.7rem 0.75rem; font-weight: 700; line-height: 1.3; cursor: pointer; }
.isj-table thead button::after { content: ""; flex: none; width: 0; height: 0; border: 4px solid transparent; border-top-color: rgb(255 255 255 / 0.45); margin-top: 4px; }
.isj-table th[aria-sort="ascending"] button::after { border-top-color: transparent; border-bottom-color: var(--ro-yellow); margin: 0 0 4px; }
.isj-table th[aria-sort="descending"] button::after { border-top-color: var(--ro-yellow); }
.isj-table thead button:focus-visible { outline: 3px solid var(--ro-yellow); outline-offset: -3px; }
.entry .isj-table tbody tr:nth-child(even) td { background: var(--wash); }
.entry .isj-table tbody tr:hover td { background: var(--ink-soft); }
.entry .isj-table td:first-child { font-weight: 600; color: var(--ink-deep); min-width: 14rem; }
.entry .isj-table td a { overflow-wrap: anywhere; }
.entry .isj-table td a.tel, .entry .isj-table td a.mail { white-space: nowrap; overflow-wrap: normal; }
.entry .isj-table td a.mail { white-space: normal; }
.entry .isj-table a::after { content: none; }
.entry .isj-table tr[hidden] { display: none; }
.isj-table-wrap .empty { padding: 1.5rem 1rem; margin: 0; }
.isj-table-src { margin-top: 0.75rem; font-size: var(--step--1); color: var(--muted); }

/* Ecrane medii: text mai mic, coloane mai înguste */
@media (max-width: 75rem) {
	.entry table.isj-table { font-size: 0.86rem; }
	.entry .isj-table th, .entry .isj-table td { padding: 0.5rem 0.55rem; }
	.isj-table thead button { padding: 0.6rem 0.55rem; }
	.entry .isj-table td:first-child { min-width: 11rem; }
}

/* Telefon / tabletă îngustă: fiecare unitate devine o fișă */
@media (max-width: 52rem) {
	.isj-table-wrap { overflow: visible; max-height: none; border: 0; border-radius: 0; }
	.entry table.isj-table, .entry .isj-table tbody, .entry .isj-table tr, .entry .isj-table td { display: block; width: 100%; }
	.entry .isj-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.entry .isj-table tbody tr { margin: 0 0 0.85rem; padding: 0.9rem 1rem 0.6rem; border: 1px solid var(--rule); border-left: 4px solid var(--ink); border-radius: var(--radius); background: var(--paper); }
	.entry .isj-table tbody tr:nth-child(even) td, .entry .isj-table tbody tr:hover td { background: transparent; }
	.entry .isj-table td { display: grid; grid-template-columns: minmax(6.5rem, 34%) 1fr; gap: 0.75rem; padding: 0.35rem 0; border: 0; min-width: 0; font-size: 0.95rem; }
	.entry .isj-table td::before { content: attr(data-label); color: var(--muted); font-size: 0.82rem; font-weight: 600; line-height: 1.5; }
	.entry .isj-table td:empty { display: none; }
	.entry .isj-table td:first-child { display: block; min-width: 0; padding: 0 0 0.6rem; margin-bottom: 0.35rem; border-bottom: 1px solid var(--rule); font-family: var(--serif); font-size: 1.08rem; line-height: 1.3; }
	.entry .isj-table td:first-child::before { content: none; }
	.entry .isj-table td a.tel { font-weight: 700; }
	.isj-table-tools input { max-width: none; }
}

/* ---------- Subsol ---------- */
.site-footer { background: var(--ink-deep); color: #dfe7f0; font-size: 0.97rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; padding-block: 3rem 2rem; }
.footer-name { font-family: var(--serif); font-size: var(--step-1); font-weight: 600; color: #fff; margin: 0 0 0.75rem; }
.footer-title { font-family: var(--sans); font-size: 1rem; font-weight: 700; color: #fff; margin: 0 0 0.75rem; }
.footer-bottom { border-top: 1px solid rgb(255 255 255 / 0.15); padding-block: 1.25rem; font-size: var(--step--1); color: #b7c4d3; }
.footer-bottom p { margin: 0; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; }
.footer-credit { margin-top: 0.2rem !important; font-size: 0.8rem; color: #8e9db0; }
.site-footer .footer-bottom .isj-edit { margin: 0 auto 0 0; color: var(--ink); }
.login-links { display: flex; align-items: center; gap: 1rem; }
.site-footer .login-btn { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.45rem 0.9rem; border: 1px solid rgb(255 255 255 / 0.35); border-radius: var(--radius); color: #fff; text-decoration: none; font-weight: 700; }
.site-footer .login-btn:hover { background: rgb(255 255 255 / 0.1); border-color: #fff; }
.site-footer .login-out { color: #b7c4d3; }
.login-icon { flex: none; }

/* ---------- Ecrane mici ---------- */
@media (max-width: 64rem) {
	.header-inner { grid-template-columns: 1fr auto; }
	.header-side { display: none; }
	.gov { padding-left: 1rem; }
	.nav-toggle { display: inline-flex; align-items: center; gap: 0.6rem; appearance: none; border: 0; background: transparent; color: #fff; font: inherit; font-weight: 700; padding: 0.85rem 0; cursor: pointer; }
	.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 1.25rem; height: 2px; background: currentColor; position: relative; }
	.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
	.nav-toggle-bars::before { top: -6px; }
	.nav-toggle-bars::after { top: 6px; }
	.nav-inner { flex-wrap: wrap; }
	.primary-nav .menu { display: none; flex-direction: column; flex-basis: 100%; order: 3; padding-bottom: 0.75rem; }
	.primary-nav.is-open .menu { display: flex; }
	.primary-nav .menu > li { flex-wrap: wrap; border-top: 1px solid rgb(255 255 255 / 0.15); }
	.primary-nav .menu > li > a { flex: 1; padding: 0.8rem 0; }
	.sub-toggle { width: 3rem; height: 2.75rem; margin: 0; }
	.primary-nav .sub-menu, .primary-nav .sub-menu .sub-menu { position: static; display: none; flex-basis: 100%; min-width: 0; max-width: none; box-shadow: none; border: 0; background: transparent; padding: 0 0 0.5rem 0.75rem; }
	.primary-nav li:focus-within > .sub-menu { display: none; }
	.primary-nav li.is-open > .sub-menu { display: block; }
	.primary-nav .sub-menu a { color: #e8eef5; padding: 0.45rem 0; }
	.primary-nav .sub-menu a:hover { background: transparent; color: #fff; text-decoration: underline; }
	.nav-search { display: flex; margin-left: auto; }
	.nav-search input { width: 9rem; }
	.layout { grid-template-columns: 1fr; gap: 2.5rem; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 40rem) {
	:root { --step-3: 1.6rem; --step-4: 2rem; }
	.brand-logo { width: 64px; }
	.brand-name { font-size: 1.15rem; }
	.gov { display: none; }
	.nav-search { order: 2; flex-basis: 100%; margin: 0 0 0.75rem; }
	.nav-search input { flex: 1; width: auto; }
	.reg-item { grid-template-columns: 3.5rem minmax(0, 1fr); gap: 0.9rem; }
	.reg-month { white-space: normal; max-width: 3rem; line-height: 1.25; font-size: 0.75rem; }
	.home-buttons { margin-top: 1.25rem; gap: 0.75rem; }
	.home-button { padding: 1rem 3rem 1rem 1.1rem; }
	.home-button-title { font-size: var(--step-1); }
	.reg-day { font-size: 1.7rem; }
	.register--lead .reg-item:first-child .reg-day { font-size: 2rem; }
	.register--lead .reg-item:first-child .reg-title { font-size: 1.08rem; }
	.single-post .article-title { font-size: 1.25rem; }
	.footer-grid { grid-template-columns: 1fr; }
	.post-nav { grid-template-columns: 1fr; }
	.post-nav-next { grid-column: 1; text-align: left; }
	.entry .alignleft, .entry .alignright { float: none; margin: 0 0 1rem; }
}
.to-top { position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: calc(max(1.5rem, env(safe-area-inset-bottom)) + var(--to-top-lift, 0px)); z-index: 90; display: grid; place-items: center; width: 2.9rem; height: 2.9rem; padding: 0; border: 2px solid #fff; border-radius: 50%; background: var(--ink); color: #fff; box-shadow: 0 2px 10px rgb(0 0 0 / 0.25); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(0.75rem); transition: opacity 0.2s, transform 0.2s, visibility 0.2s; }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--ink-deep); }
.to-top:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.to-top[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
	.tricolor, .primary-nav, .secondary, .site-footer, .post-nav, .skip-link, .to-top { display: none !important; }
	.layout { display: block; }
	a { color: #000; }
}
