/**
 * Blog Frontend Styles
 * 
 * Styles for blog landing page and archive
 */

/* ============================================
   Blog Hero Section - Matches Dictionary Design
   ============================================ */
.blog-hero {
	background: linear-gradient(135deg, #f9f7f4 0%, #fefdfb 100%);
	color: var(--color-headline);
	padding: 15px 0;
	position: relative;
	overflow: hidden;
	width: 100vw;
	margin-left: calc(-50vw + 50%);
	margin-top: -1px; /* Connect to header */
	min-height: 250px; /* Reduced for better visual balance */
}

.blog-hero::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-image: 
		radial-gradient(circle at 20% 80%, rgba(170, 1, 37, 0.02) 0%, transparent 50%),
		radial-gradient(circle at 80% 20%, rgba(0, 123, 152, 0.02) 0%, transparent 50%);
	pointer-events: none;
}

.blog-hero .container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1rem;
	position: relative;
	display: flex;
	align-items: center;
	min-height: 250px;
	gap: 60px;
}

/* 40/60 Split Layout */
.blog-hero-image {
	width: 45%;
	max-width: 450px;
	position: relative;
	z-index: 1;
	margin-left: -50px; /* Pull it left to align with logo */
	animation: gentleFloat 8s ease-in-out infinite;
}

@keyframes gentleFloat {
	0%, 100% {
		transform: translateY(0) rotate(-2deg);
	}
	50% {
		transform: translateY(-15px) rotate(2deg);
	}
}

.blog-hero-image img {
	width: 100%;
	height: auto;
	display: block;
	filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.1));
}

.blog-hero-content {
	width: 60%;
	max-width: 650px;
	text-align: left;
	position: relative;
	z-index: 2;
	animation: fadeInUp 0.8s ease-out;
}

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

.blog-title {
	font-size: 2.8rem;
	font-weight: 600;
	margin: 0 0 20px;
	font-family: 'Aleo', serif;
	position: relative;
	z-index: 1;
	color: #34190d; /* Dark brown from brand */
	animation: fadeInUp 0.8s ease-out;
}

.blog-subtitle {
	font-size: 1.2rem;
	color: var(--color-text-light);
	margin: 0 0 20px;
	position: relative;
	z-index: 1;
	font-family: 'Open Sans', sans-serif;
	line-height: 1.6;
	animation: fadeInUp 0.8s ease-out 0.2s both;
}

.blog-count {
	font-size: 0.95rem;
	margin-top: 15px;
	color: var(--color-text-light);
	position: relative;
	z-index: 1;
	animation: fadeInUp 0.8s ease-out 0.4s both;
}

.blog-count strong {
	font-weight: 600;
	font-size: 1.2em;
	color: var(--color-secondary);
}

/* ============================================
   Category Archive Hero Section
   ============================================ */
.category-hero {
	background: linear-gradient(135deg, #f9f7f4 0%, #fefdfb 100%);
	color: var(--color-headline);
	padding: 30px 0;
	position: relative;
	overflow: hidden;
	width: 100vw;
	margin-left: calc(-50vw + 50%);
	margin-top: -1px; /* Connect to header */
	min-height: 175px; /* 25% of front page hero (700px) */
}

.category-hero::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-image: 
		radial-gradient(circle at 20% 80%, rgba(170, 1, 37, 0.02) 0%, transparent 50%),
		radial-gradient(circle at 80% 20%, rgba(0, 123, 152, 0.02) 0%, transparent 50%);
	pointer-events: none;
}

.category-hero .container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1rem;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: 115px;
}

.category-hero-content {
	max-width: 800px;
	animation: fadeInUp 0.8s ease-out;
}

.category-title {
	font-size: 2.2rem;
	font-weight: 600;
	margin: 0 0 15px;
	font-family: 'Aleo', serif;
	color: #34190d;
}

.category-description {
	font-size: 1.1rem;
	color: var(--color-text-light);
	line-height: 1.6;
	font-family: 'Open Sans', sans-serif;
}

.category-description p {
	margin: 0;
}

