/* =========================================================
   Azguards Blog v1.3
   Note: modal position/display is controlled by JS inline
   styles to prevent theme/Elementor overrides
   ========================================================= */

/* ── CSS Variables ───────────────────────────────────────── */
.azguards-blog,
.azguards-cat-modal {
	--ab-primary:       #87BB3F;
	--ab-primary-dark:  #6fa030;
	--ab-primary-light: #eef3e6;
	--ab-text:          #2e3028;
	--ab-text-muted:    #6b7063;
	--ab-border:        #e0e2db;
	--ab-border-light:  #eaecea;
	--ab-bg:            #f5f5f3;
	--ab-card-bg:       #ffffff;
	--ab-surface:       #f9faf8;
	--ab-radius:        10px;
	--ab-radius-sm:     7px;
	--ab-transition:    0.18s ease;
}

/* ── Page ────────────────────────────────────────────────── */
.azguards-blog {
	width: 100%;
	background: #f5f5f3;
	min-height: 60vh;
}

/* =========================================================
   HEADER
   ========================================================= */
.azguards-blog__hero {
	background: #f5f5f3;
	border-bottom: 1px solid #e0e2db;
	padding: 32px 0 26px;
}

.azguards-blog__hero-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 28px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
}

.azguards-blog__heading {
	font-size: 26px;
	font-weight: 700;
	color: #2e3028;
	margin: 0;
	letter-spacing: -0.01em;
	line-height: 1;
	padding-bottom: 5px;
	border-bottom: 2.5px solid #87BB3F;
	display: inline-block;
}

/* ── Search ──────────────────────────────────────────────── */
.azguards-blog__search-wrap {
	position: relative;
	width: 250px;
	flex-shrink: 0;
}

.azguards-blog__search-icon {
	position: absolute;
	left: 11px;
	top: 50%;
	transform: translateY(-50%);
	color: #6b7063;
	pointer-events: none;
}

