/**
 * Pagina "Resurse" - stiluri specifice (enqueue doar pe aceasta pagina).
 * Design tokens aliniate cu tema Perpetuum (verde brand #6cbe45).
 */

.resurse {
	--res-accent: #6cbe45;
	--res-accent-dark: #4f9c2c;
	--res-text: #28292c;
	--res-muted: #52555a;
	--res-surface: #f7f8f8;
	--res-border: #e7e9ea;
	--res-radius: 12px;
	--res-container: 1240px;
	color: var(--res-text);
}

.res-container { max-width: var(--res-container); margin: 0 auto; padding: 0 24px; }
.res-container--narrow { max-width: 820px; }

.res-eyebrow {
	display: block;
	font-family: "Josefin Sans", sans-serif;
	text-transform: uppercase;
	letter-spacing: 2px;
	font-weight: 800;
	font-size: 13px;
	color: var(--res-accent);
	margin: 0 0 12px;
}

.res-title {
	font-size: clamp(26px, 3.2vw, 38px);
	font-weight: 800;
	line-height: 1.2;
	margin: 0;
	padding-left: 16px;
	border-left: 3px solid var(--res-accent);
}

.res-section { padding: clamp(48px, 6vw, 80px) 0; }
.res-section--alt { background: var(--res-surface); }
.res-head { max-width: 720px; margin-bottom: 40px; }

/* Ascuns vizual, disponibil pentru screen-reader */
.res-sr-only {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0,0,0,0);
	white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- 1. HERO */
.res-hero {
	position: relative;
	padding: clamp(40px, 5vw, 72px) 0 0;
	background: linear-gradient(120deg, #f4f6f5 0%, #eef1ef 60%, #e7ebe8 100%);
	border-bottom: 1px solid var(--res-border);
}
/* Fotografia banner (placeholder): pe desktop stă în dreapta, textul rămâne lizibil stânga */
.res-hero.has-bg {
	background-size: cover;
	background-position: right center;
	background-repeat: no-repeat;
}
.res-hero__overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
	/* văl deschis dinspre stânga -> lizibilitate text peste foto */
	background: linear-gradient(90deg, rgba(244,246,245,.96) 0%, rgba(244,246,245,.85) 38%, rgba(244,246,245,.35) 60%, rgba(244,246,245,0) 78%);
}
.res-hero__inner { position: relative; z-index: 1; }
.res-hero__content { max-width: 620px; }

.res-eyebrow--rule::after {
	content: "";
	display: block;
	width: 44px;
	height: 3px;
	margin-top: 10px;
	background: var(--res-accent);
	border-radius: 2px;
}
.res-hero__title { font-size: clamp(34px, 5vw, 60px); font-weight: 800; line-height: 1.05; margin: 14px 0 18px; letter-spacing: -.5px; }
.res-hero__desc { font-size: clamp(16px, 1.8vw, 19px); line-height: 1.6; color: var(--res-muted); margin: 0 0 26px; }

/* Bară căutare + filtre */
.res-herobar {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0 0 26px;
	max-width: 620px;
}
.res-herobar__search {
	position: relative;
	flex: 1 1 260px;
	min-width: 220px;
}
.res-herobar__icon {
	position: absolute;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	color: #9aa0a4;
	font-size: 15px;
	pointer-events: none;
}
.res-herobar__input {
	width: 100%;
	box-sizing: border-box;
	padding: 14px 16px;
	font: inherit;
	font-size: 15px;
	color: var(--res-text);
	background: #fff;
	border: 1px solid var(--res-border);
	border-radius: 10px;
	box-shadow: 0 4px 14px rgba(40,41,44,.06);
	transition: border-color .2s ease, box-shadow .2s ease;
}
.res-herobar__input:focus {
	outline: none;
	border-color: var(--res-accent);
	box-shadow: 0 0 0 3px rgba(108,190,69,.18);
}
.res-herobar__field { flex: 0 1 auto; }
.res-select {
	font: inherit;
	font-size: 14px;
	color: var(--res-text);
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2352555a' d='M6 8 0 2 1.4.6 6 5.2 10.6.6 12 2z'/%3E%3C/svg%3E") no-repeat right 14px center;
	padding: 14px 38px 14px 16px;
	border: 1px solid var(--res-border);
	border-radius: 10px;
	box-shadow: 0 4px 14px rgba(40,41,44,.06);
	cursor: pointer;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	min-width: 160px;
}
.res-select:focus-visible { outline: 3px solid var(--res-accent); outline-offset: 2px; }

