/* Jocuri Olimpice CNOS. Culorile și fonturile preiau variabilele temei Olympic.md, dacă există. */
.cj {
	--cj-head: var(--navy, #0A1A3A);
	--cj-ink: var(--ink, #0E1525);
	--cj-muted: var(--muted, #5B6478);
	--cj-line: var(--line, #E3E6EC);
	--cj-paper: var(--white, #FFFFFF);
	--cj-bg: var(--bg, #F4F5F7);
	--cj-accent: var(--gold, #FFD200);
	--cj-link: var(--blue, #0046AE);
	--cj-display: var(--font-display, inherit);
	font-family: var(--font-body, inherit);
	color: var(--cj-ink);
}
.cj *, .cj *::before, .cj *::after { box-sizing: border-box; }
.cj a { text-decoration: none; }
.cj-wrap { max-width: var(--container, 1280px); margin: 0 auto; padding-left: var(--gutter, 24px); padding-right: var(--gutter, 24px); }

/* Antet */
.cj-head { background: var(--cj-head); color: #fff; }
.cj-head .cj-wrap { padding-top: 48px; padding-bottom: 48px; }
.has-overlay-header .cj-head .cj-wrap { padding-top: 180px; }
.cj-head-grid { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px; }
.cj-head-text { flex: 1 1 480px; min-width: 0; }
.cj-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: rgba(255, 255, 255, .72); margin-bottom: 18px; }
.cj-crumbs a { color: rgba(255, 255, 255, .82); }
.cj-crumbs a:hover { color: #fff; }
.cj-title { margin: 0; font-family: var(--cj-display); font-weight: 900; font-size: clamp(44px, 7vw, 104px); line-height: .9; letter-spacing: -.01em; overflow-wrap: anywhere; }
.cj-lead { margin-top: 16px; max-width: 46em; font-size: 18px; line-height: 1.6; color: rgba(255, 255, 255, .85); }
.cj-lead p { margin: 0; }
.cj-status { display: inline-block; margin: 20px 0 0; font-weight: 700; font-size: 16px; }
.cj-status--viitoare, .cj-status--in-desfasurare { color: var(--cj-accent); }
.cj-status--incheiata { color: rgba(255, 255, 255, .72); font-weight: 500; }
.cj-logo { flex: 0 0 auto; width: 220px; height: 220px; background: #fff; border-radius: 6px; display: flex; align-items: center; justify-content: center; padding: 20px; }
.cj-logo img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }

.cj-tabs { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 32px; border-bottom: 1px solid rgba(255, 255, 255, .25); }
.cj-tabs a { color: rgba(255, 255, 255, .82); font-weight: 500; font-size: 15px; padding: 12px 0; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.cj-tabs a:hover { color: #fff; }
.cj-tabs a[aria-current] { color: #fff; font-weight: 700; border-bottom-color: var(--cj-accent); }
.cj-count { font-variant-numeric: tabular-nums; opacity: .7; font-weight: 400; }

/* Fapte */
.cj-facts { margin: -28px 0 0; position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); background: var(--cj-paper); border: 1px solid var(--cj-line); border-radius: 6px; overflow: hidden; }
.cj-facts > div { padding: 18px 22px; border-right: 1px solid var(--cj-line); }
.cj-facts > div:last-child { border-right: 0; }
.cj-facts dt { font-size: 14px; color: var(--cj-muted); }
.cj-facts dd { margin: 4px 0 0; font-weight: 700; font-size: 19px; }
.cj-facts--inline { margin: 0 0 24px; }

/* Corp */
.cj-body { padding-top: 56px; padding-bottom: 72px; }
.cj-block + .cj-block { margin-top: 56px; }
.cj-h2 { margin: 0 0 20px; font-family: var(--cj-display); font-weight: 800; font-size: clamp(28px, 3vw, 40px); line-height: 1.05; }
.cj-columns { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.cj-main { flex: 999 1 560px; min-width: 0; max-width: 760px; }
.cj-side { flex: 1 1 260px; min-width: 0; max-width: 340px; }
.cj-content { font-size: 18px; line-height: 1.7; }
.cj-content img { max-width: 100%; height: auto; }

.cj-moldova { background: var(--cj-paper); border: 1px solid var(--cj-line); border-radius: 6px; padding: 28px; margin-bottom: 40px; }
.cj-medals { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.cj-medals li { display: flex; align-items: flex-start; gap: 14px; font-size: 17px; }
.cj-medals a { font-weight: 700; color: var(--cj-ink); }
.cj-medals a:hover { color: var(--cj-link); text-decoration: underline; }
.cj-medal-what { display: block; color: var(--cj-muted); font-size: 15px; margin-top: 2px; }

.cj-mascot { margin: 0; background: var(--cj-paper); border: 1px solid var(--cj-line); border-radius: 6px; padding: 20px; }
.cj-mascot img { width: 100%; height: auto; display: block; }
.cj-mascot figcaption { margin-top: 12px; font-size: 15px; color: var(--cj-muted); }

/* Medalii */
.cj-dot { display: inline-block; width: 12px; height: 12px; border-radius: 999px; flex-shrink: 0; vertical-align: middle; }
.cj-dot--lg { width: 22px; height: 22px; margin-top: 1px; }
.cj-dot--gold { background: linear-gradient(135deg, #F6D365, #C9962B); }
.cj-dot--silver { background: linear-gradient(135deg, #EEF1F5, #9AA3AF); }
.cj-dot--bronze { background: linear-gradient(135deg, #E3A574, #A0612F); }
.cj-legend { display: flex; align-items: center; gap: 6px; margin: -8px 0 20px; font-size: 14px; color: var(--cj-muted); }

/* Listă */
.cj-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--cj-line); }
.cj-row a { display: grid; grid-template-columns: 84px 64px minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 14px 8px; border-bottom: 1px solid var(--cj-line); color: var(--cj-ink); transition: background-color .15s; }
.cj-row a:hover { background: var(--cj-paper); }
.cj-row a:hover .cj-row-title { text-decoration: underline; text-underline-offset: 4px; }
.cj-row-year { font-family: var(--cj-display); font-weight: 800; font-size: 28px; font-variant-numeric: tabular-nums; }
.cj-row-logo { width: 64px; height: 48px; display: flex; align-items: center; justify-content: center; }
.cj-row-logo img { max-width: 64px; max-height: 48px; width: auto; height: auto; object-fit: contain; }
.cj-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cj-row-title { font-weight: 700; font-size: 18px; }
.cj-row-meta { font-size: 14px; color: var(--cj-muted); }
.cj-row-medals { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; max-width: 120px; }

/* Următoarele */
.cj-next { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.cj-next a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 22px; background: var(--cj-paper); border: 1px solid var(--cj-line); border-radius: 6px; color: var(--cj-ink); transition: border-color .15s; }
.cj-next a:hover { border-color: var(--cj-ink); }
.cj-next-logo { height: 72px; display: flex; align-items: center; margin-bottom: 8px; }
.cj-next-logo img { max-height: 72px; max-width: 140px; width: auto; height: auto; object-fit: contain; }
.cj-next-when { font-weight: 700; font-size: 14px; color: var(--cj-link); }
.cj-next-title { font-family: var(--cj-display); font-weight: 800; font-size: 28px; line-height: 1.05; }
.cj-next-meta { font-size: 15px; color: var(--cj-muted); }

/* Navigare între ediții */
.cj-pager { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 72px; }
.cj-pager a { display: flex; flex-direction: column; gap: 4px; padding: 18px 22px; border: 1px solid var(--cj-line); border-radius: 6px; background: var(--cj-paper); color: var(--cj-ink); font-weight: 700; font-size: 20px; }
.cj-pager a span { font-weight: 500; font-size: 14px; color: var(--cj-muted); }
.cj-pager a:hover { border-color: var(--cj-ink); }
.cj-pager-next { margin-left: auto; text-align: right; }
.cj-empty { font-size: 18px; color: var(--cj-muted); }

@media (max-width: 700px) {
	.has-overlay-header .cj-head .cj-wrap { padding-top: 150px; }
	.cj-logo { width: 140px; height: 140px; padding: 14px; }
	.cj-facts { margin-top: -20px; }
	.cj-facts > div { border-right: 0; border-bottom: 1px solid var(--cj-line); }
	.cj-row a { grid-template-columns: 60px minmax(0, 1fr) auto; gap: 12px; }
	.cj-row-logo { display: none; }
	.cj-row-year { font-size: 22px; }
	.cj-moldova { padding: 20px; }
	.cj-pager { flex-direction: column; }
	.cj-pager-next { margin-left: 0; text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .cj a { transition: none; } }
