/**
 * Veebilahendused Widgets — Meediakajastus stiilid
 * Disain: Harmony Clinic (Playfair Display + Lato + Raleway, roosa/kreem palett)
 */

/* ------------ Ühised ------------ */
.vlw-mk-wrap,
.vlw-mkf-wrap { box-sizing: border-box; }
.vlw-mk-wrap *,
.vlw-mkf-wrap * { box-sizing: border-box; }

.vlw-mk-empty {
	padding: 30px;
	background: #faf6ef;
	border: 1px dashed #a17a79;
	color: #333;
	text-align: center;
	font-family: 'Lato', sans-serif;
	border-radius: 4px;
}

/* ------------ Grid ------------ */
.vlw-mk-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 24px;
}

.vlw-mk-card {
	position: relative;
	display: flex;
	flex-direction: column;
	border: 0 !important;
	outline: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	text-align: left;
	text-decoration: none;
	color: inherit;
	cursor: pointer;
	overflow: hidden;
	transition: transform 0.4s ease, box-shadow 0.4s ease;
	font-family: 'Lato', sans-serif;
	width: 100%;
	-webkit-appearance: none;
	appearance: none;
	-webkit-tap-highlight-color: transparent;
	-webkit-touch-callout: none;
}

.vlw-mk-card:hover { transform: translateY(-4px); }
.vlw-mk-card:focus-visible { outline: 2px solid #a17a79; outline-offset: 3px; }

/* Pilt */
.vlw-mk-image {
	position: relative;
	width: 100%;
	overflow: hidden;
	background: #efe6dd;
	border-radius: inherit;
}

.vlw-mk-image img,
.vlw-mk-image .vlw-mk-video-poster {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	object-fit: cover !important;
	object-position: center center !important;
	transition: transform 0.6s ease;
	display: block !important;
	pointer-events: none;
	border: 0 !important;
	outline: none !important;
	background: transparent;
	box-shadow: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* MP4 video-poster erikäsitlus — brauserid lisavad video elemendile vaikimisi
   focus outline'i ja mõned teemad video/img valikutele bordereid */
.vlw-mk-video-poster::-webkit-media-controls,
.vlw-mk-video-poster::-webkit-media-controls-panel,
.vlw-mk-video-poster::-webkit-media-controls-play-button {
	display: none !important;
	-webkit-appearance: none !important;
}

video.vlw-mk-video-poster {
	object-fit: cover !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	border-radius: 0 !important;
}

.vlw-mk-card.is-below .vlw-mk-image {
	position: relative;
	padding-bottom: 56.25%;
}

.vlw-mk-card.is-overlay .vlw-mk-image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.vlw-mk-card:hover .vlw-mk-image img { transform: scale(1.05); }

.vlw-mk-image-placeholder {
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, #d3bcc0 0%, #a17a79 100%);
}

/* Play nupp */
.vlw-mk-play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 62px;
	height: 62px;
	z-index: 3;
	pointer-events: none;
	filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
	transition: transform 0.3s ease;
}

.vlw-mk-card:hover .vlw-mk-play { transform: translate(-50%, -50%) scale(1.1); }

.vlw-mk-play svg { width: 100%; height: 100%; display: block; }

/* Overlay */
.vlw-mk-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 0%, rgba(52,52,52,0.55) 60%, rgba(52,52,52,0.55) 100%);
	z-index: 1;
	pointer-events: none;
}

/* Sisu */
.vlw-mk-content {
	padding: 20px 22px 22px;
	position: relative;
	z-index: 2;
}

.vlw-mk-card.is-overlay {
	min-height: 340px;
	position: relative;
	background: #2a2a2a !important;
}

.vlw-mk-card.is-overlay .vlw-mk-image {
	position: absolute !important;
	top: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	left: 0 !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
}

.vlw-mk-card.is-overlay .vlw-mk-content {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 12px 28px 22px;
	color: #faf6ef;
	z-index: 3;
}

.vlw-mk-card.is-below {
	background: transparent;
}

