/* ==========================================================================
   Școala Bogdănești — stilurile temei
   ========================================================================== */

:root {
	--sb-primary: #C21F18;
	--sb-primary-dark: #8E140F;
	--sb-primary-bright: #E0362C;
	--sb-accent: #FFC83D;
	--sb-ink: #12141A;
	--sb-ink-2: #2A2D36;
	--sb-bg: #F3F1EC;
	--sb-surface: #FFFFFF;
	--sb-line: #E8E3DA;
	--sb-line-2: #D9D4CA;
	--sb-muted: #555A66;
	--sb-soft: #ECE8E0;
	--sb-on-dark: #E6E7EB;
	--sb-on-dark-muted: #B9BCC6;
	--sb-green-bg: #E9F4EC;
	--sb-green: #1E6B3E;
	--sb-red-bg: #FDE8E6;
	--sb-yellow-bg: #FFF4D6;
	--sb-blue-bg: #E3ECF7;
	--sb-font-display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
	--sb-font-body: 'Figtree', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
	--sb-r-sm: 14px;
	--sb-r: 24px;
	--sb-r-lg: 32px;
	--sb-wrap: 1320px;
	--sb-gutter: 32px;
	--sb-shadow: 0 18px 40px -18px rgba(18, 20, 26, .35);
}

/* Bază ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--sb-bg);
	color: var(--sb-ink);
	font-family: var(--sb-font-body);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--sb-primary); text-underline-offset: 3px; }
a:hover { color: var(--sb-primary-dark); }
h1, h2, h3, h4, h5, h6 { font-family: var(--sb-font-display); font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sb-accent); outline-offset: 3px; border-radius: 6px; }
.sb-main:focus { outline: 0; }
::selection { background: var(--sb-accent); color: var(--sb-ink); }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important;
}
.sb-skip-link:focus {
	clip: auto !important; clip-path: none; height: auto; width: auto; margin: 0;
	left: 16px; top: 16px; z-index: 100000; padding: 12px 18px; background: var(--sb-ink); color: #fff; border-radius: 999px; font-weight: 700; text-decoration: none;
}

.sb-wrap { max-width: var(--sb-wrap); margin-left: auto; margin-right: auto; padding-left: var(--sb-gutter); padding-right: var(--sb-gutter); }
.sb-section { padding-top: 56px; padding-bottom: 72px; }
.sb-h2 { font-size: clamp(32px, 4vw, 46px); }

/* Butoane ---------------------------------------------------------------- */
.sb-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
	font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap;
	transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.sb-btn:hover { transform: translateY(-1px); }
