/**
 * Blog & Page Template Styles
 * 
 * Styles for single posts, pages, archives with full-width headers
 * 
 * @package Hook
 * @version 1.0.6
 */

/*-----------------------------------------------------------------------------------*/
/* Full Width Page Header
/*-----------------------------------------------------------------------------------*/

.page-header {
	position: relative;
	width: 100%;
	min-height: 320px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, var(--hook-primary) 0%, var(--hook-primary-light) 100%);
	color: var(--hook-white);
	padding: 80px 20px;
	margin-bottom: 60px;
	overflow: hidden;
}

/* Hide page header on home/front page */
.home .page-header,
.blog .page-header {
	display: none;
}

/* WooCommerce header adjustments */
.page-header-woocommerce,
.page-header-product {
	/* Inherits all .page-header styles */
}

.page-header-product-image {
	opacity: 0.4; /* More subtle for product images */
}

.product-categories {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	justify-content: center;
	margin-bottom: 16px;
}

.product-header-excerpt {
	font-size: 1.15rem;
	line-height: 1.6;
	opacity: 0.95;
	margin-top: 20px;
	max-width: 700px;
	margin-left: auto;
	margin-right: auto;
}

.product-count {
	font-size: 0.95rem;
	font-weight: 500;
}

/* Page Header with Background Image */
.page-header-image {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
}

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

/* Overlay for better text readability */
.page-header-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(
		135deg,
		rgba(11, 44, 82, 0.85) 0%,
		rgba(11, 44, 82, 0.7) 100%
	);
	z-index: 2;
}

/* Content on top of overlay */
.page-header-content {
	position: relative;
	z-index: 3;
	max-width: 800px;
	text-align: center;
	margin: 0 auto;
}

.page-header .breadcrumbs {
	margin-bottom: 20px;
	opacity: 0.9;
	justify-content: center;
}

.page-header .breadcrumbs a {
	color: var(--hook-white);
}

.page-header .breadcrumbs .separator {
	color: rgba(255, 255, 255, 0.6);
}

.page-header .breadcrumbs .current {
	color: var(--hook-white);
}

.page-title {
	font-size: clamp(2rem, 5vw, 3.5rem);
	font-weight: 800;
	margin: 0 0 20px 0;
	line-height: 1.2;
	color: var(--hook-white);
	letter-spacing: -0.02em;
}

.page-excerpt,
.archive-description {
	font-size: 1.2rem;
	line-height: 1.6;
	opacity: 0.95;
	margin-top: 20px;
}

/*-----------------------------------------------------------------------------------*/
/* Post Meta in Header
/*-----------------------------------------------------------------------------------*/

.post-meta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 24px;
	flex-wrap: wrap;
	margin-top: 24px;
	font-size: 0.95rem;
	opacity: 0.9;
}

.post-meta > span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.post-meta svg {
	opacity: 0.8;
}

.post-categories {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	justify-content: center;
	margin-bottom: 16px;
}

/* Accent badge for Learning Hub */
.badge-accent {
	background: var(--hook-accent);
	color: var(--hook-white);
}

.archive-meta {
	margin-top: 16px;
	opacity: 0.9;
}

/*-----------------------------------------------------------------------------------*/
/* Main Content Layout
/*-----------------------------------------------------------------------------------*/

.site-content {
	padding: 0 0 60px 0;
}

.content-wrapper {
	display: grid;
	grid-template-columns: 1fr 350px;
	gap: 50px;
	align-items: start;
}

/* Full width content (no sidebar) - for pages and Learning Hub posts */
.content-wrapper-full {
	grid-template-columns: 1fr;
	/* No max-width restriction - uses full container */
}

/* Regular pages - full container width */
.page .site-content .container > article {
	width: 100%;
	max-width: 100%;
}

.page-content {
	width: 100%;
	max-width: 100%;
}

/*-----------------------------------------------------------------------------------*/
/* Single Post Styles
/*-----------------------------------------------------------------------------------*/

.single-post {
	background: var(--hook-white);
}

.post-thumbnail {
	margin-bottom: 40px;
	border-radius: var(--hook-radius-lg);
	overflow: hidden;
	box-shadow: var(--hook-shadow-md);
}

.post-thumbnail img {
	width: 100%;
	height: auto;
	display: block;
}

.post-content {
	font-size: 1.125rem;
	line-height: 1.8;
	color: var(--hook-text);
	margin-bottom: 40px;
}

.post-content h2,
.post-content h3,
.post-content h4 {
	margin-top: 2em;
	margin-bottom: 0.8em;
	color: var(--hook-text);
}

.post-content h2 {
	font-size: 2rem;
	font-weight: 700;
	padding-bottom: 0.5em;
	border-bottom: 2px solid var(--hook-border);
}

