:root{
  --blue:#2a7de1;
  --blue-dark:#1d63b9;
  --dark:#0a1624;
  --text:#1f2937;
  --muted:#475569;
  --surface:#ffffff;
  --surface-soft:#f5f8ff;
  --line:rgba(15,23,42,.10);
  --shadow:0 14px 35px rgba(0,0,0,.18);
  --radius:18px;
  --header-height:96px;
}

*{
  box-sizing:border-box;
  margin:0;
  padding:0;
}

html{
  overflow-x:clip;
  scroll-behavior:smooth;
  scroll-padding-top:calc(var(--header-height) + 20px);
}

body{
  font-family:Arial, Helvetica, sans-serif;
  background:#fff;
  color:var(--text);
  line-height:1.5;
  overflow-x:clip;
  min-width:320px;
}

body.menu-open{
  overflow:hidden;
}

img,
picture,
video,
canvas,
svg,
iframe{
  display:block;
  max-width:100%;
}

iframe{
  width:100%;
}

a,
button{
  touch-action:manipulation;
}

button,
input,
select,
textarea{
  font:inherit;
}

.container{
  width:min(1200px, calc(100% - 40px));
  margin-inline:auto;
}

header{
  background:#fff;
  border-bottom:3px solid var(--blue);
  position:sticky;
  top:0;
  z-index:1000;
  box-shadow:0 8px 24px rgba(15,23,42,.06);
}

.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  min-height:var(--header-height);
  padding:10px 0;
  position:relative;
}

.logo{
  display:flex;
  align-items:center;
  flex:0 0 auto;
  min-width:0;
}

.logo img{
  width:auto;
  height:clamp(80px, 10vw, 150px);
  object-fit:contain;
}

nav.menu{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:clamp(16px, 2vw, 28px);
  flex:1 1 auto;
  min-width:0;
  flex-wrap:wrap;
}

nav.menu a{
  text-decoration:none;
  font-weight:600;
  color:#333;
  border-radius:12px;
  transition:background .2s ease, color .2s ease, transform .2s ease;
}

nav.menu a:hover,
nav.menu a:focus-visible{
  color:var(--blue-dark);
}

.call-btn{
  background:var(--blue);
  color:#fff;
  padding:12px 18px;
  border-radius:10px;
  text-decoration:none;
  white-space:nowrap;
  box-shadow:0 10px 22px rgba(42,125,225,.18);
}

.menu-toggle{
  display:none;
  align-items:center;
  justify-content:center;
  width:48px;
  height:48px;
  border:1px solid rgba(15,23,42,.1);
  border-radius:14px;
  background:#fff;
  color:var(--dark);
  font-size:28px;
  line-height:1;
  cursor:pointer;
  flex:0 0 auto;
}

.menu-toggle:focus-visible,
.call-btn:focus-visible,
nav.menu a:focus-visible{
  outline:3px solid rgba(42,125,225,.28);
  outline-offset:2px;
}

.hero{
  background:
    linear-gradient(rgba(10,22,36,.85), rgba(10,22,36,.85)),
    url('../img/minikoparka.png');
  background-size:cover;
  background-position:center;
  padding:56px 0 40px;
  text-align:center;
  color:#fff;
  min-height:420px;
  display:flex;
  align-items:center;
}

.hero .container{
  display:grid;
  gap:20px;
}

.hero-logo{
  width:min(100%, 700px);
  margin-inline:auto;
  margin-bottom:8px;
}

.hero-logo img{
  width:100%;
  height:auto;
}

.hero-services{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:30px;
  margin-top:-70px;
}

.hero-service{
  background:linear-gradient(#ffffff, #f5f8ff);
  color:#222;
  padding:30px;
  border-radius:18px;
  box-shadow:0 18px 40px rgba(0,0,0,0.25);
  text-decoration:none;
  transition:transform .25s ease, box-shadow .25s ease;
  min-height:100%;
}

.hero-service:hover{
  transform:translateY(-6px) scale(1.02);
  box-shadow:0 25px 60px rgba(0,0,0,0.35);
}

.hero-service h3{
  font-size:clamp(1.1rem, 2vw, 1.45rem);
  line-height:1.2;
}

.hero-service p{
  margin-top:10px;
  line-height:1.6;
  color:#334155;
}

.section{
  padding:90px 0;
}

.cards{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(250px, 1fr));
  gap:30px;
}

.card{
  background:#fff;
  border-radius:18px;
  box-shadow:var(--shadow);
  padding:20px;
  text-align:center;
}

.card img{
  width:100%;
  height:180px;
  object-fit:contain;
  margin-bottom:15px;
}

.card p{
  font-size:14px;
  line-height:1.6;
}

footer{
  background:#071423;
  color:#fff;
  padding:42px 20px;
  text-align:center;
  margin-top:80px;
}

.sprzet-grid,
.sales-grid,
.repairs-grid,
.contact-grid{
  min-width:0;
}

@media (max-width:1024px){
  .hero-services{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    margin-top:0;
  }
}

@media (max-width:900px){
  :root{
    --header-height:76px;
  }

  .container{
    width:min(1200px, calc(100% - 24px));
  }

  .nav{
    gap:12px;
  }

  .logo{
    flex:1 1 auto;
  }

  .logo img{
    height:52px;
  }

  .menu-toggle{
    display:flex;
  }

  nav.menu{
    display:none;
    flex-direction:column;
    align-items:stretch;
    justify-content:flex-start;
    position:absolute;
    top:calc(100% + 3px);
    left:0;
    right:0;
    width:100%;
    max-height:calc(100vh - var(--header-height) - 24px);
    overflow-y:auto;
    background:#fff;
    padding:12px;
    gap:8px;
    border-radius:0 0 18px 18px;
    box-shadow:0 18px 40px rgba(0,0,0,0.16);
    border-top:1px solid rgba(15,23,42,.08);
    z-index:2000;
  }

  nav.menu.active{
    display:flex;
  }

  nav.menu a{
    display:block;
    width:100%;
    padding:14px 12px;
    font-size:17px;
    background:#fff;
  }

  nav.menu a:not(.call-btn){
    border:1px solid rgba(15,23,42,.08);
  }

  .call-btn{
    width:100%;
    text-align:center;
    padding:14px 16px;
  }

  .hero{
    min-height:auto;
    padding:28px 0 30px;
  }

  .hero-logo{
    width:min(100%, 360px);
  }

  .hero-services{
    grid-template-columns:1fr;
    gap:18px;
    margin-top:8px;
  }

  .hero-service{
    padding:22px 20px;
  }

  .sales-card,
  .repair-card,
  .contact-card{
    max-width:100% !important;
  }

  footer{
    margin-top:56px;
    padding:32px 16px calc(32px + env(safe-area-inset-bottom));
  }
}

@media (max-width:767px){
  .hero-service h3{
    font-size:1.2rem;
  }

  .sprzet-grid,
  .sales-grid,
  .repairs-grid,
  .contact-grid{
    grid-template-columns:1fr !important;
    gap:20px !important;
  }
}
