/* ==========================================================================
   Sunnyside — styles for imported WPBakery content (see inc/legacy-shortcodes.php)
   ========================================================================== */

/* Rows: single-column rows keep the reading width; multi-column rows go wide. */
.entry-content > .vc-row:has(> .vc-col + .vc-col) {
	max-width: min(var(--wp--style--global--wide-size, 1320px), 100%);
}
.vc-row {
	display: flex;
	flex-wrap: wrap;
	gap: clamp(1rem, 3vw, 2rem);
	margin-block: 0;
}
.entry-content > .vc-row + .vc-row {
	margin-block-start: 1.5rem;
}
.vc-row--middle { align-items: center; }
.vc-row--bottom { align-items: flex-end; }
.vc-row--top    { align-items: flex-start; }

.vc-col {
	flex: 1 1 calc(var(--vc-w, 100%) - 2rem);
	min-width: 0;
}
.vc-col > :first-child { margin-top: 0; }
.vc-col > :last-child  { margin-bottom: 0; }

@media (max-width: 781px) {
	.vc-col { flex-basis: 100%; }
}

.vc-text > :first-child { margin-top: 0; }
.vc-text > :last-child  { margin-bottom: 0; }
.vc-text + .vc-text,
.vc-text + .vc-image,
.vc-image + .vc-text {
	margin-top: 1.25rem;
}
/* Old posts lean on inline font-weight/size spans; keep them readable. */
.vc-text span[style*="font-size"] {
	font-size: inherit !important;
}
.vc-text h2,
.vc-text h3 {
	text-wrap: balance;
}
.vc-text ol,
.vc-text ul {
	padding-left: 1.25em;
}

/* Spacers double as anchor targets for the posts' tables of contents.
   Collapse them a bit so long posts don't have big holes. */
.vc-space {
	max-height: 2.5rem;
	scroll-margin-top: 6rem;
}

/* Images */
.vc-image {
	margin: 0;
}
.vc-image img {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: var(--ss-radius);
}
.vc-image--center img { margin-inline: auto; }
.vc-image--right img  { margin-left: auto; }
.vc-image figcaption {
	margin-top: 0.5rem;
	font-size: 0.875rem;
	color: #666;
	text-align: center;
}
.vc-image__title {
	margin: 0 0 0.75rem;
	font-size: 1.125rem;
}

/* FAQ toggles */
.vc-toggle {
	border-bottom: 1px solid var(--ss-border, #e3e3e3);
}
.vc-toggle:first-of-type {
	border-top: 1px solid var(--ss-border, #e3e3e3);
}
.vc-toggle summary {
	position: relative;
	padding: 1rem 2rem 1rem 0;
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}
.vc-toggle summary::-webkit-details-marker { display: none; }
.vc-toggle summary::after {
	content: "+";
	position: absolute;
	right: 0.25rem;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1.5rem;
	font-weight: 400;
	line-height: 1;
	color: var(--ss-accent);
}
.vc-toggle[open] summary::after { content: "\2212"; }
.vc-toggle summary:focus-visible {
	outline: 2px solid var(--ss-ink);
	outline-offset: 2px;
}
.vc-toggle__body {
	padding: 0 0 1rem;
}
.vc-toggle__body > :first-child { margin-top: 0; }

/* Buttons */
.vc-btn { margin-block: 1.25rem; }
.vc-btn--center { justify-content: center; }
.vc-btn--right  { justify-content: flex-end; }

/* Image banners */
.vc-banner {
	position: relative;
	display: flex;
	align-items: flex-end;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: var(--ss-radius);
	background: var(--ss-ink);
	color: var(--ss-white);
	text-decoration: none;
}
.vc-banner__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	border-radius: 0 !important;
	transition: transform 0.6s ease;
}
.vc-banner::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgb(0 0 0 / 0.6), transparent 60%);
}
.vc-banner__title {
	position: relative;
	z-index: 1;
	padding: 1rem 1.25rem;
	font-size: 1.25rem;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: -0.01em;
}
a.vc-banner:hover .vc-banner__img,
a.vc-banner:focus-visible .vc-banner__img {
	transform: scale(1.05);
}

/* Related posts grid ([vc_masonry_grid]) */
.post-grid--related {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
	gap: 1.25rem;
	margin-block: 1.5rem;
}
.post-grid--related .post-card__title {
	font-size: 1.0625rem;
}
.post-grid--related .post-card__excerpt {
	display: none;
}
