/* Elegant Blog Archive — everything is scoped under .eba-wrap so nothing leaks into the theme, Elementor or WooCommerce. */

.eba-wrap {
	/* Fallbacks; real values are injected from the settings page. */
	--eba-primary: #12343b;
	--eba-secondary: #1f5f66;
	--eba-accent: #f2b138;
	--eba-bg: #f4f6f6;
	--eba-card: #ffffff;
	--eba-text: #14232a;
	--eba-muted: #5d6b70;
	--eba-hero-text: #ffffff;
	--eba-font-head: inherit;
	--eba-font-body: inherit;
	--eba-radius: 18px;
	--eba-cols: 3;
	--eba-gutter: clamp(16px, 4vw, 32px);
	--eba-line: rgba(20, 35, 42, 0.1);

	display: block;
	position: relative;
	background: var(--eba-bg);
	color: var(--eba-text);
	font-family: var(--eba-font-body);
	font-size: 1rem;
	line-height: 1.8;
	text-align: start;
	-webkit-font-smoothing: antialiased;
}

.eba-wrap *,
.eba-wrap *::before,
.eba-wrap *::after {
	box-sizing: border-box;
}

.eba-wrap img {
	display: block;
	max-width: 100%;
	height: auto;
}

.eba-wrap a {
	color: inherit;
	text-decoration: none;
	background: none;
}

.eba-wrap h1,
.eba-wrap h2,
.eba-wrap h3 {
	font-family: var(--eba-font-head);
	color: inherit;
	margin: 0;
	padding: 0;
	text-transform: none;
	letter-spacing: 0;
}

.eba-wrap p {
	margin: 0;
}

.eba-wrap ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.eba-wrap li {
	margin: 0;
	padding: 0;
}

.eba-container {
	width: min(1200px, calc(100% - 2 * var(--eba-gutter)));
	margin-inline: auto;
}

.eba-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.eba-wrap a:focus-visible,
.eba-wrap button:focus-visible,
.eba-wrap input:focus-visible {
	outline: 3px solid var(--eba-accent);
	outline-offset: 3px;
}

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

.eba-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: var(--eba-primary);
	color: var(--eba-hero-text);
	padding: clamp(56px, 9vw, 124px) 0 clamp(104px, 13vw, 168px);
	border-end-start-radius: clamp(28px, 5vw, 64px);
	border-end-end-radius: clamp(28px, 5vw, 64px);
}

.eba-hero::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset-inline-end: -9%;
	inset-block-start: -45%;
	width: min(62vw, 720px);
	aspect-ratio: 1;
	border-radius: 50%;
	background: var(--eba-secondary);
}

.eba-hero::after {
	content: "";
	position: absolute;
	z-index: -1;
	inset-inline-end: 15%;
	inset-block-end: 24%;
	width: clamp(56px, 9vw, 116px);
	aspect-ratio: 1;
	border-radius: 50%;
	border: clamp(8px, 1.2vw, 14px) solid var(--eba-accent);
}

.eba-wrap .eba-hero__title {
	max-width: 14em;
	font-size: clamp(2.3rem, 6.4vw, 4.6rem);
	font-weight: 900;
	line-height: 1.3;
	color: var(--eba-hero-text);
	text-wrap: balance;
}

.eba-hero__sub {
	max-width: 36em;
	margin-top: clamp(14px, 2vw, 22px) !important;
	font-size: clamp(1rem, 1.9vw, 1.2rem);
	line-height: 1.9;
	opacity: 0.88;
}

@media (prefers-reduced-motion: no-preference) {
	.eba-hero__title,
	.eba-hero__sub {
		animation: eba-in 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
	}

	.eba-hero__sub {
		animation-delay: 0.12s;
	}
}