.post-content h3 {
	font-size: 1.5rem;
	font-weight: 600;
}

.post-content p {
	margin-bottom: 1.5em;
}

.post-content a {
	color: var(--hook-primary);
	text-decoration: underline;
	text-decoration-color: rgba(11, 44, 82, 0.3);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
	transition: var(--hook-transition-fast);
}

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

.post-content img {
	border-radius: var(--hook-radius-md);
	margin: 2em 0;
	box-shadow: var(--hook-shadow-sm);
}

.post-content blockquote {
	margin: 2em 0;
	padding: 24px 32px;
	background: var(--hook-bg-light);
	border-left: 4px solid var(--hook-primary);
	border-radius: var(--hook-radius-sm);
	font-style: italic;
	color: var(--hook-text-light);
}

.post-content ul,
.post-content ol {
	margin: 1.5em 0 1.5em 2em;
}

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

/*-----------------------------------------------------------------------------------*/
/* Post Tags
/*-----------------------------------------------------------------------------------*/

.post-tags {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 24px 0;
	border-top: 1px solid var(--hook-border);
	margin-top: 40px;
}

.post-tags svg {
	color: var(--hook-text-light);
	flex-shrink: 0;
}

.tag-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tag {
	display: inline-block;
	padding: 6px 14px;
	background: var(--hook-bg-light);
	color: var(--hook-text);
	border-radius: var(--hook-radius-sm);
	font-size: 0.9rem;
	font-weight: 500;
	transition: var(--hook-transition-fast);
}

.tag:hover {
	background: var(--hook-primary);
	color: var(--hook-white);
}

/*-----------------------------------------------------------------------------------*/
/* Author Bio
/*-----------------------------------------------------------------------------------*/

.author-bio {
	display: flex;
	gap: 24px;
	padding: 32px;
	background: var(--hook-bg-light);
	border-radius: var(--hook-radius-lg);
	margin-top: 40px;
}

.author-avatar {
	flex-shrink: 0;
}

.author-avatar img {
	border-radius: var(--hook-radius-round);
	width: 80px;
	height: 80px;
}

.author-info {
	flex: 1;
}

.author-name {
	margin: 0 0 8px 0;
	font-size: 1.4rem;
	font-weight: 700;
	color: var(--hook-text);
}

.author-description {
	margin-bottom: 16px;
	color: var(--hook-text-light);
	line-height: 1.6;
}

/*-----------------------------------------------------------------------------------*/
/* Post Navigation (Previous/Next)
/*-----------------------------------------------------------------------------------*/

.post-navigation {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 30px;
	margin-top: 60px;
	padding-top: 40px;
	border-top: 2px solid var(--hook-border);
}

.nav-previous,
.nav-next {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.nav-next {
	text-align: right;
	align-items: flex-end;
}

.nav-subtitle {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--hook-text-light);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.nav-title {
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--hook-primary);
	transition: var(--hook-transition-fast);
	display: block;
}

.nav-title:hover {
	color: var(--hook-primary-light);
}

/*-----------------------------------------------------------------------------------*/
/* Blog List (Archive Pages) - Side-by-Side Layout
/*-----------------------------------------------------------------------------------*/

.blog-list {
	display: flex;
	flex-direction: column;
	gap: 50px;
	margin-bottom: 50px;
}

.blog-list-item {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	align-items: center;
	background: var(--hook-white);
	border: 1px solid var(--hook-border);
	border-radius: var(--hook-radius-lg);
	overflow: hidden;
	padding: 40px;
	transition: var(--hook-transition-fast);
}

.blog-list-item:hover {
	box-shadow: 0 12px 28px rgba(11, 44, 82, 0.12);
	transform: translateY(-4px);
	border-color: var(--hook-primary);
}

/* Alternate image position */
.blog-list-item-left .blog-list-image {
	order: 1;
}

.blog-list-item-left .blog-list-content {
	order: 2;
}

.blog-list-item-right .blog-list-image {
	order: 2;
}

.blog-list-item-right .blog-list-content {
	order: 1;
}

/* Image styling */
.blog-list-image {
	position: relative;
	overflow: hidden;
	border-radius: var(--hook-radius-md);
	height: 100%;
	min-height: 320px;
}

.blog-list-image a {
	display: block;
	height: 100%;
}

.blog-list-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s ease;
	border-radius: var(--hook-radius-md);
}

.blog-list-item:hover .blog-list-image img {
	transform: scale(1.08);
}

/* Content styling */
.blog-list-content {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 10px 0;
}

