/* ==========================================================================
   Pozivi: pojavno okno, lepljiv trak, prelivanje slik v uvodniku.
   ========================================================================== */

/* ---------- Prelivanje slik v ozadju ---------- */

.bg-fade .bg-fade__img {
	position: absolute;
	inset: 0;
	opacity: 0;
	transform: scale(1.04);
	transition: opacity 1.4s var(--ease), transform 7s linear;
}
.bg-fade .bg-fade__img.is-active { opacity: 1; transform: scale(1); }
.bg-fade::after { z-index: 1; }
@media (prefers-reduced-motion: reduce) {
	.bg-fade .bg-fade__img { transition: none; transform: none; }
}

/* ---------- Lepljiv trak s pozivom ---------- */

.sticky-cta {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 90;
	padding-bottom: env(safe-area-inset-bottom, 0);
	background: color-mix(in srgb, var(--c-dark) 96%, transparent);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	box-shadow: 0 -10px 30px -12px rgb(0 0 0 / 35%);
	transform: translateY(110%);
	transition: transform .35s var(--ease);
}
.sticky-cta.is-visible { transform: none; }
.sticky-cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; min-height: 72px; padding-block: 12px; }
.sticky-cta__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.3; }
.sticky-cta__text strong { color: var(--s-heading); font-size: 1.02rem; }
.sticky-cta__text span { color: var(--s-soft); font-size: .88rem; }
.sticky-cta__actions { display: flex; align-items: center; gap: 6px; flex: none; }
.sticky-cta__actions .btn { min-height: 46px; }
.sticky-cta__close { color: var(--s-soft); }
.has-sticky-cta .site-footer { padding-bottom: 80px; }
@media (max-width: 600px) {
	.sticky-cta__inner { min-height: 64px; }
	.sticky-cta__text span { display: none; }
	.sticky-cta__text strong { font-size: .92rem; }
	.sticky-cta__actions .btn { min-height: 42px; padding-inline: 1em; font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
	.sticky-cta { transition: none; }
}

/* ---------- Pojavno okno ---------- */

.popup {
	position: fixed;
	inset: 0;
	z-index: 1100;
	display: grid;
	place-items: center;
	padding: 20px;
	opacity: 0;
	transition: opacity .25s var(--ease);
}
.popup[hidden] { display: none; }
/* Dokler okno ni odprto, ne lovi klikov (sicer prekrije stran). */
.popup:not(.is-open) { pointer-events: none; }
.popup.is-open { opacity: 1; }
.popup__backdrop { position: absolute; inset: 0; background: rgb(8 12 20 / 62%); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.popup__dialog {
	position: relative;
	display: grid;
	width: min(560px, 100%);
	max-height: calc(100vh - 40px);
	overflow: auto;
	border-radius: calc(var(--radius) + 4px);
	background: #fff;
	box-shadow: 0 30px 80px -20px rgb(0 0 0 / 45%);
	transform: translateY(14px) scale(.98);
	transition: transform .3s var(--ease);
}
.popup.is-open .popup__dialog { transform: none; }
.popup__dialog:focus { outline: none; }
@media (min-width: 760px) {
	.popup__dialog.has-image { width: min(860px, 100%); grid-template-columns: 1fr 1.1fr; }
	.popup__dialog.has-image .popup__media img { height: 100%; aspect-ratio: auto; }
}
.popup__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.popup__body { padding: clamp(24px, 4vw, 40px); }
.popup__title { margin: 0 0 .5em; font-size: clamp(1.5rem, 3vw, 2rem); }
.popup__text { color: var(--s-soft); margin: 0; }
.popup__body .btn-row { margin-top: 22px; }
.popup__close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	background: rgb(255 255 255 / 92%);
	color: var(--c-dark);
	box-shadow: var(--shadow-sm);
}
.popup__close:hover { background: #fff; }
.has-popup { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
	.popup, .popup__dialog { transition: none; }
}
