/**
 * Blog/Insights Styles
 *
 * @package Together_Theme
 * @since 1.0.0
 */

/* ============================================
   CRITICAL: Override ALL parent theme styles
   ============================================ */

/* Hide parent theme's main container when our blog pages are active */
body:has(.together-blog-insights-page) #main-container.page-blog,
body:has(.together-blog-insights-page) #main-container.page-blog .row,
body:has(.together-single-post-page) #main-container.page-blog {
	display: none !important;
}

/* Insights Page Container - Override parent theme styles */
body .together-blog-insights-page {
	width: 100% !important;
	min-height: 100vh !important;
	background: #fff !important;
	padding: 0 0 60px 0 !important; /* Remove top padding since page-header has its own */
	margin: 0 !important;
	position: relative !important;
	z-index: 1 !important;
}

/* Ensure page-header styling applies to blog insights page */
body .together-blog-insights-page .page-header {
	background: #F0FDF4 !important; /* Light green background */
	padding: 60px 20px 40px !important;
	margin: 0 0 40px 0 !important;
	border-bottom: none !important;
	position: relative !important;
	overflow: hidden !important;
	width: 100vw !important;
	left: 50% !important;
	margin-left: -50vw !important;
	margin-right: -50vw !important;
	box-sizing: border-box !important;
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
}

/* Add soft blob shapes to blog insights page header */
body .together-blog-insights-page .page-header::before,
body .together-blog-insights-page .page-header::after {
	content: '' !important;
	position: absolute !important;
	width: 400px !important;
	height: 400px !important;
	border-radius: 50% 30% 60% 40% / 50% 40% 60% 30% !important;
	z-index: 1 !important;
	pointer-events: none !important;
}

body .together-blog-insights-page .page-header::before {
	top: -100px !important;
	right: -100px !important;
	background: rgba(107, 203, 119, 0.3) !important; /* Light green blob */
	transform: rotate(45deg) !important;
}

body .together-blog-insights-page .page-header::after {
	bottom: -80px !important;
	left: -80px !important;
	background: rgba(151, 195, 84, 0.4) !important; /* Medium green blob */
	border-radius: 60% 40% 30% 70% / 60% 30% 70% 40% !important;
	transform: rotate(-30deg) !important;
}

body .together-blog-insights-page .page-header-inner {
	max-width: 1350px !important;
	width: 100% !important;
	position: relative !important;
	z-index: 2 !important;
	padding: 0 20px !important;
	box-sizing: border-box !important;
	text-align: center !important;
}

body .together-blog-insights-page .page-header .page-title {
	font-size: 2.5em !important;
	font-weight: 700 !important;
	color: #1a1a1a !important;
	margin: 0 !important;
	line-height: 1.3 !important;
	position: relative !important;
	z-index: 2 !important;
	text-align: center !important;
}

body .together-blog-insights-page .page-header .page-title .title-part-blue {
	color: #447AB3 !important;
}

body .together-blog-insights-page .page-header .page-title .title-part-black {
	color: #1a1a1a !important;
}

/* Single Post Page Container */
body .together-single-post-page {
	width: 100% !important;
	background: #fff !important;
	padding: 60px 0 !important;
	margin: 0 !important;
	position: relative !important;
	z-index: 1 !important;
}

/* Hide parent theme blog elements */
body .blog-sidebar,
body .blog-utility-bar,
body .blog-intro,
body .blog-grid:not(.blog-insights-grid),
body .blog-card:not(.insight-card),
body #main-container.page-blog .row > aside,
body #main-container.page-blog .blog-layout-container .blog-sidebar,
body #main-container.page-blog .blog-layout-container .blog-utility-bar {
	display: none !important;
}