.vlw-mk-card.is-below .vlw-mk-content {
	color: #333;
	background: #d3bcc0;
}

/* Meta */
.vlw-mk-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	font-family: 'Raleway', sans-serif;
	font-size: 12px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	margin-bottom: 8px;
	color: #a17a79;
}

.vlw-mk-card.is-overlay .vlw-mk-meta { color: #d3bcc0; }
.vlw-mk-sep { opacity: 0.6; margin: 0 2px; }

.vlw-mk-type-badge {
	display: inline-block;
	background: rgba(161,122,121,0.15);
	color: #a17a79;
	padding: 2px 8px;
	border-radius: 2px;
	font-size: 10px;
	letter-spacing: 1.2px;
}

.vlw-mk-card.is-overlay .vlw-mk-type-badge {
	background: rgba(250,246,239,0.15);
	color: #faf6ef;
}

/* Pealkiri — matchib Elementor Posts widget'i artiklite stiili (Lato 18px, #FAF6EF) */
.vlw-mk-content {
	text-align: left !important;
	max-width: 100%;
	box-sizing: border-box;
}

.vlw-mk-card h3.vlw-mk-title,
.vlw-mk-card .vlw-mk-title,
h3.vlw-mk-title,
.vlw-mk-title {
	font-family: 'Playfair Display', serif;
	font-size: 22px;
	font-weight: 500;
	line-height: 1.3;
	margin: 0 0 8px;
	color: #333;
	text-align: left !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	white-space: normal !important;
	word-break: break-word !important;
	word-wrap: break-word !important;
	overflow-wrap: anywhere !important;
	hyphens: auto;
	max-width: 100% !important;
	width: 100%;
	display: block;
	box-sizing: border-box;
	text-overflow: clip !important;
	overflow: visible !important;
}

.vlw-mk-card.is-overlay .vlw-mk-title,
.vlw-mk-card.is-overlay h3.vlw-mk-title { color: #faf6ef !important; }

.vlw-mk-card.is-below .vlw-mk-title,
.vlw-mk-card.is-below h3.vlw-mk-title { color: #333 !important; }

.vlw-mk-meta {
	text-align: left !important;
	max-width: 100%;
	white-space: normal !important;
}

/* Excerpt */
.vlw-mk-excerpt {
	font-family: 'Lato', sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: rgba(51,51,51,0.75);
	margin: 8px 0 0;
}

/* CTA nupp */
.vlw-mk-cta {
	text-align: center;
	margin-top: 40px;
}

.vlw-mk-view-all {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 32px;
	background: #a17a79;
	color: #faf6ef;
	font-family: 'Roboto', sans-serif;
	font-size: 15px;
	font-weight: 500;
	letter-spacing: 0.5px;
	text-decoration: none;
	border-radius: 3px;
	transition: background 0.3s ease, transform 0.2s ease;
}

.vlw-mk-view-all:hover {
	background: #3a2e2a;
	color: #faf6ef;
	text-decoration: none;
}

.vlw-mk-view-all .vlw-mk-arrow {
	transition: transform 0.3s ease;
	display: inline-block;
}

.vlw-mk-view-all:hover .vlw-mk-arrow { transform: translateX(4px); }

/* ------------ Featured Video widget ------------ */
.vlw-mkf-wrap { width: 100%; }

.vlw-mk-featured {
	display: flex;
	gap: 40px;
	align-items: center;
	flex-wrap: wrap;
}

.vlw-mkf-media {
	flex: 1 1 55%;
	min-width: 300px;
	position: relative;
	aspect-ratio: 16 / 9;
	border: 0;
	padding: 0;
	background: #efe6dd;
	cursor: pointer;
	overflow: hidden;
	border-radius: 4px;
	box-shadow: 0 20px 60px rgba(52,52,52,0.15);
	transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.vlw-mkf-media:hover {
	transform: translateY(-4px);
	box-shadow: 0 25px 70px rgba(52,52,52,0.22);
}

.vlw-mkf-media img,
.vlw-mkf-media .vlw-mk-video-poster {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.6s ease;
	pointer-events: none;
}

.vlw-mkf-media:hover img,
.vlw-mkf-media:hover .vlw-mk-video-poster { transform: scale(1.04); }

.vlw-mkf-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(52,52,52,0.15) 0%, rgba(52,52,52,0.35) 100%);
	pointer-events: none;
}

.vlw-mkf-play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 90px;
	height: 90px;
	pointer-events: none;
	filter: drop-shadow(0 6px 20px rgba(0,0,0,0.4));
	transition: transform 0.3s ease;
}

.vlw-mkf-media:hover .vlw-mkf-play { transform: translate(-50%, -50%) scale(1.08); }

.vlw-mkf-play svg { width: 100%; height: 100%; }

.vlw-mkf-content {
	flex: 1 1 40%;
	min-width: 280px;
}

.vlw-mkf-eyebrow {
	font-family: 'Raleway', sans-serif;
	font-size: 13px;
	font-weight: 600;
	color: #a17a79;
	text-transform: uppercase;
	letter-spacing: 2px;
	margin-bottom: 14px;
}

.vlw-mkf-title {
	font-family: 'Playfair Display', serif;
	font-size: 34px;
	font-weight: 500;
	line-height: 1.2;
	color: #333;
	margin: 0 0 12px;
}

.vlw-mkf-meta {
	font-family: 'Raleway', sans-serif;
	font-size: 13px;
	color: #a17a79;
	letter-spacing: 1px;
	text-transform: uppercase;
	margin-bottom: 18px;
}

.vlw-mkf-desc {
	font-family: 'Lato', sans-serif;
	font-size: 16px;
	line-height: 1.6;
	color: #555;
	margin: 0 0 26px;
}

.vlw-mkf-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 32px;
	background: #a17a79;
	color: #faf6ef;
	font-family: 'Roboto', sans-serif;
	font-size: 15px;
	font-weight: 500;
	letter-spacing: 0.5px;
	border: 0;
	border-radius: 3px;
	cursor: pointer;
	transition: background 0.3s ease, transform 0.2s ease;
}

