/*
Theme Name: Ermetra
Theme URI: https://ermetra.lt
Author: UAB Ermetra
Description: Lengva, greita tema UAB Ermetra autoservisui. Puslapių turinys redaguojamas su Elementor, kontaktai ir darbo laikas – Išvaizda → Tinkinti → Įmonės duomenys.
Version: 1.2.2
Requires at least: 6.4
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: ermetra
*/

:root {
	--erm-bg: #111315;
	--erm-bg-2: #181b1e;
	--erm-line: #2c3137;
	--erm-text: #eef0f2;
	--erm-muted: #a3abb4;
	--erm-accent: #f5b301;
	--erm-accent-hover: #ffc21f;
	--erm-radius: 10px;
	--erm-wrap: 1180px;
	--erm-head: "Barlow Condensed", "Arial Narrow", sans-serif;
	--erm-stripe: repeating-linear-gradient(-45deg, var(--erm-accent) 0 14px, var(--erm-bg) 14px 28px);
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
	margin: 0;
	background: var(--erm-bg);
	color: var(--erm-muted);
	font: 400 17px/1.6 "Barlow", system-ui, sans-serif;
	-webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--erm-accent); text-decoration: none; }
a:hover { color: var(--erm-accent-hover); }
h1, h2, h3, h4 {
	color: var(--erm-text);
	font-family: var(--erm-head);
	font-weight: 700;
	line-height: 1.05;
	text-transform: uppercase;
}
.erm-wrap { max-width: var(--erm-wrap); margin: 0 auto; padding: 0 20px; }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; z-index: 100; top: 8px; left: 8px;
	padding: 10px 16px; background: var(--erm-accent); color: var(--erm-bg);
}

/* Buttons (theme parts) */
.erm-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	padding: 15px 26px; border: 2px solid var(--erm-accent); border-radius: 6px;
	background: var(--erm-accent); color: var(--erm-bg);
	font: 700 17px/1 var(--erm-head); letter-spacing: .08em; text-transform: uppercase;
	cursor: pointer; transition: transform .15s, background-color .15s;
}
.erm-btn:hover { background: var(--erm-accent-hover); color: var(--erm-bg); transform: translateY(-2px); }

