/* ============================================
   Header Categories Dropdown
   ============================================ */

.fca-categories-dropdown {
	position: relative;
	display: inline-flex;
	align-items: center;
	align-self: center;
}

/* Fix shortcode wrapper alignment - prevent p tag from breaking flex */
p:has(.fca-categories-dropdown) {
	display: contents;
}

.fca-categories-dropdown {
	margin: 0;
	line-height: 1;
}

.fca-categories-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	height: 40px;
	padding: 0 1rem;
	background: transparent;
	border: 1px solid var(--wp--preset--color--contrast-3);
	border-radius: var(--fca-radius-pill);
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
}

.fca-categories-toggle:hover {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	border-color: var(--wp--preset--color--contrast);
}

.fca-categories-toggle[aria-expanded="true"] {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

.fca-categories-toggle svg {
	transition: transform 0.2s ease;
}

.fca-categories-toggle[aria-expanded="true"] svg {
	transform: rotate(180deg);
}

.fca-categories-menu {
	position: absolute;
	top: calc(100% + 0.5rem);
	right: 0;
	min-width: 200px;
	max-height: 400px;
	overflow-y: auto;
	background: var(--fca-bg-primary);
	border: 1px solid var(--fca-border-color);
	border-radius: var(--fca-radius-lg);
	box-shadow: 0 10px 40px var(--fca-shadow-color);
	list-style: none;
	margin: 0;
	padding: 0.5rem;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: all 0.2s ease;
	z-index: 1000;
}

.fca-categories-dropdown.is-open .fca-categories-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.fca-categories-menu li {
	margin: 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.625rem 0.875rem;
	border-radius: var(--fca-radius-md);
	transition: background 0.15s ease;
}

.fca-categories-menu li:hover {
	background: var(--wp--preset--color--contrast-3);
}

.fca-categories-menu a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	font-size: var(--wp--preset--font-size--small);
}

.fca-category-count {
	font-size: 0.75rem;
	color: var(--wp--preset--color--contrast-2);
	background: var(--wp--preset--color--contrast-3);
	padding: 0.125rem 0.5rem;
	border-radius: var(--fca-radius-pill);
}

/* ============================================
   Category Filter Pills
   ============================================ */

/* Style for the categories widget as pills */
.wp-block-categories.is-style-pill {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	padding: 0;
	margin: 0;
}

.wp-block-categories.is-style-pill li {
	margin: 0;
}

.wp-block-categories.is-style-pill a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem 1rem;
	border-radius: var(--fca-radius-pill);
	border: 1px solid var(--wp--preset--color--contrast-3);
	background: transparent;
	color: var(--wp--preset--color--contrast-2);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	text-decoration: none;
	transition: all 0.2s ease;
}

.wp-block-categories.is-style-pill a:hover {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	border-color: var(--wp--preset--color--contrast);
}

/* ============================================
   Featured Posts Grid - Enhanced Visual Cards
   ============================================ */

/* Post template grid styling */
.wp-block-post-template.is-layout-grid {
	gap: 2rem;
}

/* Individual post card in grid */
.wp-block-post-template.is-layout-grid > li {
	position: relative;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	border-radius: var(--fca-radius-lg);
	padding: 0.5rem;
	margin: -0.5rem;
}

.wp-block-post-template.is-layout-grid > li:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .wp-block-post-template.is-layout-grid > li:hover {
	box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

/* Featured image container with overlay capability */
.wp-block-post-template.is-layout-grid .wp-block-post-featured-image {
	position: relative;
	overflow: hidden;
	border-radius: var(--fca-radius-lg);
	background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
	aspect-ratio: 16 / 10;
}

/* Featured image with zoom effect */
.wp-block-post-template.is-layout-grid .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease, opacity 0.3s ease;
}

.wp-block-post-template.is-layout-grid > li:hover .wp-block-post-featured-image img {
	transform: scale(1.05);
}

/* Fallback gradient for posts without featured images */
.wp-block-post-template.is-layout-grid .wp-block-post-featured-image:empty,
.wp-block-post-template.is-layout-grid .wp-block-post-featured-image:not(:has(img)) {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 180px;
}

.wp-block-post-template.is-layout-grid .wp-block-post-featured-image:not(:has(img))::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	opacity: 0.9;
}

