*, *::before, *::after { box-sizing: border-box; min-width: 0; }
html { -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0 0 0.75em; }

:root {
  --gold: #E1C265;
  --brown: #3E3006;
  --bg: #E2E2E2;
  --white: #FFFFFF;
  --max-width: 1200px;
}

@font-face { font-family: CG;  src: url(../fonts/CG.TTF);  font-display: swap; }
@font-face { font-family: CGB; src: url(../fonts/CGB.TTF); font-display: swap; }

body {
  background: var(--bg);
  color: var(--brown);
  font-family: CG, Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

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

.section-label {
  font-family: CGB, Arial, sans-serif;
  color: var(--gold);
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 0.5em;
}

.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-logo { width: 56px; height: auto; }
.brand-text { font-family: CGB, Arial, sans-serif; line-height: 1.2; color: var(--brown); font-size: 0.95rem; }
.brand-text strong { font-size: 1.15em; }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 4px;
}
.nav-toggle span {
  display: block;
  height: 3px;
  background: var(--brown);
  border-radius: 2px;
}

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
}
.nav-btn-img { position: relative; }
.nav-btn-img-hover { position: absolute; inset: 8px 10px; opacity: 0; transition: opacity 0.15s ease; width: calc(100% - 20px); }
.nav-btn:hover .nav-btn-img-hover, .nav-btn:focus-visible .nav-btn-img-hover { opacity: 1; }
.nav-btn-text { display: none; }

.hero {
  position: relative;
  background: var(--brown);
  overflow: hidden;
}
.hero-img { width: 100%; height: 60vh; min-height: 320px; max-height: 620px; object-fit: cover; opacity: 0.55; }
.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}
.hero-kicker { font-family: CGB, Arial, sans-serif; color: var(--gold); font-size: clamp(1.5rem, 5vw, 2.5rem); font-weight: bold; margin: 0; }
.hero-title { font-family: CGB, Arial, sans-serif; color: var(--white); font-size: clamp(1.25rem, 4vw, 1.75rem); font-weight: bold; margin: 0.3em 0; }
.hero-text { color: var(--white); font-family: CGB, Arial, sans-serif; max-width: 40em; font-size: clamp(0.9rem, 2.2vw, 1.1rem); }
.hero-cta {
  display: inline-block;
  margin-top: 1em;
  background: var(--gold);
  color: var(--brown);
  font-family: CGB, Arial, sans-serif;
  font-weight: bold;
  padding: 0.7em 1.6em;
  border-radius: 3px;
}

.about { padding: 60px 0; }
.about-inner { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.about-text { flex: 1 1 320px; }
.about-heading { font-family: CGB, Arial, sans-serif; color: var(--brown); font-size: 1.6rem; font-weight: bold; }
.about-photo { flex: 1 1 320px; max-width: 460px; }
.about-photo img { border-radius: 4px; }

.hardware-row { display: flex; gap: 20px; margin-top: 24px; flex-wrap: wrap; }
.hardware-row a { display: block; width: 160px; }
.hardware-row img { border-radius: 4px; }

.projekty { padding: 60px 0; background: var(--brown) url(../images/backgrounds/projekty_kategorie_pozadi.jpg) center/cover; }
.projekty .section-label { text-align: center; }
.projekty-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.projekty-tile {
  position: relative;
  display: block;
  border-radius: 4px;
  overflow: hidden;
}
.projekty-tile img { width: 100%; aspect-ratio: 253 / 342; object-fit: cover; }
.projekty-tile-label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 16px 10px;
  text-align: center;
  font-family: CGB, Arial, sans-serif;
  color: var(--white);
  font-weight: bold;
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
}

.gallery-teaser { padding: 60px 0; }
.gallery-teaser-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.gallery-teaser-grid img { aspect-ratio: 1; object-fit: cover; border-radius: 4px; }
.gallery-teaser-cta {
  display: inline-block;
  margin-top: 20px;
  font-family: CGB, Arial, sans-serif;
  color: var(--brown);
  font-weight: bold;
  border-bottom: 2px solid var(--gold);
}

.product-intro { padding: 50px 0 20px; }
.product-intro-grid { display: flex; gap: 40px; flex-wrap: wrap; }
.product-intro-text { flex: 2 1 420px; }
.product-intro-hardware { flex: 1 1 220px; }

.site-footer {
  background: var(--brown) url(../images/contact/kontakty_v1.png) center/cover;
  color: var(--gold);
  padding: 60px 0 30px;
}
.site-footer .section-label { color: var(--gold); font-size: 2.2rem; text-align: center; }
.kontakt-grid { display: flex; flex-wrap: wrap; gap: 40px; justify-content: center; align-items: flex-start; margin-top: 20px; }
.kontakt-map iframe { border-radius: 4px; max-width: 100%; }
.kontakt-details { font-family: CGB, Arial, sans-serif; }
.kontakt-details p { margin: 0 0 1em; }
.kontakt-details .icon { display: inline-block; width: 18px; margin-right: 8px; vertical-align: middle; }
.site-footer-copy { text-align: center; margin-top: 40px; font-family: CGB, Arial, sans-serif; font-size: 0.8rem; color: var(--white); }

.mini-footer { background: var(--brown); color: var(--white); text-align: center; padding: 20px 0; font-family: CGB, Arial, sans-serif; font-size: 0.8rem; }
.mini-footer p { margin: 0; }

.gotopbtn {
  position: fixed;
  width: 56px;
  height: 56px;
  background: url(../images/BUTTON_TOP.png) no-repeat center/contain;
  bottom: 30px;
  right: 30px;
  z-index: 60;
}

@media (max-width: 900px) {
  .projekty-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-teaser-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    width: 100%;
    order: 3;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; border-top: 1px solid var(--gold); margin-top: 10px; }
  .nav-btn-img { display: none; }
  .nav-btn-text {
    display: block;
    width: 100%;
    padding: 10px 0;
    font-family: CGB, Arial, sans-serif;
    color: var(--brown);
    font-weight: bold;
  }
  .nav-btn { display: block; width: 100%; padding: 0; }

  .projekty-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .gallery-teaser-grid { grid-template-columns: repeat(2, 1fr); }
  .about-inner { flex-direction: column; }
  .kontakt-grid { flex-direction: column; align-items: center; text-align: center; }
  .gotopbtn { width: 44px; height: 44px; bottom: 16px; right: 16px; }
}
