/*
 * RomaniaHUB – pagina /articole/ ([romaniahub_articole_pagina]).
 * Folosește hero-ul și caseta de categorii de la Firme (rh-firme-sus.css) și cardul de articol (rh-posts.css).
 * Carduri 20px, butoane și etichete 12px, 24px între carduri, 72px între secțiuni.
 */

.rh-arts {
	padding-bottom: 72px;
	overflow-x: clip;
}

.rh-arts .rh-fs-wrap {
	max-width: 1440px;
	padding: 0 10px;
}

/* Secțiunea Elementor în care stă pagina: pe toată lățimea */
.elementor-section:has(.rh-arts) > .elementor-container,
.e-con:has(> .elementor-widget .rh-arts) {
	max-width: none !important;
}

.elementor-section:has(.rh-arts) {
	padding: 0 !important;
}

/* ---------- Hero ---------- */

.rh-arts .rh-arts-hero {
	padding: 30px 0 76px;
}

.rh-arts .rh-fs-title {
	max-width: 760px;
	margin: 0;
	font-size: clamp(32px, 3.4vw, 50px);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -1.4px;
	color: #fff;
}

.rh-arts .rh-fs-lead {
	max-width: 640px;
}

.rh-arts .rh-arts-search {
	max-width: 760px;
}

.rh-arts .rh-arts-search .rh-fs-field--q {
	flex: 1 1 auto;
}

/* ---------- Caseta cu categorii ---------- */

.rh-arts .rh-arts-cats {
	grid-template-columns: repeat(5, minmax(0, 1fr));
}

.rh-arts .rh-fs-cat__icon {
	color: #fff;
}

/* ---------- Secțiunile ---------- */

.rh-arts-body {
	padding-top: 72px !important;
}

.rh-arts-sec + .rh-arts-sec,
.rh-arts-sec + .rh-arts-guides,
.rh-arts-guides + .rh-arts-sec,
.rh-arts-ad + .rh-arts-sec,
.rh-arts-sec + .rh-arts-ad,
.rh-arts-guides + .rh-arts-ad,
.rh-arts-band {
	margin-top: 72px;
}

.rh-arts-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 24px;
}

.rh-arts-head__title {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 14px;
	min-width: 0;
}

.rh-arts-kicker {
	flex: 1 0 100%;
	color: var(--rh-accent-ink);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .6px;
	text-transform: uppercase;
}

.rh-arts-head h2 {
	margin: 0 !important;
	color: var(--rh-ink) !important;
	font-size: clamp(26px, 2.4vw, 36px) !important;
	font-weight: 800 !important;
	line-height: 1.15 !important;
	letter-spacing: -.8px;
	text-transform: none !important;
}

.rh-arts-head p {
	flex: 1 0 100%;
	max-width: none;
	margin: 4px 0 0;
	font-size: 16px;
	line-height: 1.6;
	color: var(--rh-muted);
}

.rh-arts-head__icon {
	display: grid;
	flex: 0 0 auto;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: var(--rh-cat, var(--rh-accent));
	color: #fff;
}

.rh-arts-more {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 6px;
	padding: 10px 16px;
	border: 1px solid #e2d6ff;
	border-radius: 12px;
	background: #fff;
	color: var(--rh-accent-ink) !important;
	font-size: 14px;
	font-weight: 800;
	text-decoration: none !important;
	white-space: nowrap;
	transition: background .15s ease, border-color .15s ease;
}

.rh-arts-more span {
	color: var(--rh-muted);
	font-weight: 700;
}

.rh-arts-more:hover {
	border-color: #c9b8ff;
	background: #f6f1ff;
}

/* Subcategoriile */
.rh-arts-subs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: -8px 0 20px;
}

.rh-arts-subs a {
	padding: 7px 13px;
	border: 1px solid #ebe8f3;
	border-radius: 999px;
	background: #fff;
	color: var(--rh-ink) !important;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none !important;
	transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.rh-arts-subs a:hover {
	border-color: #d9c9ff;
	background: #faf7ff;
	color: var(--rh-accent-ink) !important;
}

/* Grila cu 4 articole */
.rh-arts-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
	align-items: stretch;
}

