/*
 * Image Group theme, part 2: home page, contact, model page specs, mobile menu, sticky filter.
 * Loaded after style.css (overrides it where needed).
 */

.btn {
	display: inline-block; padding: 14px 32px; border: 1px solid currentColor; background: none; color: inherit;
	font: inherit; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; cursor: pointer;
	transition: background .2s, color .2s;
}
.btn-small { padding: 10px 20px; font-size: 12px; }
.btn-dark { background: var(--text); border-color: var(--text); color: #fff; }
.btn-dark:hover { background: #333; border-color: #333; }
.btn-light { background: #fff; border-color: #fff; color: var(--text); }
.btn-light:hover { background: transparent; color: #fff; }

/* ---------- desktop dropdown (JS adds .open for touch and focus) ---------- */
@media (min-width: 860px) {
	.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu, .main-nav li.open > .sub-menu { display: flex; }
}

/* ---------- hero slider ----------
   The whole picture is shown, in its own proportions (never cropped). The slider is as tall as the
   picture that is showing (at most 78% of the screen height); if the picture is narrower than the
   screen it sits in the middle over a blurred copy of itself. */
.hero-slider { position: relative; overflow: hidden; background: #111; }
.hero-slide {
	position: absolute; inset: 0; display: block; overflow: hidden; text-decoration: none; color: #fff;
	opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .8s ease, visibility 0s linear .8s;
}
.hero-slide.active { position: relative; opacity: 1; visibility: visible; pointer-events: auto; z-index: 1; transition-delay: 0s; }
.hero-slide::before {
	content: ""; position: absolute; inset: -30px; background: var(--bg) center / cover no-repeat;
	filter: blur(28px) brightness(.65); transform: scale(1.1);
}
.hero-slide img { position: relative; display: block; width: auto; max-width: 100%; height: auto; max-height: 78vh; margin: 0 auto; }
.hero-caption {
	position: absolute; left: 0; right: 0; bottom: 0; display: block; padding: 48px var(--pad) 44px;
	background: linear-gradient(to top, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0));
}
.hero-sub { display: block; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; opacity: .9; }
.hero-title { display: block; margin-top: 6px; font-size: clamp(26px, 5vw, 56px); font-weight: 300; letter-spacing: .06em; line-height: 1.1; text-transform: uppercase; }
.hero-dots { position: absolute; left: 0; right: 0; bottom: 14px; z-index: 2; display: flex; justify-content: center; gap: 4px; }
.hero-dots button { width: 28px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; }
.hero-dots button::after { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: rgba(255, 255, 255, .5); }
.hero-dots button[aria-current="true"]::after { background: #fff; }

/* ---------- home sections ---------- */
.section { padding: 40px 0 8px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 8px; }
.section-title { margin: 0 0 16px; font-size: clamp(20px, 3vw, 28px); font-weight: 300; letter-spacing: .1em; text-transform: uppercase; }
.section-title.small { font-size: 18px; }
.section-head .section-title { margin-bottom: 8px; }
.more-link { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; color: var(--muted); }
.more-link:hover { color: var(--text); }

.home-intro .page-title span { font-weight: 300; color: var(--muted); }
.home-intro .entry-content { padding-bottom: 8px; font-size: 18px; }

/* one-line carousel (New faces): scrolls by itself, full screen width */
.faces { padding: 32px 0 8px; overflow: hidden; }
.marquee { overflow: hidden; width: 100%; }
.marquee-track { display: flex; width: max-content; animation: marquee var(--dur, 60s) linear infinite; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
.marquee-set { display: flex; gap: 8px; margin: 0; padding: 0 8px 0 0; list-style: none; }
.marquee-item { flex: none; width: clamp(150px, 18vw, 240px); }
.marquee-item a { display: block; text-decoration: none; }
.marquee-item .thumb { display: block; aspect-ratio: 3 / 4; overflow: hidden; background: #eee; }
.marquee-item img { display: block; width: 100%; height: 100%; object-fit: cover; }
.marquee-item .name { display: block; padding: 8px 2px 4px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
	.marquee { overflow-x: auto; }
	.marquee-track { animation: none; }
	.marquee-set[aria-hidden="true"] { display: none; }
}

.home-models { margin-bottom: 24px; }
@media (min-width: 900px) and (max-width: 1199px) { .home-models .model-card:nth-child(n+5) { display: none; } }
@media (min-width: 1200px) and (max-width: 1699px) { .home-models .model-card:nth-child(n+6) { display: none; } }

.features { display: grid; gap: 28px; grid-template-columns: 1fr; margin-bottom: 40px; }
@media (min-width: 760px) { .features { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.features h3 { margin: 0 0 8px; font-size: 15px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.features p { margin: 0; color: #444; }

.cta { margin: 24px 0 0; padding: 64px var(--pad); background: #111; color: #fff; text-align: center; }
.cta h2 { margin: 0 0 8px; font-size: clamp(24px, 4vw, 40px); font-weight: 300; letter-spacing: .08em; text-transform: uppercase; }
.cta p { margin: 0 0 24px; opacity: .85; }

.news-grid { display: grid; gap: 24px; grid-template-columns: 1fr; margin-bottom: 40px; }
@media (min-width: 700px) { .news-grid { grid-template-columns: repeat(3, 1fr); } }
.news-grid h3 { margin: 4px 0 0; font-size: 18px; font-weight: 400; }
.news-grid h3 a { text-decoration: none; }
.news-thumb { display: block; margin-bottom: 8px; line-height: 0; }
.news-thumb img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* ---------- contact ---------- */
/* three columns on wide screens: map | form | details; on phones: form, details, map */
.contact-layout { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: stretch; padding-bottom: 40px; }
.contact-form-box { order: 1; }
.contact-card { order: 2; }
.contact-map { order: 3; min-height: 300px; line-height: 0; background: #eee; }
.contact-map iframe { display: block; width: 100%; height: 100%; min-height: 300px; border: 0; filter: grayscale(.25); }
@media (min-width: 700px) {
	.contact-layout { grid-template-columns: 1fr 1fr; }
	.contact-map { grid-column: 1 / -1; min-height: 340px; }
}
@media (min-width: 1100px) {
	.contact-layout { grid-template-columns: 1.15fr 1.1fr .85fr; gap: 32px; }
	.contact-map { grid-column: auto; order: 1; min-height: 480px; }
	.contact-form-box { order: 2; }
	.contact-card { order: 3; }
}

/* form: compact, fields side by side where there is room */
.contact-form label { display: block; margin: 0 0 14px; }
.contact-form label > span { display: block; margin-bottom: 4px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.contact-form .field-row { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
@media (min-width: 480px) { .contact-form .field-row { grid-template-columns: 1fr 1fr; } }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form textarea {
	display: block; width: 100%; margin: 0; padding: 10px 12px; border: 1px solid #ccc; border-radius: 0; background: #fff; font: inherit; font-size: 16px; line-height: 1.4;
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--text); outline-offset: 0; border-color: var(--text); }
.contact-form .btn { margin-top: 4px; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.notice { margin: 0 0 16px; padding: 12px 16px; border-left: 4px solid; font-size: 15px; }
.notice-ok { background: #eef7ee; border-color: #3c8d40; }
.notice-error { background: #fdeeee; border-color: #c0392b; }

/* details ("rekvizitai") card */
.contact-card { padding: 24px; background: #f5f5f3; border: 1px solid var(--line); align-self: start; }
.contact-card .section-title { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.contact-card .details { margin: 0 0 20px; }
.contact-card .details > div { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.contact-card .details > div:last-child { border-bottom: 0; }
.contact-card dt { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.contact-card dd { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.contact-card dd a { text-decoration: none; }
.contact-card dd a:hover { text-decoration: underline; }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.icon-link { display: inline-flex; padding: 8px; border: 1px solid var(--line); background: #fff; color: var(--text); line-height: 0; }
.icon-link:hover { background: var(--text); color: #fff; }
@media (min-width: 400px) and (max-width: 1099px) {
	.contact-card .details > div { grid-template-columns: 9em 1fr; gap: 12px; align-items: baseline; }
}
.contact-widgets { display: grid; gap: 24px; padding: 32px 0; }
@media (min-width: 760px) { .contact-widgets { grid-template-columns: repeat(3, 1fr); } }

/* ---------- footer ---------- */
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.footer-contact a { text-decoration: none; }
.footer-social { display: flex; align-items: center; gap: 14px; }
.footer-social a { display: inline-flex; padding: 6px; color: var(--text); }
.footer-social a:hover { opacity: .6; }
.footer-social .copyright { margin-right: 8px; }

/* ---------- model page ---------- */
.model-head { display: block; padding: 20px 0 8px; }
.model-head .back-link { display: inline-block; margin-bottom: 8px; padding: 6px 0; }
.model-head .page-title { margin-bottom: 16px; }
.model-specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 16px; margin: 0 0 8px; padding: 0; list-style: none; font-size: 16px; }
.model-specs li { display: flex; flex-direction: column; min-width: 0; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.model-specs li span { margin: 0 0 2px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.model-specs li b { font-weight: 400; }
.model-specs .spec-insta { grid-column: 1 / -1; border: 0; padding: 0; }
.model-specs .spec-insta a {
	display: inline-flex; align-items: center; justify-content: center; padding: 12px 22px; border: 1px solid var(--text);
	font-size: 13px; letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
}
.model-specs .spec-insta a:hover { background: var(--text); color: #fff; }
@media (min-width: 600px) {
	.model-specs { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 900px; }
	.model-specs .spec-insta { grid-column: auto; align-self: end; }
}
@media (min-width: 1000px) { .model-specs { grid-template-columns: repeat(8, minmax(0, auto)); gap: 14px 36px; max-width: none; justify-content: start; } }

/* top row of the model page: back link on the left, previous / next model on the right */
.model-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 8px; }
.model-nav .back-link { margin: 0; }
.model-step { display: flex; gap: 8px; }
.step {
	display: inline-flex; align-items: center; gap: 8px; max-width: 220px; min-height: 40px; padding: 4px 14px;
	border: 1px solid var(--line); background: #fff; color: var(--text); text-decoration: none;
	font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
}
.step:hover, .step:focus-visible { background: var(--text); border-color: var(--text); color: #fff; }
.step .arr { font-size: 22px; line-height: 1; }
.step .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* slim bar under the header once the title is out of view: back, previous, name, next */
.model-bar {
	display: flex; align-items: center; gap: 4px; position: fixed; top: var(--hh, 72px); left: 0; right: 0; z-index: 45;
	height: 44px; padding: 0 var(--pad); background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line);
	font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
	transform: translateY(-120%); transition: transform .25s; pointer-events: none;
}
.model-bar.visible { transform: none; pointer-events: auto; }
.model-bar a { padding: 10px 12px; font-size: 22px; line-height: 1; text-decoration: none; }
.model-bar .bar-back { margin-right: auto; padding-left: 0; }
.model-bar .bar-name { flex: 0 1 auto; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.model-bar .bar-step:last-child { margin-left: 0; padding-right: 0; }

/* bottom of the model page: continue to the neighbours without scrolling back up */
.model-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 8px 0 40px; padding-top: 16px; border-top: 1px solid var(--line); }
.model-pager a {
	display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 14px; border: 1px solid var(--line);
	text-decoration: none; font-size: 14px; letter-spacing: .08em; text-transform: uppercase;
}
.model-pager a:hover, .model-pager a:focus-visible { background: var(--text); border-color: var(--text); color: #fff; }
.model-pager .pager-next { justify-content: flex-end; text-align: right; }
.model-pager .arr { font-size: 26px; line-height: 1; }
.model-pager .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- phones ---------- */
@media (max-width: 859px) {
	.site-header .wrap { min-height: 60px; }
	.site-logo img { max-height: 44px; }

	/* full-screen menu */
	.main-nav {
		display: none; position: fixed; top: var(--hh, 72px); left: 0; right: 0; bottom: 0; z-index: 49;
		padding: 8px var(--pad) 32px; overflow-y: auto; background: var(--bg); border: 0;
	}
	.main-nav.open { display: block; }
	.main-nav ul { flex-direction: column; gap: 0; }
	.main-nav > ul > li { border-bottom: 1px solid var(--line); }
	.main-nav a, .main-nav a:hover, .main-nav .current-menu-item > a { display: block; padding: 18px 0; border: 0; font-size: 20px; letter-spacing: .1em; font-weight: 400; }
	.main-nav .current-menu-item > a, .main-nav .current-menu-ancestor > a { font-weight: 700; }
	.main-nav .sub-menu { display: flex; position: static; min-width: 0; padding: 0 0 12px 16px; border: 0; box-shadow: none; }
	.main-nav .sub-menu a { padding: 12px 0; font-size: 16px; color: var(--muted); }
	body.nav-open { overflow: hidden; }

	.nav-toggle { order: 3; margin-right: -10px; }
	.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { transition: transform .25s, top .25s, background .25s; }
	.nav-toggle[aria-expanded="true"] span { background: transparent; }
	.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
	.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

	/* A-Z filter: one scrolling row that stays under the header */
	.letter-filter {
		position: sticky; top: var(--hh, 72px); z-index: 40; flex-wrap: nowrap; overflow-x: auto; gap: 6px;
		margin: 0 calc(var(--pad) * -1) 12px; padding: 10px var(--pad); background: var(--bg); border-bottom: 1px solid var(--line);
		scrollbar-width: none; -webkit-overflow-scrolling: touch;
	}
	.letter-filter::-webkit-scrollbar { display: none; }
	.letter-filter li { flex: none; }
	.letter-filter button { min-width: 44px; height: 44px; font-size: 15px; }

	.page-head { padding-top: 20px; }

	/* on phones the previous/next buttons in the top row show only the arrow */
	.model-step .step .lbl { display: none; }
	.model-step .step { min-width: 44px; justify-content: center; }

	.cta { padding: 48px var(--pad); }
	.footer-bottom { flex-direction: column; align-items: flex-start; }
}
