/* CES — Centrum Edukacji Samochodowej
   Paleta oparta na istniejącej identyfikacji: granat #23293a + złoto #cc9933 */

:root{
  --navy: #23293a;
  --navy-deep: #171b26;
  --gold: #cc9933;
  --gold-light: #e3b656;
  --paper: #f7f5f0;
  --surface: #ffffff;
  --ink: #23293a;
  --ink-soft: #565c6b;
  --ink-faint: #8890a0;
  --border: #e5e1d6;
  --radius: 10px;
  --maxw: 1080px;
  --font: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16px;
}

img{ max-width: 100%; height: auto; display: block; }

a{ color: var(--gold); text-decoration: none; }
a:hover{ text-decoration: underline; }

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

/* ---------- topbar ---------- */
.topbar{
  background: var(--navy);
  color: #fff;
  font-size: 13px;
}
.topbar .wrap{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px 20px;
}
.topbar a{ color: #cfd3dd; }
.topbar a:hover{ color: #fff; }
.topbar .contact-line{ display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- header / nav ---------- */
header.site{
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
header.site .wrap{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 20px;
}
.brand{
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img{ height: 46px; width: auto; }
.brand .brand-name{
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .02em;
  color: var(--navy);
  line-height: 1.2;
}
.brand .brand-name small{
  display: block;
  font-weight: 500;
  font-size: 11.5px;
  color: var(--ink-faint);
  letter-spacing: .04em;
  text-transform: uppercase;
}

nav.main{ display: flex; gap: 4px; flex-wrap: wrap; }
nav.main a{
  color: var(--navy);
  font-weight: 600;
  font-size: 14.5px;
  padding: 9px 14px;
  border-radius: 7px;
  text-decoration: none;
}
nav.main a:hover{ background: var(--paper); text-decoration: none; }
nav.main a.active{ background: var(--navy); color: #fff; }

/* ---------- mobile hamburger menu ---------- */
.nav-toggle{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.hamburger{
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 8px;
  border-radius: 7px;
  cursor: pointer;
}
.hamburger:hover{ background: var(--paper); }
.hamburger span{
  display: block;
  height: 2.5px;
  width: 100%;
  background: var(--navy);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle:focus-visible + .hamburger{ outline: 2px solid var(--gold); outline-offset: 2px; }
.nav-toggle:checked + .hamburger span:nth-child(1){ transform: translateY(7.5px) rotate(45deg); }
.nav-toggle:checked + .hamburger span:nth-child(2){ opacity: 0; }
.nav-toggle:checked + .hamburger span:nth-child(3){ transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 780px){
  .hamburger{ display: flex; }
  nav.main{
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 14px 26px rgba(23,27,38,.1);
    transition: max-height .25s ease;
  }
  nav.main a{
    border-radius: 0;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
  }
  .nav-toggle:checked ~ nav.main{ max-height: 420px; }
}

/* brand sub-nav (tabs to 3M / Brenntag / Fein / Loctite / Teroson) */
.subnav{
  background: var(--paper);
  border-bottom: 1px solid var(--border);
}
.subnav .wrap{
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 10px;
  padding-bottom: 10px;
}
.subnav a{
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.subnav a:hover{ text-decoration: none; border-color: var(--gold); color: var(--navy); }
.subnav a.active{
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}

/* level 3 — sibling product pages within one brand */
.subnav3{
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.subnav3 .wrap{
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 9px;
  padding-bottom: 9px;
}
.subnav3-label{
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-faint);
  margin-right: 6px;
}
.subnav3 a{
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 5px 11px;
  border-radius: 6px;
}
.subnav3 a:hover{ background: var(--paper); text-decoration: none; color: var(--navy); }
.subnav3 a.active{ background: var(--navy); color: #fff; }

/* ---------- hero ---------- */
.hero{
  position: relative;
  color: #fff;
  min-height: 400px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-color: var(--navy);
  overflow: hidden;
}
.hero::before{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(23,27,38,.5), rgba(23,27,38,.8));
}
.hero .wrap{
  position: relative;
  z-index: 1;
  width: 100%;
  padding-top: 40px;
  padding-bottom: 40px;
}
.hero-box{
  background: rgba(23,27,38,.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
  padding: 28px 32px;
  max-width: 640px;
}
.eyebrow{
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gold-light);
  margin: 0 0 10px;
}
.hero h1{
  font-size: clamp(28px, 4vw, 42px);
  margin: 0 0 14px;
  max-width: 22ch;
  text-wrap: balance;
  font-weight: 800;
}
.hero p{ max-width: 56ch; color: #dfe2ea; font-size: 16px; }

.page-hero{
  background: var(--navy);
  color: #fff;
  padding: 46px 0;
}
.page-hero .eyebrow{ margin-bottom: 8px; }
.page-hero h1{ margin: 0; font-size: clamp(26px,3.4vw,36px); font-weight: 800; }
.page-hero p{ color: #dfe2ea; max-width: 62ch; margin-top: 10px; }

/* ---------- sections ---------- */
section{ padding: 52px 0; }
section.tight{ padding: 34px 0; }
section.alt{ background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

h2.section-title{
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 22px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gold);
  display: inline-block;
}

.lead{
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 72ch;
}

.two-col{
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 36px;
  align-items: center;
}
@media (max-width: 760px){ .two-col{ grid-template-columns: 1fr; } }

/* ---------- brand grid (oferta hub) ---------- */
.brand-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: 18px;
}
.brand-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  border-top: 4px solid var(--accent, var(--gold));
  transition: transform .15s ease, box-shadow .15s ease;
}
.brand-card:hover{ transform: translateY(-3px); box-shadow: 0 10px 24px rgba(23,27,38,.08); }
.brand-card h3{ margin: 0 0 8px; font-size: 19px; color: var(--navy); }
.brand-card p{ margin: 0 0 16px; color: var(--ink-soft); font-size: 14.5px; }
.brand-card a.cta{ font-weight: 700; font-size: 14px; }

/* ---------- product blocks ---------- */
.product{
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: start;
  padding: 28px 0;
  border-top: 1px solid var(--border);
}
.product:first-of-type{ border-top: none; }
@media (max-width: 700px){ .product{ grid-template-columns: 1fr; } }
.product figure{ margin: 0; }
.product figure img{ border-radius: var(--radius); border: 1px solid var(--border); }
.product figcaption{ font-size: 12px; color: var(--ink-faint); margin-top: 6px; text-align: right; }
.product h3{
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--gold);
  letter-spacing: .01em;
}
.product p{ margin: 0; color: var(--ink-soft); }

/* ---------- stub / placeholder notice ---------- */
.notice{
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  color: var(--ink-soft);
  font-size: 14.5px;
}

/* ---------- cert gallery ---------- */
.cert-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 24px;
}
.cert-grid figure{
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.cert-grid img{ border-radius: 6px; margin: 0 auto; }
.cert-grid figcaption{ margin-top: 10px; font-size: 13px; color: var(--ink-soft); }

/* ---------- contact ---------- */
.contact-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: stretch;
}
@media (max-width: 760px){ .contact-grid{ grid-template-columns: 1fr; } }
.contact-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
}
.contact-card h3{
  margin: 0 0 14px;
  color: var(--navy);
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.contact-card p{ margin: 0 0 6px; color: var(--ink-soft); }
.contact-card .phones div{ margin-bottom: 4px; }
.map-frame{
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 340px;
}
.map-frame iframe{ width: 100%; height: 100%; min-height: 340px; border: 0; display: block; }

@media (max-width: 760px){
  .map-frame{ height: 340px; }
}

/* ---------- footer ---------- */
footer.site{
  background: var(--navy-deep);
  color: #b7bccb;
  margin-top: 40px;
}
footer.site .wrap{
  padding: 34px 24px 26px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}
footer.site img.brands-strip{ height: 34px; width: auto; filter: grayscale(.15); }
footer.site .foot-links{ display: flex; gap: 16px; flex-wrap: wrap; font-size: 13.5px; }
footer.site a{ color: #b7bccb; }
footer.site a:hover{ color: #fff; }
.copy{
  text-align: center;
  font-size: 12px;
  color: #6c7488;
  padding-bottom: 24px;
}

@media (max-width: 600px){
  footer.site .wrap{
    flex-direction: column;
    text-align: center;
  }
}