@keyframes eba-in {
	from {
		opacity: 0;
		transform: translateY(22px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@media (max-width: 640px) {
	.eba-hero::after {
		display: none;
	}
}

/* ---------- Floating toolbar (search + categories) ---------- */

.eba-toolwrap {
	position: relative;
	z-index: 2;
}

.eba-hero + .eba-toolwrap {
	margin-top: calc(-1 * clamp(44px, 6vw, 62px));
}

.eba-wrap:not(:has(.eba-hero)) .eba-toolwrap {
	padding-top: clamp(20px, 3vw, 36px);
}

.eba-tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	padding: 10px;
	background: var(--eba-card);
	border-radius: calc(var(--eba-radius) * 1.3);
	box-shadow: 0 18px 40px -22px rgba(10, 25, 30, 0.45);
}

.eba-search {
	display: flex;
	align-items: center;
	flex: 1 1 280px;
	min-width: 0;
	margin: 0;
	background: var(--eba-bg);
	border-radius: 999px;
	padding: 4px;
}

.eba-wrap .eba-search__input {
	flex: 1;
	min-width: 0;
	height: auto !important;
	margin: 0 !important;
	padding: 0.65rem 1.1rem !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--eba-text) !important;
	font: inherit !important;
	font-size: 0.98rem !important;
	-webkit-appearance: none;
	appearance: none;
}

.eba-wrap .eba-search__input::placeholder {
	color: var(--eba-muted);
	opacity: 1;
}

.eba-wrap .eba-search__btn {
	flex: none;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: var(--eba-primary) !important;
	color: var(--eba-hero-text) !important;
	cursor: pointer;
	transition: background-color 0.2s;
}

.eba-wrap .eba-search__btn:hover,
.eba-wrap .eba-search__btn:focus {
	background: var(--eba-secondary) !important;
	color: var(--eba-hero-text) !important;
}

.eba-chips {
	display: flex;
	flex: 3 1 320px;
	gap: 8px;
	min-width: 0;
	padding-block: 2px;
	overflow-x: auto;
	scrollbar-width: none;
}

.eba-chips::-webkit-scrollbar {
	display: none;
}

.eba-wrap a.eba-chip {
	flex: none;
	padding: 0.38rem 1.05rem;
	border: 1px solid var(--eba-line);
	border-radius: 999px;
	color: var(--eba-text);
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.7;
	white-space: nowrap;
	transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

.eba-wrap a.eba-chip:hover {
	border-color: var(--eba-accent);
	color: var(--eba-text);
}

.eba-wrap a.eba-chip.is-active {
	background: var(--eba-primary);
	border-color: var(--eba-primary);
	color: var(--eba-hero-text);
}

/* ---------- Body ---------- */

.eba-body {
	padding-block: clamp(28px, 4vw, 52px) clamp(56px, 8vw, 104px);
}

.eba-hero + .eba-body {
	padding-top: clamp(36px, 5vw, 64px);
}

/* ---------- Featured post ---------- */

.eba-featured {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: clamp(340px, 44vw, 500px);
	margin-bottom: clamp(24px, 3vw, 40px);
	border-radius: calc(var(--eba-radius) * 1.6);
	overflow: hidden;
	background: var(--eba-primary);
	color: #fff;
	isolation: isolate;
}

.eba-featured--plain {
	background: var(--eba-secondary);
}

.eba-featured__media {
	position: absolute;
	inset: 0;
	z-index: -2;
}

.eba-featured__media .eba-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.eba-featured:hover .eba-img {
	transform: scale(1.04);
}

.eba-featured::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(to top, rgba(6, 18, 22, 0.9) 0%, rgba(6, 18, 22, 0.55) 45%, rgba(6, 18, 22, 0.05) 80%);
}

.eba-featured--plain::after {
	background: none;
}

.eba-featured__body {
	width: min(760px, 100%);
	padding: clamp(22px, 4vw, 48px);
	display: flex;
	flex-direction: column;
	gap: 14px;
	align-items: flex-start;
}

.eba-wrap a.eba-featured__cat {
	position: relative;
	z-index: 2;
	padding: 0.2rem 0.9rem;
	border-radius: 999px;
	background: var(--eba-accent);
	color: #14232a;
	font-size: 0.85rem;
	font-weight: 700;
}

.eba-wrap .eba-featured__title {
	font-size: clamp(1.5rem, 3.6vw, 2.5rem);
	font-weight: 800;
	line-height: 1.5;
	color: #fff;
	text-wrap: balance;
}

.eba-wrap .eba-featured__title a {
	color: #fff;
}

/* One link covers the whole featured card. */
.eba-wrap .eba-featured__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.eba-featured__excerpt {
	max-width: 40em;
	font-size: 1.02rem;
	line-height: 1.9;
	color: rgba(255, 255, 255, 0.86);
}

.eba-featured .eba-meta,
.eba-featured .eba-by {
	color: rgba(255, 255, 255, 0.8);
}

.eba-featured .eba-sep {
	background: rgba(255, 255, 255, 0.4);
}

.eba-featured .eba-by__ini {
	background: var(--eba-accent);
	color: #14232a;
}

/* ---------- Grid & cards ---------- */

.eba-grid {
	--c: var(--eba-cols);
	display: grid;
	grid-template-columns: repeat(var(--c), minmax(0, 1fr));
	gap: clamp(18px, 2.4vw, 30px);
}

@media (max-width: 1024px) {
	.eba-grid {
		--c: min(var(--eba-cols), 2);
	}
}

@media (max-width: 640px) {
	.eba-grid {
		--c: 1;
	}
}

.eba-card {
	display: flex;
	flex-direction: column;
	padding: 10px;
	background: var(--eba-card);
	border: 1px solid var(--eba-line);
	border-radius: var(--eba-radius);
	transition: border-color 0.25s, transform 0.25s;
}

.eba-card:hover {
	border-color: var(--eba-accent);
	transform: translateY(-4px);
}

.eba-card__media {
	border-radius: max(calc(var(--eba-radius) - 8px), 0px);
	overflow: hidden;
	background: var(--eba-bg);
}

.eba-card__imglink {
	display: block;
	aspect-ratio: 16 / 10;
}

.eba-card__media .eba-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.eba-card:hover .eba-img {
	transform: scale(1.05);
}

.eba-card__ph {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	background: var(--eba-primary);
	color: var(--eba-accent);
}

.eba-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 10px;
	padding: 18px 10px 10px;
}