/* Hide any page content that might be showing below our grid (from page editor) */
body .together-blog-insights-page ~ .page-content,
body .together-blog-insights-page ~ .entry-content,
body .together-blog-insights-page ~ article:not(.insight-card),
body .together-blog-insights-page ~ .page-content-inner,
body:has(.together-blog-insights-page) .page-content:not(.together-blog-insights-page),
body:has(.together-blog-insights-page) .entry-content:not(.together-blog-insights-page),
body:has(.together-blog-insights-page) #main-content article:not(.insight-card),
body:has(.together-blog-insights-page) .page-content-inner:not(.together-blog-insights-page),
body:has(.together-blog-insights-page) section:not(.together-blog-insights-page) {
	display: none !important;
}

/* Hide any page content sections that appear after our insights page (from page editor) */
body .together-blog-insights-page ~ .page-content,
body .together-blog-insights-page ~ .entry-content,
body .together-blog-insights-page ~ section:not(footer):not(header),
body .blog-insights-container ~ section:not(footer):not(header) {
	display: none !important;
}

/* Hide Elementor or page builder content that might appear */
body .together-blog-insights-page ~ .elementor-section,
body .together-blog-insights-page ~ .wp-block-group {
	display: none !important;
}

/* Override parent theme container */
body .together-blog-insights-page .container,
body .together-blog-insights-page #main-container,
body .blog-layout-container:has(.together-blog-insights-page) {
	max-width: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
	width: 100% !important;
}

/* Hide parent theme blog layout when our design is present */
body .together-blog-insights-page ~ .blog-sidebar,
body .together-blog-insights-page ~ .blog-utility-bar,
body .blog-layout-container:has(.together-blog-insights-page) .blog-sidebar,
body .blog-layout-container:has(.together-blog-insights-page) .blog-utility-bar,
body .blog-layout-container:has(.together-blog-insights-page) .blog-main-content:not(.together-blog-insights-page),
body #main-container.page-blog:has(.together-blog-insights-page) .row > aside,
body #main-container.page-blog:has(.together-blog-insights-page) .blog-intro {
	display: none !important;
}

body .blog-layout-container:has(.together-blog-insights-page),
body #main-container.page-blog:has(.together-blog-insights-page) .row {
	display: block !important;
	grid-template-columns: 1fr !important;
}

/* Ensure our container shows */
body .together-blog-insights-page .blog-insights-container {
	display: block !important;
}

.blog-insights-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 40px;
}

/* Page Header - Now using standard page-header styling */
.blog-insights-header {
	display: none; /* Hide old header, use page-header instead */
}

.title-part-blue {
	color: #447AB3;
}

.title-part-black {
	color: #1a1a1a;
}

/* Filter Bar */
.blog-insights-filters {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 50px;
	padding-bottom: 30px;
	border-bottom: 1px solid #e0e0e0;
}

.blog-filter-button {
	display: inline-block;
	padding: 10px 24px;
	background: #fff;
	color: #333;
	border: 1px solid #ddd;
	border-radius: 4px;
	text-decoration: none;
	font-size: 0.9375rem;
	font-weight: 500;
	transition: all 0.3s ease;
	cursor: pointer;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.blog-filter-button:hover {
	border-color: #447AB3;
	color: #447AB3;
	text-decoration: none;
}

.blog-filter-button.active {
	background: #447AB3;
	color: #fff;
	border-color: #447AB3;
}

/* Insights Grid */
.blog-insights-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
	margin-bottom: 60px;
}

