/* =====================================================================
   MIMS – arkusz stylów. Kolory zmienisz w sekcji :root.
   ===================================================================== */
@font-face { font-family: "Barlow"; src: url("../fonts/Barlow-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/Barlow-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/BarlowCondensed-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/BarlowCondensed-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --red: #B3140F;          /* czerwień z logo MIMS */
  --red-dark: #8E0F0B;
  --ink: #1F2328;          /* tekst */
  --steel: #2B3036;        /* ciemne tło nagłówka strony głównej */
  --steel-2: #3A4048;
  --muted: #5A626C;
  --paper: #F2F3F5;        /* tło strony */
  --line: #D6DADF;
  --white: #fff;
  --signal: #F5B800;       /* obrys zaznaczenia (klawiatura) */

  --wrap: 1160px;
  --radius: 6px;
  --head: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
  --body: "Barlow", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; font-family: var(--body); font-size: 1.0625rem; line-height: 1.6; color: var(--ink); background: var(--paper); }
img { max-width: 100%; height: auto; }
a { color: var(--red-dark); text-underline-offset: .18em; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.1; letter-spacing: .005em; margin: 1.5em 0 .5em; }
h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.8rem); margin-top: 0; }
h2 { font-size: clamp(1.5rem, 1.3rem + .8vw, 1.85rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.lead { font-size: 1.2rem; line-height: 1.5; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--signal); color: var(--ink); padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; }

/* ---------- przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .65rem 1.15rem; border: 2px solid transparent; border-radius: var(--radius);
  font: 600 1rem/1.2 var(--body); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn-lg { padding: .85rem 1.4rem; font-size: 1.1rem; }
.btn-block { width: 100%; margin-top: 1rem; }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-dark); color: var(--white); }
.btn-light { border-color: rgba(255,255,255,.55); color: var(--white); }
.btn-light:hover { background: rgba(255,255,255,.1); color: var(--white); }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }

/* ---------- nagłówek ---------- */
.site-header { background: var(--white); border-bottom: 4px solid var(--red); position: relative; z-index: 20; }
.header-inner { display: flex; align-items: center; gap: 1.5rem; padding-block: .6rem; }
.brand img { display: block; width: 190px; height: auto; }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; display: flex; gap: .2rem; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: .5rem .8rem; font: 600 1.2rem/1 var(--head); text-transform: none;
  color: var(--ink); text-decoration: none; border-bottom: 3px solid transparent;
}
.site-nav a:hover { color: var(--red); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--red); color: var(--red-dark); }
.nav-toggle {
  display: none; margin-left: auto; align-items: center; gap: .5rem; padding: .55rem .85rem;
  background: var(--white); border: 2px solid var(--line); border-radius: var(--radius);
  font: 600 1rem var(--body); color: var(--ink); cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; position: relative; content: "";
}
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after { position: absolute; top: 6px; }

