/* ==========================================================================
   Wallasey WebWorks — Blog Styles (V3)
   Shared by: blog home, archives, search results, single posts, index.
   Enqueued conditionally in functions.php.
   ========================================================================== */

:root {
	--primary: #0e73e8;
	--primary-dark: #0b5bb8;
	--dark: #0f172a;
	--gray-50: #f8fafc;
	--gray-100: #f1f5f9;
	--gray-200: #e2e8f0;
	--gray-600: #475569;
	--success: #10b981;
}

/* --------------------------------------------------------------------------
   BLOG HERO
   -------------------------------------------------------------------------- */

.blog-hero {
	position: relative;
	padding: 100px 20px 80px;
	background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 60%, #083d7a 100%);
	color: #fff;
	overflow: hidden;
}

.blog-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1), transparent 50%);
	pointer-events: none;
}

.blog-hero-content {
	max-width: 900px;
	margin: 0 auto;
	text-align: center;
	position: relative;
	z-index: 2;
}

.blog-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: rgba(255, 255, 255, 0.16);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.3);
	padding: 10px 20px;
	border-radius: 50px;
	font-size: 0.9rem;
	font-weight: 600;
	margin-bottom: 25px;
}

.blog-badge .icon {
	width: 1.15em;
	height: 1.15em;
}

.blog-hero h1 {
	font-size: clamp(2.2rem, 5vw, 3.5rem);
	font-weight: 900;
	line-height: 1.15;
	margin: 0 0 18px;
	letter-spacing: -0.5px;
}

.blog-hero p {
	font-size: clamp(1.05rem, 2vw, 1.25rem);
	line-height: 1.6;
	margin: 0 auto;
	max-width: 650px;
	opacity: 0.95;
}

/* --------------------------------------------------------------------------
   SECTIONS (blog scope)
   -------------------------------------------------------------------------- */

.blog-section-white {
	padding: 80px 20px;
	background: #fff;
}

.blog-section-gray {
	padding: 80px 20px;
	background: var(--gray-50);
}

.section-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

.section-header {
	text-align: center;
	max-width: 800px;
	margin: 0 auto 50px;
}

.section-title {
	font-size: clamp(2rem, 4vw, 2.8rem);
	font-weight: 900;
	color: var(--dark);
	margin: 0 0 15px;
	line-height: 1.15;
}

.section-description {
	font-size: 1.15rem;
	color: var(--gray-600);
	margin: 0;
	line-height: 1.6;
}

/* --------------------------------------------------------------------------
   FEATURED POST
   -------------------------------------------------------------------------- */

.featured-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: rgba(14, 115, 232, 0.1);
	border: 2px solid var(--primary);
	color: var(--primary-dark);
	padding: 8px 22px;
	border-radius: 50px;
	font-size: 0.85rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 24px;
}

.featured-post {
	background: #fff;
	border: 2px solid var(--gray-200);
	border-radius: 20px;
	overflow: hidden;
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.featured-post:hover {
	border-color: var(--primary);
	box-shadow: 0 15px 50px rgba(14, 115, 232, 0.12);
}

.featured-image {
	height: 380px;
	overflow: hidden;
	background: var(--gray-100);
}

.featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.featured-content {
	padding: 40px;
}

.post-category {
	display: inline-block;
	background: rgba(14, 115, 232, 0.1);
	color: var(--primary-dark);
	padding: 6px 16px;
	border-radius: 50px;
	font-size: 0.8rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 16px;
}

.featured-content .post-title {
	font-size: clamp(1.6rem, 3vw, 2.3rem);
	font-weight: 900;
	line-height: 1.2;
	margin: 0 0 16px;
}

.featured-content .post-title a {
	color: var(--dark);
	text-decoration: none;
}

.featured-content .post-title a:hover {
	color: var(--primary);
}

.post-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	color: var(--gray-600);
	font-size: 0.95rem;
	margin: 0 0 18px;
}

.post-meta .icon {
	width: 1.05em;
	height: 1.05em;
	vertical-align: -0.15em;
	color: var(--primary);
}

.post-excerpt {
	font-size: 1.08rem;
	color: var(--gray-600);
	line-height: 1.7;
	margin: 0 0 24px;
}

.btn-read-more {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 32px;
	background: linear-gradient(135deg, var(--primary), var(--primary-dark));
	color: #fff;
	font-weight: 700;
	border-radius: 8px;
	text-decoration: none;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-read-more:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 25px rgba(14, 115, 232, 0.3);
	text-decoration: none;
}

/* --------------------------------------------------------------------------
   BLOG CARD GRID
   -------------------------------------------------------------------------- */

.blog-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 30px;
}

.blog-card {
	background: #fff;
	border: 2px solid var(--gray-200);
	border-radius: 16px;
	overflow: hidden;
	transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
	display: flex;
	flex-direction: column;
}

.blog-card:hover {
	border-color: var(--primary);
	transform: translateY(-5px);
	box-shadow: 0 10px 40px rgba(14, 115, 232, 0.12);
}

.blog-card-image {
	height: 200px;
	overflow: hidden;
	background: var(--gray-100);
}