/* Insight Card */
.insight-card {
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.insight-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.insight-card-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

/* Card Image */
.insight-card-image {
	position: relative;
	width: 100%;
	height: 220px;
	overflow: hidden;
	background: #f0f0f0;
}

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

/* Hide any salt logo overlays that might be added by CSS or other sources */
.insight-card-image .insight-card-logo,
.insight-card-image::after,
.insight-card-image::before {
	display: none !important;
	content: none !important;
}

/* Card Content */
.insight-card-content {
	padding: 24px;
}

.insight-card-title {
	font-size: 1.25rem;
	font-weight: 700;
	color: #1a1a1a;
	margin: 0 0 20px 0;
	line-height: 1.4;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.insight-card-link:hover .insight-card-title {
	color: #447AB3;
}

/* Card Footer */
.insight-card-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 20px;
}

.insight-category-tag {
	display: inline-block;
	padding: 6px 12px;
	background: transparent;
	color: #333;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.insight-read-more-btn {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #1a1a1a;
	color: #fff;
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.3s ease;
	flex-shrink: 0;
	padding: 0;
	text-decoration: none;
}

.insight-read-more-btn:hover {
	background: #447AB3;
}

.insight-read-more-btn svg {
	width: 20px;
	height: 20px;
}

/* No Insights */
.no-insights {
	text-align: center;
	padding: 60px 20px;
	color: #666;
}

/* Load More Button */
.blog-load-more-wrapper {
	text-align: center;
	margin-top: 60px;
	padding: 20px 0;
}

.blog-load-more-btn {
	display: inline-block;
	padding: 14px 32px;
	background: #447AB3;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 1rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.3s ease;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.blog-load-more-btn:hover {
	background: #2d5a85;
	color: #fff;
	text-decoration: none;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(68, 122, 179, 0.3);
}

.blog-load-more-btn:active {
	transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
	.blog-insights-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 24px;
	}
}

@media (max-width: 768px) {
	.blog-insights-container {
		padding: 0 20px;
	}
	
	.blog-insights-title {
		font-size: 2rem;
	}
	
	.blog-insights-filters {
		gap: 8px;
	}
	
	.blog-filter-button {
		padding: 8px 16px;
		font-size: 0.875rem;
	}
	
	.blog-insights-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	
	.insight-card-image {
		height: 200px;
	}
}

/* ============================================
   Single Post Page Styles
   ============================================ */

/* Single Post Container */
.together-single-post-page {
	width: 100%;
	background: #fff;
	padding: 60px 0;
}

.together-single-post-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 40px;
}

.together-single-post-wrapper {
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: 60px;
	align-items: start;
}

/* Back Link */
.single-post-back-link {
	margin-bottom: 20px;
}

.back-to-insights-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #447AB3;
	text-decoration: none;
	font-size: 0.9375rem;
	font-weight: 500;
	transition: color 0.3s ease;
}

.back-to-insights-link:hover {
	color: #2d5a85;
	text-decoration: none;
}

.back-to-insights-link svg {
	width: 16px;
	height: 16px;
}

/* Category Tag */
.single-post-category-tag {
	margin-bottom: 20px;
}

