/* =========================================================================
   Paviljonas Avilys: „Kaip viskas vyksta?“ + užklausos formos modalas.
   Kraunama tik puslapyje 1924.
   ========================================================================= */

/* ---- Kaip viskas vyksta? --------------------------------------------- */
.av-steps {
	--av-step-bg: var(--bone); /* šviesus fonas – kaip aukščiau esančios sekcijos */
	background: var(--av-step-bg);
	/* fonas sutampa su ankstesne sekcija – jos apatinis tarpas jau duoda oro */
	padding-top: clamp(8px, 1.5vw, 24px);
	padding-bottom: clamp(64px, 8vw, 110px);
}
.av-steps__inner { width: var(--container); max-width: 100%; margin: 0 auto; text-align: center; }
.av-steps__heading { margin: 0; } /* šriftas – kaip visur: .content-heading */
.av-steps__intro { max-width: 60ch; margin: 18px auto 0; }
.av-steps__list {
	list-style: none;
	margin: clamp(48px, 6vw, 80px) 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(var(--av-steps, 5), minmax(0, 1fr));
	gap: 28px;
}
.av-step { position: relative; display: flex; flex-direction: column; align-items: center; }
.av-step__icon {
	width: 92px; height: 70px;
	display: flex; align-items: center; justify-content: center;
	color: var(--ink);
}
.av-step__icon svg, .av-step__icon img { width: 100%; height: 100%; object-fit: contain; display: block; }
.av-step__icon--empty { height: 24px; }
/* jungiamoji linija tarp ikonų */
.av-step:not(:last-child)::after {
	content: "";
	position: absolute;
	top: 35px;
	left: calc(50% + 62px);
	width: calc(100% - 124px + 28px);
	height: 1px;
	background: #D8D0C4;
}
.av-step__title {
	margin: 28px 0 0;
	max-width: 11ch;
	font-family: var(--font-serif);
	font-weight: 400;
	font-size: clamp(22px, 1.9vw, 27px);
	line-height: 1.15;
	color: var(--ink);
}
.av-step__text {
	margin: 18px 0 0;
	max-width: 24ch;
	font-family: var(--font-sf);
	font-size: 13px;
	line-height: 1.65;
	color: #55514A;
}

@media (max-width: 1023px) {
	.av-steps__list { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 56px; }
	.av-step::after { display: none; }
}
@media (max-width: 640px) {
	.av-steps__list { grid-template-columns: 1fr; row-gap: 0; text-align: left; }
	.av-step {
		display: grid;
		grid-template-columns: 64px 1fr;
		column-gap: 20px;
		align-items: start;
		padding-bottom: 32px;
	}
	.av-step__icon { width: 64px; height: 48px; grid-row: span 2; }
	.av-step:not(:last-child)::after {
		display: block;
		top: 58px; left: 31px; bottom: 6px;
		width: 1px; height: auto;
	}
	.av-step__title { margin: 4px 0 0; max-width: none; }
	.av-step__text { margin-top: 8px; max-width: none; }
}

/* ---- Užklausos modalas (kompaktiškas, telpa į ekraną) ------------------ */
.av-inq {
	position: fixed; inset: 0; z-index: 10000;
	display: flex; align-items: center; justify-content: center;
	padding: 20px 16px;
}
.av-inq[hidden] { display: none; }
.av-inq__backdrop { position: absolute; inset: 0; background: rgba(26, 26, 27, .62); animation: av-fade .25s ease both; }
.av-inq__panel.mvv-contact {
	position: relative;
	width: 100%; max-width: 980px;
	max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px);
	overflow-y: auto; overscroll-behavior: contain;
	background: var(--bone);
	padding: clamp(24px, 3vw, 40px) clamp(24px, 3.5vw, 48px);
	animation: av-rise .35s cubic-bezier(.16, 1, .3, 1) both;
}
.av-inq__close {
	position: absolute; top: 10px; right: 10px;
	width: 38px; height: 38px; padding: 9px;
	border: 0; background: transparent; color: var(--ink); cursor: pointer;
	transition: color .2s ease;
}
.av-inq__close:hover { color: var(--gold); }
.av-inq__close svg { width: 100%; height: 100%; display: block; }