.rh-arts-grid > .rh-post {
	height: 100%;
}

/* ---------- Ghiduri „Cum să…” ---------- */

.rh-arts-guides {
	position: relative;
	overflow: hidden;
	padding: 40px;
	border-radius: 20px;
	background:
		radial-gradient(circle at 92% 0%, rgba(108, 28, 255, .5) 0, rgba(108, 28, 255, 0) 45%),
		radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1.4px) 0 0 / 22px 22px,
		linear-gradient(135deg, #120c26 0%, #1d0f4a 60%, #2b0f73 100%);
}

.rh-arts-guides .rh-arts-kicker {
	color: #c9b8ff;
}

.rh-arts-guides .rh-arts-head h2 {
	color: #fff !important;
}

.rh-arts-guides .rh-arts-head p {
	color: #d6d1ea;
}

.rh-arts-more--light {
	border-color: rgba(255, 255, 255, .2);
	background: rgba(255, 255, 255, .08);
	color: #fff !important;
}

.rh-arts-more--light:hover {
	border-color: rgba(255, 255, 255, .35);
	background: rgba(255, 255, 255, .16);
}

.rh-arts-subs--light a {
	border-color: rgba(255, 255, 255, .18);
	background: rgba(255, 255, 255, .08);
	color: #fff !important;
}

.rh-arts-subs--light a:hover {
	border-color: rgba(255, 255, 255, .35);
	background: rgba(255, 255, 255, .16);
	color: #fff !important;
}

/* ---------- Reclamele Google ---------- */

.rh-arts-ad {
	position: relative;
	padding: 34px 24px 24px;
	border: 1px solid #ebe8f3;
	border-radius: 20px;
	background: #fff;
	text-align: center;
}

.rh-arts-ad__label {
	position: absolute;
	top: 10px;
	left: 16px;
	color: #9c97b3;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .6px;
	text-transform: uppercase;
}

.rh-arts-ad--banda ins.adsbygoogle {
	width: 100%;
	max-width: 970px;
	min-height: 250px;
	margin: 0 auto;
}

/* Reclama din grilă: cât un card de articol */
.rh-arts-ad--card {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 100%;
	padding: 34px 12px 12px;
	box-shadow: 0 6px 20px rgba(18, 12, 38, .06);
}

.rh-arts-ad--card ins.adsbygoogle {
	width: 100%;
	min-height: 250px;
}

/* Fără reclamă afișată (blocată sau negăsită): nu lăsăm un dreptunghi gol */
.rh-arts-ad:has(ins.adsbygoogle[data-ad-status="unfilled"]) {
	display: none;
}

/* Conținutul pus din Aspect → Widget-uri (cod AdSense sau imagine cu link) */
.rh-arts-ad__w + .rh-arts-ad__w {
	margin-top: 16px;
}

.rh-arts-ad .wp-block-image,
.rh-arts-ad figure {
	margin: 0;
}

.rh-arts-ad .wp-block-image a,
.rh-arts-ad__w > a {
	display: block;
}

.rh-arts-ad img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0 auto;
	border-radius: 12px;
}

.rh-arts-ad--banda img {
	max-width: 970px;
}

.rh-arts-ad figcaption {
	margin: 8px 0 0;
	color: #6f6a85;
	font-size: 13px;
}

/* Fișele de produse HubDeals într-un loc de reclamă */
.rh-arts-ad--produse {
	text-align: left;
}

.rh-arts-ad--produse .hubdeals-grid,
.rh-arts-ad--produse .hubdeals-list {
	margin: 0 !important;
}

.rh-arts-ad--card.rh-arts-ad--produse,
.rh-arts-ad--lateral.rh-arts-ad--produse {
	justify-content: flex-start;
}

/* „Afaceri”: 6 articole pe 3 coloane și bannerul vertical în dreapta */
.rh-arts-split {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 324px;
	gap: 24px;
	align-items: start;
}