.blog-list-meta {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.blog-list-meta .post-date {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.9rem;
	color: var(--hook-text-light);
	font-weight: 500;
}

.blog-list-meta svg {
	opacity: 0.7;
}

/* Badge variations for Learning Hub */
.badge-accent {
	background: var(--hook-accent);
	color: var(--hook-white);
}

.blog-list-title {
	font-size: clamp(1.6rem, 3vw, 2.2rem);
	font-weight: 700;
	margin: 0;
	line-height: 1.3;
	letter-spacing: -0.02em;
}

.blog-list-title a {
	color: var(--hook-text);
	transition: var(--hook-transition-fast);
	background: linear-gradient(to right, var(--hook-primary) 0%, var(--hook-primary) 100%);
	background-size: 0 2px;
	background-position: 0 100%;
	background-repeat: no-repeat;
	padding-bottom: 2px;
}

.blog-list-item:hover .blog-list-title a {
	color: var(--hook-primary);
	background-size: 100% 2px;
}

.blog-list-excerpt {
	font-size: 1.1rem;
	line-height: 1.7;
	color: var(--hook-text-light);
	margin: 0;
}

.blog-list-author {
	display: flex;
	align-items: center;
	gap: 12px;
	padding-top: 8px;
	border-top: 1px solid var(--hook-bg-light);
}

.blog-list-author img {
	border-radius: var(--hook-radius-round);
	width: 40px;
	height: 40px;
	border: 2px solid var(--hook-bg-light);
}

.blog-list-author .author-name {
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--hook-text);
}

/* Read More Button in List */
.blog-list-content .btn {
	align-self: flex-start;
	margin-top: 8px;
}

/*-----------------------------------------------------------------------------------*/
/* Responsive Blog List
/*-----------------------------------------------------------------------------------*/

@media (max-width: 992px) {
	.blog-list {
		gap: 40px;
	}
	
	.blog-list-item {
		padding: 30px;
		gap: 30px;
	}
	
	.blog-list-image {
		min-height: 280px;
	}
	
	.blog-list-title {
		font-size: 1.6rem;
	}
	
	.blog-list-excerpt {
		font-size: 1rem;
	}
}

@media (max-width: 768px) {
	.blog-list {
		gap: 30px;
	}
	
	.blog-list-item {
		grid-template-columns: 1fr;
		gap: 24px;
		padding: 24px;
	}
	
	/* Always show image first on mobile */
	.blog-list-item-left .blog-list-image,
	.blog-list-item-right .blog-list-image {
		order: 1;
	}
	
	.blog-list-item-left .blog-list-content,
	.blog-list-item-right .blog-list-content {
		order: 2;
	}
	
	.blog-list-image {
		min-height: 240px;
		margin: -24px -24px 0 -24px;
		border-radius: 0;
		width: calc(100% + 48px);
	}
	
	.blog-list-image img {
		border-radius: 0;
	}
	
	.blog-list-title {
		font-size: 1.4rem;
	}
	
	.blog-list-excerpt {
		font-size: 0.95rem;
	}
	
	.blog-list-content {
		gap: 16px;
	}
}

@media (max-width: 576px) {
	.blog-list-item {
		padding: 20px;
	}
	
	.blog-list-image {
		min-height: 200px;
		margin: -20px -20px 0 -20px;
		width: calc(100% + 40px);
	}
	
	.blog-list-title {
		font-size: 1.3rem;
	}
	
	.blog-list-meta {
		gap: 12px;
	}
}

/*-----------------------------------------------------------------------------------*/
/* Sidebar
/*-----------------------------------------------------------------------------------*/

.sidebar {
	position: sticky;
	top: 100px;
}

.sidebar .widget {
	background: var(--hook-white);
	border: 1px solid var(--hook-border);
	border-radius: var(--hook-radius-lg);
	padding: 28px;
	margin-bottom: 30px;
}

.sidebar .widget:last-child {
	margin-bottom: 0;
}

.sidebar .widget-title {
	font-size: 1.2rem;
	font-weight: 700;
	margin: 0 0 20px 0;
	padding-bottom: 16px;
	border-bottom: 2px solid var(--hook-border);
	color: var(--hook-text);
}

.sidebar ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.sidebar li {
	margin-bottom: 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--hook-bg-light);
}

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

.sidebar a {
	color: var(--hook-text-light);
	transition: var(--hook-transition-fast);
	display: block;
}

.sidebar a:hover {
	color: var(--hook-primary);
	padding-left: 4px;
}

/* Search Widget */
.sidebar .search-form {
	display: flex;
	gap: 8px;
}

.sidebar .search-form input[type="search"] {
	flex: 1;
	padding: 10px 14px;
	border: 1px solid var(--hook-border);
	border-radius: var(--hook-radius-sm);
	font-size: 0.95rem;
}