.av-inq__head { margin-bottom: 22px; padding-right: 40px; }
.av-inq__head .divider-line { margin-bottom: 14px; }
.av-inq__head .content-heading { font-size: clamp(28px, 2.6vw, 36px); line-height: 1.1; margin: 0; }
.av-inq__intro { margin: 8px 0 0 !important; max-width: 70ch; font-size: 14px !important; line-height: 1.55 !important; color: #55514A; }

.av-inq__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px 18px;
}
.av-inq__full { grid-column: 1 / -1; }
.mvv-contact .av-inq__grid .ct-field { margin: 0; min-width: 0; }
.mvv-contact .av-inq__grid .ct-field > label,
.av-inq__radios legend {
	display: block; margin-bottom: 6px; padding: 0;
	font-family: var(--font-grotesk); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #8B8578;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mvv-contact .av-inq__grid .ct-field input,
.mvv-contact .av-inq__grid .ct-field select,
.mvv-contact .av-inq__grid .ct-field textarea {
	height: 44px; padding: 9px 12px; font-size: 15px; line-height: 1.4;
}
.mvv-contact .av-inq__grid .ct-field select { padding-right: 34px; background-position: right 12px center; }
.mvv-contact .av-inq__grid .ct-field textarea { height: auto; min-height: 68px; resize: vertical; }

/* Elektra – segmentuoti mygtukai vietoj apvalių radio */
.av-inq__radios { border: 0; padding: 0; margin: 0; min-width: 0; }
.av-inq__seg { display: grid; grid-template-columns: repeat(3, 1fr); height: 44px; border: 1px solid #DED6CA; background: #fff; }
.mvv-contact .ct-field label.av-inq__radio { position: relative; display: flex; cursor: pointer; margin: 0; padding: 0; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); }
.mvv-contact .ct-field label.av-inq__radio span { color: var(--ink); }
.mvv-contact .ct-field label.av-inq__radio input:checked + span { color: #fff; }
.av-inq__radio + .av-inq__radio { border-left: 1px solid #DED6CA; }
.mvv-contact .av-inq__radio input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.av-inq__radio span {
	flex: 1; display: flex; align-items: center; justify-content: center;
	font-family: var(--font-sf); font-size: 14px; color: var(--ink);
	transition: background .15s ease, color .15s ease;
}
.av-inq__radio:hover span { background: var(--bone-dark); }
.av-inq__radio input:checked + span { background: var(--ink); color: #fff; }
.av-inq__radio input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: -2px; }

.av-inq__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: 20px !important; }
.av-inq__actions .ct-note { margin: 0; flex: 1 1 260px; font-size: 12px; }
.av-inq__actions .ct-status { flex-basis: 100%; margin: 0; font-size: 14px; }
.av-inq__actions .ct-status:empty { display: none; }
body.av-inq-open { overflow: hidden; }

@media (max-width: 900px) {
	.av-inq__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.av-inq__radios { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
	.av-inq { padding: 0; align-items: stretch; }
	.av-inq__panel.mvv-contact { max-height: none; height: 100%; padding: 48px 18px 24px; }
	.av-inq__grid { grid-template-columns: 1fr 1fr; gap: 12px; }
	.av-inq__grid > .ct-field:nth-child(1),
	.av-inq__grid > .ct-field:nth-child(6) { grid-column: 1 / -1; }
	.av-inq__intro { font-size: 13px !important; }
	.mvv-contact .av-inq__grid .ct-field > label { white-space: normal; }
}
@keyframes av-fade { from { opacity: 0; } }
@keyframes av-rise { from { opacity: 0; transform: translateY(16px); } }
@media (prefers-reduced-motion: reduce) {
	.av-inq__backdrop, .av-inq__panel.mvv-contact { animation: none; }
}
