/**
 * Featured Cards Carousel Styles
 * Horizontal scrollable content cards with responsive widths
 */

/* Main carousel wrapper */
.featured-cards-carousel-query {
	width: 100%;
}

.featured-cards-wrapper {
	width: 100%;
	position: relative;
	margin-right: 0;
	padding-left: 0;
	padding-right: 0;
}

/* Heading inside wrapper needs padding to align with content */
.featured-cards-wrapper > .wp-block-heading {
	padding-left: 30px;
	padding-right: 30px;
	margin-bottom: var(--wp--preset--spacing--small, 1rem);
}

/* Horizontal scrolling container */
.featured-cards-container {
	display: flex !important;
	flex-wrap: nowrap !important;
	gap: 1.5rem;
	padding-left: 30px;
	padding-right: 30px;
	padding-top: 8px;
	padding-bottom: 32px;
	margin: 0;
	overflow: auto hidden;
	width: 100%;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

/* Hide scrollbar but keep functionality */
.featured-cards-container::-webkit-scrollbar {
	display: none;
}

.featured-cards-container {
	scrollbar-width: none; /* Firefox */
	-ms-overflow-style: none; /* IE and Edge */
}

/* Individual featured card */
.featured-card {
	flex-shrink: 0;
	width: 315px; /* Default width for smaller screens */
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	transition: box-shadow 0.3s ease, transform 0.3s ease;
	display: flex;
	flex-direction: column;
}

/* Card width at 1278px and above */
@media (min-width: 1278px) {
	.featured-card {
		width: 432px;
	}
}

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

/* Featured card image */
.featured-card .wp-block-image {
	width: 100%;
	margin: 0;
	overflow: hidden;
}

.featured-card .wp-block-image img {
	width: 100%;
	height: auto;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.featured-card:hover .wp-block-image img {
	transform: scale(1.05);
}

/* Content wrapper inside card */
.featured-card > .wp-block-group {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

/* Card heading */
.featured-card .wp-block-heading {
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.3;
	margin: 0 0 0.5rem 0;
}

/* Card paragraph */
.featured-card p {
	color: #666;
	line-height: 1.6;
	font-size: 1rem;
	margin: 0 0 1.5rem 0;
	flex-grow: 1;
}

/* Button styling */
.featured-card .wp-block-buttons {
	margin: 0;
}

.featured-card .wp-block-button {
	margin: 0;
}

.featured-card .wp-block-button__link {
	padding: 0.75rem 1.5rem;
	font-size: 1rem;
	font-weight: 500;
	text-decoration: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.featured-card .wp-block-button__link:hover {
	opacity: 0.9;
	transform: scale(1.02);
}

/* Editor overrides */
.editor-styles-wrapper .featured-cards-container > * {
	margin-block-start: 0 !important;
	margin-block-end: 0 !important;
}

/* Responsive adjustments for mobile */
@media (max-width: 599px) {
	.featured-cards-wrapper {
		margin-left: 0;
		margin-right: 0;
	}
	
	.featured-cards-wrapper > .wp-block-heading {
		padding-left: var(--wp--preset--spacing--medium, 1rem);
		padding-right: var(--wp--preset--spacing--medium, 1rem);
	}
	
	.featured-cards-container {
		padding-left: var(--wp--preset--spacing--medium, 1rem);
		padding-right: var(--wp--preset--spacing--medium, 1rem);
		padding-top: 8px;
		padding-bottom: 32px;
		gap: 1rem;
	}
	
	/* Card maintains fixed width on mobile for horizontal scroll */
	.featured-card {
		width: 280px;
	}
	
	/* Adjust typography for mobile */
	.featured-card .wp-block-heading {
		font-size: 1.25rem;
	}
	
	.featured-card p {
		font-size: 0.9375rem;
	}
}

/* Tablet adjustments */
@media (min-width: 600px) and (max-width: 1277px) {
	.featured-card {
		width: 315px;
	}
}