/* Category archive specific styles */
#category-archive .blog-content {
	padding-top: 40px;
}

/* ============================================
   Breadcrumbs Override for Blog
   ============================================ */
.blog-landing .breadcrumbs-wrapper,
body.blog .breadcrumbs-wrapper,
body.category .breadcrumbs-wrapper,
body.tag .breadcrumbs-wrapper,
body.single-post .breadcrumbs-wrapper {
	background: #4a4a4a; /* Dark background like dictionary */
	padding: 0.75rem 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.blog-landing .breadcrumbs,
body.blog .breadcrumbs,
body.category .breadcrumbs,
body.tag .breadcrumbs,
body.single-post .breadcrumbs {
	color: white;
}

.blog-landing .breadcrumbs a,
body.blog .breadcrumbs a,
body.category .breadcrumbs a,
body.tag .breadcrumbs a,
body.single-post .breadcrumbs a {
	color: white;
	opacity: 0.8;
	transition: all 0.3s ease;
}

.blog-landing .breadcrumbs a:hover,
body.blog .breadcrumbs a:hover,
body.category .breadcrumbs a:hover,
body.tag .breadcrumbs a:hover,
body.single-post .breadcrumbs a:hover {
	opacity: 1;
	color: var(--color-accent); /* Golden yellow on hover */
}

.blog-landing .breadcrumbs .separator,
body.blog .breadcrumbs .separator,
body.category .breadcrumbs .separator,
body.tag .breadcrumbs .separator,
body.single-post .breadcrumbs .separator {
	color: white;
	opacity: 0.5;
}

/* ============================================
   Blog Page Layout
   ============================================ */
.blog-page {
	width: 100%;
	background: linear-gradient(to bottom, #F5F1EE 0%, #F9F6F3 100%);
	padding-bottom: 60px;
}

/* ============================================
   Categories Navigation
   ============================================ */
.blog-categories-nav {
	background: rgba(74, 74, 74, 0.08);
	padding: 20px 0;
	margin-bottom: 40px;
	border-bottom: 1px solid rgba(74, 74, 74, 0.1);
}

.categories-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	align-items: center;
}

.category-link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 8px 16px;
	background: white;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 10px;
	color: var(--color-text);
	text-decoration: none;
	font-size: 0.95rem;
	transition: all 0.3s ease;
}

.category-link:hover {
	background: var(--color-accent);
	color: var(--color-headline);
	border-color: var(--color-accent);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(246, 180, 2, 0.3);
}

.category-link.active {
	background: var(--color-secondary);
	color: white;
	border-color: var(--color-secondary);
}

.category-count {
	font-size: 0.85em;
	opacity: 0.7;
}

/* ============================================
   Blog Content Layout
   ============================================ */
.blog-content .container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1rem;
}

/* ============================================
   Featured Post Section
   ============================================ */
.featured-post-section {
	margin-bottom: 60px;
}

.featured-post-card {
	background: white;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
	padding: 15px;
}

.featured-post-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	min-height: 380px;
	gap: 15px;
}

a.featured-thumbnail {
	display: block;
	position: relative;
	overflow: hidden;
	border-radius: 8px;
	height: 100%;
}

.featured-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.featured-thumbnail:hover img {
	transform: scale(1.05);
}

.featured-content {
	padding: 15px 25px 15px 15px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.entry-category.featured {
	background: var(--color-accent);
	color: var(--color-headline);
	padding: 4px 12px;
	border-radius: 8px;
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 600;
	display: inline-block;
	transition: all 0.3s ease;
	margin-bottom: 25px;
}

.entry-category.featured:hover {
	background: #e5a402;
}

.featured-title {
	font-size: 2rem;
	margin: 0 0 20px;
	font-family: 'Aleo', serif;
	line-height: 1.3;
}

.featured-title a {
	color: var(--color-headline);
	text-decoration: none;
	transition: color 0.3s ease;
}

.featured-title a:hover {
	color: var(--color-secondary);
}

.featured-excerpt {
	color: var(--color-text);
	line-height: 1.6;
	font-size: 1.05rem;
}

.featured-excerpt-link {
	text-decoration: none;
	color: inherit;
}

/* Featured footer removed for cleaner design */

/* ============================================
   Main Blog Layout with Grid
   ============================================ */
.blog-layout {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 40px;
	align-items: start;
}

/* ============================================
   Blog Entry Cards Grid
   ============================================ */
.blog-entries-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 30px;
}