.vlw-mkf-btn:hover {
	background: #3a2e2a;
	color: #faf6ef;
}

.vlw-mkf-btn-icon {
	font-size: 12px;
	line-height: 1;
	transform: translateY(-1px);
}

/* ------------ Lightbox ------------ */
.vlw-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(20, 20, 20, 0.92);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.vlw-lightbox.is-open {
	opacity: 1;
	pointer-events: auto;
}

.vlw-lightbox-inner {
	position: relative;
	width: min(100%, 1100px);
	max-width: 1100px;
	max-height: 85vh;
	aspect-ratio: 16 / 9;
	background: #000;
	box-shadow: 0 40px 100px rgba(0,0,0,0.6);
	margin: 0 auto;
	overflow: hidden;
}

/* Fallback vanadele browseritele mis aspect-ratio ei toeta */
@supports not (aspect-ratio: 16 / 9) {
	.vlw-lightbox-inner {
		height: 0;
		padding-bottom: 56.25%;
	}
}

.vlw-lightbox .vlw-lightbox-inner iframe,
.vlw-lightbox .vlw-lightbox-inner video,
.vlw-lightbox-inner iframe,
.vlw-lightbox-inner video {
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	min-width: 0 !important;
	min-height: 0 !important;
	border: 0 !important;
	display: block !important;
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	object-fit: contain !important;
	background: #000 !important;
}

/* Sulge nupp — positsioneeritud lightbox (mitte inner) sees, et overflow:hidden ei lõikaks */
.vlw-lightbox .vlw-lightbox-close,
.vlw-lightbox button.vlw-lightbox-close {
	position: fixed !important;
	top: 20px !important;
	right: 20px !important;
	width: 44px !important;
	height: 44px !important;
	padding: 0 !important;
	margin: 0 !important;
	background: #d3bcc0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	color: #3a2e2a !important;
	cursor: pointer !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	box-shadow: 0 4px 12px rgba(0,0,0,0.4) !important;
	transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease !important;
	text-shadow: none !important;
	line-height: 1 !important;
	font-size: 0 !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	outline: none !important;
	z-index: 1000000 !important;
	-webkit-tap-highlight-color: transparent !important;
	-webkit-focus-ring-color: transparent !important;
	-webkit-touch-callout: none !important;
	user-select: none !important;
	-webkit-user-select: none !important;
}

