/*!
 * EX Blog Posts — Front-end styles
 * Developed by Evening Xpert — https://www.eveningxpert.com
 */

.exbp-wrap {
	--exbp-cur: var(--exbp-cols-d, 3);
	position: relative;
	color: var(--exbp-text, #5b6470);
	font-family: inherit;
	margin: 0 0 1.5em;
}
@media (max-width: 1024px) { .exbp-wrap { --exbp-cur: var(--exbp-cols-t, 2); } }
@media (max-width: 767px)  { .exbp-wrap { --exbp-cur: var(--exbp-cols-m, 1); } }

.exbp-wrap *, .exbp-wrap *::before, .exbp-wrap *::after { box-sizing: border-box; }
.exbp-wrap button {
	font-family: inherit; text-transform: none; letter-spacing: normal;
	line-height: 1.2; margin: 0; box-shadow: none; text-shadow: none;
}
.exbp-wrap a { text-decoration: none; box-shadow: none; }

/* ---------- Grid base ---------- */
.exbp-items {
	display: grid;
	grid-template-columns: repeat(var(--exbp-cur), minmax(0, 1fr));
	gap: var(--exbp-gap, 28px);
	transition: opacity .25s ease;
}

/* ---------- Card ---------- */
.exbp-item {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--exbp-bg, #fff);
	border-radius: var(--exbp-radius, 14px);
	overflow: hidden;
	transition: transform .35s ease, box-shadow .35s ease, border-color .25s ease;
}
.exbp-style-shadow .exbp-item { box-shadow: 0 4px 22px rgba(17, 24, 39, .07); }
.exbp-style-shadow .exbp-item:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(17, 24, 39, .13); }
.exbp-style-bordered .exbp-item { border: 1px solid rgba(17, 24, 39, .1); }
.exbp-style-bordered .exbp-item:hover { border-color: var(--exbp-primary); }
.exbp-style-flat .exbp-item { background: transparent; border-radius: 0; overflow: visible; }
.exbp-style-flat .exbp-thumb { border-radius: var(--exbp-radius, 14px); }
.exbp-style-flat .exbp-body { padding: 18px 0 0; }

/* ---------- Thumbnail ---------- */
.exbp-thumb {
	position: relative;
	aspect-ratio: var(--exbp-ratio, 16/9);
	overflow: hidden;
	background: #eef0f3;
}
.exbp-thumb-link { display: block; width: 100%; height: 100%; }
.exbp-thumb img, .exbp-thumb .exbp-img {
	display: block; width: 100%; height: 100%; max-width: none;
	object-fit: cover; border-radius: 0; margin: 0;
	transition: transform .7s cubic-bezier(.2, .7, .2, 1);
}
.exbp-item:hover .exbp-thumb img { transform: scale(1.07); }

/* ---------- Category badge ---------- */
.exbp-cat {
	display: inline-block;
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--exbp-primary, #ff5a1f);
	color: #fff !important;
	font-size: 11px; font-weight: 700; line-height: 1.2;
	letter-spacing: .06em; text-transform: uppercase;
	transition: filter .2s;
}
.exbp-cat:hover { filter: brightness(1.1); }
.exbp-thumb .exbp-cat { position: absolute; top: 14px; left: 14px; z-index: 2; }

/* ---------- Body ---------- */
.exbp-body {
	display: flex; flex-direction: column; flex: 1; gap: 11px;
	padding: 22px 24px 24px;
}
.exbp-body .exbp-cat { align-self: flex-start; }
.exbp-title {
	margin: 0 !important; padding: 0;
	font-size: var(--exbp-title-size, 20px); line-height: 1.38; font-weight: 700;
}
.exbp-title a {
	color: var(--exbp-title, #1d2327);
	background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat;
	transition: background-size .4s ease, color .2s ease;
}
.exbp-title a:hover { color: var(--exbp-primary); background-size: 100% 1.5px; }

.exbp-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; line-height: 1.4; color: var(--exbp-text); opacity: .9; }
.exbp-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.exbp-meta svg { width: 14px; height: 14px; flex: none; color: var(--exbp-primary); }

.exbp-excerpt { margin: 0 !important; font-size: 15px; line-height: 1.7; color: var(--exbp-text); }