.blog-entry-card.grid-card {
	background: white;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
	padding: 12px;
}

.blog-entry-card.grid-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.grid-card a.entry-thumbnail {
	display: block;
	width: 100%;
	height: 180px;
	overflow: hidden;
	border-radius: 8px;
	margin-bottom: 15px;
}

.grid-card .entry-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.grid-card .entry-thumbnail:hover img {
	transform: scale(1.05);
}

.grid-card .entry-content-wrap {
	padding: 0 8px 8px 8px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.entry-meta-top {
	display: flex;
	align-items: center;
	gap: 15px;
	margin-bottom: 10px;
	font-size: 0.9rem;
}

.entry-category {
	background: var(--color-secondary);
	color: white;
	padding: 3px 10px;
	border-radius: 8px;
	text-decoration: none;
	font-size: 0.85rem;
	font-weight: 600;
	transition: all 0.3s ease;
	display: inline-block;
	margin-bottom: 12px;
}

.entry-category:hover {
	background: var(--color-primary);
}

.grid-card .entry-date {
	color: #999;
	font-size: 0.85rem;
}

.grid-card .entry-title {
	font-size: 1.15rem;
	margin: 0 0 10px;
	font-family: 'Aleo', serif;
	line-height: 1.3;
	font-weight: 600;
}

.grid-card .entry-title {
	color: var(--color-headline);
}

.grid-card .entry-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.3s ease;
}

.grid-card .entry-title a:hover {
	color: var(--color-secondary);
}

.grid-card .excerpt-link {
	text-decoration: none;
	color: inherit;
}

.grid-card .entry-excerpt {
	color: var(--color-text);
	line-height: 1.5;
	flex: 1;
	font-size: 0.9rem;
}

.grid-card .entry-excerpt p {
	margin: 0;
}

/* Footer removed for cleaner cards */

/* ============================================
   Blog Sidebar
   ============================================ */
.blog-sidebar {
	position: sticky;
	top: 100px;
}