/* Puncte de încredere */
.res-features {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 26px 40px;
	padding-bottom: clamp(90px, 9vw, 130px); /* loc pentru bara de tipuri suprapusă */
}
.res-feature { display: flex; align-items: flex-start; gap: 12px; max-width: 220px; }
.res-feature__icon {
	flex: none;
	width: 38px; height: 38px;
	display: flex; align-items: center; justify-content: center;
	color: var(--res-accent-dark);
	font-size: 17px;
}
.res-feature__text { font-size: 14px; line-height: 1.35; color: var(--res-muted); }
.res-feature__text strong { display: block; color: var(--res-text); font-weight: 800; }

/* Bară tipuri document (card alb suprapus peste baza hero-ului) */
.res-typebar-wrap {
	position: relative;
	z-index: 2;
	margin-top: clamp(-70px, -6vw, -90px);
	margin-bottom: -28px; /* iese ușor sub hero */
}
.res-typebar {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	background: #fff;
	border: 1px solid var(--res-border);
	border-radius: 14px;
	box-shadow: 0 18px 40px rgba(40,41,44,.10);
	overflow: hidden;
}
.res-typebtn {
	font: inherit;
	cursor: pointer;
	background: none;
	border: 0;
	border-left: 1px solid var(--res-border);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 22px 10px;
	color: var(--res-muted);
	transition: background .18s ease, color .18s ease;
}
.res-typebar .res-typebtn:first-child { border-left: 0; }
.res-typebtn__icon { font-size: 22px; color: #59606a; transition: color .18s ease; }
.res-typebtn__label { font-size: 12px; font-weight: 700; letter-spacing: .4px; }
.res-typebtn:hover { background: var(--res-surface); color: var(--res-text); }
.res-typebtn:hover .res-typebtn__icon { color: var(--res-accent-dark); }
.res-typebtn.is-active { color: var(--res-accent-dark); background: rgba(108,190,69,.08); box-shadow: inset 0 -3px 0 var(--res-accent); }
.res-typebtn.is-active .res-typebtn__icon { color: var(--res-accent); }
.res-typebtn:focus-visible { outline: 3px solid var(--res-accent); outline-offset: -3px; }

/* ------------------------------------------------------------- 2. TOOLBAR */
.res-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 20px;
	margin-bottom: 32px;
}
.res-reset {
	font: inherit;
	cursor: pointer;
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 600;
	color: var(--res-text);
	background: #fff;
	border: 1px solid var(--res-border);
	border-radius: var(--res-radius);
	transition: border-color .2s ease, color .2s ease;
}
.res-reset:hover { border-color: var(--res-accent); color: var(--res-accent-dark); }
.res-reset:focus-visible { outline: 3px solid var(--res-accent); outline-offset: 2px; }
.res-count { margin: 0 auto 0 0; font-size: 14px; font-weight: 700; color: var(--res-muted); }

/* ---------------------------------------------------------------- GRID + CARD */
.res-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}
.res-grid--featured { margin-top: 4px; }

.res-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--res-border);
	border-radius: var(--res-radius);
	overflow: hidden;
	transition: transform .22s ease, box-shadow .22s ease;
}
.res-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(40,41,44,.10); }

.res-card__cover {
	position: relative;
	aspect-ratio: 16 / 10;
	background: var(--res-surface);
}
.res-card__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Copertă cu logo de brand: necropat, centrat pe alb */
.res-card__cover--logo { background: #fff; border-bottom: 1px solid var(--res-border); }
.res-card__cover--logo img { object-fit: contain; padding: 28px 32px; box-sizing: border-box; }
.res-card__ph {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: "Josefin Sans", sans-serif;
	font-weight: 800;
	font-size: 15px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--res-accent-dark);
	background:
		repeating-linear-gradient(45deg, rgba(108,190,69,.06) 0 10px, transparent 10px 20px),
		var(--res-surface);
}