.eba-wrap a.eba-card__cat {
	align-self: flex-start;
	color: var(--eba-secondary);
	font-size: 0.86rem;
	font-weight: 700;
}

.eba-wrap a.eba-card__cat:hover {
	color: var(--eba-primary);
	text-decoration: underline;
	text-underline-offset: 4px;
}

.eba-wrap .eba-card__title {
	font-size: 1.16rem;
	font-weight: 800;
	line-height: 1.75;
	color: var(--eba-text);
}

.eba-wrap .eba-card__title a {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	color: inherit;
	transition: color 0.2s;
}

.eba-wrap .eba-card__title a:hover {
	color: var(--eba-secondary);
}

.eba-card__excerpt {
	color: var(--eba-muted);
	font-size: 0.95rem;
	line-height: 1.9;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
}

.eba-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 12px;
	margin-top: auto;
	padding-top: 6px;
	color: var(--eba-muted);
	font-size: 0.85rem;
	line-height: 1.7;
}

.eba-by {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--eba-text);
	font-weight: 600;
}

.eba-by__ini {
	display: grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--eba-primary);
	color: var(--eba-hero-text);
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1;
}

.eba-sep {
	width: 1px;
	height: 0.95em;
	background: var(--eba-line);
}

.eba-wrap a.eba-more {
	align-self: flex-start;
	margin-top: 4px;
	padding-bottom: 2px;
	color: var(--eba-primary);
	font-size: 0.92rem;
	font-weight: 700;
	background: linear-gradient(var(--eba-accent), var(--eba-accent)) no-repeat;
	background-position: 100% 100%;
	background-size: 100% 2px;
	transition: background-size 0.3s;
}

.eba-wrap[dir="ltr"] a.eba-more {
	background-position: 0 100%;
}

.eba-wrap a.eba-more:hover {
	background-size: 100% 100%;
	color: var(--eba-text);
}

/* ---------- Pagination ---------- */

.eba-pager {
	margin-top: clamp(36px, 5vw, 60px);
}

.eba-pager__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.eba-wrap .eba-pager .page-numbers {
	display: grid;
	place-items: center;
	min-width: 44px;
	height: 44px;
	padding: 0 0.9rem;
	border: 1px solid var(--eba-line);
	border-radius: calc(var(--eba-radius) * 0.6);
	background: var(--eba-card);
	color: var(--eba-text);
	font-weight: 700;
	line-height: 1;
	transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.eba-wrap .eba-pager a.page-numbers:hover {
	border-color: var(--eba-accent);
	color: var(--eba-text);
}

.eba-wrap .eba-pager .page-numbers.current {
	background: var(--eba-primary);
	border-color: var(--eba-primary);
	color: var(--eba-hero-text);
}

.eba-wrap .eba-pager .page-numbers.dots {
	border-color: transparent;
	background: transparent;
}

.eba-wrap[dir="rtl"] .eba-chev {
	transform: scaleX(-1);
}

/* ---------- Empty state ---------- */

.eba-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: clamp(40px, 7vw, 80px) 20px;
	border: 1px dashed var(--eba-line);
	border-radius: var(--eba-radius);
	background: var(--eba-card);
	color: var(--eba-muted);
	text-align: center;
}

.eba-empty .eba-empty__title {
	color: var(--eba-text);
	font-size: 1.2rem;
	font-weight: 800;
}

.eba-wrap a.eba-btn {
	margin-top: 10px;
	padding: 0.7rem 1.6rem;
	border-radius: 999px;
	background: var(--eba-primary);
	color: var(--eba-hero-text);
	font-weight: 700;
	transition: background-color 0.2s;
}

.eba-wrap a.eba-btn:hover {
	background: var(--eba-secondary);
	color: var(--eba-hero-text);
}

@media (prefers-reduced-motion: reduce) {
	.eba-wrap * {
		transition: none !important;
		animation: none !important;
	}
}
