/* Blog Guides Grid — Styles */

.bgg-wrapper {
	width: 100%;
}

.bgg-section {
	background-color: #0a0c11;
	padding: 80px 0;
	box-sizing: border-box;
}

.bgg-container {
	width: 100%;
	max-width: 1320px;
	margin: 0 auto;
	padding: 0 40px;
	box-sizing: border-box;
}

/* ---------------- Header ---------------- */
.bgg-header {
	text-align: center;
	max-width: 760px;
	margin: 0 auto 56px auto;
}

.bgg-eyebrow-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	margin-bottom: 16px;
}

.bgg-eyebrow {
	font-size: 13px;
	letter-spacing: 3px;
	font-weight: 700;
	color: #d9a94e;
	text-transform: uppercase;
	white-space: nowrap;
}

.bgg-eyebrow-line {
	height: 1px;
	width: 50px;
	background-color: #d9a94e;
	flex-shrink: 0;
}

.bgg-title {
	font-size: 42px;
	font-weight: 800;
	text-transform: uppercase;
	line-height: 1.2;
	margin: 0 0 18px 0;
}

.bgg-title-block {
	display: block;
}

.bgg-title-white {
	color: #f7f5f0;
}

.bgg-title-gold {
	color: #d9a94e;
}

.bgg-subtitle {
	font-size: 16px;
	line-height: 1.6;
	color: #a9a6ad;
	margin: 0;
}

.bgg-empty-state {
	text-align: center;
	color: #a9a6ad;
	padding: 40px 0;
}

/* ---------------- Grid ---------------- */
.bgg-grid {
	--bgg-cols: 3;
	--bgg-gap: 28px;
	display: grid;
	grid-template-columns: repeat(var(--bgg-cols), 1fr);
	gap: var(--bgg-gap);
	margin-bottom: 48px;
}

