/*
 * Front-page hero: full-bleed photo, edge shadow, next-event card.
 * Desktop shadow fades in from the right. On small screens it becomes
 * the brand green and fades downward.
 */

.elementor .elementor-element-2a3bc26c.e-d53d2d-2bbe {
	position: relative;
	min-height: 760px;
	/* Keep the title and the next-event card inside the same 1300px band
	   as the sections below. The photo stays full-bleed. */
	padding: 148px max(64px, calc((100% - 1300px) / 2)) 108px max(72px, calc((100% - 1300px) / 2));
	align-items: center;
	justify-content: space-between;
	gap: 40px;
	overflow: hidden;
}

.elementor .elementor-element-4f5c8b0.e-3c7e4c35-e11b {
	width: auto;
	max-width: 680px;
	min-height: 0;
	padding: 0;
	background-color: transparent;
	position: relative;
	z-index: 2;
	flex: 1 1 auto;
}

.elementor .elementor-element-4019208e.e-6e9ea8c-d436 {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	min-height: 0;
	z-index: 0;
}

.elementor .elementor-element-1b77a32e,
.elementor .elementor-element-1b77a32e.e-5772aade-9390,
.elementor .e-5772aade-9390 {
	display: none;
}

.elementor-element-2a3bc26c::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(
		to left,
		rgba(8, 10, 12, 0.78) 0%,
		rgba(8, 10, 12, 0.5) 14%,
		rgba(8, 10, 12, 0.16) 32%,
		rgba(8, 10, 12, 0) 50%
	);
}

.elementor-element-2b5a9872 {
	text-shadow: 0 2px 18px rgba(0, 0, 0, 0.4);
}

.elementor h1.vk-h1.e-5b32093a-ac67 {
	text-shadow:
		0 1px 2px rgba(0, 0, 0, 0.55),
		0 4px 18px rgba(0, 0, 0, 0.72);
}

.elementor .elementor-element-2a3bc26c > .elementor-widget-shortcode {
	position: relative;
	z-index: 2;
	width: 332px;
	max-width: 100%;
	flex: 0 0 332px;
	align-self: center;
}

.elementor-element-2a3bc26c > .elementor-widget-shortcode .elementor-widget-container {
	margin: 0;
	padding: 0;
}

.elementor-element-2a3bc26c > .elementor-widget-shortcode:not(:has(.vk-next-event)) {
	display: none;
}

.vk-next-event {
	display: flex;
	flex-direction: column;
	width: 100%;
	overflow: hidden;
	border-radius: 22px;
	background: #fff;
	color: #1a1a1a;
	text-decoration: none;
	box-shadow: 0 18px 48px rgba(10, 10, 10, 0.22);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vk-next-event:hover,
.vk-next-event:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 22px 54px rgba(10, 10, 10, 0.28);
	color: #1a1a1a;
}

.vk-next-event:focus-visible {
	outline: 3px solid var(--accent-01, #f3873f);
	outline-offset: 3px;
}

.vk-next-event__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 13px 18px;
	background: #2c4246;
	color: #fff;
	font-family: var(--font-archivo), Archivo, sans-serif;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
}

.vk-next-event__body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 16px 18px 18px;
}

.vk-next-event__kicker {
	margin: 0;
	color: #53535c;
	font-family: var(--font-archivo), Archivo, sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1.3;
	text-transform: uppercase;
}

.vk-next-event__title {
	margin: 0;
	color: #1a1a1a;
	font-family: var(--font-archivo), Archivo, sans-serif;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.25;
}

.vk-next-event__photo {
	display: block;
	overflow: hidden;
	border-radius: 14px;
}

.vk-next-event__img {
	display: block;
	width: 100%;
	height: 168px;
	object-fit: cover;
}

.vk-next-event__more {
	color: #f3873f;
	font-family: var(--font-archivo), Archivo, sans-serif;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
}

.vk-next-event:hover .vk-next-event__more,
.vk-next-event:focus-visible .vk-next-event__more {
	color: #d9732a;
}

