/*!
Theme Name: Kadence Child
Theme URI: https://www.kadencewp.com/kadence-theme/
Template: kadence
Author: Kadence WP
Author URI: https://www.kadencewp.com/
Description: A child theme for the Kadence Theme.
Version: 1.0.0
License: GNU General Public License v3.0 (or later)
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: kadence-child
*/

/* Theme customization starts here
-------------------------------------------------------------- */

/* Homepage Categories Grid */
.entry-content-wrap .homepage-categories-wrapper {
	padding: 1.5rem 0;
	width: 100%;
}

.entry-content-wrap .site-container {
	max-width: var(--global-content-width, 1200px);
	margin: 0 auto;
	padding-left: var(--global-content-edge-padding, 1rem);
	padding-right: var(--global-content-edge-padding, 1rem);
}

.entry-content-wrap .homepage-categories-wrapper .homepage-categories-grid {
	display: grid !important;
	grid-template-columns: 1fr !important;
	gap: 1.5rem;
	width: 100%;
	margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
	.entry-content-wrap .homepage-categories-wrapper .homepage-categories-grid {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

@media (min-width: 1024px) {
	.entry-content-wrap .homepage-categories-wrapper .homepage-categories-grid {
		grid-template-columns: repeat(4, 1fr) !important;
	}
}

/* Category Column */
.homepage-category-column {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--global-palette9, #ffffff);
	border-radius: 8px;
	padding: 1.25rem;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.category-column-header {
	margin-bottom: 1rem;
}

.category-column-title {
	font-size: 1.5rem;
	font-weight: 700;
	margin: 0 0 0.5rem 0;
	padding: 0;
	color: var(--global-palette3, #1a1a1a);
	line-height: 1.3;
	letter-spacing: -0.01em;
}

@media (max-width: 768px) {
	.category-column-title {
		font-size: 1.25rem;
	}
}

.category-column-description {
	margin: 0 0 1rem 0;
	padding: 0;
	font-size: 0.85rem;
	line-height: 1.4;
	color: var(--global-palette5, #666666);
}

/* Posts List */
.category-posts-list-wrapper {
	flex: 1;
	overflow-y: auto;
	overflow-x: hidden; /* Prevent horizontal scroll */
	min-height: 100px;
	/* Custom scrollbar styling */
	scrollbar-width: thin; /* Firefox - thin scrollbar */
	scrollbar-color: var(--global-palette8, #e5e5e5) transparent; /* Firefox - thumb and track */
}

/* Webkit scrollbar styling (Chrome, Safari, Edge) */
.category-posts-list-wrapper::-webkit-scrollbar {
	width: 6px; /* Thin scrollbar width */
}

.category-posts-list-wrapper::-webkit-scrollbar-track {
	background: transparent; /* Transparent track */
}

.category-posts-list-wrapper::-webkit-scrollbar-thumb {
	background: var(--global-palette8, #e5e5e5); /* Light gray thumb */
	border-radius: 3px; /* Rounded corners */
}

.category-posts-list-wrapper::-webkit-scrollbar-thumb:hover {
	background: var(--global-palette6, #cccccc); /* Slightly darker on hover */
}

.category-posts-list {
	list-style: none !important;
	padding: 0;
	margin: 0;
}

.category-posts-list li {
	list-style: none !important;
}

.category-post-item {
	margin-bottom: 0;
	list-style: none !important;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.category-post-item:last-child .category-post-link {
	border-bottom: none;
}

.category-post-link {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.25rem 0.5rem;
	margin: 0;
	text-decoration: none;
	transition: all 0.2s ease;
	color: var(--global-palette1, #d32f2f);
	border-bottom: 1px solid var(--global-palette8, #e5e5e5);
	border-radius: 4px;
	flex: 1;
}

.category-post-link:hover {
	text-decoration: none;
	background: var(--global-palette7, #f5f5f5);
	color: var(--global-palette3, #1a1a1a);
	border-bottom-color: var(--global-palette8, #e5e5e5);
}

.post-detail-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	min-width: 24px;
	padding: 0;
	margin: 0;
	text-decoration: none;
	color: var(--global-palette5, #666666);
	border-radius: 4px;
	transition: all 0.2s ease;
	flex-shrink: 0;
}

.post-detail-link:hover {
	background: var(--global-palette7, #f5f5f5);
	color: var(--global-palette3, #1a1a1a);
	text-decoration: none;
}

.post-detail-link svg {
	width: 16px;
	height: 16px;
	display: block;
}

.post-order-number {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	min-width: 20px;
	border-radius: 50%;
	background: var(--global-palette7, #f5f5f5);
	color: var(--global-palette3, #1a1a1a);
	font-size: 0.65rem;
	font-weight: 600;
	line-height: 1;
	flex-shrink: 0;
}

.post-icon {
	width: 16px;
	height: 16px;
	min-width: 16px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 3px;
	overflow: hidden;
	background: transparent;
}

.post-icon-placeholder {
	width: 16px;
	height: 16px;
	background: var(--global-palette8, #e5e5e5);
	border-radius: 2px;
	display: block;
}

.post-icon-image {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.post-title {
	flex: 1;
	font-weight: 500;
	line-height: 1.3;
	font-size: 0.9rem;
	color: inherit;
}

/* Column Footer */
.category-column-footer {
	margin-top: 1rem;
	padding-top: 0.75rem;
	border-top: 1px solid var(--global-palette8, #e5e5e5);
	text-align: center;
}

.show-all-button {
	display: inline-block;
	padding: 0;
	text-decoration: none;
	font-weight: 500;
	transition: all 0.2s ease;
	text-align: center;
	color: var(--global-palette1, #d32f2f);
	font-size: 0.9rem;
}

.show-all-button:hover {
	text-decoration: none;
	color: var(--global-palette1, #d32f2f);
	opacity: 0.8;
}

.no-posts {
	padding: 2rem 0;
	text-align: center;
	color: var(--global-palette5, #666666);
}

/* Homepage Content Block (content between columns) */
.homepage-content-block {
	margin: 2rem 0;
	padding: 2rem 0;
	width: 100%;
	clear: both;
}

.homepage-gutenberg-content .wp-block-group,
.homepage-gutenberg-content .wp-block-columns,
.homepage-gutenberg-content .wp-block-post-template,
.homepage-gutenberg-content .wp-block-query {
	margin-top: 2rem;
}

.homepage-gutenberg-content .wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(1, 1fr);
	gap: 1.5rem;
}

@media (min-width: 768px) {
	.homepage-gutenberg-content .wp-block-post-template {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.homepage-gutenberg-content .wp-block-post-template {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (min-width: 1280px) {
	.homepage-gutenberg-content .wp-block-post-template {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* Ensure proper spacing for all Gutenberg blocks */
.homepage-gutenberg-content > * {
	margin-top: 0;
	margin-bottom: 1.5rem;
}

.homepage-gutenberg-content > *:first-child {
	margin-top: 0;
}

.homepage-gutenberg-content > *:last-child {
	margin-bottom: 0;
}