.single-post-category-tag span {
	display: inline-block;
	padding: 6px 16px;
	background: #f5f5f5;
	color: #333;
	border-radius: 20px;
	font-size: 0.875rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Post Header */
.single-post-header {
	margin-bottom: 24px;
}

.single-post-title {
	font-size: 2.5rem;
	font-weight: 700;
	color: #1a1a1a;
	line-height: 1.2;
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Post Intro */
.single-post-intro {
	font-size: 1.125rem;
	color: #666;
	line-height: 1.6;
	margin-bottom: 24px;
}

/* Post Meta */
.single-post-meta {
	display: flex;
	gap: 20px;
	margin-bottom: 32px;
	font-size: 0.9375rem;
	color: #999;
}

.post-date,
.post-read-time {
	display: flex;
	align-items: center;
}

/* Featured Image */
.single-post-featured-image {
	margin-bottom: 40px;
	border-radius: 8px;
	overflow: hidden;
}

.post-hero-image {
	width: 100%;
	height: auto;
	display: block;
}

/* Post Content */
.single-post-content {
	font-size: 1.0625rem;
	line-height: 1.8;
	color: #333;
	margin-bottom: 40px;
}

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

.single-post-content h2,
.single-post-content h3,
.single-post-content h4 {
	font-weight: 700;
	margin-top: 2em;
	margin-bottom: 1em;
	color: #1a1a1a;
}

.single-post-content h2 {
	font-size: 1.75rem;
}

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

.single-post-content h4 {
	font-size: 1.25rem;
}

.single-post-content ul,
.single-post-content ol {
	margin-bottom: 1.5em;
	padding-left: 2em;
}

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

.single-post-content a {
	color: #447AB3;
	text-decoration: underline;
}

.single-post-content a:hover {
	color: #2d5a85;
}

/* Post Footer */
.single-post-footer {
	margin-top: 40px;
	padding-top: 40px;
	border-top: 1px solid #e0e0e0;
}

.post-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.tags-label {
	font-weight: 600;
	color: #333;
	margin-right: 10px;
}

.tag-link {
	display: inline-block;
	padding: 6px 12px;
	background: #f5f5f5;
	color: #447AB3;
	border-radius: 4px;
	text-decoration: none;
	font-size: 0.875rem;
	transition: background 0.3s ease;
}

.tag-link:hover {
	background: #e8e8e8;
	text-decoration: none;
}

/* Post Navigation */
.post-navigation {
	margin-top: 60px;
	padding-top: 40px;
	border-top: 1px solid #e0e0e0;
	display: flex;
	justify-content: space-between;
	gap: 20px;
}

.nav-links {
	display: flex;
	width: 100%;
	justify-content: space-between;
	gap: 20px;
}

.nav-previous,
.nav-next {
	flex: 1;
}

.nav-previous a,
.nav-next a {
	display: flex;
	align-items: center;
	gap: 12px;
	color: #447AB3;
	text-decoration: none;
	padding: 16px;
	background: #f9f9f9;
	border-radius: 8px;
	transition: background 0.3s ease;
}

.nav-next a {
	flex-direction: row-reverse;
	text-align: right;
}

.nav-previous a:hover,
.nav-next a:hover {
	background: #f0f0f0;
	text-decoration: none;
}

.nav-arrow {
	font-size: 1.5rem;
}

.nav-label {
	display: block;
	font-size: 0.875rem;
	color: #999;
	margin-bottom: 4px;
}

.nav-title {
	display: block;
	font-weight: 600;
	color: #333;
}

/* Sidebar */
.together-single-post-sidebar {
	position: sticky;
	top: 100px;
}

.single-post-sidebar-widget {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 24px;
	margin-bottom: 24px;
}

.widget-title {
	font-size: 1.25rem;
	font-weight: 700;
	color: #1a1a1a;
	margin: 0 0 20px 0;
}

/* Featured Jobs Widget */
.featured-jobs-list {
	margin-bottom: 20px;
}

.featured-job-item {
	padding: 16px 0;
	border-bottom: 1px solid #f0f0f0;
}

.featured-job-item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.featured-job-title {
	margin: 0 0 8px 0;
	font-size: 1rem;
	font-weight: 600;
}

.featured-job-title a {
	color: #1a1a1a;
	text-decoration: none;
	transition: color 0.3s ease;
}

.featured-job-title a:hover {
	color: #447AB3;
	text-decoration: none;
}

.featured-job-company {
	font-size: 0.875rem;
	color: #666;
}

.view-all-jobs-link {
	display: inline-block;
	color: #447AB3;
	text-decoration: none;
	font-weight: 500;
	font-size: 0.9375rem;
	transition: color 0.3s ease;
}

.view-all-jobs-link:hover {
	color: #2d5a85;
	text-decoration: none;
}

/* Responsive */
@media (max-width: 1024px) {
	.together-single-post-wrapper {
		grid-template-columns: 1fr;
		gap: 40px;
	}
	
	.together-single-post-sidebar {
		position: static;
	}
}

@media (max-width: 768px) {
	.together-single-post-container {
		padding: 0 20px;
	}
	
	.single-post-title {
		font-size: 2rem;
	}
	
	.post-navigation {
		flex-direction: column;
	}
	
	.nav-links {
		flex-direction: column;
	}
	
	.nav-next a {
		flex-direction: row;
		text-align: left;
	}
}
