/*
Theme Name: Abas Engine
Theme URI: https://www.abas.net.pl/
Description: Motyw strony Grupy ABAS — instalacje wentylacyjne, klimatyzacyjne i sanitarne. Silnik: Abas Engine.
Author: Abas Engine
Version: 0.2.1
Text Domain: abas-engine
*/

/* ============ Zmienne / paleta marki (z oryginalnej strony) ============ */
:root {
	--brand:       #ee1c25;
	--brand-dark:  #b3141b;
	--ink:         #2b2f36;
	--slate:       #3e4249;
	--slate-deep:  #475363;
	--muted:       #6b7280;
	--line:        #e6e6e5;
	--bg:          #ffffff;
	--bg-soft:     #f7f7f6;
	--radius:      10px;
	--wrap:        1160px;
	--shadow:      0 1px 3px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.05);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	color: var(--ink);
	background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { color: var(--brand); }
h1,h2,h3,h4 { color: var(--slate); line-height: 1.25; font-weight: 700; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ============ Górny pasek ============ */
.topbar { background: var(--slate-deep); color: #cdd3db; font-size: 13px; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 38px; flex-wrap: wrap; }
.topbar a { color: #e6e9ee; }
.topbar a:hover { color: #fff; }
.topbar__contact span { margin-right: 18px; white-space: nowrap; }
.lang { display: flex; gap: 6px; align-items: center; list-style: none; margin: 0; padding: 0; }
.lang li { margin: 0; }
.lang a { padding: 2px 7px; border-radius: 4px; text-transform: uppercase; font-weight: 600; font-size: 12px; }
.lang .current-lang a, .lang a.current { background: var(--brand); color: #fff; }

/* ============ Nagłówek / logo / menu ============ */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 84px; position: relative; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand__logo { font-size: 34px; font-weight: 800; letter-spacing: 2px; color: var(--brand); line-height: 1; }
.brand__tag { font-size: 12px; color: var(--muted); max-width: 260px; line-height: 1.3; }
.brand img { max-height: 56px; width: auto; }

.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; font-size: 20px; cursor: pointer; color: var(--slate); }

.main-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.main-nav a { display: block; padding: 10px 14px; border-radius: 6px; color: var(--slate); font-weight: 600; }
.main-nav a:hover { background: var(--bg-soft); color: var(--brand); }
.main-nav .current-menu-item > a { color: var(--brand); }

/* ============ Sekcje / hero ============ */
.hero { background: linear-gradient(180deg, #f7f7f6 0%, #fff 100%); border-bottom: 1px solid var(--line); }
.hero .wrap { padding: 56px 20px; }
.hero h1 { font-size: clamp(28px, 4vw, 44px); margin: 0 0 12px; }
.hero p { font-size: 18px; color: var(--muted); max-width: 720px; margin: 0 0 24px; }

.btn { display: inline-block; background: var(--brand); color: #fff; padding: 12px 22px; border-radius: 8px; font-weight: 700; }
.btn:hover { background: var(--brand-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--slate); border: 1px solid var(--line); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }

.section { padding: 48px 0; }
.section__title { font-size: 26px; margin: 0 0 6px; }
.section__lead { color: var(--muted); margin: 0 0 28px; }

/* ============ Filtr kategorii ============ */
.cat-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.cat-filter__item {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px;
	color: var(--slate); font-size: 14px; font-weight: 600; background: #fff; line-height: 1.2;
}
.cat-filter__item:hover { border-color: var(--brand); color: var(--brand); }
.cat-filter__item.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.cat-filter__count { font-size: 12px; opacity: .7; font-weight: 700; }
.cat-filter__item.is-active .cat-filter__count { opacity: .85; }
.pagination-wrap { margin-top: 30px; }
.pagination-wrap .page-numbers { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; margin: 0 3px; color: var(--slate); }
.pagination-wrap .page-numbers.current { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ============ Siatka kart ============ */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .18s, transform .18s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card__media { aspect-ratio: 4 / 3; background: var(--bg-soft); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 16px; }
.card__title { font-size: 17px; margin: 0 0 6px; }
.card__meta { font-size: 13px; color: var(--muted); }
.badge { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #fff; background: var(--brand); padding: 3px 8px; border-radius: 999px; }

/* ============ Referencje ============ */
.grid--ref { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.ref-card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.ref-card__scan { display: block; background: var(--bg-soft); padding: 12px; }
.ref-card__scan img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 4px; transition: transform .18s; }
.ref-card__scan:hover img { transform: scale(1.02); }
.ref-card__body { padding: 14px 16px; }
.ref-card__title { font-size: 15px; margin: 0 0 4px; }
.ref-card__desc { font-size: 13px; color: var(--muted); }

/* ============ Treść pojedyncza ============ */
.entry { padding: 40px 0; }
.entry__title { font-size: clamp(24px, 3vw, 34px); margin: 0 0 8px; }
.entry__content { max-width: 800px; }
.entry__content img { border-radius: 8px; margin: 12px 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 10px; margin-top: 20px; }
.gallery-grid img { border-radius: 8px; aspect-ratio: 4/3; object-fit: cover; width: 100%; }

/* ============ Mapa ============ */
.section--map { padding-top: 0; }
.map-embed { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; line-height: 0; }
.map-embed iframe { display: block; width: 100%; }

/* ============ Formularze ============ */
.form-intro { color: var(--muted); font-size: 17px; margin-bottom: 22px; }
.abas-form { max-width: 560px; }
.abas-form label { display: block; font-weight: 600; color: var(--slate); margin: 14px 0 4px; }
.abas-form .req { color: var(--brand); }
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea {
	width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
	font: inherit; color: var(--ink); background: #fff;
}
.wpcf7 input:focus, .wpcf7 textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(238,28,37,.12); }
.wpcf7 textarea { min-height: 140px; resize: vertical; }
.wpcf7 .cf7-note { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.wpcf7 input[type="submit"] {
	margin-top: 18px; background: var(--brand); color: #fff; border: 0; cursor: pointer;
	padding: 12px 26px; border-radius: 8px; font-weight: 700; font-size: 16px;
}
.wpcf7 input[type="submit"]:hover { background: var(--brand-dark); }
.wpcf7-response-output { border-radius: 8px; margin: 16px 0 0 !important; padding: 12px 16px !important; }
.wpcf7 .wpcf7-not-valid-tip { color: var(--brand-dark); font-size: 13px; }

/* ============ Kontakt ============ */
.contact { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: start; }
.contact__side { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: sticky; top: 100px; }
.contact__side .section__title { font-size: 20px; margin-top: 0; }
.contact__side p { margin: 0 0 14px; }
.dept { font-size: 20px; color: var(--brand-dark); margin: 28px 0 12px; padding-bottom: 6px; border-bottom: 2px solid var(--line); }
.person-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.person { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: #fff; }
.person__name { font-weight: 700; color: var(--slate); font-size: 16px; }
.person__role { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.person__contact { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.person__contact li { margin: 2px 0; word-break: break-word; }
.person__contact span { display: inline-block; min-width: 44px; color: var(--muted); font-size: 12px; }
@media (max-width: 720px) {
	.contact { grid-template-columns: 1fr; }
	.contact__side { position: static; }
}

/* ============ Stopka ============ */
.site-footer { background: var(--slate-deep); color: #cbd1d9; margin-top: 40px; font-size: 14px; }
.site-footer .wrap { padding: 36px 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 24px; }
.site-footer h4 { color: #fff; font-size: 15px; margin: 0 0 10px; }
.site-footer a { color: #cbd1d9; }
.site-footer a:hover { color: #fff; }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,.12); }
.site-footer__bottom .wrap { padding: 14px 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 13px; color: #9aa3af; }

/* ============ Responsywność ============ */
@media (max-width: 860px) {
	.nav-toggle { display: block; }
	.main-nav { position: absolute; left: 0; right: 0; top: 100%; z-index: 999; background: #fff; border: 1px solid var(--line); border-top: 0; display: none; box-shadow: var(--shadow); }
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; padding: 8px; }
	.brand__tag { display: none; }
	.site-header { position: sticky; top: 0; }
}