.exbp-readmore {
	align-self: flex-start; margin-top: auto; padding-top: 4px;
	display: inline-flex; align-items: center; gap: 7px;
	color: var(--exbp-primary) !important; font-size: 14px; font-weight: 700;
}
.exbp-readmore svg { transition: transform .25s ease; }
.exbp-readmore:hover svg { transform: translateX(5px); }

/* ---------- List layout ---------- */
.exbp-layout-list .exbp-item { flex-direction: row; }
.exbp-layout-list .exbp-thumb { flex: 0 0 40%; aspect-ratio: auto; min-height: 230px; }
.exbp-layout-list .exbp-thumb-link { position: absolute; inset: 0; }
.exbp-layout-list .exbp-body { justify-content: center; padding: 26px 30px; }
.exbp-style-flat.exbp-layout-list .exbp-body { padding: 4px 0 4px 28px; }
@media (max-width: 767px) {
	.exbp-layout-list .exbp-item { flex-direction: column; }
	.exbp-layout-list .exbp-thumb { flex: none; aspect-ratio: var(--exbp-ratio, 16/9); min-height: 0; }
	.exbp-layout-list .exbp-body { padding: 22px 24px 24px; }
	.exbp-style-flat.exbp-layout-list .exbp-body { padding: 18px 0 0; }
}

/* ---------- Masonry layout ---------- */
.exbp-layout-masonry .exbp-items { display: block; column-count: var(--exbp-cur); column-gap: var(--exbp-gap, 28px); }
.exbp-layout-masonry .exbp-item { display: inline-flex; width: 100%; margin: 0 0 var(--exbp-gap, 28px); break-inside: avoid; vertical-align: top; }
.exbp-layout-masonry .exbp-thumb { aspect-ratio: auto; }
.exbp-layout-masonry .exbp-thumb img { height: auto; }

