/* ============================================================
   BLOG PAGE  –  guru-cloud-veterinar
   ============================================================ */

/* ============================================================
   HERO
   ============================================================ */
.blog-hero {
	position: relative;
	background: linear-gradient(135deg, #0d3d26 0%, #155f3c 45%, #1a7a4a 100%);
	padding: 90px 0 0;
	overflow: hidden;
}

.blog-hero__bg-pattern {
	position: absolute;
	inset: 0;
	background-image:
		radial-gradient(circle at 20% 50%, rgba(255,255,255,0.04) 0%, transparent 50%),
		radial-gradient(circle at 80% 20%, rgba(255,255,255,0.06) 0%, transparent 40%),
		radial-gradient(circle at 60% 80%, rgba(46,200,120,0.08) 0%, transparent 45%);
	pointer-events: none;
}

.blog-hero__inner {
	position: relative;
	z-index: 1;
	text-align: center;
	padding-bottom: 60px;
}

.blog-hero__eyebrow {
	display: inline-block;
	background: rgba(255,255,255,0.12);
	border: 1px solid rgba(255,255,255,0.2);
	color: rgba(255,255,255,0.9);
	padding: 6px 20px;
	border-radius: 30px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 2.5px;
	text-transform: uppercase;
	margin-bottom: 24px;
}

.blog-hero__title {
	color: #fff;
	font-size: clamp(32px, 5vw, 58px);
	font-weight: 800;
	line-height: 1.15;
	margin: 0 0 20px;
	letter-spacing: -0.5px;
}

.blog-hero__title em {
	font-style: normal;
	color: #6ee8a8;
}

.blog-hero__desc {
	color: rgba(255,255,255,0.7);
	font-size: clamp(15px, 2vw, 18px);
	max-width: 480px;
	margin: 0 auto 36px;
	line-height: 1.6;
}

.blog-hero__stats {
	display: inline-flex;
	align-items: center;
	gap: 24px;
	background: rgba(255,255,255,0.08);
	border: 1px solid rgba(255,255,255,0.12);
	border-radius: 50px;
	padding: 14px 32px;
}

.blog-hero__stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
}

.blog-hero__stat strong {
	color: #fff;
	font-size: 22px;
	font-weight: 800;
	line-height: 1;
}

.blog-hero__stat span {
	color: rgba(255,255,255,0.55);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.blog-hero__stat-divider {
	width: 1px;
	height: 32px;
	background: rgba(255,255,255,0.2);
}

.blog-hero__wave {
	display: block;
	line-height: 0;
	position: relative;
	z-index: 1;
}

.blog-hero__wave svg {
	width: 100%;
	height: 80px;
}

/* ============================================================
   BLOG SECTION  +  MASONRY GRID
   ============================================================ */
.blog-section {
	background: #f4f6f5;
	padding: 60px 0 100px;
}

/* ── 3-column irregular grid ── */
.blog-masonry {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-auto-rows: 50px;
	gap: 20px;
}

/*
  9-item balanced cycle – each column gets exactly one 400, 500, 600px card
  per 9-item round so columns re-align cleanly after every 9 cards.

  Col assignment (auto-placement, left→right):
    items 1,4,7 → col 1
    items 2,5,8 → col 2
    items 3,6,9 → col 3

  Heights (grid-auto-rows: 50px):
    span  8 → 400px
    span 10 → 500px
    span 12 → 600px

  Cycle:
    1(col1) 8  2(col2) 12  3(col3) 10
    4(col1) 12 5(col2) 8   6(col3) 10  – wait, need col sums to match
    col1: 8+12+10=30  col2: 12+8+10=30  col3: 10+10+8=28  ← not equal

  Balanced version (col sums all = 30):
    1(col1) 8   2(col2) 12  3(col3) 10
    4(col1) 12  5(col2) 10  6(col3) 8
    7(col1) 10  8(col2) 8   9(col3) 12
    col sums: 30, 30, 30 ✓
*/
.blog-card:nth-child(9n+1) { grid-row: span 8;  }  /* 400px */
.blog-card:nth-child(9n+2) { grid-row: span 12; }  /* 600px */
.blog-card:nth-child(9n+3) { grid-row: span 10; }  /* 500px */
.blog-card:nth-child(9n+4) { grid-row: span 12; }  /* 600px */
.blog-card:nth-child(9n+5) { grid-row: span 10; }  /* 500px */
.blog-card:nth-child(9n+6) { grid-row: span 8;  }  /* 400px */
.blog-card:nth-child(9n+7) { grid-row: span 10; }  /* 500px */
.blog-card:nth-child(9n+8) { grid-row: span 8;  }  /* 400px */
.blog-card:nth-child(9n+9) { grid-row: span 12; }  /* 600px */

/* ============================================================
   BLOG CARD
   ============================================================ */
.blog-card {
	position: relative;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 4px 20px rgba(0,0,0,0.10);
	transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.blog-card:hover {
	box-shadow: 0 16px 48px rgba(0,0,0,0.22);
	transform: translateY(-4px);
}

/* Full-cover image */
.blog-card__link {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	height: 100%;
	text-decoration: none;
	color: inherit;
	position: relative;
}

.blog-card__image {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	transition: transform 0.55s cubic-bezier(0.25,0.46,0.45,0.94);
	will-change: transform;
}

.blog-card:hover .blog-card__image {
	transform: scale(1.06);
}

/* Gradient overlay – light at top, dark at bottom */
.blog-card__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to bottom,
		rgba(8,28,18,0.08)   0%,
		rgba(8,28,18,0.10)  35%,
		rgba(8,28,18,0.65)  65%,
		rgba(8,28,18,0.88) 100%
	);
	transition: opacity 0.35s ease;
}

