/* ===========================================================================
   Anunțuri Angajare — Timeline
   Design: cronologie verticală cu noduri-an circulare pe o linie centrală,
   inspirat de timeline-ul spitalului, adaptat la identitatea vizuală a
   Spitalului Municipal Vatra Dornei (bleumarin + teal, titluri Source Serif 4).
   Lista de anunțuri rămâne simplă (dată + link), organizată pe ani și luni.
   =========================================================================== */

.aat-timeline {
	--aat-accent: #007A8A; /* suprascris inline din Setări → culoare accent */
	--aat-navy: #1A4470;
	--aat-navy-soft: #24568a;
	--aat-teal: var( --aat-accent, #007A8A );
	--aat-teal-dark: #0A7280;
	--aat-teal-light: #9FE8F2;
	--aat-bg-soft: #F4FAFB;
	--aat-bg-card: #ffffff;
	--aat-border: #dbe3e8;
	--aat-border-soft: #e9eff2;
	--aat-muted: #5a6b76;
	--aat-ink: #17242e;
	--aat-shadow-sm: 0 1px 2px rgba( 18, 65, 99, 0.06 );
	--aat-shadow: 0 2px 6px rgba( 18, 65, 99, 0.06 ), 0 18px 40px -26px rgba( 18, 65, 99, 0.35 );

	/* geometria timeline-ului */
	--aat-node: 66px;   /* diametrul cercului cu anul */
	--aat-gap: 22px;    /* spațiu între cerc și conținut */
	--aat-rail: 33px;   /* poziția liniei verticale (centrul cercului) */

	font-size: 16px;
	line-height: 1.55;
	color: var( --aat-ink );
	max-width: 100%;
	box-sizing: border-box;
}

.aat-timeline *,
.aat-timeline *::before,
.aat-timeline *::after {
	box-sizing: border-box;
}

.aat-timeline h1,
.aat-timeline h2,
.aat-timeline h3,
.aat-timeline .aat-serif {
	font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
}

/* --------------------------------------------------------------------------
   Banner opțional de titlu (doar dacă shortcode-ul primește titlu="...")
   -------------------------------------------------------------------------- */
.aat-banner {
	position: relative;
	overflow: hidden;
	background: linear-gradient( 135deg, var( --aat-navy ) 0%, #1A5A88 44%, var( --aat-teal-dark ) 78%, var( --aat-teal ) 100% );
	color: #fff;
	border-radius: 18px;
	padding: clamp( 30px, 5vw, 48px ) clamp( 24px, 5vw, 44px );
	margin-bottom: 30px;
	box-shadow: var( --aat-shadow );
}

.aat-banner::before {
	content: "";
	position: absolute;
	top: -130px;
	right: -110px;
	width: 340px;
	height: 340px;
	border-radius: 50%;
	background: radial-gradient( circle, rgba( 143, 199, 220, 0.24 ) 0%, rgba( 143, 199, 220, 0 ) 70% );
	pointer-events: none;
}

.aat-banner-titlu {
	position: relative;
	font-family: 'Source Serif 4', Georgia, serif;
	font-size: clamp( 1.6rem, 3vw, 2.2rem );
	font-weight: 600;
	line-height: 1.2;
	margin: 0 0 10px 0;
	color: #fff;
}

.aat-banner-subtitlu {
	position: relative;
	font-size: 1.02rem;
	color: #d8e6ee;
	margin: 0;
	max-width: 660px;
}

/* --------------------------------------------------------------------------
   Bara de controale: căutare + filtru categorie
   -------------------------------------------------------------------------- */
.aat-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 30px;
	padding: 14px;
	background: var( --aat-bg-soft );
	border: 1px solid var( --aat-border-soft );
	border-radius: 14px;
}

.aat-search,
.aat-filter-cat {
	font-size: 15px;
	padding: 12px 15px;
	border: 1px solid var( --aat-border );
	border-radius: 10px;
	background: #fff;
	color: var( --aat-ink );
	box-shadow: var( --aat-shadow-sm );
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.aat-search {
	flex: 1 1 260px;
	min-width: 200px;
}

.aat-search::placeholder {
	color: #8a99a3;
}

.aat-filter-cat {
	flex: 0 0 auto;
	cursor: pointer;
}

.aat-search:focus,
.aat-filter-cat:focus {
	outline: none;
	border-color: var( --aat-teal );
	box-shadow: 0 0 0 3px rgba( 0, 122, 138, 0.16 );
}

.aat-no-results {
	width: 100%;
	color: var( --aat-muted );
	font-style: italic;
	padding-top: 4px;
}

/* --------------------------------------------------------------------------
   Coloana timeline-ului (linia verticală continuă)
   -------------------------------------------------------------------------- */
.aat-years {
	position: relative;
}

.aat-years::before {
	content: "";
	position: absolute;
	left: var( --aat-rail );
	top: calc( var( --aat-node ) / 2 );
	bottom: calc( var( --aat-node ) / 2 );
	width: 3px;
	transform: translateX( -50% );
	background: linear-gradient( to bottom, var( --aat-teal-light ), var( --aat-border ) );
	border-radius: 3px;
}

/* --------------------------------------------------------------------------
   Anul — nod principal al cronologiei
   -------------------------------------------------------------------------- */
.aat-year {
	position: relative;
	margin: 0;
}

.aat-year + .aat-year {
	margin-top: 6px;
}

.aat-year-summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: var( --aat-gap );
	padding: 14px 0;
	user-select: none;
}

.aat-year-summary::-webkit-details-marker {
	display: none;
}

/* Cercul cu anul */
.aat-year-node {
	flex: 0 0 auto;
	width: var( --aat-node );
	height: var( --aat-node );
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border: 3px solid var( --aat-teal );
	box-shadow: 0 0 0 5px #fff, var( --aat-shadow-sm );
	transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
	position: relative;
	z-index: 1;
}

.aat-year-label {
	font-family: 'Source Serif 4', Georgia, serif;
	font-size: 1.28rem;
	font-weight: 600;
	color: var( --aat-navy );
	line-height: 1;
	transition: color 0.2s ease;
	font-variant-numeric: tabular-nums;
}

/* Meta din dreapta cercului: număr anunțuri + indicator */
.aat-year-meta {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-width: 0;
	border-bottom: 1px solid var( --aat-border-soft );
	padding-bottom: 14px;
	padding-top: 14px;
	margin-top: -14px;
	margin-bottom: -14px;
}

.aat-year-count {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var( --aat-teal-dark );
	background: var( --aat-bg-soft );
	border: 1px solid var( --aat-border );
	border-radius: 999px;
	padding: 5px 13px;
	white-space: nowrap;
}

.aat-year-toggle {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	position: relative;
	color: var( --aat-teal );
	transition: transform 0.2s ease;
}

.aat-year-toggle::before,
.aat-year-toggle::after {
	content: "";
	position: absolute;
	background: currentColor;
	border-radius: 2px;
}

.aat-year-toggle::before { /* linia orizontală */
	top: 50%;
	left: 3px;
	right: 3px;
	height: 2.5px;
	transform: translateY( -50% );
}

.aat-year-toggle::after { /* linia verticală (dispare când e deschis) */
	left: 50%;
	top: 3px;
	bottom: 3px;
	width: 2.5px;
	transform: translateX( -50% );
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.aat-year[open] > .aat-year-summary .aat-year-toggle::after {
	opacity: 0;
	transform: translateX( -50% ) scaleY( 0 );
}

/* Stare activă (an deschis): cercul se umple cu teal */
.aat-year[open] > .aat-year-summary .aat-year-node {
	background: linear-gradient( 145deg, var( --aat-teal ), var( --aat-teal-dark ) );
	border-color: var( --aat-teal-dark );
}

.aat-year[open] > .aat-year-summary .aat-year-label {
	color: #fff;
}

/* Hover pe rândul anului */
.aat-year-summary:hover .aat-year-node {
	transform: scale( 1.04 );
	box-shadow: 0 0 0 5px #fff, 0 6px 16px -6px rgba( 10, 114, 128, 0.5 );
}

.aat-year-summary:focus-visible {
	outline: none;
}

.aat-year-summary:focus-visible .aat-year-node {
	box-shadow: 0 0 0 5px #fff, 0 0 0 8px rgba( 0, 122, 138, 0.35 );
}

/* --------------------------------------------------------------------------
   Corpul anului (panoul cu luni + anunțuri), aliniat sub conținut, nu sub cerc
   -------------------------------------------------------------------------- */
.aat-year-body {
	margin-left: calc( var( --aat-node ) + var( --aat-gap ) );
	margin-bottom: 10px;
	padding: 6px 22px 22px 22px;
	background: var( --aat-bg-card );
	border: 1px solid var( --aat-border-soft );
	border-radius: 14px;
	box-shadow: var( --aat-shadow );
	animation: aat-fade 0.25s ease;
}

@keyframes aat-fade {
	from { opacity: 0; transform: translateY( -4px ); }
	to   { opacity: 1; transform: translateY( 0 ); }
}

/* Luna */
.aat-month-block {
	padding-top: 18px;
}

.aat-month-block + .aat-month-block {
	margin-top: 4px;
}

.aat-month-heading {
	font-size: 1.06rem;
	font-weight: 600;
	text-transform: capitalize;
	color: var( --aat-navy );
	margin: 0 0 12px 0;
	padding-bottom: 8px;
	border-bottom: 2px solid var( --aat-teal-light );
	display: flex;
	align-items: baseline;
	gap: 9px;
}

.aat-month-count {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-weight: 600;
	color: var( --aat-teal-dark );
	font-size: 0.72rem;
	background: var( --aat-bg-soft );
	border-radius: 999px;
	padding: 2px 9px;
}

/* --------------------------------------------------------------------------
   Lista de anunțuri
   -------------------------------------------------------------------------- */
.aat-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.aat-item {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 13px 8px 13px 10px;
	border-radius: 10px;
	transition: background 0.15s ease;
}

.aat-item + .aat-item {
	border-top: 1px solid var( --aat-border-soft );
}

.aat-item:hover {
	background: var( --aat-bg-soft );
}

/* Badge dată: ziua mare + luna scurtă */
.aat-data {
	flex: 0 0 auto;
	width: 52px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 6px 4px;
	background: var( --aat-bg-soft );
	border: 1px solid var( --aat-border-soft );
	border-radius: 9px;
	line-height: 1;
	text-align: center;
}

.aat-data-zi {
	font-size: 1.18rem;
	font-weight: 700;
	color: var( --aat-navy );
	font-variant-numeric: tabular-nums;
}

.aat-data-luna {
	margin-top: 3px;
	font-size: 0.66rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var( --aat-teal-dark );
}

.aat-item-body {
	flex: 1 1 auto;
	min-width: 0;
	padding-top: 2px;
}

.aat-link {
	color: var( --aat-teal-dark );
	font-weight: 600;
	font-size: 1rem;
	text-decoration: none;
	line-height: 1.4;
	display: inline;
	word-break: break-word;
	background-image: linear-gradient( var( --aat-teal ), var( --aat-teal ) );
	background-size: 0% 2px;
	background-position: 0 100%;
	background-repeat: no-repeat;
	transition: background-size 0.25s ease, color 0.15s ease;
}

.aat-link:hover,
.aat-link:focus {
	color: var( --aat-teal );
	background-size: 100% 2px;
}

.aat-link-lipsa {
	color: var( --aat-muted );
	font-style: italic;
	font-weight: 500;
	background: none;
}

/* Meta sub titlu: categorie + anexe */
.aat-item-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
}

.aat-cat-tag {
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var( --aat-navy );
	background: rgba( 26, 68, 112, 0.07 );
	border-radius: 6px;
	padding: 3px 9px;
}

.aat-anexe {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 6px;
}

.aat-anexe a {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 0.8rem;
	font-weight: 600;
	color: var( --aat-teal-dark );
	background: var( --aat-bg-soft );
	border: 1px solid var( --aat-border );
	border-radius: 6px;
	padding: 3px 9px;
	text-decoration: none;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.aat-anexe a::before {
	content: "📎";
	font-size: 0.78em;
}

.aat-anexe a:hover {
	background: #fff;
	border-color: var( --aat-teal );
}

.aat-empty {
	color: var( --aat-muted );
	font-style: italic;
	padding: 20px;
	background: var( --aat-bg-soft );
	border-radius: 12px;
	text-align: center;
}

/* --------------------------------------------------------------------------
   Widget „Ultimele anunțuri” — listă simplă compactă
   -------------------------------------------------------------------------- */
.aat-widget-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.aat-widget-list li {
	padding: 9px 0;
	border-bottom: 1px solid var( --aat-border-soft );
}

.aat-widget-list li:last-child {
	border-bottom: none;
}

.aat-widget-list .aat-data {
	display: block;
	width: auto;
	background: none;
	border: none;
	padding: 0;
	text-align: left;
	font-size: 0.8rem;
	color: var( --aat-muted );
	margin-bottom: 2px;
}

.aat-widget-list a {
	color: var( --aat-teal-dark );
	font-weight: 600;
	text-decoration: none;
}

.aat-widget-list a:hover {
	color: var( --aat-teal );
	text-decoration: underline;
}

.aat-widget-more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 12px;
	font-size: 0.9rem;
	font-weight: 700;
	color: var( --aat-teal-dark );
}

/* --------------------------------------------------------------------------
   Responsive — tabletă
   -------------------------------------------------------------------------- */
@media ( max-width: 782px ) {
	.aat-timeline {
		font-size: 15px;
		--aat-node: 58px;
		--aat-gap: 16px;
		--aat-rail: 29px;
	}

	.aat-controls {
		flex-direction: column;
		align-items: stretch;
	}

	.aat-search,
	.aat-filter-cat {
		flex: 0 0 auto; /* în layout pe coloană, evită întinderea pe verticală */
		width: 100%;
	}

	.aat-year-label {
		font-size: 1.12rem;
	}

	.aat-year-body {
		padding: 4px 16px 18px 16px;
	}
}

/* --------------------------------------------------------------------------
   Responsive — telefon
   -------------------------------------------------------------------------- */
@media ( max-width: 600px ) {
	.aat-timeline {
		--aat-node: 52px;
		--aat-gap: 14px;
		--aat-rail: 26px;
	}

	.aat-banner {
		border-radius: 14px;
		padding: 24px 20px;
	}

	.aat-year-label {
		font-size: 1rem;
	}

	.aat-year-count {
		font-size: 0.72rem;
		padding: 4px 10px;
	}

	/* Panoul iese în afara nodului, ca să câștige lățime pe ecran mic */
	.aat-year-body {
		margin-left: 0;
		padding: 4px 14px 16px 14px;
	}

	.aat-item {
		gap: 12px;
		padding: 12px 4px;
	}

	.aat-data {
		width: 46px;
	}

	.aat-data-zi {
		font-size: 1.05rem;
	}
}

/* Telefoane foarte mici */
@media ( max-width: 380px ) {
	.aat-timeline {
		font-size: 14px;
		--aat-node: 48px;
		--aat-gap: 12px;
		--aat-rail: 24px;
	}

	.aat-year-meta {
		flex-wrap: wrap;
	}
}

/* Respectă preferința de mișcare redusă */
@media ( prefers-reduced-motion: reduce ) {
	.aat-year-body {
		animation: none;
	}

	.aat-year-node,
	.aat-year-toggle,
	.aat-link {
		transition: none;
	}
}

/* ==========================================================================
   Banner carusel „live” — ultimele anunțuri, deasupra header-ului
   ========================================================================== */
.aat-banner-live {
	--aat-accent: #007A8A;
	width: 100%;
	background: var( --aat-accent );
	color: #fff;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.4;
	box-shadow: 0 1px 4px rgba( 0, 0, 0, 0.15 );
	position: relative;
	z-index: 999;
}

.aat-banner-live.is-sticky {
	position: sticky;
	top: 0;
}

.aat-banner-live__inner {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 8px 20px;
	min-height: 44px;
}

.aat-banner-live__eticheta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	font-size: 12px;
	white-space: nowrap;
	flex-shrink: 0;
}