.bgg-card {
	background-color: rgba(255, 255, 255, 0.02);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.bgg-card:hover {
	border-color: rgba(217, 169, 78, 0.5);
	box-shadow: 0 24px 48px -18px rgba(217, 169, 78, 0.15);
	transform: translateY(-8px);
}

/* ---------------- Image ---------------- */
.bgg-image-link {
	display: block;
	text-decoration: none;
}

.bgg-image-wrap {
	position: relative;
	aspect-ratio: 4/3;
	overflow: hidden;
}

.bgg-image,
.bgg-image-placeholder {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.bgg-image-placeholder {
	background: repeating-linear-gradient(45deg, #1c1f27, #1c1f27 10px, #171a21 10px, #171a21 20px);
}

.bgg-category-badge {
	position: absolute;
	top: 16px;
	left: 16px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background-color: #d9a94e;
	color: #1a1508;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.5px;
	padding: 8px 14px;
	border-radius: 999px;
	z-index: 1;
}

.bgg-category-icon {
	display: inline-flex;
	align-items: center;
	font-size: 12px;
}

.bgg-category-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.bgg-date-badge {
	position: absolute;
	top: 16px;
	right: 16px;
	background-color: rgba(10, 12, 17, 0.75);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: #f7f5f0;
	font-size: 12px;
	font-weight: 600;
	padding: 7px 14px;
	border-radius: 999px;
	z-index: 1;
	backdrop-filter: blur(4px);
}

/* ---------------- Card body ---------------- */
.bgg-card-body {
	padding: 24px 26px 26px 26px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.bgg-title-link {
	text-decoration: none;
}

.bgg-card-title {
	font-size: 21px;
	font-weight: 700;
	color: #f7f5f0;
	line-height: 1.35;
	margin: 0 0 12px 0;
	transition: color 0.3s ease;
}

.bgg-excerpt {
	font-size: 14px;
	line-height: 1.65;
	color: #a9a6ad;
	margin: 0 0 20px 0;
	flex: 1;
}

.bgg-divider {
	display: block;
	height: 1px;
	background-color: rgba(255, 255, 255, 0.1);
	margin-bottom: 18px;
}

.bgg-footer-row {
	display: flex;
	align-items: center;
	gap: 14px;
}

.bgg-comments {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 600;
	color: #f7f5f0;
}

.bgg-comments svg {
	flex-shrink: 0;
}

.bgg-footer-sep {
	width: 1px;
	height: 16px;
	background-color: rgba(255, 255, 255, 0.15);
}

.bgg-read-more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
	font-size: 13px;
	font-weight: 700;
	color: #d9a94e;
	text-decoration: none;
	transition: color 0.3s ease;
}

.bgg-read-more:hover {
	color: #f0c46f;
}

.bgg-arrow {
	display: inline-block;
	transition: transform 0.3s ease;
}

.bgg-read-more:hover .bgg-arrow {
	transform: translateX(4px);
}

/* ---------------- Entrance animation ---------------- */
.bgg-wrapper[data-entrance="true"] .bgg-entrance-item {
	opacity: 0;
	transform: translateY(28px);
}

.bgg-wrapper[data-entrance="true"] .bgg-entrance-item.bgg-in-view {
	animation-name: bggFadeUp;
	animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
	animation-fill-mode: forwards;
}

@keyframes bggFadeUp {
	from { opacity: 0; transform: translateY(28px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ---------------- Controls bar (search + filter) ---------------- */
.bgg-controls-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
	margin-bottom: 40px;
}

.bgg-search-wrap {
	position: relative;
	flex: 0 1 320px;
	min-width: 220px;
}

.bgg-search-icon {
	position: absolute;
	top: 50%;
	left: 16px;
	transform: translateY(-50%);
	color: #7c8a99;
	pointer-events: none;
	display: flex;
	align-items: center;
}

.bgg-search-icon svg {
	width: 16px;
	height: 16px;
}

.bgg-search-input {
	width: 100%;
	box-sizing: border-box;
	background-color: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 999px;
	padding: 12px 18px 12px 42px;
	font-size: 14px;
	color: #f7f5f0;
	font-family: inherit;
	outline: none;
	transition: border-color 0.3s ease, background-color 0.3s ease;
}

.bgg-search-input::placeholder {
	color: #7c8a99;
}

.bgg-search-input:focus {
	border-color: #d9a94e;
	background-color: rgba(255, 255, 255, 0.05);
}

.bgg-search-clear {
	position: absolute;
	top: 50%;
	right: 14px;
	transform: translateY(-50%);
	background: transparent;
	border: none;
	color: #7c8a99;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	padding: 4px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease, color 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.bgg-search-clear.bgg-visible {
	opacity: 1;
	pointer-events: auto;
}

.bgg-search-clear:hover {
	color: #d9a94e;
}

.bgg-filter-tabs {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.bgg-filter-tab {
	background-color: transparent;
	border: 1px solid rgba(255, 255, 255, 0.12);
	color: #a9a6ad;
	font-size: 13px;
	font-weight: 600;
	padding: 9px 18px;
	border-radius: 999px;
	cursor: pointer;
	white-space: nowrap;
	transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
	-webkit-appearance: none;
	appearance: none;
	font-family: inherit;
}

.bgg-filter-tab:hover {
	border-color: rgba(217, 169, 78, 0.5);
	color: #f7f5f0;
}

.bgg-filter-tab.bgg-active {
	background-color: #d9a94e;
	border-color: #d9a94e;
	color: #1a1508;
	transform: translateY(-1px);
}

/* ---------------- Results area (AJAX swap transition) ---------------- */
.bgg-results {
	position: relative;
	transition: opacity 0.35s ease;
}

.bgg-results.bgg-loading {
	opacity: 0.35;
	pointer-events: none;
}

.bgg-results-spinner {
	position: absolute;
	top: 40px;
	left: 50%;
	transform: translateX(-50%);
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 3px solid rgba(217, 169, 78, 0.25);
	border-top-color: #d9a94e;
	opacity: 0;
	transition: opacity 0.25s ease;
	animation: bggSpin 0.8s linear infinite;
	pointer-events: none;
}

.bgg-results.bgg-loading .bgg-results-spinner {
	opacity: 1;
}

@keyframes bggSpin {
	from { transform: translateX(-50%) rotate(0deg); }
	to   { transform: translateX(-50%) rotate(360deg); }
}

.bgg-no-results {
	text-align: center;
	color: #a9a6ad;
	padding: 60px 0;
	font-size: 15px;
}

/* Cards fade/slide in on every AJAX refresh, not just first load */
.bgg-grid .bgg-card {
	opacity: 0;
	transform: translateY(16px);
	animation: bggFadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ---------------- Pagination ---------------- */
.bgg-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 44px;
	flex-wrap: wrap;
}

.bgg-page-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	box-sizing: border-box;
	background-color: transparent;
	border: 1px solid rgba(255, 255, 255, 0.12);
	color: #a9a6ad;
	font-size: 13px;
	font-weight: 600;
	border-radius: 8px;
	cursor: pointer;
	transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
	-webkit-appearance: none;
	appearance: none;
	font-family: inherit;
	text-decoration: none;
}

.bgg-page-btn:hover {
	border-color: rgba(217, 169, 78, 0.5);
	color: #f7f5f0;
}

.bgg-page-btn.bgg-active {
	background-color: #d9a94e;
	border-color: #d9a94e;
	color: #1a1508;
}

.bgg-page-btn[disabled] {
	opacity: 0.35;
	cursor: default;
	pointer-events: none;
}

.bgg-page-dots {
	color: #7c8a99;
	padding: 0 4px;
	font-size: 13px;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 991px) {
	.bgg-grid { --bgg-cols: 2; }
	.bgg-title { font-size: 32px; }
	.bgg-container { padding: 0 24px; }
	.bgg-section { padding: 60px 0; }
	.bgg-controls-bar { flex-direction: column; align-items: stretch; }
	.bgg-search-wrap { flex: 1 1 auto; }
}

@media (max-width: 600px) {
	.bgg-grid { --bgg-cols: 1; }
	.bgg-title { font-size: 26px; }
	.bgg-card-body { padding: 20px 20px 22px 20px; }
	.bgg-footer-row { flex-wrap: wrap; }
	.bgg-filter-tabs { gap: 8px; }
	.bgg-filter-tab { padding: 8px 14px; font-size: 12px; }
	.bgg-page-btn { min-width: 34px; height: 34px; font-size: 12px; }
}