.sidebar-section {
	background: white;
	border-radius: 10px;
	padding: 25px;
	margin-bottom: 30px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.sidebar-section h3 {
	font-size: 1.2rem;
	margin: 0 0 20px;
	color: var(--color-headline);
	font-family: 'Aleo', serif;
}

/* Search Widget */
.search-widget form {
	display: flex;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 8px;
	overflow: hidden;
}

.search-widget input[type="search"] {
	flex: 1;
	padding: 12px;
	border: none;
	outline: none;
	font-size: 0.95rem;
}

.search-widget button {
	background: var(--color-secondary);
	color: white;
	border: none;
	padding: 12px 20px;
	cursor: pointer;
	transition: background 0.3s ease;
}

.search-widget button:hover {
	background: var(--color-primary);
}

/* Recent Posts List */
.recent-posts-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.recent-posts-list li {
	padding: 12px 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.recent-posts-list li:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.recent-posts-list a {
	display: flex;
	flex-direction: column;
	gap: 5px;
	text-decoration: none;
	transition: all 0.3s ease;
}

.recent-posts-list a:hover .post-title {
	color: var(--color-secondary);
}

.post-title {
	color: var(--color-headline);
	font-weight: 500;
	line-height: 1.4;
}

.post-date {
	color: #999;
	font-size: 0.85rem;
}

/* Category List */
.category-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.category-list li {
	padding: 10px 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.category-list li:last-child {
	border-bottom: none;
}

.category-list a {
	color: var(--color-text);
	text-decoration: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	transition: color 0.3s ease;
}

.category-list a:hover {
	color: var(--color-secondary);
}

.category-list .current-cat a {
	color: var(--color-secondary);
	font-weight: 600;
}

/* Tag Cloud */
.tag-cloud {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tag-link {
	display: inline-block;
	padding: 6px 12px;
	background: rgba(0, 123, 152, 0.1);
	color: var(--color-secondary);
	border-radius: 15px;
	text-decoration: none;
	font-size: 0.9rem;
	transition: all 0.3s ease;
}

.tag-link:hover {
	background: var(--color-secondary);
	color: white;
	transform: translateY(-2px);
}

/* Newsletter Widget */
.newsletter-widget p {
	color: var(--color-text);
	margin-bottom: 20px;
	line-height: 1.5;
}

.newsletter-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.newsletter-form input[type="email"] {
	padding: 12px;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 8px;
	font-size: 0.95rem;
	outline: none;
}

.btn-subscribe {
	background: var(--color-accent);
	color: var(--color-headline);
	border: none;
	padding: 12px 24px;
	border-radius: 8px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
}

.btn-subscribe:hover {
	background: #e5a402;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(246, 180, 2, 0.3);
}

/* Dictionary CTA */
.dictionary-cta p {
	color: var(--color-text);
	margin-bottom: 20px;
	line-height: 1.5;
}

.btn-cta {
	display: inline-block;
	background: var(--color-secondary);
	color: white;
	padding: 12px 24px;
	border-radius: 8px;
	text-decoration: none;
	font-weight: 600;
	transition: all 0.3s ease;
}

.btn-cta:hover {
	background: var(--color-primary);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 123, 152, 0.3);
}

/* ============================================
   Pagination
   ============================================ */
.blog-pagination {
	margin-top: 50px;
	text-align: center;
}

.blog-pagination .page-numbers {
	display: inline-block;
	padding: 10px 15px;
	margin: 0 5px;
	background: white;
	color: var(--color-text);
	text-decoration: none;
	border-radius: 8px;
	transition: all 0.3s ease;
	border: 1px solid rgba(0, 0, 0, 0.1);
}

.blog-pagination .page-numbers:hover {
	background: var(--color-accent);
	color: var(--color-headline);
	border-color: var(--color-accent);
}

.blog-pagination .page-numbers.current {
	background: var(--color-secondary);
	color: white;
	border-color: var(--color-secondary);
}

/* ============================================
   WordPress Core Widget Styles
   ============================================ */
.blog-sidebar .widget {
	background: white;
	border-radius: 10px;
	padding: 25px;
	margin-bottom: 30px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.blog-sidebar .widget-title {
	font-size: 1.2rem;
	margin: 0 0 20px;
	color: var(--color-headline);
	font-family: 'Aleo', serif;
}

/* WordPress Search Widget */
.blog-sidebar .widget_search form {
	display: flex;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 8px;
	overflow: hidden;
}

.blog-sidebar .widget_search input[type="search"] {
	flex: 1;
	padding: 12px;
	border: none;
	outline: none;
	font-size: 0.95rem;
}

.blog-sidebar .widget_search button,
.blog-sidebar .widget_search input[type="submit"] {
	background: var(--color-secondary);
	color: white;
	border: none;
	padding: 12px 20px;
	cursor: pointer;
	transition: background 0.3s ease;
}

.blog-sidebar .widget_search button:hover,
.blog-sidebar .widget_search input[type="submit"]:hover {
	background: var(--color-primary);
}

/* WordPress Recent Posts Widget */
.blog-sidebar .widget_recent_entries ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.blog-sidebar .widget_recent_entries li {
	padding: 12px 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.blog-sidebar .widget_recent_entries li:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.blog-sidebar .widget_recent_entries a {
	color: var(--color-headline);
	text-decoration: none;
	font-weight: 500;
	transition: color 0.3s ease;
}

.blog-sidebar .widget_recent_entries a:hover {
	color: var(--color-secondary);
}

.blog-sidebar .widget_recent_entries .post-date {
	display: block;
	color: #999;
	font-size: 0.85rem;
	margin-top: 5px;
}

/* WordPress Categories Widget */
.blog-sidebar .widget_categories ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.blog-sidebar .widget_categories li {
	padding: 10px 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.blog-sidebar .widget_categories li:last-child {
	border-bottom: none;
}

.blog-sidebar .widget_categories a {
	color: var(--color-text);
	text-decoration: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	transition: color 0.3s ease;
}

.blog-sidebar .widget_categories a:hover {
	color: var(--color-secondary);
}

/* WordPress Tag Cloud Widget */
.blog-sidebar .widget_tag_cloud .tagcloud {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.blog-sidebar .widget_tag_cloud a {
	display: inline-block;
	padding: 6px 12px;
	background: rgba(0, 123, 152, 0.1);
	color: var(--color-secondary);
	border-radius: 15px;
	text-decoration: none;
	font-size: 0.9rem !important;
	transition: all 0.3s ease;
}

.blog-sidebar .widget_tag_cloud a:hover {
	background: var(--color-secondary);
	color: white;
	transform: translateY(-2px);
}

/* WordPress Text Widget */
.blog-sidebar .widget_text p {
	color: var(--color-text);
	line-height: 1.5;
	margin-bottom: 15px;
}

.blog-sidebar .widget_text p:last-child {
	margin-bottom: 0;
}

/* WordPress Custom HTML Widget */
.blog-sidebar .widget_custom_html {
	color: var(--color-text);
}

/* ============================================
   No Results
   ============================================ */
.no-results {
	background: white;
	padding: 60px;
	text-align: center;
	border-radius: 10px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.no-results h2 {
	color: var(--color-headline);
	margin-bottom: 15px;
}

.no-results p {
	color: var(--color-text);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1200px) {
	.blog-layout {
		grid-template-columns: 1fr;
	}
	
	.blog-entries-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	
	.blog-sidebar {
		position: static;
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 30px;
		margin-top: 40px;
	}
}

@media (max-width: 968px) {
	.featured-post-grid {
		grid-template-columns: 1fr;
	}
	
	.featured-thumbnail {
		height: 300px;
	}
	
	.blog-entries-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 768px) {
	.blog-hero .container {
		flex-direction: column;
		text-align: center;
		gap: 30px;
	}
	
	.blog-hero-image,
	.blog-hero-content {
		width: 100%;
		max-width: 100%;
	}
	
	.blog-hero-image {
		max-width: 300px;
		margin: 0 auto;
	}
	
	.blog-title {
		font-size: 2rem;
	}
	
	.blog-entry-card {
		flex-direction: column;
	}
	
	.entry-thumbnail {
		width: 100%;
	}
	
	.entry-content-wrap {
		padding: 20px;
	}
	
	.blog-sidebar {
		grid-template-columns: 1fr;
	}
	
	.categories-nav {
		justify-content: center;
	}
}

/* ============================================
   Blog Search Form Styling
   ============================================ */
.blog-search-form .search-form-inner {
	display: flex;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.blog-search-form .search-field {
	flex: 1;
	padding: 12px 15px;
	border: 2px solid #e5e7eb;
	border-right: none;
	border-radius: 8px 0 0 8px;
	font-size: 0.95rem;
	background: white;
	transition: border-color 0.3s ease;
}

.blog-search-form .search-field:focus {
	outline: none;
	border-color: #007b98;
}

.blog-search-form .search-submit {
	padding: 12px 15px;
	background: #007b98;
	border: 2px solid #007b98;
	border-radius: 0 8px 8px 0;
	color: white;
	cursor: pointer;
	transition: background-color 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

.blog-search-form .search-submit:hover {
	background: #005a6b;
	border-color: #005a6b;
}

.blog-search-form .search-submit svg {
	width: 16px;
	height: 16px;
}

.screen-reader-text {
	position: absolute !important;
	left: -10000px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* Override WordPress block search widget styling */
.blog-sidebar .wp-block-search,
.blog-sidebar .wp-block-search__label,
.blog-sidebar .wp-block-search__input,
.blog-sidebar .wp-block-search__button {
	display: none !important;
}

/* Ensure our custom search form shows properly */
.blog-sidebar .blog-search-form {
	display: block !important;
}