/* Link kaart */

.smartvolt-story-card {
	--sv-card-radius: 24px;
	--sv-body-bg: var(--wp--preset--color--lichtblauw, #d1edf8);
	--sv-navy: var(--wp--preset--color--alt-achtergrond, #0b3f54);
	--sv-btn-size: 56px;
	--sv-btn-radius: 16px;
	--sv-btn-offset: 0px;

	border-radius: var(--sv-card-radius) var(--sv-card-radius) 0 var(--sv-card-radius);
	overflow: hidden;
	background: var(--wp--preset--color--wit, #fff);
	height: 100%;
	display: flex;
	flex-direction: column;
}

.smartvolt-story-card--linked {
	position: relative;
}

.smartvolt-story-card__link {
	display: flex;
	flex-direction: column;
	flex: 1;
	position: relative;
	text-decoration: none;
	color: inherit;
	height: 100%;
	min-height: 0;
}

.smartvolt-story-card__link:hover,
.smartvolt-story-card__link:focus {
	text-decoration: none;
	color: inherit;
}

.smartvolt-story-card__inner {
	display: flex;
	flex-direction: column;
	flex: 1;
	height: 100%;
	min-height: 0;
}

.smartvolt-story-card .wp-block-image,
.smartvolt-story-card .wp-block-post-featured-image {
	margin: 0;
	line-height: 0;
	overflow: hidden;
	aspect-ratio: 16 / 10;
	width: 100%;
	flex-shrink: 0;
	position: relative;
	align-self: stretch;
}

.smartvolt-story-card .wp-block-image img,
.smartvolt-story-card .wp-block-post-featured-image img,
.smartvolt-story-card .wp-block-image picture,
.smartvolt-story-card .wp-block-post-featured-image picture {
	display: block;
	position: absolute !important;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	object-fit: cover !important;
	object-position: center;
	z-index: 1;
	transition: transform 0.4s ease;
}

.smartvolt-story-card__link:hover .wp-block-image img,
.smartvolt-story-card__link:hover .wp-block-post-featured-image img,
.smartvolt-story-card__link:focus-visible .wp-block-image img,
.smartvolt-story-card__link:focus-visible .wp-block-post-featured-image img {
	transform: scale(1.05);
}

.smartvolt-story-card .smartvolt-story-card__body {
	position: relative;
	margin: 0 !important;
	padding: 16px 32px !important;
    width: calc(100% - 62px) !important;
	box-sizing: border-box;
	background-color: var(--sv-body-bg) !important;
	border-radius: 0 0 16px 16px;
	flex: 1;
	height: auto;
	min-height: 0;
    display: flex;
	flex-direction: column;
	justify-content: flex-start;
    align-items: center;
}

.smartvolt-story-card--linked .smartvolt-story-card__body {
	padding-right: var(--sv-btn-size) !important;
	min-height: 80px;
}

@media (max-width: 1024px) {
	.smartvolt-story-card .smartvolt-story-card__body,
	.smartvolt-story-card--linked .smartvolt-story-card__body {
		width: 100% !important;
		padding: 30px 32px 72px 32px !important;
	}
}

/* Donkerblauwe knop met pijl — rechtsonder */
.smartvolt-story-card__action {
	position: absolute;
	right: var(--sv-btn-offset);
	bottom: var(--sv-btn-offset);
	width: var(--sv-btn-size);
	height: var(--sv-btn-size);
	border-radius: var(--sv-btn-radius);
	background-color: var(--sv-navy);
	pointer-events: none;
	z-index: 3;
	transition: background-color 0.3s ease;
}

.smartvolt-story-card__action::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: url("./assets/icon-arrow.svg");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 20px 20px;
}

.smartvolt-story-card__link:hover .smartvolt-story-card__action,
.smartvolt-story-card__link:focus-visible .smartvolt-story-card__action {
	background-color: color-mix(in srgb, var(--sv-navy) 70%, #fff);
}

.smartvolt-story-card .smartvolt-story-card__body .wp-block-heading,
.smartvolt-story-card .smartvolt-story-card__body .wp-block-post-title,
.smartvolt-story-card .smartvolt-story-card__body p {
	position: relative;
	z-index: 4; /* Above the right-hand action bar. */
	margin: 0 0 16px 0 !important;
	color: var(--sv-navy);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--large, 20px);
	line-height: 1.35;
}

.smartvolt-story-card .smartvolt-story-card__body .wp-block-heading:last-child,
.smartvolt-story-card .smartvolt-story-card__body .wp-block-post-title:last-child,
.smartvolt-story-card .smartvolt-story-card__body p:last-child {
	margin-bottom: 0 !important;
}

.smartvolt-story-card--linked .smartvolt-story-card__body .wp-block-heading a,
.smartvolt-story-card--linked .smartvolt-story-card__body .wp-block-post-title a,
.smartvolt-story-card--linked .smartvolt-story-card__body p a {
	pointer-events: none;
}

.editor-styles-wrapper .smartvolt-story-card.smartvolt-story-card--linked {
	cursor: default;
}

.block-editor-block-list__block .smartvolt-story-card .wp-block-image .components-placeholder {
	min-height: 180px;
}

.smartvolt-story-card__action-decoration {
    position: absolute;
    background-color: var(--sv-body-bg);
    width: 18%;
    height: calc(100% - 62px);
    right: 0;
    bottom: 62px;
    border-radius: 0 0 16px;
}

.smartvolt-story-card__action-decoration-white {
	border-radius: 16px;
	position: absolute;
	background-color: var(--wp--preset--color--wit, #fff);
	width: 62px;
	height: 62px;
	right: 0;
	bottom: 0;
	z-index: 2;
}

.smartvolt-story-card__action-decoration-blue {
	position: absolute;
    background-color: var(--sv-body-bg);
    width: 50px;
    height: 50px;
    right: 25px;
    bottom: 25px;
    z-index: 1;
}

/* Gelijke hoogte in een rij */
.wp-block-column:has(.smartvolt-story-card),
.wp-block-post-template > li {
	display: flex;
	flex-direction: column;
}

.wp-block-column .smartvolt-story-card,
.wp-block-post-template .smartvolt-story-card {
	flex: 1;
}

/* Editor: linkveld altijd zichtbaar onder de kaart */
.smartvolt-story-card__editor-link {
	margin-top: 10px;
	padding: 10px 12px;
	border: 1px dashed #c3c4c7;
	border-radius: 6px;
	background: #f6f7f7;
}

.smartvolt-story-card__editor-link .components-base-control {
	margin-bottom: 0;
}

.smartvolt-story-card__editor-link .components-base-control + .components-base-control {
	margin-top: 8px;
}

.smartvolt-story-card__editor-link .components-base-control__label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}