/* Top bar + header */
.erm-topbar { background: #0b0c0d; font-size: 14px; }
.erm-topbar .erm-wrap { display: flex; gap: 28px; justify-content: flex-end; padding-top: 8px; padding-bottom: 8px; }
.erm-topbar .erm-wrap a { color: var(--erm-muted); }
.erm-topbar .erm-wrap a:hover { color: var(--erm-accent); }
.erm-topbar span { display: inline-flex; align-items: center; gap: 8px; }
.erm-topbar svg, .erm-header svg { width: 16px; height: 16px; flex: none; }
.erm-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(17, 19, 21, .96); backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--erm-line);
}
.admin-bar .erm-header { top: 32px; }
.erm-nav { display: flex; align-items: center; justify-content: space-between; height: 84px; }
.erm-header .erm-logo, .erm-footer .erm-logo { display: flex; align-items: center; gap: 12px; color: var(--erm-text); font: 800 26px/1 var(--erm-head); letter-spacing: .06em; }
.erm-header .erm-logo:hover, .erm-footer .erm-logo:hover { color: var(--erm-text); }
.erm-logo__mark { display: block; width: 58px; color: var(--erm-accent); }
.erm-logo__mark svg { display: block; width: 100%; height: auto; }
.erm-logo:hover .erm-logo__mark { color: var(--erm-accent-hover); }
.erm-logo small { display: block; margin-top: 4px; color: var(--erm-muted); font: 600 11px/1 "Barlow", sans-serif; letter-spacing: .2em; }
.erm-logo--footer .erm-logo__mark { width: 130px; }
.custom-logo { max-height: 48px; width: auto; }
.erm-menu { display: flex; align-items: center; gap: 30px; }
.erm-menu ul { display: flex; gap: 30px; margin: 0; padding: 0; list-style: none; }
.erm-header .erm-menu a { color: #d8dce0; font: 600 16px/1 var(--erm-head); letter-spacing: .1em; text-transform: uppercase; }
.erm-header .erm-menu a:hover, .erm-header .erm-menu .erm-call { color: var(--erm-accent); }
.erm-call { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.erm-burger { display: none; padding: 8px; border: 0; background: none; color: var(--erm-text); cursor: pointer; }
.erm-burger svg { width: 28px; height: 28px; }

/* Footer */
.erm-footer { border-top: 8px solid; border-image: var(--erm-stripe) 8; background: #0b0c0d; padding: 56px 0 28px; font-size: 15px; }
.erm-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.erm-footer .erm-footer__title { margin: 0 0 14px; font-size: 18px; letter-spacing: .1em; }
.erm-footer p { margin: 0 0 6px; }
.erm-footer .erm-footer__about { margin-top: 16px; }
.erm-footer .erm-footer__grid a { color: var(--erm-muted); }
.erm-footer .erm-footer__grid a:hover { color: var(--erm-accent); }
.erm-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--erm-line); font-size: 14px; }
.erm-footer__links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.erm-footer__links a { color: var(--erm-muted); }
.erm-footer__links a:hover { color: var(--erm-accent); }

/* Elementor helpers (CSS classes set in Elementor → Advanced) */
.erm-hero { border-bottom: 8px solid; border-image: var(--erm-stripe) 8; }
.erm-hero-title { max-width: 820px; }
.erm-hero-title span { color: var(--erm-accent); }
.erm-lead { max-width: 620px; }
.erm-eyebrow .elementor-heading-title {
	display: flex; align-items: center; gap: 10px;
	color: var(--erm-accent); font: 700 14px/1 var(--erm-head); letter-spacing: .18em; text-transform: uppercase;
}
.erm-eyebrow .elementor-heading-title::before { content: ""; width: 28px; height: 3px; background: currentColor; }
.erm-facts { padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, .14); }
.erm-service { transition: border-color .2s, transform .2s; }
.erm-service:hover { border-color: var(--erm-accent) !important; transform: translateY(-3px); }
.erm-service .elementor-icon { border-radius: 8px; }
.erm-gallery .elementor-image-gallery .gallery { display: grid; grid-template-columns: repeat(var(--erm-cols, 4), minmax(0, 1fr)); gap: 12px; margin: 0; }
.erm-gallery .gallery-columns-2 { --erm-cols: 2; }
.erm-gallery .gallery-columns-3 { --erm-cols: 3; }
.erm-gallery .gallery-columns-5 { --erm-cols: 5; }
.erm-gallery .gallery-columns-6 { --erm-cols: 6; }
.erm-gallery .gallery br { display: none; }
.erm-gallery .elementor-image-gallery .gallery[class*="gallery-columns-"] .gallery-item { width: auto; max-width: none; margin: 0; padding: 0; }
.erm-gallery .gallery-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; transition: opacity .2s; }
.erm-gallery .gallery-item a:hover img { opacity: .85; }
.erm-contact-list .elementor-icon-list-items { display: grid; gap: 12px; }
.erm-contact-list .elementor-icon-list-items .elementor-icon-list-item {
	padding: 16px 18px; border: 1px solid var(--erm-line); border-radius: var(--erm-radius); background: var(--erm-bg);
}
.erm-map iframe { border-radius: var(--erm-radius); filter: grayscale(.35); }
.erm-map-gate { position: relative; }
.erm-map-gate iframe:not([src]) { visibility: hidden; }
.erm-map-gate__cover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 20px; border: 1px solid var(--erm-line); border-radius: var(--erm-radius); background: var(--erm-bg-2); text-align: center; font-size: 15px; }
.erm-map-gate__cover p { margin: 0; max-width: 34ch; }
.erm-map-gate.is-loaded .erm-map-gate__cover { display: none; }

/* Cookie consent */
.erm-btn--ghost { background: transparent; color: var(--erm-accent); }
.erm-btn--ghost:hover { background: rgba(245, 179, 1, .12); color: var(--erm-accent-hover); }
.erm-consent { position: fixed; right: 20px; bottom: 20px; z-index: 9999; width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto; padding: 22px; border: 1px solid var(--erm-line); border-top: 4px solid var(--erm-accent); border-radius: var(--erm-radius); background: var(--erm-bg-2); color: var(--erm-muted); font-size: 15px; line-height: 1.5; box-shadow: 0 18px 50px rgba(0, 0, 0, .55); }
.erm-consent[hidden] { display: none; }
.erm-consent .erm-consent__title { margin: 0 0 8px; font-size: 22px; letter-spacing: .06em; }
.erm-consent p { margin: 0 0 16px; }
.erm-consent__options { display: grid; gap: 10px; margin: 0 0 16px; }
.erm-consent__options[hidden] { display: none; }
.erm-consent__options label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.erm-consent__options input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--erm-accent); }
.erm-consent__options strong { color: var(--erm-text); }
.erm-consent__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.erm-consent__actions .erm-btn { flex: 1 1 auto; padding: 12px 16px; font-size: 15px; }
.erm-consent__actions .erm-btn[hidden] { display: none; }
.erm-form__privacy { margin: 14px 0 0; font-size: 13px; color: var(--erm-muted); }