.sb-btn--dark { background: var(--sb-ink); color: #fff; }
.sb-btn--dark:hover { background: var(--sb-ink-2); color: #fff; }
.sb-btn--primary { background: var(--sb-primary); color: #fff; }
.sb-btn--primary:hover { background: var(--sb-primary-dark); color: #fff; }
.sb-btn--accent { background: var(--sb-accent); color: var(--sb-ink); }
.sb-btn--accent:hover { color: var(--sb-ink); filter: brightness(.95); }
.sb-btn--ghost { background: transparent; border-color: var(--sb-line-2); color: var(--sb-ink); }
.sb-btn--ghost:hover { background: var(--sb-soft); color: var(--sb-ink); }

.sb-iconbtn {
	width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--sb-line-2); background: var(--sb-surface);
	display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--sb-ink); flex-shrink: 0;
}
.sb-iconbtn:hover, .sb-iconbtn[aria-expanded="true"] { background: var(--sb-ink); color: #fff; border-color: var(--sb-ink); }

.sb-chip {
	display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 12px;
	border: 1px solid var(--sb-line-2); background: var(--sb-bg); font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; color: var(--sb-ink);
}
.sb-chip:hover { background: var(--sb-soft); color: var(--sb-ink); }
.sb-chip[aria-pressed="true"] { background: var(--sb-ink); color: #fff; border-color: var(--sb-ink); }
.sb-chip--ghost { background: transparent; }

.sb-badge {
	display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; background: var(--sb-red-bg);
	color: var(--sb-primary-dark); font-size: 12.5px; font-weight: 800; text-decoration: none; letter-spacing: .01em;
}
.sb-badge--pin { background: var(--sb-ink); color: var(--sb-accent); }
.sb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--sb-muted); font-size: 14px; font-weight: 600; }

/* Antet ------------------------------------------------------------------ */
.sb-header { position: relative; z-index: 50; background: var(--sb-bg); }
.sb-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; padding-top: 18px; padding-bottom: 14px; }
.sb-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--sb-ink); min-width: 0; }
.sb-brand:hover { color: var(--sb-ink); }
.sb-brand__mark { width: 48px; height: 48px; border-radius: 14px; background: var(--sb-ink); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sb-brand__logo { width: auto; max-height: 52px; }
.sb-brand__text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.sb-brand__name { font-family: var(--sb-font-display); font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.sb-brand__tag { font-size: 13px; color: var(--sb-muted); font-weight: 600; }

.sb-nav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.sb-nav__list a { display: block; color: var(--sb-ink); text-decoration: none; font-weight: 600; font-size: 15px; padding: 10px 12px; border-radius: 999px; }
.sb-nav__list a:hover, .sb-nav__list .current-menu-item > a, .sb-nav__list .current_page_item > a { background: var(--sb-soft); color: var(--sb-ink); }
.sb-nav__list li { position: relative; }
.sb-nav__list .sub-menu {
	list-style: none; margin: 0; padding: 8px; position: absolute; left: 0; top: 100%; min-width: 240px; background: var(--sb-surface);
	border: 1px solid var(--sb-line); border-radius: 18px; box-shadow: var(--sb-shadow); opacity: 0; visibility: hidden; transform: translateY(6px);
	transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.sb-nav__list li:hover > .sub-menu, .sb-nav__list li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.sb-nav__list .sub-menu a { border-radius: 12px; }
.sb-nav__catalog { display: none; }

.sb-header__actions { display: flex; align-items: center; gap: 8px; }
.sb-menu-toggle { display: none; }
.sb-menu-toggle__close { display: none; }
.sb-menu-toggle[aria-expanded="true"] .sb-menu-toggle__open { display: none; }
.sb-menu-toggle[aria-expanded="true"] .sb-menu-toggle__close { display: inline-flex; }

.sb-panel { padding-bottom: 14px; }
.sb-a11y { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--sb-surface); border: 1px solid var(--sb-line-2); border-radius: 18px; padding: 10px 14px; }
.sb-a11y__label { font-weight: 800; margin-right: 6px; font-size: 14px; }

.sb-searchform { display: flex; align-items: center; gap: 10px; background: var(--sb-surface); border: 1px solid var(--sb-line-2); border-radius: 999px; padding: 6px 6px 6px 18px; }
.sb-searchform .sb-icon { color: var(--sb-muted); flex-shrink: 0; }
.sb-searchform__input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; height: 44px; font-size: 16px; }

@media (max-width: 1180px) {
	.sb-menu-toggle { display: inline-flex; }
	.sb-header__catalog { display: none; }
	.sb-nav {
		display: none; position: absolute; left: 16px; right: 16px; top: 100%; background: var(--sb-surface); border-radius: var(--sb-r);
		box-shadow: var(--sb-shadow); padding: 12px; border: 1px solid var(--sb-line);
	}
	.sb-nav.is-open { display: block; }
	.sb-nav__list { flex-direction: column; align-items: stretch; }
	.sb-nav__list a { padding: 14px 16px; font-size: 17px; border-radius: 14px; }
	.sb-nav__list .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 16px; }
	.sb-nav__catalog { display: flex; margin: 10px 4px 4px; }
}
@media (max-width: 520px) {
	.sb-brand__tag { display: none; }
	.sb-brand__name { font-size: 17px; }
	.sb-brand__mark { width: 42px; height: 42px; }
}

/* Antetul paginilor interioare ------------------------------------------ */
.sb-page-header { padding: 40px 0 8px; }
.sb-breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--sb-muted); font-weight: 600; margin-bottom: 14px; }
.sb-breadcrumb a { color: var(--sb-muted); }
.sb-breadcrumb a:hover { color: var(--sb-ink); }
.sb-page-header__title { font-size: clamp(38px, 6vw, 64px); line-height: 1; margin: 0 0 12px; }
.sb-page-header__sub { font-size: 18px; color: var(--sb-muted); max-width: 720px; margin: 0; }

/* Liste de articole ---------------------------------------------------- */
.sb-post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.sb-post-card { background: var(--sb-surface); border: 1px solid var(--sb-line); border-radius: var(--sb-r); overflow: hidden; display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s ease; }
.sb-post-card:hover { transform: translateY(-4px); box-shadow: var(--sb-shadow); }
.sb-post-card__media { display: block; aspect-ratio: 16 / 10; background: var(--sb-soft); overflow: hidden; }
.sb-post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.sb-post-card__placeholder { height: 100%; display: flex; align-items: center; justify-content: center; }
.sb-post-card__body { padding: 20px 22px 24px; }
.sb-post-card__title { font-size: 22px; margin: 10px 0 8px; }
.sb-post-card__title a { color: var(--sb-ink); text-decoration: none; }
.sb-post-card__title a:hover { color: var(--sb-primary); }
.sb-post-card__excerpt { color: var(--sb-muted); font-size: 15.5px; margin: 0; }

.nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 40px; }
.nav-links .page-numbers { min-width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--sb-surface); border: 1px solid var(--sb-line); color: var(--sb-ink); text-decoration: none; font-weight: 700; padding: 0 12px; }
.nav-links .page-numbers.current { background: var(--sb-ink); color: #fff; border-color: var(--sb-ink); }

.sb-empty, .sb-404 { max-width: 640px; margin: 0 auto; text-align: center; padding: 40px 0; }
.sb-404__code { font-family: var(--sb-font-display); font-size: clamp(96px, 18vw, 180px); font-weight: 800; line-height: .9; color: var(--sb-primary); letter-spacing: -0.05em; }
.sb-404 .sb-searchform { margin: 24px 0; }

.sb-search-again { max-width: 640px; margin-bottom: 28px; }
.sb-results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.sb-results__item { background: var(--sb-surface); border: 1px solid var(--sb-line); border-radius: var(--sb-r-sm); padding: 18px 22px; }
.sb-results__title { display: block; font-family: var(--sb-font-display); font-size: 21px; font-weight: 800; color: var(--sb-ink); text-decoration: none; margin: 8px 0 4px; }
.sb-results__item p { margin: 0; color: var(--sb-muted); }

/* Articol ---------------------------------------------------------------- */
.sb-article__header { padding-top: 40px; padding-bottom: 24px; max-width: 980px; }
.sb-article__title { font-size: clamp(36px, 5.4vw, 60px); line-height: 1.02; margin: 14px 0 14px; }
.sb-article__lead { font-size: 20px; color: var(--sb-muted); margin: 0; }
.sb-article__media img { width: 100%; border-radius: var(--sb-r-lg); aspect-ratio: 16 / 8; object-fit: cover; }
.sb-article__content { max-width: 760px; margin: 40px auto 0; }
.sb-article__footer { max-width: 760px; margin: 32px auto 0; padding-top: 24px; border-top: 1px solid var(--sb-line); display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
.sb-share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-weight: 700; font-size: 14px; }
.sb-tags a { display: inline-block; margin: 0 6px 6px 0; padding: 4px 12px; border-radius: 999px; background: var(--sb-soft); color: var(--sb-ink); text-decoration: none; font-size: 14px; font-weight: 600; }
.post-navigation { max-width: 760px; margin: 40px auto 0; }
.post-navigation .nav-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; justify-content: stretch; margin: 0; }
.post-navigation a { display: block; background: var(--sb-surface); border: 1px solid var(--sb-line); border-radius: var(--sb-r-sm); padding: 16px 18px; text-decoration: none; color: var(--sb-ink); }
.sb-postnav__label { display: block; font-size: 13px; color: var(--sb-muted); font-weight: 700; }
.sb-postnav__title { display: block; font-weight: 800; }
.sb-related { padding-top: 64px; }