@media (max-width: 767px) {
	.elementor .elementor-element-2a3bc26c.e-d53d2d-2bbe {
		min-height: 0;
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		padding: 124px 20px 48px;
		gap: 28px;
	}

	.elementor .elementor-element-4f5c8b0.e-3c7e4c35-e11b {
		width: 100%;
		max-width: 100%;
		flex: 0 1 auto;
		padding: 0;
	}

	.elementor .elementor-element-4019208e.e-6e9ea8c-d436 {
		width: 100%;
		height: 100%;
		min-height: 0;
	}

	.elementor .elementor-element-2a3bc26c .elementor-element-1de66556.e-4eabec2b-891e {
		width: 100%;
		flex-direction: column;
		align-items: stretch;
	}

	.elementor .elementor-element-2a3bc26c .elementor-element-47bc75f9,
	.elementor .elementor-element-2a3bc26c .elementor-element-74a1d6e7,
	.elementor .elementor-element-2a3bc26c .vk-btn-primary,
	.elementor .elementor-element-2a3bc26c .vk-btn-outline {
		width: 100%;
		box-sizing: border-box;
	}

	.elementor-element-2a3bc26c::after {
		background: linear-gradient(
			to bottom,
			rgba(44, 66, 70, 0.28) 0%,
			rgba(44, 66, 70, 0.08) 26%,
			rgba(44, 66, 70, 0.62) 68%,
			#2c4246 100%
		);
	}

	.elementor .elementor-element-2a3bc26c > .elementor-widget-shortcode {
		width: 100%;
		flex-basis: auto;
		align-self: stretch;
	}

	.vk-next-event__title {
		font-size: 20px;
	}

	.vk-next-event__img {
		height: 180px;
	}

	/* Section links sit under the content and span the screen. */
	.elementor .elementor-element-5a7d694 > .elementor-element-4b6f4620,
	.elementor .elementor-element-4457db47 > .elementor-element-7efde89 {
		display: contents;
	}

	/*
	 * News section header ("Kogukonna uudised" badge + "Uudised ja teated"):
	 * the block spans the screen and the badge and title are centred.
	 */
	.elementor .elementor-element-3b940078 {
		align-self: stretch;
		align-items: center;
		width: 100%;
		text-align: center;
	}

	.elementor a.vk-btn-primary[data-interaction-id="458ce93e"],
	.elementor a.vk-btn-primary[data-interaction-id="26a3f11b"],
	.elementor a.vk-btn-primary[data-interaction-id="67d00a23"] {
		display: flex;
		order: 5;
		align-self: stretch;
		justify-content: center;
		box-sizing: border-box;
		width: 100%;
		max-width: none;
		margin-top: 28px;
	}
}

/*
 * Elementor’s preview is the strip beside the widget panel, and it is the
 * front page, so the rules above load there too. The photo is taken out of
 * the flow and the card is locked at 332px, which crushes the title column
 * in that narrower canvas. Give the editor a layout it can measure.
 */
body.elementor-editor-active .elementor .elementor-element-2a3bc26c.e-d53d2d-2bbe {
	overflow: visible;
	flex-wrap: wrap;
	align-items: stretch;
	min-height: 760px;
}

body.elementor-editor-active .elementor .elementor-element-4f5c8b0.e-3c7e4c35-e11b {
	flex: 1 1 420px;
	min-width: 280px;
	min-height: 520px;
}

body.elementor-editor-active .elementor .elementor-element-4019208e.e-6e9ea8c-d436 {
	height: auto;
	min-height: 100%;
}

body.elementor-editor-active .elementor .elementor-element-c1e9e95,
body.elementor-editor-active .elementor .elementor-element-2a3bc26c > .elementor-widget-shortcode {
	flex: 1 1 260px;
	width: auto;
	max-width: 332px;
	min-width: 220px;
}

/* Homepage room cards: the whole card opens the room, not only "Vaata lähemalt". */
.vk-card {
	cursor: pointer;
}

.vk-card > a.vk-btn-link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 3;
}

.vk-card:hover .vk-h5 {
	color: #d9732a;
}

.vk-card:focus-within {
	outline: 2px solid #2c4246;
	outline-offset: 3px;
}