.aat-banner-live__punct {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 0 0 0 rgba( 255, 255, 255, 0.7 );
	animation: aat-puls 2s infinite;
}

@keyframes aat-puls {
	0%   { box-shadow: 0 0 0 0 rgba( 255, 255, 255, 0.6 ); }
	70%  { box-shadow: 0 0 0 7px rgba( 255, 255, 255, 0 ); }
	100% { box-shadow: 0 0 0 0 rgba( 255, 255, 255, 0 ); }
}

.aat-banner-live__viewport {
	flex: 1 1 auto;
	position: relative;
	overflow: hidden;
	min-width: 0;
	height: 1.5em;
}

.aat-banner-live__track {
	list-style: none;
	margin: 0;
	padding: 0;
	position: relative;
	height: 100%;
}

.aat-banner-live__slide {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	opacity: 0;
	transform: translateY( 100% );
	transition: opacity 0.5s ease, transform 0.5s ease;
	pointer-events: none;
}

.aat-banner-live__slide.is-active {
	opacity: 1;
	transform: translateY( 0 );
	pointer-events: auto;
}

.aat-banner-live__link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: #fff;
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}

.aat-banner-live__link:hover .aat-banner-live__titlu,
.aat-banner-live__link:focus .aat-banner-live__titlu {
	text-decoration: underline;
}