.blog-card:hover .blog-card__overlay {
	opacity: 0.92;
}

/* ── Top row: category + reading time ── */
.blog-card__top {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	padding: 20px 20px 0;
}

.blog-card__cat {
	display: inline-block;
	background: #2e7d52;
	color: #fff;
	padding: 5px 13px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.8px;
	text-transform: uppercase;
	transition: background 0.25s;
}

.blog-card:hover .blog-card__cat {
	background: #3caa6e;
}

.blog-card__time {
	background: rgba(0,0,0,0.35);
	color: rgba(255,255,255,0.85);
	padding: 5px 11px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 500;
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

/* ── Bottom content ── */
.blog-card__bottom {
	position: relative;
	z-index: 2;
	padding: 0 22px 22px;
}

.blog-card__title {
	color: #fff;
	font-size: clamp(15px, 1.4vw, 19px);
	font-weight: 700;
	line-height: 1.35;
	margin: 0 0 8px;
	letter-spacing: -0.2px;
}

/* Bigger title on tall cards */
.blog-card:nth-child(9n+2) .blog-card__title,
.blog-card:nth-child(9n+4) .blog-card__title,
.blog-card:nth-child(9n+9) .blog-card__title {
	font-size: clamp(17px, 1.6vw, 22px);
}

/* Excerpt – hidden by default, shown on tall cards */
.blog-card__excerpt {
	color: rgba(255,255,255,0.72);
	font-size: 13px;
	line-height: 1.55;
	margin: 0 0 14px;
	display: none;
}

/* Show excerpt on 600px (span 12) cards */
.blog-card:nth-child(9n+2) .blog-card__excerpt,
.blog-card:nth-child(9n+4) .blog-card__excerpt,
.blog-card:nth-child(9n+9) .blog-card__excerpt {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Show excerpt on 500px (span 10) cards too */
.blog-card:nth-child(9n+3) .blog-card__excerpt,
.blog-card:nth-child(9n+5) .blog-card__excerpt,
.blog-card:nth-child(9n+7) .blog-card__excerpt {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.blog-card__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.blog-card__date {
	display: flex;
	align-items: center;
	gap: 5px;
	color: rgba(255,255,255,0.55);
	font-size: 12px;
}

.blog-card__date svg {
	flex-shrink: 0;
	opacity: 0.7;
}

.blog-card__cta {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	color: #6ee8a8;
	font-size: 13px;
	font-weight: 600;
	opacity: 0;
	transform: translateX(-8px);
	transition: opacity 0.3s ease, transform 0.3s ease;
	white-space: nowrap;
}

.blog-card__cta svg {
	transition: transform 0.25s ease;
}

.blog-card:hover .blog-card__cta {
	opacity: 1;
	transform: translateX(0);
}

.blog-card:hover .blog-card__cta svg {
	transform: translateX(3px);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.blog-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 64px;
}

.blog-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-width: 46px;
	height: 46px;
	padding: 0 14px;
	border-radius: 50px;
	background: #fff;
	color: #333;
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	box-shadow: 0 2px 10px rgba(0,0,0,0.08);
	transition: background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.blog-pagination .page-numbers:hover {
	background: #2e7d52;
	color: #fff;
	box-shadow: 0 4px 16px rgba(46,125,82,0.35);
	transform: translateY(-2px);
}

.blog-pagination .page-numbers.current {
	background: #2e7d52;
	color: #fff;
	box-shadow: 0 4px 16px rgba(46,125,82,0.35);
}

.blog-pagination .page-numbers.dots {
	background: transparent;
	box-shadow: none;
	pointer-events: none;
}

.blog-pagination .prev,
.blog-pagination .next {
	border-radius: 50px;
	padding: 0 20px;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.blog-empty {
	text-align: center;
	padding: 80px 20px;
}

.blog-empty__icon {
	margin-bottom: 24px;
}

.blog-empty__icon svg {
	width: 80px;
	height: 80px;
}

.blog-empty h2 {
	color: #1a3d28;
	font-size: 24px;
	font-weight: 700;
	margin: 0 0 12px;
}

.blog-empty p {
	color: #6b8a78;
	font-size: 16px;
	max-width: 400px;
	margin: 0 auto;
	line-height: 1.6;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet – 2 columns */
@media (max-width: 900px) {
	.blog-masonry {
		grid-template-columns: repeat(2, 1fr);
		grid-auto-rows: 50px;
		gap: 14px;
	}

	/* Reset all desktop spans */
	.blog-card:nth-child(9n+1),
	.blog-card:nth-child(9n+2),
	.blog-card:nth-child(9n+3),
	.blog-card:nth-child(9n+4),
	.blog-card:nth-child(9n+5),
	.blog-card:nth-child(9n+6),
	.blog-card:nth-child(9n+7),
	.blog-card:nth-child(9n+8),
	.blog-card:nth-child(9n+9) {
		grid-row: unset;
	}

	/* 2-col alternating: short/tall */
	.blog-card:nth-child(4n+1) { grid-row: span 9;  }  /* 450px */
	.blog-card:nth-child(4n+2) { grid-row: span 11; }  /* 550px */
	.blog-card:nth-child(4n+3) { grid-row: span 11; }  /* 550px */
	.blog-card:nth-child(4n+4) { grid-row: span 9;  }  /* 450px */

	/* Show excerpts on all tablet cards */
	.blog-card__excerpt {
		display: -webkit-box !important;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}

	.blog-hero { padding-top: 70px; }
}

/* Mobile – 1 column */
@media (max-width: 575px) {
	.blog-masonry {
		grid-template-columns: 1fr;
		grid-auto-rows: unset;
		gap: 12px;
	}

	/* Reset all nth-child spans */
	.blog-card:nth-child(4n+1),
	.blog-card:nth-child(4n+2),
	.blog-card:nth-child(4n+3),
	.blog-card:nth-child(4n+4) {
		grid-row: unset;
	}

	.blog-card { height: 300px; }
	.blog-card:nth-child(3n+1) { height: 340px; }
	.blog-card:nth-child(3n+2) { height: 280px; }

	.blog-hero { padding-top: 50px; }
	.blog-hero__stats { padding: 12px 20px; gap: 16px; }
	.blog-hero__stat strong { font-size: 18px; }

	.blog-section { padding: 40px 0 60px; }

	.blog-card__excerpt { display: none !important; }

	.blog-pagination .page-numbers { min-width: 40px; height: 40px; font-size: 13px; }
}
