/**
 * Classic Wine Vinegar Elementor Widgets
 * Styles
 */

/* ============================================
   Scrolling Ticker Widget
   ============================================ */

.cwv-ticker-wrapper {
	width: 100%;
	overflow: hidden;
	position: relative;
	background-color: #3a4f3f;
}

.cwv-ticker-track {
	display: flex;
	align-items: center;
	white-space: nowrap;
	will-change: transform;
}

/* Left to Right Animation */
.cwv-ticker-left {
	animation: cwv-scroll-left linear infinite;
}

@keyframes cwv-scroll-left {
	0% {
		transform: translateX(-50%);
	}
	100% {
		transform: translateX(0%);
	}
}

/* Right to Left Animation */
.cwv-ticker-right {
	animation: cwv-scroll-right linear infinite;
}

@keyframes cwv-scroll-right {
	0% {
		transform: translateX(0%);
	}
	100% {
		transform: translateX(-50%);
	}
}

/* Pause on Hover */
.cwv-ticker-pause-hover:hover .cwv-ticker-track {
	animation-play-state: paused;
}

/* Ticker Items */
.cwv-ticker-item {
	display: inline-flex;
	align-items: center;
	margin-right: 80px;
	color: #ffffff;
	font-size: 16px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.cwv-ticker-icon {
	display: inline-flex;
	align-items: center;
	margin-right: 12px;
	font-size: 16px;
}

.cwv-ticker-text {
	display: inline-block;
}

/* Smooth rendering */
.cwv-ticker-wrapper,
.cwv-ticker-track {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Prevent layout shift */
.cwv-ticker-wrapper::before,
.cwv-ticker-wrapper::after {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	width: 50px;
	pointer-events: none;
	z-index: 2;
}

.cwv-ticker-wrapper::before {
	left: 0;
	background: linear-gradient(to right, currentColor, transparent);
}

.cwv-ticker-wrapper::after {
	right: 0;
	background: linear-gradient(to left, currentColor, transparent);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
	.cwv-ticker-track {
		animation: none !important;
	}

	.cwv-ticker-track {
		overflow-x: auto;
		white-space: normal;
		flex-wrap: wrap;
	}
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.cwv-ticker-item {
		font-size: 14px;
		margin-right: 60px;
	}

	.cwv-ticker-icon {
		font-size: 14px;
		margin-right: 10px;
	}
}

@media (max-width: 480px) {
	.cwv-ticker-item {
		font-size: 12px;
		margin-right: 40px;
	}

	.cwv-ticker-icon {
		font-size: 12px;
		margin-right: 8px;
	}
}

/* ============================================
   Recipe Grid Widget
   ============================================ */

.cwv-recipe-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
}

.cwv-recipe-card {
	background: #ffffff;
	border-radius: 8px;
	overflow: hidden;
	transition: transform 0.3s, box-shadow 0.3s;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cwv-recipe-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.cwv-recipe-image {
	position: relative;
	overflow: hidden;
	aspect-ratio: 4/3;
	background: #f0f0f0;
}

.cwv-recipe-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s;
}

.cwv-recipe-card:hover .cwv-recipe-image img {
	transform: scale(1.05);
}

.cwv-recipe-card-content {
	padding: 1.5rem;
}

.cwv-recipe-category {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	background: #3a4f3f;
	color: #ffffff;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	border-radius: 4px;
	margin-bottom: 0.75rem;
}

.cwv-recipe-title {
	font-size: 1.5rem;
	font-weight: 600;
	margin: 0 0 1rem 0;
	line-height: 1.3;
}

.cwv-recipe-title a {
	color: #2d2d2d;
	text-decoration: none;
	transition: color 0.2s;
}

.cwv-recipe-title a:hover {
	color: #3a4f3f;
}

.cwv-recipe-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-bottom: 1rem;
	font-size: 0.875rem;
	color: #666666;
}

.cwv-meta-item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.cwv-recipe-excerpt {
	font-size: 0.9375rem;
	line-height: 1.6;
	color: #555555;
	margin-bottom: 1rem;
}

.cwv-recipe-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1.5rem;
	background: transparent;
	border: 2px solid #2d2d2d;
	color: #2d2d2d;
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	border-radius: 24px;
	transition: all 0.2s;
}

