/* Verus Portfolio Sync – galleries, section tiles, lightbox.
   Colours come from the theme (--vf-*) with brand fallbacks. */

.vf-wrap {
	--_ink: var(--vf-ink, #2b2420);
	--_muted: var(--vf-muted, #6f625a);
	--_accent: var(--vf-accent, #a16f6f);
	--_line: var(--vf-line, #e8ddd5);
	max-width: 1240px;
	margin: 0 auto;
	padding: clamp(24px, 5vw, 64px) 16px clamp(40px, 7vw, 96px);
}

.vf-head { max-width: 760px; margin: 0 auto clamp(28px, 4vw, 48px); text-align: center; }
.vf-back {
	display: inline-block; margin-bottom: 18px; font-size: .85rem; letter-spacing: .08em;
	text-transform: uppercase; color: var(--vf-muted, #6f625a); text-decoration: none;
}
.vf-back:hover { color: var(--vf-accent, #a16f6f); }
.vf-head__title { margin: 0 0 6px; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; }
.vf-head__sub { margin: 0 0 18px; color: var(--vf-muted, #6f625a); font-size: .95rem; letter-spacing: .04em; }
.vf-head__desc { margin: 0 auto; font-size: 1.05rem; line-height: 1.7; }
.vf-head__desc p:last-child { margin-bottom: 0; }

/* Elementor flex containers measure these grids too short (the tiles then spill over
   the content below). A one-column grid parent sizes them correctly and keeps the gaps. */
.elementor-widget-shortcode:has(.vf-sections, .vf-cards, .vf-grid) { flex-shrink: 0; }
.e-con-inner:has(> .elementor-widget-shortcode .vf-sections, > .elementor-widget-shortcode .vf-cards),
.e-con-full:has(> .elementor-widget-shortcode .vf-sections, > .elementor-widget-shortcode .vf-cards) {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
}

/* Six section tiles */
.vf-sections {
	display: grid; gap: 10px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}
.vf-section-tile {
	/* Height from padding (4:5) – sizes reliably inside Elementor flex containers, unlike aspect-ratio */
	position: relative; display: block; overflow: hidden; height: 0; padding-top: 125%;
	background: #d9cbc2; color: #fff; text-decoration: none; border-radius: 2px;
}
.vf-section-tile__img, .vf-section-tile img {
	position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none !important;
	object-fit: cover; object-position: center 30%;
	transition: transform .9s cubic-bezier(.2, .7, .2, 1), filter .6s;
}
.vf-section-tile::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(to top, rgba(30, 22, 18, .72) 0%, rgba(30, 22, 18, .15) 45%, rgba(30, 22, 18, 0) 70%);
}
.vf-section-tile__label { position: absolute; left: 22px; right: 22px; bottom: 20px; z-index: 1; }
.vf-section-tile__name {
	display: block; font-family: var(--vf-serif, "Cormorant Garamond", Georgia, serif);
	font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.1; color: #fff;
}
.vf-section-tile__sub { display: block; margin-top: 6px; font-size: .82rem; letter-spacing: .05em; opacity: .85; }
.vf-section-tile:hover img, .vf-section-tile:focus-visible img { transform: scale(1.04); }
.vf-section-tile:focus-visible { outline: 2px solid var(--vf-accent, #a16f6f); outline-offset: 3px; }

/* Gallery cards */
.vf-cards { display: grid; gap: clamp(16px, 2.5vw, 28px); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vf-card { display: block; color: inherit; text-decoration: none; }
.vf-card__media { position: relative; display: block; overflow: hidden; height: 0; padding-top: 66.666%; background: #e9e0d9; border-radius: 2px; }
.vf-card__img, .vf-card__media img {
	position: absolute; inset: 0;
	width: 100% !important; height: 100% !important; max-width: none !important;
	object-fit: cover; object-position: center 30%; display: block;
	transition: transform .9s cubic-bezier(.2, .7, .2, 1);
}
.vf-card:hover img { transform: scale(1.035); }
.vf-card__body { display: block; padding-top: 12px; }
.vf-card__title { display: block; font-family: var(--vf-serif, "Cormorant Garamond", Georgia, serif); font-size: 1.35rem; line-height: 1.2; }
.vf-card__meta { display: block; margin-top: 3px; font-size: .82rem; color: var(--vf-muted, #6f625a); }
.vf-card__img--empty { display: block; width: 100%; height: 100%; background: #e9e0d9; }
.vf-empty { text-align: center; color: var(--vf-muted, #6f625a); font-style: italic; }

/* Photo grid (masonry with CSS columns, keeps original proportions) */
.vf-grid { columns: 3 320px; column-gap: 10px; }
.vf-grid__item { display: block; margin: 0 0 10px; break-inside: avoid; cursor: zoom-in; background: #eee6df; }
.vf-grid__item img { display: block; width: 100%; height: auto; }

/* Call to action */
.vf-cta {
	margin: clamp(40px, 6vw, 80px) auto 0; max-width: 720px; padding: clamp(28px, 4vw, 44px) 20px;
	text-align: center; border-top: 1px solid var(--vf-line, #e8ddd5); border-bottom: 1px solid var(--vf-line, #e8ddd5);
}
.vf-cta__title { margin: 0 0 8px; font-family: var(--vf-serif, "Cormorant Garamond", Georgia, serif); font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.15; }
.vf-cta__text { margin: 0 0 22px; color: var(--vf-muted, #6f625a); }
.vf-cta__buttons { margin: 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.vf-btn {
	display: inline-block; padding: 13px 26px; border: 1px solid var(--vf-ink, #2b2420);
	background: var(--vf-ink, #2b2420); color: #fff !important; text-decoration: none;
	font-size: .9rem; letter-spacing: .06em; border-radius: 999px; transition: background .25s, color .25s;
}
.vf-btn:hover { background: var(--vf-accent, #a16f6f); border-color: var(--vf-accent, #a16f6f); }
.vf-btn--ghost { background: transparent; color: var(--vf-ink, #2b2420) !important; }
.vf-btn--ghost:hover { color: #fff !important; }

.vf-more { margin-top: clamp(40px, 6vw, 72px); }
.vf-more__title { text-align: center; font-size: 1.6rem; margin-bottom: 24px; }

@media (max-width: 1024px) {
	.vf-sections, .vf-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
	.vf-sections { grid-template-columns: 1fr; gap: 8px; }
	.vf-section-tile { padding-top: 75%; }
	.vf-cards { grid-template-columns: 1fr; }
	.vf-grid { columns: 2; column-gap: 6px; }
	.vf-grid__item { margin-bottom: 6px; }
}

/* Lightbox */
.vf-lb {
	position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center;
	background: rgba(20, 16, 14, .96); opacity: 0; transition: opacity .2s; touch-action: pan-y;
}
.vf-lb.is-open { opacity: 1; }
.vf-lb__img { max-width: 94vw; max-height: 88vh; width: auto; height: auto; object-fit: contain; user-select: none; }
.vf-lb button {
	position: absolute; border: 0; background: transparent; color: #fff; cursor: pointer;
	font-size: 2rem; line-height: 1; padding: 14px 18px; opacity: .8;
}
.vf-lb button:hover, .vf-lb button:focus-visible { opacity: 1; }
.vf-lb__close { top: 8px; right: 8px; }
.vf-lb__prev { left: 4px; top: 50%; transform: translateY(-50%); }
.vf-lb__next { right: 4px; top: 50%; transform: translateY(-50%); }
.vf-lb__count { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, .7); font-size: .85rem; }
@media (max-width: 600px) { .vf-lb__prev, .vf-lb__next { display: none; } }
@media (prefers-reduced-motion: reduce) {
	.vf-section-tile img, .vf-card img, .vf-lb { transition: none; }
}