.vlw-lightbox .vlw-lightbox-close:focus,
.vlw-lightbox .vlw-lightbox-close:active,
.vlw-lightbox button.vlw-lightbox-close:focus,
.vlw-lightbox button.vlw-lightbox-close:active {
	outline: none !important;
	box-shadow: 0 4px 12px rgba(0,0,0,0.4) !important;
	border: 0 !important;
}

.vlw-lightbox .vlw-lightbox-close svg {
	width: 16px !important;
	height: 16px !important;
	display: block !important;
	stroke: #3a2e2a !important;
	fill: none !important;
	transition: transform 0.3s ease !important;
}

.vlw-lightbox .vlw-lightbox-close:hover,
.vlw-lightbox button.vlw-lightbox-close:hover {
	background: #a17a79 !important;
	box-shadow: 0 6px 16px rgba(0,0,0,0.3) !important;
	transform: scale(1.05) !important;
}

.vlw-lightbox .vlw-lightbox-close:hover svg {
	stroke: #faf6ef !important;
	transform: rotate(90deg) !important;
}

.vlw-lightbox .vlw-lightbox-close:focus-visible {
	outline: 2px solid #faf6ef !important;
	outline-offset: 3px !important;
}

body.vlw-lightbox-open { overflow: hidden; }

/* Vea teade */
.vlw-lightbox-error {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #1a1a1a;
	color: #faf6ef;
	padding: 30px;
	text-align: center;
	font-family: 'Lato', sans-serif;
}

/* ------------ Arhiivileht ------------ */
.vlw-archive {
	max-width: 1200px;
	margin: 0 auto;
	padding: 135px 20px 80px;
	font-family: 'Lato', sans-serif;
}

.vlw-archive-header {
	text-align: left;
	margin-bottom: 40px;
}

.vlw-archive-title {
	font-family: 'Playfair Display', serif;
	font-size: 43px;
	font-weight: 500;
	color: #333;
	margin: 0 0 20px;
	line-height: 1.2;
	text-transform: uppercase;
	text-align: left;
}

.vlw-archive-intro {
	font-family: 'Lato', sans-serif;
	font-size: 17px;
	font-weight: 400;
	line-height: 1.6;
	color: #343434;
	margin: 0 0 14.4px;
	max-width: 900px;
	text-align: left;
}

.vlw-archive .vlw-mk-grid {
	grid-template-columns: repeat(2, 1fr);
	gap: 24px;
}

.vlw-archive-pagination {
	margin-top: 50px;
	text-align: center;
	font-family: 'Roboto', sans-serif;
}

.vlw-archive-pagination .page-numbers {
	display: inline-block;
	padding: 8px 14px;
	margin: 0 2px;
	background: transparent;
	color: #a17a79;
	text-decoration: none;
	border-radius: 3px;
	transition: background 0.2s ease, color 0.2s ease;
}

.vlw-archive-pagination .page-numbers:hover,
.vlw-archive-pagination .page-numbers.current {
	background: #a17a79;
	color: #faf6ef;
}

.vlw-archive-empty {
	text-align: center;
	padding: 40px 0;
	color: #666;
	font-family: 'Lato', sans-serif;
}