.blog-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image img {
	transform: scale(1.05);
}

.blog-card-placeholder {
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--primary);
	opacity: 0.4;
}

.blog-card-placeholder svg {
	width: 60px;
	height: 60px;
}

.blog-card-content {
	padding: 28px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.blog-card-date {
	font-size: 0.88rem;
	color: var(--gray-600);
	margin-bottom: 12px;
}

.blog-card-title {
	font-size: 1.35rem;
	font-weight: 800;
	line-height: 1.3;
	margin: 0 0 12px;
}

.blog-card-title a {
	color: var(--dark);
	text-decoration: none;
}

.blog-card-title a:hover {
	color: var(--primary);
}

.blog-card-excerpt {
	font-size: 0.98rem;
	color: var(--gray-600);
	line-height: 1.6;
	margin: 0 0 18px;
	flex: 1;
}

.blog-card-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--primary);
	font-weight: 700;
	text-decoration: none;
	margin-top: auto;
}

.blog-card-link svg {
	width: 16px;
	height: 16px;
	transition: transform 0.2s ease;
}

.blog-card-link:hover svg {
	transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   NO POSTS / EMPTY STATE
   -------------------------------------------------------------------------- */

.no-posts {
	text-align: center;
	padding: 60px 20px;
}

.no-posts svg {
	width: 80px;
	height: 80px;
	color: #cbd5e1;
	margin-bottom: 20px;
}

.no-posts h2 {
	font-size: 1.5rem;
	font-weight: 700;
	margin: 0 0 12px;
	color: var(--gray-600);
}

.no-posts p {
	color: var(--gray-600);
	margin: 0;
}

/* --------------------------------------------------------------------------
   PAGINATION
   -------------------------------------------------------------------------- */

.pagination {
	margin-top: 60px;
	text-align: center;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 45px;
	height: 45px;
	margin: 0 5px 8px;
	padding: 0 15px;
	background: #fff;
	border: 2px solid var(--gray-200);
	border-radius: 8px;
	color: var(--dark);
	font-weight: 700;
	text-decoration: none;
	transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
	background: var(--primary);
	border-color: var(--primary);
	color: #fff;
}

.pagination .page-numbers.dots {
	border: none;
	background: transparent;
}

/* --------------------------------------------------------------------------
   CATEGORY GRID
   -------------------------------------------------------------------------- */

.category-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 20px;
}

.category-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	background: #fff;
	border: 2px solid var(--gray-200);
	border-radius: 14px;
	padding: 28px 20px;
	text-align: center;
	text-decoration: none;
	transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
	border-color: var(--primary);
	transform: translateY(-4px);
	box-shadow: 0 8px 25px rgba(14, 115, 232, 0.12);
	text-decoration: none;
}

.category-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 12px;
	background: rgba(14, 115, 232, 0.1);
	color: var(--primary);
}

.category-icon svg {
	width: 26px;
	height: 26px;
}

.category-name {
	font-size: 1.1rem;
	font-weight: 800;
	color: var(--dark);
	margin: 0;
}

.category-count {
	font-size: 0.85rem;
	color: var(--gray-600);
}

/* --------------------------------------------------------------------------
   SINGLE POST
   -------------------------------------------------------------------------- */

.post-hero {
	background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 60%, #083d7a 100%);
	color: #fff;
	padding: 90px 20px 70px;
}

.post-hero-container {
	max-width: 800px;
	margin: 0 auto;
	text-align: center;
}

.post-hero .post-category {
	background: rgba(255, 255, 255, 0.16);
	border: 1px solid rgba(255, 255, 255, 0.3);
	color: #fff;
}

.post-hero .post-title {
	font-size: clamp(2rem, 5vw, 3.2rem);
	font-weight: 900;
	line-height: 1.15;
	margin: 0 0 20px;
	letter-spacing: -0.5px;
}

.post-hero .post-meta {
	justify-content: center;
	color: rgba(255, 255, 255, 0.9);
}

.post-hero .post-meta .icon {
	color: #fff;
	opacity: 0.85;
}

.featured-image-section {
	background: linear-gradient(to bottom, var(--primary-dark) 0%, var(--primary-dark) 50%, var(--gray-50) 50%);
	padding: 0 20px;
}

.featured-image-container {
	max-width: 900px;
	margin: 0 auto;
}

