/**
 * Veritas Featured Listings Widget — Styles
 *
 * Card grid for the Featured_Listings_Widget Elementor widget.
 * Uses Veritas gold/black palette and Cormorant Garamond for price.
 *
 * @package PLVeritasHelper
 * @since   0.3.0
 */

/* ─── Tokens ──────────────────────────────────────────────────── */
.vfl-wrap {
	--vfl-gold:       #FFCC00;
	--vfl-gold-hover: #E6B800;
	--vfl-gold-text:  #8B6914; /* Darkened gold for text on white — 5.8:1 contrast ratio (WCAG AA) */
	--vfl-black:      #1A1A1A;
	--vfl-white:      #FFFFFF;
	--vfl-muted:      #666666; /* Darkened from #777 — 5.7:1 contrast ratio (WCAG AA) */
	--vfl-border:     #E8E8E8;
	--vfl-shadow:     0 2px 16px rgba(0, 0, 0, 0.08);
	--vfl-shadow-hov: 0 8px 32px rgba(0, 0, 0, 0.14);
	--vfl-radius:     8px;
	--vfl-font-head:  'Cormorant Garamond', Georgia, serif;
	--vfl-font-body:  'Inter', sans-serif;
}

/* ─── Section Header ──────────────────────────────────────────── */
.vfl-header {
	text-align: center;
	margin-bottom: 40px;
}

.vfl-heading {
	font-family: var(--vfl-font-head);
	font-size: clamp(28px, 4vw, 42px);
	font-weight: 600;
	color: var(--vfl-black);
	margin: 0 0 12px;
	line-height: 1.15;
}

.vfl-subheading {
	font-family: var(--vfl-font-body);
	font-size: 16px;
	color: #555;
	margin: 0;
	max-width: 560px;
	margin-inline: auto;
	line-height: 1.6;
}

/* ─── Grid ────────────────────────────────────────────────────── */
.vfl-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	width: 100%;
}

/* ─── Card ────────────────────────────────────────────────────── */
.vfl-card {
	background: var(--vfl-white);
	border-radius: var(--vfl-radius);
	box-shadow: var(--vfl-shadow);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.25s ease, transform 0.2s ease;
	border: 1.5px solid transparent;
}

.vfl-card:hover {
	box-shadow: var(--vfl-shadow-hov);
	transform: translateY(-4px);
	border-color: var(--vfl-gold);
}

/* ─── Card Image ──────────────────────────────────────────────── */
.vfl-card-image-wrap {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 10;
}

.vfl-card-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.vfl-card:hover .vfl-card-image {
	transform: scale(1.04);
}

/* Placeholder when no image */
.vfl-card-image--placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #1A1A1A 0%, #333 60%, #222 100%);
	display: flex;
	align-items: center;
	justify-content: center;
}

.vfl-card-image--placeholder::after {
	content: '';
	display: block;
	width: 48px;
	height: 48px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='12' r='10' stroke='%23FFCC00' stroke-width='1.5'/%3E%3Cpath d='M12 7v5l3 3' stroke='%23FFCC00' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-size: contain;
	opacity: 0.4;
}

/* ─── Badge ───────────────────────────────────────────────────── */
.vfl-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	background-color: var(--vfl-gold);
	color: var(--vfl-black);
	font-family: var(--vfl-font-body);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 3px;
	line-height: 1.5;
	pointer-events: none;
}

/* ─── Card Body ───────────────────────────────────────────────── */
.vfl-card-body {
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}

/* Location */
.vfl-location {
	font-family: var(--vfl-font-body);
	font-size: 12px;
	font-weight: 500;
	color: var(--vfl-muted);
	text-transform: uppercase;
	letter-spacing: 0.07em;
	margin: 0;
	display: flex;
	align-items: center;
	gap: 4px;
}

.vfl-pin {
	width: 9px;
	height: 12px;
	flex-shrink: 0;
	color: var(--vfl-muted);
}

/* Title */
.vfl-title {
	font-family: var(--vfl-font-body);
	font-size: 16px;
	font-weight: 600;
	color: var(--vfl-black);
	margin: 0;
	line-height: 1.4;
}

.vfl-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.15s ease;
}

.vfl-title a:hover {
	color: #333;
}

/* Meta row */
.vfl-meta {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin-top: 2px;
}

.vfl-price {
	font-family: var(--vfl-font-head);
	font-size: 22px;
	font-weight: 700;
	color: var(--vfl-gold-text);
	line-height: 1;
}

.vfl-acres {
	font-family: var(--vfl-font-body);
	font-size: 13px;
	color: var(--vfl-muted);
}

/* CTA link */
.vfl-card-cta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: auto;
	padding-top: 12px;
	font-family: var(--vfl-font-body);
	font-size: 13px;
	font-weight: 600;
	color: var(--vfl-gold-text);
	text-decoration: none;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	transition: gap 0.15s ease, opacity 0.15s ease;
}

.vfl-card-cta svg {
	width: 14px;
	height: 10px;
	flex-shrink: 0;
	transition: transform 0.15s ease;
}

.vfl-card-cta:hover {
	opacity: 0.8;
}

.vfl-card-cta:hover svg {
	transform: translateX(3px);
}

/* ─── No Results ──────────────────────────────────────────────── */
.vfl-no-results {
	font-family: var(--vfl-font-body);
	color: var(--vfl-muted);
	text-align: center;
	padding: 40px 0;
}

/* ─── Footer / View All button ────────────────────────────────── */
.vfl-footer {
	display: flex;
	justify-content: center;
	margin-top: 40px;
}

.vfl-view-all {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--vfl-font-body);
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--vfl-black);
	background-color: var(--vfl-gold);
	border: none;
	border-radius: 6px;
	padding: 14px 28px;
	text-decoration: none;
	transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.vfl-view-all svg {
	width: 14px;
	height: 10px;
	transition: transform 0.15s ease;
}

.vfl-view-all:hover {
	background-color: var(--vfl-gold-hover);
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(255, 204, 0, 0.3);
}

.vfl-view-all:hover svg {
	transform: translateX(3px);
}

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

@media (max-width: 600px) {
	.vfl-grid {
		grid-template-columns: 1fr;
	}

	.vfl-heading {
		font-size: 28px;
	}
}