/* Conținut editorial ---------------------------------------------------- */
.sb-prose { max-width: 760px; font-size: 18px; }
.sb-prose > * + * { margin-top: 1.1em; }
.sb-prose h2 { font-size: 32px; margin-top: 1.6em; }
.sb-prose h3 { font-size: 24px; margin-top: 1.4em; }
.sb-prose ul, .sb-prose ol { padding-left: 1.3em; }
.sb-prose li + li { margin-top: .35em; }
.sb-prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--sb-accent); font-family: var(--sb-font-display); font-size: 24px; font-weight: 700; line-height: 1.3; }
.sb-prose img, .sb-prose figure img { border-radius: var(--sb-r-sm); }
.sb-prose table { width: 100%; border-collapse: collapse; font-size: 16px; display: block; overflow-x: auto; }
.sb-prose th, .sb-prose td { border-bottom: 1px solid var(--sb-line); padding: 10px 12px; text-align: left; }
.sb-prose th { background: var(--sb-soft); }
.sb-prose .wp-block-file { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; background: var(--sb-surface); border: 1px solid var(--sb-line); border-radius: var(--sb-r-sm); padding: 14px 16px; }
.sb-prose .wp-block-file__button { background: var(--sb-ink); color: #fff; border-radius: 999px; padding: 8px 16px; text-decoration: none; font-weight: 700; }
.sb-featured img { border-radius: var(--sb-r); margin-bottom: 24px; }

/* Document individual --------------------------------------------------- */
.sb-doc-single { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.sb-doc-single .sb-prose { flex: 999 1 480px; }
.sb-doc-single__card { flex: 1 1 280px; background: var(--sb-surface); border: 1px solid var(--sb-line); border-radius: var(--sb-r); padding: 24px; }
.sb-doc-single__card dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 16px 0 20px; font-size: 15px; }
.sb-doc-single__card dt { font-weight: 800; }
.sb-doc-single__card dd { margin: 0; color: var(--sb-muted); }
.sb-doc-type { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; height: 30px; padding: 0 10px; border-radius: 8px; background: var(--sb-primary); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.sb-doc-type--doc, .sb-doc-type--docx, .sb-doc-type--odt { background: #1E6B3E; }
.sb-doc-type--xls, .sb-doc-type--xlsx, .sb-doc-type--ods { background: #1F5FA8; }

/* Comentarii ------------------------------------------------------------- */
.sb-comments { max-width: 760px; margin: 48px auto 0; }

/* Subsol ----------------------------------------------------------------- */
.sb-footer { padding: 0 16px 16px; }
.sb-footer__box { max-width: 1408px; margin: 0 auto; background: var(--sb-ink); color: var(--sb-on-dark-muted); border-radius: var(--sb-r-lg); padding: 48px 56px 28px; font-size: 15px; }
.sb-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; }
.sb-footer__about { grid-column: span 1; }
.sb-footer__name { font-family: var(--sb-font-display); font-size: 22px; font-weight: 800; color: #fff; line-height: 1.15; margin-bottom: 10px; letter-spacing: -0.02em; }
.sb-footer__contact { list-style: none; padding: 0; margin: 14px 0; display: flex; flex-direction: column; gap: 8px; }
.sb-footer__contact a { display: inline-flex; align-items: center; gap: 10px; color: var(--sb-on-dark); text-decoration: none; }
.sb-footer__contact a:hover { color: #fff; text-decoration: underline; }
.sb-footer__note { font-size: 13.5px; }
.sb-footer__title { color: #fff; font-weight: 800; margin-bottom: 10px; }
.sb-footer__menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.sb-footer__menu a { color: var(--sb-on-dark-muted); text-decoration: none; }
.sb-footer__menu a:hover { color: #fff; text-decoration: underline; }
.sb-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--sb-ink-2); font-size: 13.5px; }
.sb-footer a:focus-visible { outline-color: var(--sb-accent); }

.sb-to-top {
	position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 48px; height: 48px; border-radius: 999px; border: 0;
	background: var(--sb-ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--sb-shadow);
}
.sb-to-top[hidden] { display: none; }

@media (max-width: 720px) {
	:root { --sb-gutter: 16px; }
	body { font-size: 16px; }
	.sb-footer__box { padding: 36px 24px 22px; border-radius: var(--sb-r); }
	.sb-section { padding-top: 40px; padding-bottom: 56px; }
}

/* Accesibilitate (clase puse de bara de accesibilitate) ------------------ */
html.sb-fs-110 body { zoom: 1.1; }
html.sb-fs-120 body { zoom: 1.2; }
html.sb-fs-130 body { zoom: 1.3; }
html.sb-fs-90 body { zoom: .9; }
html.sb-contrast { filter: contrast(1.35); }
html.sb-gray { filter: grayscale(1); }
html.sb-contrast.sb-gray { filter: contrast(1.35) grayscale(1); }
html.sb-contrast a { text-decoration: underline; }
html.sb-no-motion *, html.sb-no-motion *::before, html.sb-no-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Elementor: secțiunile widgeturilor școlii ocupă toată lățimea ---------- */
.elementor-section.sb-row > .elementor-container { max-width: var(--sb-wrap); padding-left: var(--sb-gutter); padding-right: var(--sb-gutter); box-sizing: border-box; }

/* Tipărire -------------------------------------------------------------- */
@media print {
	.sb-header, .sb-footer, .sb-to-top, .sb-share, .post-navigation, .sb-related { display: none !important; }
	body { background: #fff; color: #000; font-size: 12pt; }
	a { color: #000; }
	.sb-prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 10pt; }
}

/* Text din Elementor (widgetul „Editor de text”) în rândurile temei */
.elementor-section.sb-row .elementor-widget-text-editor { font-size: 18px; max-width: 760px; }
.elementor-section.sb-row .elementor-widget-text-editor h2 { font-size: 28px; margin: 1.4em 0 .4em; }
.elementor-section.sb-row .elementor-widget-text-editor h2:first-child { margin-top: 0; }
.elementor-section.sb-row { padding-top: 24px; padding-bottom: 40px; }