.aat-banner-live__data {
	font-variant-numeric: tabular-nums;
	opacity: 0.85;
	font-size: 12px;
	flex-shrink: 0;
}

.aat-banner-live__cat {
	background: rgba( 255, 255, 255, 0.18 );
	border-radius: 999px;
	padding: 1px 9px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	flex-shrink: 0;
}

.aat-banner-live__titlu {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.aat-banner-live__nav {
	display: inline-flex;
	gap: 6px;
	flex-shrink: 0;
}

.aat-banner-live__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	border: 0;
	padding: 0;
	background: rgba( 255, 255, 255, 0.4 );
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.aat-banner-live__dot:hover {
	background: rgba( 255, 255, 255, 0.7 );
}

.aat-banner-live__dot.is-active {
	background: #fff;
	transform: scale( 1.25 );
}

.aat-banner-live__toate {
	color: #fff;
	text-decoration: none;
	font-weight: 600;
	font-size: 13px;
	white-space: nowrap;
	flex-shrink: 0;
	opacity: 0.95;
}

.aat-banner-live__toate:hover {
	text-decoration: underline;
	opacity: 1;
}

@media ( max-width: 640px ) {
	.aat-banner-live__inner {
		gap: 10px;
		padding: 8px 14px;
	}
	.aat-banner-live__eticheta span:not( .aat-banner-live__punct ) {
		display: none; /* pe mobil păstrează doar punctul pulsatoriu */
	}
	.aat-banner-live__cat {
		display: none;
	}
	.aat-banner-live__data {
		display: none;
	}
	/* „Vezi toate" rămâne vizibil pe mobil — e cel mai important link. */
	.aat-banner-live__toate {
		font-size: 12px;
		white-space: nowrap;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.aat-banner-live__slide {
		transition: opacity 0.3s ease;
		transform: none;
	}
	.aat-banner-live__slide.is-active {
		transform: none;
	}
	.aat-banner-live__punct {
		animation: none;
	}
}
