/* Feis Com Mobile — iPhone / touch / compact layer.
   Works on top of the Feis Com theme (uses its CSS variables) and falls back gracefully on other themes. */

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a, button, [role="button"], input, select, textarea, label { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); touch-action: manipulation; }
img, svg, video, iframe { max-width: 100%; }

/* ---------- Safe areas (notch, Dynamic Island, home indicator) ---------- */
.fcm-safe .fc-topbar, .fcm-safe .fc-header, .fcm-safe .fc-footer__bottom {
	padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right);
}
.fcm-safe .fc-container { width: min(var(--container, 1240px), 100% - 32px - env(safe-area-inset-left) - env(safe-area-inset-right)); }
@media (max-width: 1024px) { .fcm-safe .fc-nav { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); padding-right: env(safe-area-inset-right); } }
.fcm-safe .fc-modal { padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); }
.fcm-safe .fc-totop { right: calc(20px + env(safe-area-inset-right)); bottom: calc(20px + env(safe-area-inset-bottom)); }
@media (display-mode: standalone) {
	/* Installed as an app with a translucent status bar: keep the header below it. */
	.fcm-safe .fc-header { padding-top: env(safe-area-inset-top); }
}

/* ---------- No zoom on form focus (iOS zooms when text < 16px) ---------- */
@media (max-width: 1024px) {
	.fcm-nozoom input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
	.fcm-nozoom select, .fcm-nozoom textarea { font-size: max(16px, 1em) !important; }
}

/* ---------- Real screen height (Safari address bar) ---------- */
@supports (height: 100svh) {
	.fcm-svh .fc-hero { height: var(--hero-h-svh, min(88svh, 860px)); }
	.fcm-svh .fc-modal__box { max-height: calc(100dvh - 40px); }
}
/* Off-canvas menu only (desktop menu sits inline in the header) */
@supports (height: 100dvh) {
	@media (max-width: 1024px) { .fcm-svh .fc-nav { height: 100dvh; } }
}