.sidebar .search-form button {
	padding: 10px 20px;
	background: var(--hook-primary);
	color: var(--hook-white);
	border: none;
	border-radius: var(--hook-radius-sm);
	cursor: pointer;
	font-weight: 600;
	transition: var(--hook-transition-fast);
}

.sidebar .search-form button:hover {
	background: var(--hook-primary-light);
}

/*-----------------------------------------------------------------------------------*/
/* Page Content (Standard Pages)
/*-----------------------------------------------------------------------------------*/

.page-content {
	font-size: 1.125rem;
	line-height: 1.8;
	color: var(--hook-text);
}

.page-content h2,
.page-content h3,
.page-content h4 {
	margin-top: 2em;
	margin-bottom: 0.8em;
}

.page-content h2 {
	font-size: 2rem;
	font-weight: 700;
	padding-bottom: 0.5em;
	border-bottom: 2px solid var(--hook-border);
}

.page-content h3 {
	font-size: 1.5rem;
	font-weight: 600;
}

.page-content p {
	margin-bottom: 1.5em;
}

.page-content img {
	border-radius: var(--hook-radius-md);
	margin: 2em 0;
	box-shadow: var(--hook-shadow-sm);
}

/*-----------------------------------------------------------------------------------*/
/* Comments Section
/*-----------------------------------------------------------------------------------*/

.page-comments,
#comments {
	margin-top: 60px;
	padding-top: 40px;
	border-top: 2px solid var(--hook-border);
}

.comments-title {
	font-size: 1.8rem;
	font-weight: 700;
	margin-bottom: 30px;
	color: var(--hook-text);
}

.comment-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.comment {
	padding: 24px;
	background: var(--hook-bg-light);
	border-radius: var(--hook-radius-lg);
	margin-bottom: 20px;
}

.comment-body {
	display: flex;
	gap: 20px;
}

.comment-avatar {
	flex-shrink: 0;
}

.comment-avatar img {
	border-radius: var(--hook-radius-round);
	width: 50px;
	height: 50px;
}

.comment-content {
	flex: 1;
}

.comment-author {
	font-weight: 700;
	margin-bottom: 4px;
	color: var(--hook-text);
}

.comment-meta {
	font-size: 0.9rem;
	color: var(--hook-text-light);
	margin-bottom: 12px;
}

.comment-text p {
	margin-bottom: 0.8em;
	color: var(--hook-text-light);
	line-height: 1.6;
}

.reply {
	margin-top: 12px;
}

.comment-reply-link {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--hook-primary);
	transition: var(--hook-transition-fast);
}

.comment-reply-link:hover {
	color: var(--hook-primary-light);
}

/* Nested Comments */
.children {
	list-style: none;
	padding-left: 40px;
	margin-top: 20px;
}

/* Comment Form */
.comment-respond {
	margin-top: 40px;
}

.comment-reply-title {
	font-size: 1.5rem;
	font-weight: 700;
	margin-bottom: 24px;
	color: var(--hook-text);
}

.comment-form {
	display: grid;
	gap: 20px;
}

.comment-form-comment textarea {
	min-height: 150px;
}

/*-----------------------------------------------------------------------------------*/
/* No Posts Found
/*-----------------------------------------------------------------------------------*/

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

.no-posts-found h2 {
	font-size: 2rem;
	margin-bottom: 20px;
	color: var(--hook-text);
}

.no-posts-found p {
	font-size: 1.1rem;
	color: var(--hook-text-light);
	margin-bottom: 30px;
}

/*-----------------------------------------------------------------------------------*/
/* Responsive Design
/*-----------------------------------------------------------------------------------*/

@media (max-width: 992px) {
	.content-wrapper {
		grid-template-columns: 1fr;
	}
	
	.sidebar {
		position: static;
	}
	
	/* Blog list responsive - already defined above */
	
	.post-navigation {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	
	.nav-next {
		text-align: left;
		align-items: flex-start;
	}
}

@media (max-width: 768px) {
	.page-header {
		min-height: 250px;
		padding: 60px 20px;
		margin-bottom: 40px;
	}
	
	.page-title {
		font-size: 2rem;
	}
	
	.page-excerpt,
	.archive-description {
		font-size: 1rem;
	}
	
	.post-meta {
		gap: 16px;
		font-size: 0.85rem;
	}
	
	.author-bio {
		flex-direction: column;
		text-align: center;
		align-items: center;
	}
	
	/* Blog list responsive - already defined above */
	
	.post-content,
	.page-content {
		font-size: 1rem;
	}
}

@media (max-width: 576px) {
	.page-header {
		padding: 40px 20px;
	}
	
	.post-meta {
		flex-direction: column;
		gap: 8px;
	}
	
	.children {
		padding-left: 20px;
	}
}