.cwv-recipe-link:hover {
	background: #2d2d2d;
	color: #ffffff;
}

.cwv-recipe-link i {
	font-size: 0.75rem;
	transition: transform 0.2s;
}

.cwv-recipe-link:hover i {
	transform: translateX(4px);
}

/* Responsive Grid */
@media (max-width: 1024px) {
	.cwv-recipe-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.cwv-recipe-grid {
		grid-template-columns: 1fr;
	}
}

/* ============================================
   Featured Recipe Widget
   ============================================ */

.cwv-featured-recipe {
	background: #ffffff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

/* Horizontal Layout */
.cwv-featured-recipe-horizontal {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0;
}

.cwv-featured-recipe-horizontal .cwv-featured-recipe-image {
	aspect-ratio: 1/1;
}

/* Vertical Layout */
.cwv-featured-recipe-vertical {
	display: flex;
	flex-direction: column;
}

.cwv-featured-recipe-vertical .cwv-featured-recipe-image {
	aspect-ratio: 16/9;
}

/* Overlay Layout */
.cwv-featured-recipe-overlay {
	position: relative;
	min-height: 500px;
}

.cwv-featured-recipe-overlay .cwv-featured-recipe-image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.cwv-featured-recipe-overlay .cwv-featured-recipe-image::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.7));
}

.cwv-featured-recipe-overlay .cwv-featured-recipe-content {
	position: relative;
	z-index: 2;
	color: #ffffff;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 500px;
}

.cwv-featured-recipe-overlay .cwv-featured-recipe-title,
.cwv-featured-recipe-overlay .cwv-featured-recipe-excerpt {
	color: #ffffff;
}

/* Featured Recipe Image */
.cwv-featured-recipe-image {
	position: relative;
	overflow: hidden;
	background: #f0f0f0;
}

.cwv-featured-recipe-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Featured Recipe Content */
.cwv-featured-recipe-content {
	padding: 2rem;
}

.cwv-featured-recipe-category {
	display: inline-block;
	padding: 0.375rem 1rem;
	background: #3a4f3f;
	color: #ffffff;
	font-size: 0.875rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	border-radius: 4px;
	margin-bottom: 1rem;
}

.cwv-featured-recipe-title {
	font-size: 2.5rem;
	font-weight: 700;
	margin: 0 0 1.5rem 0;
	line-height: 1.2;
	color: #2d2d2d;
}

.cwv-featured-recipe-meta {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 1.5rem;
	margin-bottom: 1.5rem;
	padding: 1.5rem;
	background: #f8f8f8;
	border-radius: 8px;
}

.cwv-featured-recipe-meta .cwv-meta-item {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.cwv-meta-label {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #666666;
	font-weight: 600;
}

.cwv-meta-value {
	font-size: 1.125rem;
	font-weight: 600;
	color: #2d2d2d;
}

.cwv-featured-recipe-excerpt {
	font-size: 1rem;
	line-height: 1.7;
	color: #555555;
	margin-bottom: 2rem;
}

.cwv-recipe-button {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	padding: 1rem 2rem;
	background: #3a4f3f;
	color: #ffffff;
	font-size: 1rem;
	font-weight: 600;
	text-decoration: none;
	border-radius: 24px;
	transition: all 0.2s;
}

.cwv-recipe-button:hover {
	background: #2a3f2f;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(58, 79, 63, 0.3);
}

.cwv-recipe-button i {
	transition: transform 0.2s;
}

.cwv-recipe-button:hover i {
	transform: translateX(4px);
}

/* Responsive Featured Recipe */
@media (max-width: 1024px) {
	.cwv-featured-recipe-horizontal {
		grid-template-columns: 1fr;
	}

	.cwv-featured-recipe-title {
		font-size: 2rem;
	}
}

@media (max-width: 768px) {
	.cwv-featured-recipe-content {
		padding: 1.5rem;
	}

	.cwv-featured-recipe-title {
		font-size: 1.75rem;
	}

	.cwv-featured-recipe-meta {
		grid-template-columns: repeat(2, 1fr);
	}
}
