/* =========================================================
   AVANSEN — BLOG ARCHIVE
========================================================= */

.av-blog-archive {
	width: 100%;
	background: #000;
	color: #f4f1ed;
	overflow: hidden;
}


/* =========================================================
   FEATURED ARTICLE
========================================================= */

.av-blog-featured {
	width: 100%;
	padding-top: 180px;
	padding-bottom: 120px;
}

.av-blog-featured__container {
	width: 1320px;
	max-width: calc(100% - 80px);
	margin: 0 auto;

	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
	gap: 64px;

	align-items: stretch;
	direction: ltr;
}


/* IMAGE */

.av-blog-featured__media {
	display: block;
	width: 100%;
	overflow: hidden;
	background: #111;
}

.av-blog-featured__image {
	display: block;

	width: 100%;
	height: 100%;
	min-height: 520px;

	object-fit: cover;

	transition: transform 700ms cubic-bezier(.2,.7,.2,1);
}

.av-blog-featured__media:hover .av-blog-featured__image {
	transform: scale(1.025);
}


/* CONTENT */

.av-blog-featured__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;

	direction: rtl;
	text-align: right;
}

.av-blog-featured__meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;

	gap: 8px;
	margin-bottom: 24px;

	font-family: "Kalameh", sans-serif;
	font-size: 18px;

	color: rgba(255, 255, 255, 0.42);
}

.av-blog-featured__title {
	margin: 0 0 24px;

	font-family: "Gofteh", sans-serif;
	font-size: clamp(28px, 2.5vw, 38px);
	font-weight: 600;
	line-height: 1.7;
}

.av-blog-featured__title a {
	color: #f4f1ed;
	text-decoration: none;
}

.av-blog-featured__excerpt {
	margin: 0;

	font-family: "Kalameh", sans-serif;
	font-size: 24px;
	font-weight: 400;
	line-height: 1.9;

	color: rgba(255, 255, 255, 0.62);
}


/* =========================================================
   FEATURED ARTICLE BUTTON
========================================================= */

.av-blog-featured__button {
	position: relative;

	width: 210px;
	height: 58px;

	margin-top: 44px;
	padding: 0 22px;

	display: flex;
	align-items: center;
	justify-content: center;

	gap: 18px;

	border: 1px solid #FF5A00;
	border-radius: 30px;

	font-family: "Kalameh", sans-serif;
	font-size: 18px;
	font-weight: 500;

	color: #F3F0ED;
	text-decoration: none;

	/* بک دکمه مشکی */
	background: #000;

	box-shadow:
		0 0 10px rgba(255, 90, 0, 0.18),
		0 0 24px rgba(255, 90, 0, 0.10);

	transition:
		transform 240ms ease,
		background 240ms ease,
		box-shadow 240ms ease;

	animation:
		av-blog-cta-pulse
		3.2s
		ease-in-out
		infinite;
}


/* =========================================================
   CINEMATIC OUTER GLOW
========================================================= */

.av-blog-featured__button::before {
	content: "";

	position: absolute;

	inset: -18px;

	z-index: -1;

	border-radius: 40px;

	background:
		radial-gradient(
			ellipse at center,
			rgba(255, 90, 0, 0.22) 0%,
			rgba(127, 47, 16, 0.12) 40%,
			rgba(0, 0, 0, 0) 72%
		);

	filter: blur(14px);

	opacity: 0.7;

	pointer-events: none;

	animation:
		av-blog-cta-glow
		3.2s
		ease-in-out
		infinite;
}


/* =========================================================
   HOVER
========================================================= */

.av-blog-featured__button:hover {
	transform: translateY(-2px) scale(1.02);

	background: #000;

	box-shadow:
		0 0 12px rgba(255, 90, 0, 0.30),
		0 0 30px rgba(255, 90, 0, 0.16);
}


/* =========================================================
   PULSE
========================================================= */

@keyframes av-blog-cta-pulse {

	0%,
	100% {
		box-shadow:
			0 0 8px rgba(255, 90, 0, 0.16),
			0 0 18px rgba(255, 90, 0, 0.08);
	}

	50% {
		box-shadow:
			0 0 16px rgba(255, 90, 0, 0.34),
			0 0 38px rgba(255, 90, 0, 0.18);
	}
}


/* =========================================================
   GLOW BREATHING
========================================================= */

@keyframes av-blog-cta-glow {

	0%,
	100% {
		opacity: 0.35;
		transform: scale(0.96);
	}

	50% {
		opacity: 0.9;
		transform: scale(1.08);
	}
}