.rh-arts-grid--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rh-arts-side {
	position: sticky;
	top: 100px;
}

.rh-arts-ad--lateral {
	padding: 34px 12px 12px;
	box-shadow: 0 6px 20px rgba(18, 12, 38, .06);
}

.rh-arts-ad--lateral img {
	max-width: 300px;
}

.rh-arts-ad--lateral ins.adsbygoogle {
	width: 100%;
	min-height: 600px;
}

/* ---------- Banda „Ai o firmă?” ---------- */

.rh-arts-band .rh-band {
	margin: 0;
}

/* ---------- Tabletă ---------- */

/* La Firme căutarea din hero dispare sub 1200px (lista are căutarea ei); aici rămâne */
@media (max-width: 1200px) {
	.rh-arts .rh-fs-search,
	.rh-arts .rh-fs-popular {
		display: flex;
	}
}

@media (max-width: 1100px) {
	.rh-arts-split {
		grid-template-columns: minmax(0, 1fr);
	}

	.rh-arts-grid--3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.rh-arts-side {
		position: static;
		width: 100%;
		max-width: 324px;
		margin: 0 auto;
	}

	.rh-arts-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* ---------- Telefon ---------- */

@media (max-width: 767px) {
	.rh-arts {
		padding-bottom: 48px;
	}

	.rh-arts .rh-arts-hero {
		padding: 20px 0 64px;
	}

	.rh-arts .rh-fs-title {
		font-size: 32px;
	}

	.rh-arts .rh-arts-search .rh-fs-field--q {
		flex-basis: 100%;
	}

	.rh-arts .rh-arts-search .rh-fs-submit {
		padding: 0 18px;
	}

	/* Subiectele populare: un rând care se derulează cu degetul */
	.rh-arts .rh-fs-popular {
		flex-wrap: nowrap;
		width: calc(100% + 20px);
		margin: 0 -10px;
		padding: 0 10px 2px;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.rh-arts .rh-fs-popular::-webkit-scrollbar {
		display: none;
	}

	.rh-arts .rh-fs-popular a,
	.rh-arts .rh-fs-popular span {
		flex: 0 0 auto;
	}

	.rh-arts-body {
		padding-top: 48px !important;
	}

	.rh-arts-sec + .rh-arts-sec,
	.rh-arts-sec + .rh-arts-guides,
	.rh-arts-guides + .rh-arts-sec,
	.rh-arts-ad + .rh-arts-sec,
	.rh-arts-sec + .rh-arts-ad,
	.rh-arts-guides + .rh-arts-ad,
	.rh-arts-band {
		margin-top: 48px;
	}

	.rh-arts-head {
		flex-wrap: wrap;
		align-items: center;
		gap: 12px;
		margin-bottom: 16px;
	}

	.rh-arts-more {
		padding: 8px 12px;
		font-size: 13px;
	}

	.rh-arts-more span {
		display: none;
	}

	.rh-arts-head__icon {
		width: 40px;
		height: 40px;
	}

	.rh-arts-subs {
		flex-wrap: nowrap;
		margin: -4px -10px 16px;
		padding: 0 10px 4px;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.rh-arts-subs::-webkit-scrollbar {
		display: none;
	}

	.rh-arts-subs a {
		flex: 0 0 auto;
	}

	/* Cele 4 articole dintr-o categorie: un rând care se derulează cu degetul (pagina nu mai e foarte lungă) */
	.rh-arts-grid {
		display: flex;
		gap: 12px;
		margin: 0 -10px;
		padding: 0 10px 6px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-padding: 0 10px;
		scrollbar-width: none;
	}

	.rh-arts-grid::-webkit-scrollbar {
		display: none;
	}

	.rh-arts-grid > * {
		flex: 0 0 82%;
		scroll-snap-align: start;
	}

	.rh-arts-guides {
		margin-right: -10px;
		margin-left: -10px;
		padding: 24px 10px;
		border-radius: 0;
	}

	.rh-arts-ad {
		padding: 30px 10px 10px;
	}
}