/* Posts: [ermetra_irasai] cards and archive */
.erm-posts { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 26px; }
.erm-post { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--erm-line); border-radius: var(--erm-radius); background: var(--erm-bg-2); }
.erm-post__media { display: grid; grid-auto-rows: minmax(0, 1fr); gap: 4px; aspect-ratio: 4 / 3; overflow: hidden; background: #000; }
.erm-post__media--3 { grid-template-columns: 2fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); }
.erm-post .erm-post__media--3 img:first-child { grid-row: span 2; }
.erm-post__media--2 { grid-template-columns: 1fr 1fr; }
.erm-post .erm-post__media img { width: 100%; height: 100%; min-height: 0; object-fit: cover; transition: transform .4s; }
.erm-post:hover .erm-post__media img { transform: scale(1.03); }
.erm-post__body { padding: 26px 26px 30px; }
.erm-post .erm-post__title { margin: 0 0 12px; font-size: 30px; }
.erm-post .erm-post__title a { color: var(--erm-text); }
.erm-post .erm-post__title a:hover { color: var(--erm-accent); }
.erm-post__body p { margin: 0 0 14px; }
.erm-tag {
	display: inline-block; margin-bottom: 16px; padding: 6px 10px; border-radius: 4px;
	background: var(--erm-accent); color: var(--erm-bg); font: 700 13px/1 var(--erm-head); letter-spacing: .14em; text-transform: uppercase;
}
.erm-more { font: 700 15px/1 var(--erm-head); letter-spacing: .12em; text-transform: uppercase; }

/* Contact form: [ermetra_forma] */
.erm-form { padding: 34px; border: 1px solid var(--erm-line); border-radius: var(--erm-radius); background: var(--erm-bg); }
.erm-form .erm-form__title { margin: 0 0 6px; font-size: 30px; }
.erm-form__intro { margin: 0 0 24px; }
.erm-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.erm-form label { display: block; margin-bottom: 16px; font-size: 14px; font-weight: 500; }
.erm-form input, .erm-form select, .erm-form textarea {
	display: block; width: 100%; margin-top: 6px; padding: 13px 14px;
	border: 1px solid var(--erm-line); border-radius: 6px; background: var(--erm-bg-2);
	color: var(--erm-text); font: inherit; font-size: 16px;
}
.erm-form input:focus, .erm-form select:focus, .erm-form textarea:focus { outline: none; border-color: var(--erm-accent); box-shadow: 0 0 0 3px rgba(245, 179, 1, .18); }
.erm-form textarea { min-height: 130px; resize: vertical; }
.erm-form .erm-btn { width: 100%; }
.erm-form__hp { position: absolute; left: -9999px; }
.erm-notice { margin-bottom: 20px; padding: 14px 16px; border-radius: 6px; font-weight: 500; }
.erm-notice--ok { background: rgba(70, 190, 110, .14); color: #8fe0a9; }
.erm-notice--error { background: rgba(230, 80, 70, .14); color: #ffa39c; }

/* Blog, single post, simple pages */
.erm-page { padding: 72px 0 96px; }
.erm-page .erm-page__title { margin: 0 0 32px; font-size: clamp(36px, 6vw, 60px); }
.erm-content { max-width: 820px; color: #cfd4d9; }
.erm-content h2, .erm-content h3 { margin: 1.6em 0 .6em; }
.erm-content img { border-radius: 8px; }
.erm-content .wp-block-gallery { margin: 28px 0; }
.erm-meta { margin: -16px 0 28px; font-size: 15px; }
.erm-back { display: inline-block; margin-top: 32px; }
.erm-pagination { margin-top: 40px; }
.erm-pagination .page-numbers { display: inline-block; margin-right: 6px; padding: 8px 14px; border: 1px solid var(--erm-line); border-radius: 6px; }
.erm-pagination .current { background: var(--erm-accent); color: var(--erm-bg); }

/* Responsive */
@media (max-width: 1024px) {
	.erm-gallery .elementor-image-gallery .gallery { --erm-cols: 3; }
	.erm-topbar { display: none; }
	.erm-burger { display: block; }
	.erm-menu {
		position: absolute; top: 100%; left: 0; right: 0; display: none;
		flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 24px;
		border-bottom: 1px solid var(--erm-line); background: var(--erm-bg);
	}
	.erm-menu.is-open { display: flex; }
	.erm-menu ul { flex-direction: column; gap: 0; }
	.erm-header .erm-menu a { display: block; padding: 16px 0; border-bottom: 1px solid var(--erm-line); font-size: 20px; }
	.erm-header .erm-menu .erm-call { display: flex; border-bottom: 0; }
}
@media (max-width: 782px) {
	.admin-bar .erm-header { top: 0; }
	.erm-footer__grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
	.erm-wrap { padding: 0 16px; }
	.erm-nav { height: 72px; }
	.erm-logo__mark { width: 50px; }
	.erm-header .erm-logo { font-size: 22px; }
	.erm-form { padding: 24px 18px; }
	.erm-form__row { grid-template-columns: 1fr; gap: 0; }
	.erm-posts { grid-template-columns: 1fr; }
	.erm-gallery .elementor-image-gallery .gallery { --erm-cols: 2; gap: 8px; }
	.erm-post__body { padding: 22px 20px 26px; }
	.erm-post .erm-post__title { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; }
}