/* =========================================================
   ARTICLE LIST
========================================================= */

.av-blog-list {
	width: 100%;
	padding-bottom: 140px;
}

.av-blog-list__container {
	width: 1320px;
	max-width: calc(100% - 80px);

	margin: 0 auto;

	box-sizing: border-box;
	direction: rtl;
}


/* =========================================================
   MARKER
========================================================= */

.av-blog-list__marker {
	transform: translateY(-48px);
}

.av-blog-list__marker + .av-blog-grid {
	margin-top: 88px;
}


/* =========================================================
   GRID
========================================================= */

.av-blog-grid {
	width: 100%;
	min-width: 0;

	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));

	column-gap: 32px;
	row-gap: 96px;

	margin: 0;

	direction: rtl;
	box-sizing: border-box;
}


/* =========================================================
   CARD
========================================================= */

.av-blog-card {
    position: relative;

    display: flex;
    flex-direction: column;

    width: 100%;
    min-width: 0;
    height: 100%;

    direction: rtl;
    text-align: right;

    box-sizing: border-box;
}

/* CARD IMAGE */

.av-blog-card__media {
	display: block;

	width: 100%;
	aspect-ratio: 1.28 / 1;

	overflow: hidden;

	background: #111;
}

.av-blog-card__image {
	display: block;

	width: 100%;
	height: 100%;

	object-fit: cover;

	transition: transform 600ms cubic-bezier(.2,.7,.2,1);
}

.av-blog-card:hover .av-blog-card__image {
	transform: scale(1.035);
}


/* CARD BODY */

.av-blog-card__body {
    position: relative;

    display: flex;
    flex-direction: column;
    flex: 1;

    padding-top: 24px;
    padding-left: 52px;
    padding-bottom: 52px;

    box-sizing: border-box;
}

.av-blog-card__meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;

	gap: 7px;

	margin-bottom: 24px;

	font-family: "Kalameh", sans-serif;
	font-size: 18px;

	color: rgba(255, 255, 255, 0.4);
}