/* Post title in grid */
.wp-block-post-template.is-layout-grid .wp-block-post-title {
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
	line-height: 1.3;
	margin: 0.25rem 0 0 0;
}

.wp-block-post-template.is-layout-grid .wp-block-post-title a {
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
}

.wp-block-post-template.is-layout-grid .wp-block-post-title a:hover {
	color: var(--wp--preset--color--contrast-2);
}

/* Post date in grid */
.wp-block-post-template.is-layout-grid .wp-block-post-date {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--contrast-2);
	margin-top: var(--wp--preset--spacing--20);
}

/* Post excerpt in grid */
.wp-block-post-template.is-layout-grid .wp-block-post-excerpt {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--contrast-2);
	line-height: 1.6;
	margin-top: 0.5rem;
	opacity: 0.85;
	transition: opacity 0.3s ease;
}

.wp-block-post-template.is-layout-grid > li:hover .wp-block-post-excerpt {
	opacity: 1;
}

.wp-block-post-template.is-layout-grid .wp-block-post-excerpt__excerpt {
	margin: 0;
}

/* ============================================
   Posts List Style - Clean with Arrow Icons
   ============================================ */

/* Posts list container */
.is-style-fca-posts-list {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.is-style-fca-posts-list > li {
	border-bottom: 1px solid var(--wp--preset--color--contrast-3);
	padding: 1.25rem 0;
}

.is-style-fca-posts-list > li:first-child {
	border-top: 1px solid var(--wp--preset--color--contrast-3);
}

/* Post title in list */
.is-style-fca-posts-list .wp-block-post-title {
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 500;
	margin: 0;
	flex: 1;
}

.is-style-fca-posts-list .wp-block-post-title a {
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
}

.is-style-fca-posts-list .wp-block-post-title a:hover {
	color: var(--wp--preset--color--contrast-2);
}

/* Arrow circle icon in posts list */
.fca-arrow-circle,
.is-style-fca-posts-list .fca-arrow-circle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px !important;
	height: 28px !important;
	min-width: 28px;
	border-radius: var(--fca-radius-circle) !important;
	background: var(--wp--preset--color--contrast) !important;
	color: var(--wp--preset--color--base) !important;
	font-size: 14px;
	font-weight: 400;
	padding: 0 !important;
	transition: transform 0.2s ease;
	flex-shrink: 0;
}

.fca-arrow-circle p {
	margin: 0;
	line-height: 1;
}

.is-style-fca-posts-list > li:hover .fca-arrow-circle {
	transform: translateX(4px);
}

/* Hide comma separator between category pills */
.wp-block-post-terms__separator {
	display: none;
}

/* Add spacing between category pills (since separator is hidden) */
.wp-block-post-terms.is-style-pill a {
	margin-right: 2px;
}

/* Pill style for post terms/categories in list */
.is-style-fca-posts-list .wp-block-post-terms.is-style-pill a,
.wp-block-post-terms.is-style-pill a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.25rem 0.75rem;
	background: var(--wp--preset--color--base-2);
	border-radius: var(--fca-radius-pill);
	font-size: var(--wp--preset--font-size--small);
	text-decoration: none;
	color: var(--wp--preset--color--contrast-2);
	transition: all 0.2s ease;
}

.is-style-fca-posts-list .wp-block-post-terms.is-style-pill a:hover,
.wp-block-post-terms.is-style-pill a:hover {
	background: var(--wp--preset--color--contrast-3);
	color: var(--wp--preset--color--contrast);
}

/* Category tags in list as pills */
.is-style-fca-posts-list .wp-block-post-terms a {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	background: var(--wp--preset--color--base-2);
	border-radius: var(--wp--preset--spacing--20);
	font-size: var(--wp--preset--font-size--small);
	text-decoration: none;
	color: var(--wp--preset--color--contrast-2);
	transition: all 0.2s ease;
}

.is-style-fca-posts-list .wp-block-post-terms a:hover {
	background: var(--wp--preset--color--contrast-3);
	color: var(--wp--preset--color--contrast);
}

/* ============================================
   Posts List Cards - AngelList Style
   ============================================ */

/* Container for the card list */
.is-style-fca-posts-list-cards {
	display: flex;
	flex-direction: column;
	gap: 0;
}