/* Badge tip document - text + culoare (nu doar culoare) */
.res-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 5px 10px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .3px;
	color: #fff;
	background: var(--res-text);
	border-radius: 6px;
}
.res-badge--catalog      { background: #4f9c2c; }
.res-badge--brosura      { background: #2f7fb8; }
.res-badge--fisa-tehnica { background: #52555a; }
.res-badge--certificat   { background: #b8862f; }
.res-badge--ghid         { background: #7a52b8; }
.res-badge--articol      { background: #b84f6c; }
.res-badge--noutate      { background: #2fb89a; }

.res-card__body { display: flex; flex-direction: column; flex: 1; padding: 20px; }
.res-card__division { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--res-accent-dark); margin-bottom: 8px; }
.res-card__title { font-size: 18px; font-weight: 800; line-height: 1.3; margin: 0 0 8px; }
.res-card__desc { font-size: 14px; line-height: 1.6; color: var(--res-muted); margin: 0 0 16px; }

.res-meta { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-bottom: 16px; }
.res-meta__item {
	font-size: 12px;
	font-weight: 600;
	color: var(--res-muted);
	background: var(--res-surface);
	border: 1px solid var(--res-border);
	padding: 3px 9px;
	border-radius: 6px;
}

.res-btn {
	margin-top: auto;
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 700;
	color: #fff;
	background: var(--res-accent);
	border-radius: var(--res-radius);
	text-decoration: none;
	transition: filter .22s ease, transform .22s ease;
}
.res-btn:hover { color: #fff; filter: brightness(.94); }
.res-btn:focus-visible { outline: 3px solid var(--res-accent-dark); outline-offset: 2px; }
.res-btn__arrow { transition: transform .22s ease; }
.res-btn:hover .res-btn__arrow { transform: translateX(3px); }

.res-card[hidden] { display: none; }
.res-empty {
	margin: 8px 0 0;
	padding: 40px 20px;
	text-align: center;
	font-size: 16px;
	color: var(--res-muted);
	background: #fff;
	border: 1px dashed var(--res-border);
	border-radius: var(--res-radius);
}

/* ------------------------------------------------------- 5. DUPĂ DIVIZIE */
.res-divisions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.res-division-card {
	display: flex;
	flex-direction: column;
	padding: 28px 24px;
	background: #fff;
	border: 1px solid var(--res-border);
	border-radius: var(--res-radius);
	text-decoration: none;
	color: var(--res-text);
	transition: transform .22s ease, box-shadow .22s ease;
}
.res-division-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(40,41,44,.10); color: var(--res-text); }
.res-division-card:focus-visible { outline: 3px solid var(--res-accent); outline-offset: 2px; }
.res-division-card__name { font-size: 20px; font-weight: 800; margin: 0 0 10px; }
.res-division-card__desc { font-size: 14px; line-height: 1.6; color: var(--res-muted); margin: 0 0 16px; flex: 1; }
.res-division-card__count { font-size: 13px; font-weight: 700; color: var(--res-accent-dark); margin-bottom: 6px; }
.res-division-card__link { font-size: 14px; font-weight: 700; color: var(--res-text); }

/* ------------------------------------------------------- 6. ARTICOLE */
.res-articles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.res-article {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--res-border);
	border-radius: var(--res-radius);
	overflow: hidden;
	transition: transform .22s ease, box-shadow .22s ease;
}
.res-article:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(40,41,44,.10); }
.res-article__media { display: block; aspect-ratio: 16 / 9; background: var(--res-surface); }
.res-article__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.res-article__ph { display: block; width: 100%; height: 100%; background: repeating-linear-gradient(45deg, rgba(40,41,44,.04) 0 10px, transparent 10px 20px), var(--res-surface); }
.res-article__body { padding: 20px; }
.res-article__meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 10px; font-size: 12px; font-weight: 700; }
.res-article__cat { color: var(--res-accent-dark); text-transform: uppercase; letter-spacing: .4px; }
.res-article__date { color: var(--res-muted); }
.res-article__title { font-size: 18px; font-weight: 800; line-height: 1.3; margin: 0 0 8px; }
.res-article__title a { color: var(--res-text); text-decoration: none; }
.res-article__title a:hover { color: var(--res-accent-dark); }
.res-article__excerpt { font-size: 14px; line-height: 1.6; color: var(--res-muted); margin: 0; }

/* --------------------------------------------------------------- 7. FAQ */
.res-faq { display: flex; flex-direction: column; gap: 12px; }
.res-faq__item {
	background: #fff;
	border: 1px solid var(--res-border);
	border-radius: var(--res-radius);
	padding: 4px 20px;
}
.res-faq__q {
	cursor: pointer;
	list-style: none;
	padding: 16px 32px 16px 0;
	font-size: 16px;
	font-weight: 700;
	position: relative;
}
.res-faq__q::-webkit-details-marker { display: none; }
.res-faq__q::after {
	content: "+";
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	font-size: 22px;
	font-weight: 400;
	color: var(--res-accent);
	transition: transform .22s ease;
}
.res-faq__item[open] .res-faq__q::after { content: "−"; }
.res-faq__q:focus-visible { outline: 3px solid var(--res-accent); outline-offset: 2px; border-radius: 6px; }
.res-faq__a { padding: 0 0 16px; }
.res-faq__a p { margin: 0; font-size: 15px; line-height: 1.7; color: var(--res-muted); }

/* --------------------------------------------------------------- 8. CTA */
.res-cta { background: var(--res-accent); color: #fff; padding: clamp(48px, 6vw, 80px) 0; }
.res-cta__inner { text-align: center; max-width: 720px; }
.res-cta__title { font-size: clamp(24px, 3vw, 34px); font-weight: 800; margin: 0 0 12px; color: #fff; }
.res-cta__text { font-size: 17px; line-height: 1.6; margin: 0 0 24px; color: rgba(255,255,255,.92); }
.res-cta__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 28px;
	font-size: 16px;
	font-weight: 700;
	color: var(--res-accent-dark);
	background: #fff;
	border-radius: var(--res-radius);
	text-decoration: none;
	transition: transform .22s ease, box-shadow .22s ease;
}
.res-cta__btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.18); color: var(--res-accent-dark); }
.res-cta__btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* -------------------------------------------------- VIZUALIZATOR PDF (dialog) */
.res-modal {
	width: min(1000px, 94vw);
	height: min(90vh, 900px);
	max-width: 94vw;
	max-height: 92vh;
	padding: 0;
	border: none;
	border-radius: var(--res-radius);
	overflow: hidden;
	box-shadow: 0 24px 60px rgba(0,0,0,.32);
}
.res-modal::backdrop { background: rgba(20,22,20,.62); }
.res-modal[open] { display: flex; flex-direction: column; }
.res-modal__bar {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 12px 16px;
	background: var(--res-text);
	color: #fff;
}
.res-modal__title {
	font-size: 15px;
	font-weight: 700;
	margin: 0;
	color: #fff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.res-modal__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.res-modal__link {
	font-size: 13px;
	font-weight: 700;
	color: #fff;
	text-decoration: none;
	padding: 7px 12px;
	border: 1px solid rgba(255,255,255,.35);
	border-radius: 8px;
	white-space: nowrap;
	transition: background .2s ease;
}
.res-modal__link:hover { background: rgba(255,255,255,.14); color: #fff; }
.res-modal__close {
	font: inherit;
	cursor: pointer;
	width: 34px;
	height: 34px;
	font-size: 16px;
	color: #fff;
	background: var(--res-accent);
	border: none;
	border-radius: 8px;
}
.res-modal__close:hover { filter: brightness(.94); }
.res-modal__link:focus-visible,
.res-modal__close:focus-visible { outline: 3px solid var(--res-accent); outline-offset: 2px; }
.res-modal__frame { flex: 1; width: 100%; border: 0; background: #525659; }

@media (max-width: 560px) {
	.res-modal__link { padding: 6px 9px; }
	.res-modal__title { font-size: 13px; }
}

/* ------------------------------------------------------------ RESPONSIVE */
@media (max-width: 1024px) {
	.res-grid,
	.res-divisions,
	.res-articles { grid-template-columns: repeat(2, 1fr); }

	/* Pe tabletă lăsăm imaginea banner mai discretă, vălul mai opac */
	.res-hero__overlay { background: linear-gradient(90deg, rgba(244,246,245,.97) 0%, rgba(244,246,245,.9) 55%, rgba(244,246,245,.55) 100%); }
	.res-typebar { grid-template-columns: repeat(4, 1fr); }
	/* prima coloană din fiecare rând nu are separator */
	.res-typebar .res-typebtn { border-top: 1px solid var(--res-border); }
	.res-typebar .res-typebtn:nth-child(4n+1) { border-left: 0; }
	.res-typebar .res-typebtn:nth-child(-n+4) { border-top: 0; }
}
@media (max-width: 680px) {
	.res-grid,
	.res-divisions,
	.res-articles { grid-template-columns: 1fr; }

	.res-hero.has-bg { background-image: none !important; } /* fără foto pe mobil: fără overflow / text peste imagine */
	.res-hero__overlay { display: none; }
	.res-herobar { flex-direction: column; }
	.res-herobar__search,
	.res-herobar__field,
	.res-select { width: 100%; }
	.res-select { min-width: 0; }
	.res-features { padding-bottom: 40px; gap: 18px 24px; }

	.res-typebar-wrap { margin-top: 8px; margin-bottom: 0; }
	.res-typebar { grid-template-columns: repeat(3, 1fr); box-shadow: 0 10px 26px rgba(40,41,44,.08); }
	.res-typebtn { padding: 16px 8px; }
	.res-typebar .res-typebtn:nth-child(4n+1) { border-left: 1px solid var(--res-border); }
	.res-typebar .res-typebtn:nth-child(3n+1) { border-left: 0; }
	.res-typebar .res-typebtn:nth-child(-n+3) { border-top: 0; }
	.res-typebar .res-typebtn:nth-child(n+4) { border-top: 1px solid var(--res-border); }

	.res-toolbar { align-items: stretch; }
	.res-reset { width: 100%; }
	.res-count { margin: 0 0 4px; }
}

@media (prefers-reduced-motion: reduce) {
	.res-card,
	.res-article,
	.res-division-card,
	.res-btn,
	.res-btn__arrow,
	.res-cta__btn,
	.res-faq__q::after { transition: none; }
}