.featured-image-wrapper {
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.featured-image-wrapper img {
	width: 100%;
	height: auto;
	display: block;
}

.post-content-section {
	background: var(--gray-50);
	padding: 60px 20px 90px;
}

.post-content-container {
	max-width: 800px;
	margin: 0 auto;
}

.post-article {
	background: #fff;
	border-radius: 20px;
	padding: 55px 60px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.post-content {
	font-size: 1.1rem;
	line-height: 1.85;
	color: #1e293b;
}

.post-content h2 {
	font-size: 1.8rem;
	font-weight: 800;
	margin: 2em 0 0.7em;
	color: var(--dark);
	line-height: 1.25;
}

.post-content h3 {
	font-size: 1.4rem;
	font-weight: 800;
	margin: 1.8em 0 0.6em;
	color: var(--dark);
}

.post-content p {
	margin: 0 0 1.4em;
}

.post-content a {
	color: var(--primary);
	text-decoration: underline;
}

.post-content img {
	max-width: 100%;
	height: auto;
	border-radius: 12px;
	margin: 1.5em 0;
}

.post-content ul,
.post-content ol {
	margin: 0 0 1.4em;
	padding-left: 1.5em;
}

.post-content li {
	margin-bottom: 0.5em;
}

.post-content blockquote {
	border-left: 4px solid var(--primary);
	background: var(--gray-50);
	margin: 1.5em 0;
	padding: 20px 24px;
	border-radius: 0 12px 12px 0;
	font-style: italic;
	color: var(--gray-600);
}

.post-content pre {
	background: var(--dark);
	color: #e2e8f0;
	padding: 20px;
	border-radius: 12px;
	overflow-x: auto;
	font-size: 0.9em;
}

.post-tags {
	margin-top: 40px;
	padding-top: 25px;
	border-top: 1px solid var(--gray-200);
}

.tag-list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.tags-label {
	font-weight: 700;
	color: var(--gray-600);
	font-size: 0.9rem;
}

.tag-link {
	background: var(--gray-100);
	color: var(--gray-600);
	padding: 6px 14px;
	border-radius: 50px;
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}

.tag-link:hover {
	background: var(--primary);
	color: #fff;
	text-decoration: none;
}

/* Author bio */

.author-bio {
	display: flex;
	align-items: center;
	gap: 24px;
	background: #fff;
	border: 2px solid var(--gray-200);
	border-radius: 16px;
	padding: 30px;
	margin-top: 40px;
}

.author-avatar img {
	border-radius: 50%;
	display: block;
}

.author-info h2 {
	font-size: 1.2rem;
	font-weight: 800;
	color: var(--dark);
	margin: 0 0 8px;
}

.author-info p {
	color: var(--gray-600);
	line-height: 1.6;
	margin: 0;
	font-size: 0.98rem;
}

/* Prev / next navigation */

.post-navigation {
	margin-top: 40px;
	display: grid;
	gap: 20px;
}

@media (min-width: 700px) {
	.post-navigation {
		grid-template-columns: 1fr 1fr;
	}
}

.nav-link {
	background: #fff;
	border: 2px solid var(--gray-200);
	border-radius: 16px;
	padding: 25px;
	text-decoration: none;
	display: flex;
	align-items: center;
	gap: 20px;
	transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-link:hover {
	border-color: var(--primary);
	box-shadow: 0 8px 25px rgba(14, 115, 232, 0.15);
	transform: translateY(-3px);
	text-decoration: none;
}

.nav-link--next {
	justify-content: space-between;
}

.nav-link--next .nav-text {
	text-align: right;
}

.nav-text {
	flex: 1;
}

.nav-icon {
	width: 30px;
	height: 30px;
	color: var(--primary);
	flex-shrink: 0;
}

.nav-label {
	display: block;
	color: var(--gray-600);
	font-size: 0.85rem;
	margin-bottom: 6px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.nav-title {
	display: block;
	color: var(--dark);
	font-weight: 700;
	font-size: 1.1rem;
	line-height: 1.4;
}

/* Post CTA box */

.post-cta {
	margin-top: 60px;
	background: linear-gradient(135deg, var(--primary), var(--primary-dark));
	border-radius: 20px;
	padding: 50px 40px;
	text-align: center;
	color: #fff;
}

.post-cta h2 {
	font-size: 2rem;
	font-weight: 900;
	margin: 0 0 15px;
}

.post-cta p {
	font-size: 1.15rem;
	margin: 0 0 30px;
	opacity: 0.95;
}

.cta-button {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 18px 40px;
	background: #fff;
	color: var(--primary-dark);
	font-weight: 800;
	font-size: 1.1rem;
	border-radius: 8px;
	text-decoration: none;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
	text-decoration: none;
}

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
	.featured-content {
		padding: 30px 25px;
	}

	.blog-grid {
		grid-template-columns: 1fr;
	}

	.post-article {
		padding: 40px 30px;
	}

	.author-bio {
		flex-direction: column;
		text-align: center;
	}
}

@media (max-width: 480px) {
	.featured-image {
		height: 250px;
	}

	.post-article {
		padding: 30px 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.blog-card,
	.featured-post,
	.category-card,
	.nav-link,
	.btn-read-more,
	.cta-button,
	.blog-card-image img {
		transition: none;
	}

	.blog-card:hover,
	.category-card:hover,
	.nav-link:hover {
		transform: none;
	}
}


/* Photo hero support: featured image + gradient overlay set inline;
   these rules make it fill and stay readable. */
.service-hero.has-image,
.hero-section.has-image,
.blog-hero.has-image {
	background-size: cover;
	background-position: center;
}

.service-hero.has-image::before,
.hero-section.has-image::before,
.blog-hero.has-image::before {
	background: radial-gradient(circle at 25% 40%, rgba(255, 255, 255, 0.06), transparent 45%);
}

.service-hero--short {
	min-height: 55vh;
}