.av-blog-card__title {
    margin: 0 0 12px;

    min-height: 4.5em;

    font-family: "Gofteh", sans-serif;
    font-size: 27px;
    font-weight: 700;
    line-height: 1.5;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.av-blog-card__title a {
	color: #f4f1ed;
	text-decoration: none;
}

.av-blog-card__excerpt {
    margin: 0;

    min-height: 3.6em;

    font-family: "Kalameh", sans-serif;
    font-size: 22px;
    font-weight: 400;
    line-height: 1.8;

    color: rgba(255, 255, 255, 0.55);

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}


/* ARROW */

.av-blog-card__arrow {
	position: absolute;

	left: 0;
	bottom: 12px;

	display: flex;
	align-items: center;
	justify-content: center;

	width: 40px;
	height: 40px;

	border: 1px solid rgba(255, 90, 0, 0.75);
	border-radius: 12px;

	color: #fff;
	text-decoration: none;

	background: rgba(255, 90, 0, 0.08);

	transition:
		background-color 200ms ease,
		transform 200ms ease;
}

.av-blog-card:hover .av-blog-card__arrow {
	background: #ff5a00;
	transform: translateX(-4px);
}


/* =========================================================
   PAGINATION
========================================================= */

.av-blog-pagination {
	width: 100%;

	margin-top: 100px;

	direction: rtl;
}

.av-blog-pagination .page-numbers {
	list-style: none;

	display: flex;
	align-items: center;
	justify-content: center;

	gap: 10px;

	margin: 0;
	padding: 0;
}

.av-blog-pagination a,
.av-blog-pagination span {
	display: flex;
	align-items: center;
	justify-content: center;

	min-width: 42px;
	height: 42px;

	padding: 0 12px;

	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 999px;

	font-family: "Kalameh", sans-serif;
	font-size: 14px;

	color: rgba(255, 255, 255, 0.65);
	text-decoration: none;
}

.av-blog-pagination .current {
	border-color: #ff5a00;
	color: #fff;
}


/* =========================================================
   EMPTY
========================================================= */

.av-blog-list__empty {
	font-family: "Kalameh", sans-serif;
	font-size: 18px;

	color: rgba(255, 255, 255, 0.55);

	direction: rtl;
	text-align: right;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1024px) {

	.av-blog-hero__container,
	.av-blog-featured__container {
		max-width: calc(100% - 48px);
	}

	.av-blog-list__container {
		max-width: calc(100% - 48px);
	}

	.av-blog-featured__container {
		grid-template-columns: 1.5fr 1fr;
		gap: 40px;
	}

	.av-blog-featured__image {
		min-height: 430px;
	}

	.av-blog-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

	/* HERO */

	.av-blog-hero {
		padding: 130px 0 64px;
	}

	.av-blog-hero__container {
		width: calc(100% - 40px);
		max-width: none;

		display: block;
	}

	.av-blog-hero__eyebrow {
		margin-bottom: 16px;
		font-size: 15px;
	}

	.av-blog-hero__title {
		font-size: 30px;
		line-height: 1;
	}

	.av-blog-hero__intro {
		max-width: none;

		margin-top: 32px;

		font-size: 18px;
		line-height: 1.9;
	}


	/* FEATURED */

	.av-blog-featured {
		padding-top: 130px;
		padding-bottom: 88px;
	}

	.av-blog-featured__container {
		width: calc(100% - 40px);
		max-width: none;

		display: flex;
		flex-direction: column;

		gap: 32px;
	}

	.av-blog-featured__media {
		aspect-ratio: 1 / 0.78;
	}

	.av-blog-featured__image {
		width: 100%;
		height: 100%;
		min-height: 0;

		object-fit: cover;
	}

	.av-blog-featured__meta {
		margin-bottom: 14px;
		font-size: 15px;
	}

	.av-blog-featured__title {
		margin-bottom: 16px;

		font-size: 30px;
		line-height: 1.25;
	}

	.av-blog-featured__excerpt {
		font-size: 18px;
		line-height: 1.9;
	}


.av-blog-featured__button {
    min-width: 176px;
    height: 54px;

    margin: 28px auto 0;
    align-self: center;

    font-size: 16px;
}


	/* LIST */

	.av-blog-list {
		padding-bottom: 88px;
	}

	.av-blog-list__container {
		width: calc(100% - 40px);
		max-width: none;
	}

	.av-blog-list__marker {
		margin: 0 0 40px;
	}


	/* GRID */

	.av-blog-grid {
		grid-template-columns: 1fr;
		row-gap: 64px;
		margin: 0;
	}


	/* CARD */

	.av-blog-card__media {
		aspect-ratio: 1.25 / 1;
	}

	.av-blog-card__body {
		padding-top: 20px;
		padding-left: 48px;
	}

	.av-blog-card__title {
		font-size: 26px;
	}

	.av-blog-card__excerpt {
		font-size: 18px;
	}

	.av-blog-card__arrow {
		width: 38px;
		height: 38px;
	}


	/* PAGINATION */

	.av-blog-pagination {
		margin-top: 72px;
	}

}



@media (max-width: 768px) {
    .av-blog-list__marker {
        font-size: 16px !important;
    }

    .av-blog-list__marker * {
        font-size: 16px !important;
    }
}


/* BLOG CARDS — AUTO HEIGHT ON MOBILE */
@media (max-width: 768px) {

    .av-blog-card {
        height: auto !important;
        min-height: 0 !important;
    }

    .av-blog-card__body {
        flex: 0 0 auto;
        padding-top: 20px;
        padding-bottom: 56px;
    }

    /* عنوان متناسب با تعداد خطوط */
    .av-blog-card__title {
        min-height: 0 !important;
        height: auto !important;
        margin-bottom: 12px;
    }

    /* توضیحات بدون ارتفاع اضافی */
    .av-blog-card__excerpt {
        min-height: 0 !important;
        height: auto !important;
    }

    /* فلش در پایین کارت */
    .av-blog-card__arrow {
        bottom: 0;
    }

    /* فاصله بین کارت‌ها */
    .av-blog-grid {
        row-gap: 48px;
        align-items: start;
    }
}




.av-blog-featured__page-title {
	margin: 0 0 18px;
	color: #fff;
	font-size: 20px;
	font-weight: 100;
	line-height: 1.5;
	text-align: right;
}


/* فاصله و چیدمان صفحه‌های دوم به بعد بلاگ */
body.blog.paged .av-blog-list {
	padding-top: 180px;
}

body.blog.paged .av-blog-list__marker {
	position: relative;
	top: auto;
	right: auto;
	left: auto;
	width: 100%;
	margin: 28px 0 0;
	transform: none;
}

body.blog.paged .av-blog-list__marker + .av-blog-grid {
	margin-top: 56px;
}

@media (max-width: 768px) {
	body.blog.paged .av-blog-list {
		padding-top: 130px;
	}

	body.blog.paged .av-blog-list__marker {
		margin: 24px 0 36px;
	}

	body.blog.paged .av-blog-list__marker + .av-blog-grid {
		margin-top: 0;
	}
}