/* ---------- Overlay layout ---------- */
.exbp-layout-overlay .exbp-item { min-height: 280px; }
.exbp-layout-overlay .exbp-thumb { position: absolute; inset: 0; aspect-ratio: auto; border-radius: inherit; }
.exbp-layout-overlay .exbp-item::before { content: ""; display: block; aspect-ratio: var(--exbp-ratio, 16/9); }
.exbp-layout-overlay .exbp-thumb::after {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background: linear-gradient(180deg, rgba(0,0,0,0) 25%, rgba(0,0,0,.55) 60%, rgba(0,0,0,.9) 100%);
}
.exbp-layout-overlay .no-thumb .exbp-thumb { background: linear-gradient(135deg, var(--exbp-primary), #1d2327); }
.exbp-wrap.exbp-layout-overlay .exbp-body {
	position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
	padding: 24px; gap: 9px; flex: none;
}
.exbp-layout-overlay .exbp-title a, .exbp-layout-overlay .exbp-readmore { color: #fff !important; }
.exbp-layout-overlay .exbp-meta, .exbp-layout-overlay .exbp-excerpt { color: rgba(255,255,255,.88); }
.exbp-layout-overlay .exbp-meta svg { color: #fff; }
.exbp-layout-overlay .exbp-excerpt { font-size: 14px; }
.exbp-layout-overlay.exbp-style-flat .exbp-item { border-radius: var(--exbp-radius, 14px); overflow: hidden; }

/* ---------- Carousel ---------- */
.exbp-carousel { position: relative; }
.exbp-layout-carousel .exbp-items {
	display: flex;
	overflow-x: auto; overflow-y: hidden;
	scroll-snap-type: x mandatory; scroll-behavior: smooth;
	scrollbar-width: none; -webkit-overflow-scrolling: touch;
	padding: 8px 4px 30px; margin: -8px -4px -30px;
	scroll-padding-left: 4px;
}
.exbp-layout-carousel .exbp-items::-webkit-scrollbar { display: none; }
.exbp-layout-carousel .exbp-item {
	flex: 0 0 calc((100% - (var(--exbp-cur) - 1) * var(--exbp-gap, 28px)) / var(--exbp-cur));
	scroll-snap-align: start;
}
.exbp-layout-carousel .exbp-empty { flex: 1 0 100%; }
.exbp-arrow {
	position: absolute; top: 38%; z-index: 5; transform: translateY(-50%);
	display: flex; align-items: center; justify-content: center;
	width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%;
	background: #fff; color: var(--exbp-title, #1d2327);
	box-shadow: 0 8px 22px rgba(17, 24, 39, .16) !important;
	cursor: pointer; transition: background .2s, color .2s, transform .2s;
}
.exbp-arrow:hover, .exbp-arrow:focus-visible { background: var(--exbp-primary); color: #fff; }
.exbp-arrow svg { width: 20px; height: 20px; }
.exbp-prev { left: -18px; }
.exbp-next { right: -18px; }
@media (max-width: 1100px) { .exbp-prev { left: 6px; } .exbp-next { right: 6px; } }
.exbp-dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.exbp-dot {
	width: 9px; height: 9px; padding: 0 !important; border: 0; border-radius: 999px;
	background: rgba(17, 24, 39, .18); cursor: pointer; transition: width .3s, background .3s;
}
.exbp-dot.is-active { width: 28px; background: var(--exbp-primary); }

/* ---------- Filter tabs ---------- */
.exbp-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 0 30px; }
.exbp-filter-btn {
	padding: 9px 20px; border: 1px solid rgba(17, 24, 39, .14); border-radius: 999px;
	background: transparent; color: var(--exbp-title, #1d2327);
	font-size: 14px; font-weight: 600; cursor: pointer; transition: all .2s ease;
}
.exbp-filter-btn:hover { border-color: var(--exbp-primary); color: var(--exbp-primary); background: transparent; }
.exbp-filter-btn.is-active, .exbp-filter-btn.is-active:hover { background: var(--exbp-primary); border-color: var(--exbp-primary); color: #fff; }

/* ---------- Pagination ---------- */
.exbp-pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 40px; }
.exbp-page-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	min-width: 44px; height: 44px; padding: 0 14px;
	border: 1px solid rgba(17, 24, 39, .12); border-radius: 10px;
	background: #fff; color: var(--exbp-title, #1d2327);
	font-size: 15px; font-weight: 600; cursor: pointer; transition: all .2s ease;
}
.exbp-page-btn:hover:not(:disabled) { border-color: var(--exbp-primary); color: var(--exbp-primary); background: #fff; }
.exbp-page-btn.is-active, .exbp-page-btn.is-active:hover { background: var(--exbp-primary) !important; border-color: var(--exbp-primary) !important; color: #fff !important; }
.exbp-page-btn:disabled { opacity: .4; cursor: not-allowed; }
.exbp-pn { padding: 0 20px; }
.exbp-ellipsis { padding: 0 4px; opacity: .6; }
.exbp-loadmore {
	position: relative; display: inline-flex; align-items: center; gap: 10px;
	padding: 14px 38px; border: 0; border-radius: 999px;
	background: var(--exbp-primary, #ff5a1f); color: #fff;
	font-size: 15px; font-weight: 700; cursor: pointer;
	box-shadow: 0 10px 24px -8px var(--exbp-primary) !important;
	transition: transform .2s, filter .2s;
}
.exbp-loadmore:hover { transform: translateY(-2px); filter: brightness(1.06); color: #fff; background: var(--exbp-primary); }

/* ---------- States ---------- */
.exbp-wrap.is-loading .exbp-items { opacity: .4; pointer-events: none; }
.exbp-wrap.is-loading .exbp-loadmore::before {
	content: ""; width: 16px; height: 16px; border-radius: 50%;
	border: 2px solid rgba(255,255,255,.5); border-top-color: #fff;
	animation: exbpSpin .7s linear infinite;
}
.exbp-empty {
	grid-column: 1 / -1; padding: 48px 20px; text-align: center;
	border: 1px dashed rgba(17, 24, 39, .18); border-radius: var(--exbp-radius, 14px);
	font-size: 15px; color: var(--exbp-text);
}
.exbp-fade { animation: exbpFade .55s ease backwards; }
@keyframes exbpFade { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes exbpSpin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
	.exbp-wrap *, .exbp-wrap *::before { animation: none !important; transition: none !important; }
	.exbp-layout-carousel .exbp-items { scroll-behavior: auto; }
}