/* ------------ Responsive ------------ */
@media (max-width: 1024px) {
	.vlw-mk-featured { gap: 30px; }
	.vlw-mkf-title { font-size: 28px; }
	.vlw-archive-title { font-size: 34px; }
	.vlw-archive .vlw-mk-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
	.vlw-mk-grid { grid-template-columns: 1fr; gap: 20px; }
	.vlw-mk-featured { flex-direction: column !important; gap: 24px; }
	.vlw-mkf-title { font-size: 26px; }
	.vlw-mkf-play { width: 70px; height: 70px; }
	.vlw-mk-card h3.vlw-mk-title,
	.vlw-mk-card .vlw-mk-title,
	h3.vlw-mk-title,
	.vlw-mk-title { font-size: 20px !important; }
	.vlw-archive { padding: 140px 16px 50px; }

	/* Mobiilis pealkiri ja intro keskele */
	.vlw-archive-header { text-align: center !important; }
	.vlw-archive-title { text-align: center !important; }
	.vlw-archive-intro { text-align: center !important; margin-left: auto; margin-right: auto; }

	/* Mobiilis (touch) — võta transform hover'id ära (v.a. play-nupu tsentreering) */
	.vlw-mk-card:hover,
	.vlw-mk-card:hover .vlw-mk-image img,
	.vlw-mk-card:hover .vlw-mk-video-poster,
	.vlw-mkf-media:hover,
	.vlw-mkf-media:hover img,
	.vlw-mkf-media:hover .vlw-mk-video-poster,
	.vlw-mk-view-all:hover .vlw-mk-arrow {
		transform: none !important;
	}
	.vlw-mk-card:hover .vlw-mk-play,
	.vlw-mkf-media:hover .vlw-mkf-play {
		transform: translate(-50%, -50%) !important;
	}
	.vlw-archive-title { font-size: 30px; }
	.vlw-archive .vlw-mk-grid { grid-template-columns: 1fr; }
	.vlw-lightbox .vlw-lightbox-close { top: 14px !important; right: 14px !important; width: 40px !important; height: 40px !important; }
}

/* Touch seadmed (telefonid, tabletid ilma hiireta) — hover transformid maha,
   AGA me EI muuda baas-positsioneerimist (nt play nupu translate keskele) */
@media (hover: none), (pointer: coarse) {
	/* Transitionid ka maha, et sticky-hover ei animeeriks kaartide "hüppamist" */
	.vlw-mk-card,
	.vlw-mk-card .vlw-mk-image img,
	.vlw-mk-card .vlw-mk-video-poster,
	.vlw-mk-card .vlw-mk-play,
	.vlw-mkf-media,
	.vlw-mkf-media img,
	.vlw-mkf-media .vlw-mk-video-poster,
	.vlw-mkf-media .vlw-mkf-play,
	.vlw-mk-view-all .vlw-mk-arrow {
		transition: none !important;
	}

	.vlw-mk-card:hover,
	.vlw-mk-card:active,
	.vlw-mk-card:focus {
		transform: none !important;
	}
	.vlw-mk-card:hover .vlw-mk-image img,
	.vlw-mk-card:hover .vlw-mk-video-poster,
	.vlw-mk-card:active .vlw-mk-image img,
	.vlw-mk-card:active .vlw-mk-video-poster {
		transform: none !important;
	}
	/* Play nupp kasutab transform: translate(-50%,-50%) tsentreerimiseks
	   — hover'iga scale eemaldub, aga tsentreering säilib */
	.vlw-mk-card:hover .vlw-mk-play,
	.vlw-mk-card:active .vlw-mk-play {
		transform: translate(-50%, -50%) !important;
	}
	.vlw-mkf-media:hover,
	.vlw-mkf-media:active {
		transform: none !important;
		box-shadow: 0 20px 60px rgba(52,52,52,0.15) !important;
	}
	.vlw-mkf-media:hover img,
	.vlw-mkf-media:hover .vlw-mk-video-poster,
	.vlw-mkf-media:active img,
	.vlw-mkf-media:active .vlw-mk-video-poster {
		transform: none !important;
	}
	.vlw-mkf-media:hover .vlw-mkf-play,
	.vlw-mkf-media:active .vlw-mkf-play {
		transform: translate(-50%, -50%) !important;
	}
	.vlw-mk-view-all:hover .vlw-mk-arrow,
	.vlw-mk-view-all:active .vlw-mk-arrow {
		transform: none !important;
	}
}