/* Each post card item */
.is-style-fca-posts-list-cards > li {
	border-bottom: 1px solid var(--wp--preset--color--contrast-3);
}

.is-style-fca-posts-list-cards > li:first-child {
	border-top: 1px solid var(--wp--preset--color--contrast-3);
}

/* Post card layout - horizontal flex */
.fca-post-card {
	display: flex;
	gap: 2rem;
	padding: 1.5rem;
	margin: 0 -1.5rem;
	align-items: stretch;
	border-radius: var(--fca-radius-lg);
	transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.fca-post-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
	background-color: var(--wp--preset--color--base-2);
}

[data-theme="dark"] .fca-post-card:hover {
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
	background-color: rgba(255, 255, 255, 0.03);
}

/* Featured image wrapper - always renders */
.fca-post-card-image-wrapper {
	flex: 0 0 280px;
	max-width: 280px;
	min-height: 160px;
	border-radius: var(--fca-radius-md);
	overflow: hidden;
}

/* When wrapper has an image */
.fca-post-card-image-wrapper:has(.fca-post-card-image) {
	background: transparent;
}

/* Featured image container */
.fca-post-card-image {
	margin: 0 !important;
	height: 100%;
}

.fca-post-card-image img {
	border-radius: var(--fca-radius-md);
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.fca-post-card:hover .fca-post-card-image img {
	transform: scale(1.03);
}

/* Fallback for posts without featured image */
.fca-post-card-image-wrapper:not(:has(.fca-post-card-image)) {
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.fca-post-card-image-wrapper:not(:has(.fca-post-card-image))::after {
	content: '</>';
	font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
	font-size: 2rem;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.15);
	letter-spacing: -0.05em;
}

/* Content side */
.fca-post-card-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.75rem;
	min-width: 0;
}

/* Category pill */
.fca-post-card-category {
	margin: 0 !important;
}

.fca-post-card-category a {
	display: inline-block;
	padding: 0.25rem 0.625rem;
	background: var(--wp--preset--color--base-2);
	border: 1px solid var(--wp--preset--color--contrast-3);
	border-radius: var(--fca-radius-xs);
	font-size: 0.75rem !important;
	font-weight: 500;
	text-decoration: none;
	color: var(--wp--preset--color--contrast-2);
	text-transform: capitalize;
	transition: all 0.2s ease;
}

.fca-post-card-category a:hover {
	background: var(--wp--preset--color--contrast-3);
	color: var(--wp--preset--color--contrast);
}

/* Post title */
.fca-post-card-title {
	margin: 0 !important;
	font-size: 1.125rem !important;
	font-weight: 600;
	line-height: 1.4;
}

.fca-post-card-title a {
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
	transition: color 0.2s ease;
}

.fca-post-card-title a:hover {
	color: var(--wp--preset--color--contrast-2);
}

/* Meta info (date + reading time) */
.fca-post-card-meta {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.fca-post-card-date {
	color: var(--wp--preset--color--contrast-2);
	font-size: var(--wp--preset--font-size--small);
}

.fca-post-card-separator {
	margin: 0 !important;
	color: var(--wp--preset--color--contrast-2);
}

.fca-post-card-reading-time,
.fca-reading-time-block {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	color: var(--wp--preset--color--contrast-2);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.fca-reading-time-block .fca-icon-book {
	flex-shrink: 0;
}

/* ============================================
   Comments Count Indicator
   ============================================ */

.fca-comments-count {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	color: var(--wp--preset--color--contrast-2);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	text-decoration: none;
	transition: color 0.2s ease;
}

.fca-comments-count:hover {
	color: var(--wp--preset--color--contrast);
}

.fca-comments-count .fca-icon-comment {
	flex-shrink: 0;
}

/* Post meta row with reading time and comments */
.fca-post-meta-row {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
}

/* Responsive adjustments for post cards */
@media (max-width: 768px) {
	.fca-post-card {
		flex-direction: column;
		gap: 1rem;
	}

	.fca-post-card-image-wrapper {
		flex: none;
		max-width: 100%;
		width: 100%;
		min-height: 180px;
	}

	.fca-post-card-image img {
		aspect-ratio: 16 / 9;
	}

	.fca-post-card-content {
		gap: 0.5rem;
	}

	.fca-post-card-title {
		font-size: 1rem !important;
	}
}