/* ---------- strona główna: hero ---------- */
.hero { background: var(--steel); color: var(--white); padding-top: 3rem; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 3rem; align-items: center; padding-bottom: 2.5rem; }
.hero-place { margin: 0 0 .6rem; color: #c3c9d0; font-weight: 600; }
.hero h1 { font-size: clamp(2.3rem, 1.6rem + 3vw, 3.6rem); margin: 0 0 1rem; max-width: 18ch; }
.hero-lead { font-size: 1.2rem; color: #dfe3e7; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

.slider { position: relative; aspect-ratio: 480 / 290; border-radius: var(--radius); overflow: hidden; background: var(--steel-2); box-shadow: 0 18px 40px rgba(0,0,0,.35); }
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .9s ease; }
.slide.is-active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slider-dots { position: absolute; bottom: .7rem; right: .8rem; display: flex; gap: .4rem; }
.slider-dots button { width: .7rem; height: .7rem; padding: 0; border-radius: 50%; border: 2px solid var(--white); background: transparent; cursor: pointer; }
.slider-dots button[aria-current="true"] { background: var(--white); }

/* tabliczka znamionowa – wyróżnik strony głównej */
.plate {
  position: relative; margin: 0; transform: translateY(50%);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: linear-gradient(180deg, #E9ECEF 0%, #CDD2D7 100%);
  border: 1px solid #AEB4BB; border-radius: 4px; color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 10px 24px rgba(0,0,0,.18);
  padding: 1.1rem 1.6rem;
}
.plate::before, .plate::after {
  content: ""; position: absolute; top: 50%; translate: 0 -50%; width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, #8d949b 60%, #5f666d);
}
.plate::before { left: .6rem; }
.plate::after { right: .6rem; }
.plate div { padding: 0 1rem; }
.plate div + div { border-left: 1px solid #A9AFB6; }
.plate dt { font: 600 .9rem/1.2 var(--body); color: var(--muted); }
.plate dd { margin: .15rem 0 0; font: 700 1.45rem/1.1 var(--head); }

/* ---------- treść ---------- */
.main { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2rem; margin-block: 2.5rem 3.5rem; align-items: start; }
.main--home { margin-top: 4.5rem; }
.page-kontakt .main { grid-template-columns: minmax(0, 1fr); }
.page-kontakt .sidebar section:not(.promo) { display: none; }
.content { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2.5rem); min-width: 0; }
.content > :first-child { margin-top: 0; }
.content > :last-child { margin-bottom: 0; }
.content p, .content li { max-width: 72ch; }
.content::after { content: ""; display: table; clear: both; }
.content h2 { clear: both; }

.media-right { float: right; margin: .3rem 0 1rem 1.75rem; max-width: 46%; }
.media-right img { display: block; border-radius: var(--radius); }

.checks { list-style: none; padding: 0; margin: 0 0 1.2rem; }
.checks li { position: relative; padding-left: 1.7rem; margin-bottom: .45rem; }
.checks li::before { content: ""; position: absolute; left: 0; top: .55em; width: .75rem; height: .75rem; background: var(--red); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.checks--cols { columns: 2; column-gap: 2.5rem; }
.checks--cols li { break-inside: avoid; }

.services { list-style: none; padding: 0; margin: 1rem 0 1.5rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .75rem; }
.services li { border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: var(--radius); padding: .8rem 1rem; max-width: none; }
.services strong { display: block; font: 700 1.25rem/1.2 var(--head); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .9rem; margin: 1rem 0 1.5rem; }
.card { border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: var(--radius); padding: 1rem 1.15rem .4rem; }
.card--wide { grid-column: 1 / -1; }
.card h2 { font-size: 1.35rem; margin: 0 0 .5rem; }

.note { border-left: 4px solid var(--red); background: var(--paper); padding: .85rem 1rem; font-weight: 600; clear: both; }

/* ---------- prawa kolumna ---------- */
.sidebar { display: grid; gap: 1.25rem; position: sticky; top: 1rem; }
.side-box { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.35rem; }
.side-box h2 { font-size: 1.45rem; margin: 0 0 .75rem; }
.promo { border: 2px solid var(--red); }

.contact-name { font-weight: 600; margin-bottom: .2rem; }
.contact-list { list-style: none; padding: 0; margin: .8rem 0 0; }
.contact-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-top: 1px solid var(--line); max-width: none; }
.contact-list span { color: var(--muted); }
.contact-list a { font-weight: 600; text-decoration: none; color: var(--ink); white-space: nowrap; }
.contact-list a:hover { color: var(--red); }
.page-kontakt .contact-card { max-width: 32rem; font-size: 1.15rem; }

/* ---------- stopka ---------- */
.site-footer { background: var(--steel); color: #cdd3d9; padding: 2.5rem 0 1rem; font-size: .98rem; }
.site-footer a { color: var(--white); }
.footer-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr 1fr; gap: 2rem; }
.footer-logo { width: 180px; display: block; }
.footer-name { color: var(--white); font-weight: 600; }
.footer-menu { list-style: none; margin: 0; padding: 0; }
.footer-menu li { margin-bottom: .3rem; }
.footer-menu a { text-decoration: none; }
.footer-menu a:hover { text-decoration: underline; }
.copyright { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2rem; padding-top: 1rem; font-size: .88rem; color: #9aa3ad; }

.call-bar { display: none; }

/* ---------- tablet ---------- */
@media (max-width: 1000px) {
  .header-call { display: none; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .slider { max-width: 620px; }
  .plate { grid-template-columns: repeat(2, 1fr); row-gap: .9rem; }
  .plate div:nth-child(3) { border-left: 0; }
  .main { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- telefon ---------- */
@media (max-width: 760px) {
  body { font-size: 1rem; padding-bottom: 4.4rem; }
  .wrap { width: min(100% - 1.5rem, var(--wrap)); }
  .brand img { width: 150px; }
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 4px solid var(--red); }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; padding: .4rem .75rem .8rem; }
  .site-nav a { padding: .8rem .5rem; border-bottom: 1px solid var(--line); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--line); border-left: 4px solid var(--red); padding-left: .75rem; }
  .hero { padding-top: 1.75rem; }
  .hero-inner { padding-bottom: 2rem; }
  .hero-actions .btn { flex: 1 1 100%; }
  .plate { padding: .9rem 1.4rem; }
  .plate div { padding: 0 .6rem; }
  .plate dd { font-size: 1.2rem; }
  .main { margin-block: 1.5rem 2rem; }
  .main--home { margin-top: 5rem; }
  .media-right { float: none; max-width: 100%; margin: 0 0 1rem; }
  .checks--cols { columns: 1; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .call-bar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: .6rem .75rem calc(.6rem + env(safe-area-inset-bottom)); background: var(--steel);
  }
  .call-bar .btn { flex: 1; }
}

@media print {
  .site-nav, .call-bar, .slider, .nav-toggle, .header-call { display: none !important; }
  .hero { background: none; color: var(--ink); }
}