.azguards-blog__search {
	width: 100%;
	padding: 9px 14px 9px 34px;
	border: 1px solid #e0e2db;
	border-radius: 7px;
	font-size: 13.5px;
	color: #2e3028;
	background: #ffffff;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.azguards-blog__search::placeholder { color: #6b7063; opacity: 0.8; }

.azguards-blog__search:focus {
	border-color: #87BB3F;
	box-shadow: 0 0 0 3px rgba(135,187,63,0.12);
}

/* ── Body ────────────────────────────────────────────────── */
.azguards-blog__body {
	max-width: 1200px;
	margin: 0 auto;
	padding: 30px 28px 72px;
}

/* =========================================================
   CATEGORY PILLS
   ========================================================= */
.azguards-blog__cats {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 7px;
	margin-bottom: 26px;
}

.azguards-blog__cat {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 6px 13px;
	background: #ffffff;
	border: 1px solid #e0e2db;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 500;
	color: #6b7063;
	cursor: pointer;
	white-space: nowrap;
	line-height: 1;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.azguards-blog__cat:hover {
	border-color: #87BB3F;
	color: #6fa030;
	background: #eef3e6;
}

.azguards-blog__cat--active {
	background: #87BB3F !important;
	border-color: #87BB3F !important;
	color: #ffffff !important;
	font-weight: 600;
}

.azguards-blog__cat-count {
	font-size: 11px;
	font-weight: 600;
	opacity: 0.6;
}

.azguards-blog__cat--more {
	border-style: dashed;
	border-color: #87BB3F;
	color: #6fa030;
	font-weight: 600;
	background: transparent;
}

.azguards-blog__cat--more:hover {
	background: #eef3e6;
	border-style: solid;
}

/* ── Meta ────────────────────────────────────────────────── */
.azguards-blog__meta {
	font-size: 12.5px;
	color: #6b7063;
	margin-bottom: 20px;
	min-height: 16px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Grid ────────────────────────────────────────────────── */
.azguards-blog__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	min-height: 200px;
	transition: opacity 0.18s ease;
}

.azguards-blog__grid.is-loading {
	opacity: 0.35;
	pointer-events: none;
}

.azguards-blog__no-results {
	grid-column: 1 / -1;
	text-align: center;
	color: #6b7063;
	font-size: 15px;
	padding: 72px 0;
}

/* =========================================================
   CARDS
   ========================================================= */
.azguards-blog-card {
	background: #ffffff;
	border: 1px solid #eaecea;
	border-radius: 10px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.azguards-blog-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 4px 20px rgba(135,187,63,0.13), 0 1px 4px rgba(0,0,0,0.06);
	border-color: rgba(135,187,63,0.3);
}

.azguards-blog-card__img-wrap {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #eef3e6;
}

.azguards-blog-card__img {
	width: 100%; height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.azguards-blog-card:hover .azguards-blog-card__img { transform: scale(1.04); }

.azguards-blog-card__img-placeholder {
	width: 100%; height: 100%;
	display: flex; align-items: center; justify-content: center;
	background: #eef3e6;
	color: #87BB3F;
}

.azguards-blog-card__body {
	padding: 18px 20px 20px;
	display: flex; flex-direction: column; flex: 1; gap: 9px;
}

.azguards-blog-card__cats { display: flex; flex-wrap: wrap; gap: 5px; }

.azguards-blog-card__cat {
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #6fa030;
	background: #eef3e6;
	padding: 3px 8px;
	border-radius: 4px;
}

.azguards-blog-card__title {
	font-size: 16px; font-weight: 700;
	line-height: 1.4; margin: 0; color: #2e3028;
}

.azguards-blog-card__title a {
	color: inherit; text-decoration: none;
	transition: color 0.18s ease;
}
.azguards-blog-card__title a:hover { color: #6fa030; }

.azguards-blog-card__excerpt {
	font-size: 13.5px; color: #6b7063;
	line-height: 1.65; margin: 0; flex: 1;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.azguards-blog-card__footer {
	display: flex; align-items: center; justify-content: space-between;
	margin-top: auto; padding-top: 13px;
	border-top: 1px solid #eaecea;
}

.azguards-blog-card__date {
	display: inline-flex; align-items: center; gap: 5px;
	font-size: 12px; color: #6b7063;
}

.azguards-blog-card__read-more {
	display: inline-flex; align-items: center; gap: 4px;
	font-size: 12.5px; font-weight: 600;
	color: #6fa030; text-decoration: none;
	transition: gap 0.18s ease, color 0.18s ease;
}
.azguards-blog-card__read-more:hover { gap: 7px; color: #87BB3F; }

/* =========================================================
   PAGINATION
   ========================================================= */
.azguards-blog__pagination { margin-top: 48px; display: flex; justify-content: center; }

.azguards-blog-pagination { display: flex; align-items: center; gap: 5px; }

.azguards-blog-pagination__btn,
.azguards-blog-pagination__page {
	display: inline-flex; align-items: center; justify-content: center;
	width: 36px; height: 36px;
	border: 1px solid #e0e2db;
	border-radius: 7px;
	background: #ffffff;
	color: #2e3028;
	font-size: 13px; font-weight: 500;
	cursor: pointer;
	transition: all 0.18s ease;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.azguards-blog-pagination__btn:hover:not(:disabled),
.azguards-blog-pagination__page:hover:not(.azguards-blog-pagination__page--active) {
	border-color: #87BB3F;
	color: #6fa030;
	background: #eef3e6;
}

.azguards-blog-pagination__page--active {
	background: #87BB3F !important;
	border-color: #87BB3F !important;
	color: #ffffff !important;
	cursor: default;
}

.azguards-blog-pagination__btn:disabled { opacity: 0.3; cursor: not-allowed; }

.azguards-blog-pagination__ellipsis {
	width: 36px; text-align: center;
	color: #6b7063; font-size: 14px; user-select: none;
}

/* =========================================================
   MODAL CONTENT STYLES
   (position/display controlled by JS — only styling here)
   ========================================================= */
.azguards-cat-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px 14px;
	border-bottom: 1px solid #eaecea;
	flex-shrink: 0;
}

.azguards-cat-modal__title {
	font-size: 14px;
	font-weight: 700;
	color: #2e3028;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.azguards-cat-modal__close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px; height: 30px;
	border: 1px solid #e0e2db;
	background: #f9faf8;
	border-radius: 6px;
	color: #6b7063;
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease;
}

.azguards-cat-modal__close:hover {
	background: #e0e2db;
	color: #2e3028;
}

.azguards-cat-modal__body {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 18px 20px;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: #e0e2db transparent;
}

.azguards-cat-modal__body::-webkit-scrollbar { width: 5px; }
.azguards-cat-modal__body::-webkit-scrollbar-thumb {
	background: #e0e2db; border-radius: 3px;
}

.azguards-cat-modal__cat {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 12px;
	background: #f9faf8;
	border: 1px solid #e0e2db;
	border-radius: 999px;
	font-size: 12.5px;
	font-weight: 500;
	color: #6b7063;
	cursor: pointer;
	white-space: nowrap;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	transition: all 0.18s ease;
}

.azguards-cat-modal__cat:hover {
	border-color: #87BB3F;
	color: #6fa030;
	background: #eef3e6;
}

.azguards-cat-modal__cat.is-active {
	background: #87BB3F;
	border-color: #87BB3F;
	color: #ffffff;
	font-weight: 600;
}

.azguards-cat-modal__count {
	font-size: 11px;
	opacity: 0.6;
	font-weight: 600;
}

/* ── Loading spinner ─────────────────────────────────────── */
@keyframes ab-spin { to { transform: rotate(360deg); } }

.azguards-blog__grid.is-loading::after {
	content: '';
	position: fixed; top: 50%; left: 50%;
	width: 30px; height: 30px; margin: -15px 0 0 -15px;
	border: 3px solid #e0e2db;
	border-top-color: #87BB3F;
	border-radius: 50%;
	animation: ab-spin 0.7s linear infinite;
	z-index: 9999;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 960px) { .azguards-blog__grid { grid-template-columns: repeat(2,1fr); } }

@media (max-width: 620px) {
	.azguards-blog__hero-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
	.azguards-blog__search-wrap { width: 100%; }
	.azguards-blog__grid { grid-template-columns: 1fr; gap: 18px; }
}
