/* =============================================================
   Section — Linked Cards  (_section-cards.css)

   All rules are scoped to .vsk-section or its descendants, so
   this stylesheet cannot bleed into other Group blocks.

   Loaded lazily via wp_enqueue_block_style() on core/group —
   delivered only when this block is present on the page.
   Also registered via add_editor_style() so the editor matches.
   ============================================================= */

/* ── Section wrapper ────────────────────────────────────────── */

.vsk-section {
	background-color: var(--raised);
	padding-block: var(--wp--preset--spacing--60, 4rem);
}

.vsk-section__title {
	margin-block-end: var(--wp--preset--spacing--50, 2.5rem) !important;
	color: var(--fg);
}

/* ── Cards grid ─────────────────────────────────────────────── */
/*
   WP's native layout:grid already outputs the auto-fill grid on
   .vsk-cards-grid. We just add gap here; the column calculation
   (minmax 260 px) comes from the block's minimumColumnWidth attr.
*/

.vsk-cards-grid.wp-block-group {
	gap: var(--wp--preset--spacing--40, 1.5rem) !important;
}

/* ── Individual card ─────────────────────────────────────────── */

.vsk-card.wp-block-group {
	background-color: var(--raised);
	border: 1px solid var(--border);
	border-radius: 8px;
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
	/* flex:vertical is set by WP layout; no need to redeclare */
}

.vsk-card.wp-block-group:hover {
	box-shadow: 0 4px 20px rgba(11, 22, 41, 0.10);
	transform: translateY(-2px);
}

/* ── Card image ──────────────────────────────────────────────── */

.vsk-card__image.wp-block-image {
	margin: 0 !important; /* flush to card top edge */
	width: 100%;
}

.vsk-card__image.wp-block-image img {
	aspect-ratio: 3 / 2;
	width: 100%;
	height: auto;
	object-fit: cover;
	display: block;
}

/* ── Card title ─────────────────────────────────────────────── */

.vsk-card__title.wp-block-heading {
	font-size: var(--wp--preset--font-size--medium, 1.125rem) !important;
	color: var(--fg) !important;
	margin: 0 !important;
	padding: 1rem 1.25rem 0.25rem;
	line-height: 1.35;
}

/* ── Card CTA ────────────────────────────────────────────────── */

.vsk-card__cta.wp-block-buttons {
	margin: auto 0 0 !important; /* push to bottom of card */
	padding: 0.5rem 1.25rem 1.25rem;
}

/* Style the button as a compact text link with an animated arrow */
.vsk-card__cta .wp-block-button__link.wp-element-button {
	background: none !important;
	border: none !important;
	box-shadow: none !important;
	padding: 0 !important;
	color: var(--accent) !important;
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	transition: color 0.15s ease;
}

.vsk-card__cta .wp-block-button__link.wp-element-button::after {
	content: '→';
	display: inline-block;
	transition: transform 0.15s ease;
}

.vsk-card__cta .wp-block-button__link.wp-element-button:hover {
	color: var(--accent-hover) !important;
}

.vsk-card__cta .wp-block-button__link.wp-element-button:hover::after {
	transform: translateX(3px);
}

/* ── Responsive ──────────────────────────────────────────────── */
/*
   WP auto-fill grid already collapses columns as viewport narrows.
   Force single column below 480 px for the smallest screens.
*/

@media (max-width: 479px) {
	.vsk-cards-grid.wp-block-group {
		grid-template-columns: 1fr !important;
	}
}