/* ---------- Touch: no sticky hover lifts ---------- */
@media (hover: none) {
	.fcm-touch .fc-prod:hover, .fcm-touch .fc-proj:hover, .fcm-touch .fc-comp:hover, .fcm-touch .fc-newscard:hover,
	.fcm-touch .fc-act:hover, .fcm-touch .fc-param:hover, .fcm-touch .fc-btn:hover, .fcm-touch a.fc-ci:hover { transform: none; box-shadow: none; }
	.fcm-touch .fc-prod:hover::before { transform: translateY(101%); }
	.fcm-touch .fc-prod:hover h3 { color: var(--ink, #0d1117); }
	.fcm-touch .fc-prod:hover p { color: var(--mut, #667080); }
	.fcm-touch .fc-prod:hover .fc-prod__icon { background: var(--red-soft, #fdecee); color: var(--red, #e11d2a); }
	.fcm-touch .fc-proj:hover .fc-proj__img { transform: none; }
	/* Visible press feedback instead */
	.fcm-touch .fc-prod:active, .fcm-touch .fc-proj:active, .fcm-touch .fc-comp:active, .fcm-touch .fc-newscard:active, .fcm-touch .fc-act:active, .fcm-touch .fc-btn:active, .fcm-touch .fcm-bar__item:active { transform: scale(.98); transition: transform .08s; }
}

/* ---------- iOS: background-attachment: fixed is broken ---------- */
.fcm-ios.fcm-fixedbg .fc-stats, .fcm-ios.fcm-fixedbg .fc-fleet__img, .fcm-ios.fcm-fixedbg [style*="background-attachment: fixed"] { background-attachment: scroll !important; }

/* ---------- Compact on phones ---------- */
@media (max-width: 680px) {
	.fcm-compact .fc-sec, .fcm-compact .fc-acts, .fcm-compact .fc-giant, .fcm-compact .fc-stats, .fcm-compact .fc-custom { padding-top: var(--fcm-pad) !important; padding-bottom: var(--fcm-pad) !important; }
	.fcm-compact .fc-about { padding-top: calc(var(--fcm-pad) + 30px) !important; }
	.fcm-compact .fc-sechead { margin-bottom: 26px; }
	.fcm-compact .fc-title, .fcm-compact .fc-acts__title { font-size: calc(clamp(30px, 9vw, 40px) * var(--fcm-hd)) !important; }
	.fcm-compact .fc-slide__title, .fcm-compact .fc-giant__title, .fcm-compact .fc-projhero h1, .fcm-compact .fc-pagehero h1 { font-size: calc(clamp(38px, 12vw, 54px) * var(--fcm-hd)) !important; }
	.fcm-compact .fc-acts__typed { font-size: calc(26px * var(--fcm-hd)) !important; margin-bottom: 28px; }
	.fcm-compact .fc-hero { min-height: var(--fcm-hero); }
	.fcm-compact .fc-slide__in { padding-top: 70px; padding-bottom: 150px; }
	.fcm-compact .fc-slide__text { margin-bottom: 22px; font-size: 16px; }
	.fcm-compact .fc-lead, .fcm-compact .fc-prose { font-size: 16px; }
	.fcm-compact .fc-prod { padding: 24px 20px 22px; }
	.fcm-compact .fc-prod__icon { width: 54px; height: 54px; font-size: 28px; margin-bottom: 16px; }
	.fcm-compact .fc-prod__n { font-size: 42px; }
	.fcm-compact .fc-comp { padding: 24px 20px; }
	.fcm-compact .fc-proj__body { padding: 16px 64px 18px 18px; }
	.fcm-compact .fc-stat { padding: 22px 18px; }
	.fcm-compact .fc-giant__params { margin-top: 40px; }
	.fcm-compact .fc-param { padding: 14px; }
	.fcm-compact .fc-giant__img { min-height: 220px; }
	.fcm-compact .fc-contact__form { padding: 22px 16px; }
	.fcm-compact .fc-ci { padding: 14px 16px; }
	.fcm-compact .fc-ci i { width: 44px; height: 44px; font-size: 20px; }
	.fcm-compact .fc-ctaband__in { padding: 36px 0; }
	.fcm-compact .fc-footer__grid { gap: 30px; padding: 46px 0 30px; }
	.fcm-compact .fc-pagehero { padding: 60px 0 54px; }
	.fcm-compact .fc-act { min-height: 160px; padding: 20px 8px; border-radius: 16px; }
	.fcm-compact .fc-fbfeed__frame { max-height: 520px; }
	.fcm-compact .fc-quick__item { padding: 14px 18px; }
	/* Bigger, thumb-friendly tap targets */
	.fcm-compact .fc-menu > li > a { padding-top: 20px; padding-bottom: 20px; }
	.fcm-compact .fc-btn { min-height: 48px; }
}

/* Animations on phones */
@media (max-width: 680px) {
	.fcm-anim-light .fc-reveal { transform: translateY(12px); transition-duration: .45s; transition-delay: 0s !important; }
	.fcm-anim-light .fc-slide__bg { transition-duration: 4s; }
	.fcm-anim-none .fc-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
	.fcm-anim-none .fc-slide__bg, .fcm-anim-none .fc-slide .fc-kicker, .fcm-anim-none .fc-slide__title, .fcm-anim-none .fc-slide__text, .fcm-anim-none .fc-slide__btns { transition: none !important; transform: none !important; }
}

/* ---------- Bottom action bar ---------- */
.fcm-bar { display: none; }
@media (max-width: 1024px) {
	.fcm-bar {
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
		display: grid; grid-template-columns: repeat(var(--fcm-n, 4), 1fr);
		padding: 6px max(6px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
		background: rgba(13, 17, 23, .92); color: #fff;
		-webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
		border-top: 1px solid rgba(255, 255, 255, .08);
		box-shadow: 0 -10px 30px -12px rgba(0, 0, 0, .45);
		transition: transform .3s cubic-bezier(.22, 1, .36, 1);
	}
	.fcm-bar.is-hidden { transform: translateY(110%); }
	.fcm-bar__item {
		display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
		min-height: 52px; border-radius: 12px; color: inherit; text-decoration: none;
		font: 600 11.5px/1.1 var(--bd, system-ui, -apple-system, sans-serif); letter-spacing: .02em;
	}
	.fcm-bar__item svg { width: 23px; height: 23px; }
	.fcm-bar__item--offer { background: var(--red, #e11d2a); color: #fff; margin: 2px 3px; }
	.fcm-bar__item--viber svg { color: #9b7bff; }
	.fcm-bar__item--wa svg { color: #3ddc84; }
	.fcm-bar--light { background: rgba(255, 255, 255, .94); color: #0d1117; border-top-color: rgba(0, 0, 0, .08); }
	.fcm-bar--brand { background: var(--red, #e11d2a); }
	.fcm-bar--brand .fcm-bar__item--offer { background: #fff; color: var(--red, #e11d2a); }
	.fcm-bar--brand .fcm-bar__item svg { color: #fff; }
	.fcm-bar--brand .fcm-bar__item--offer svg { color: var(--red, #e11d2a); }
	/* Make room so the bar never covers content / footer */
	.fcm-has-bar { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
	.fcm-has-bar .fc-totop { bottom: calc(78px + env(safe-area-inset-bottom)); }
	/* The bar already has a call button: hide the duplicate in the header on phones */
	.fcm-has-bar .fc-header .fc-call { display: none; }
	.fcm-has-bar .fc-nav { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
}
@media print { .fcm-bar { display: none !important; } }
