:root{
  --page-bg: #ffffff;
  --text: #2A3A6A;
  --muted: #5e6677;
  --border: rgba(31, 36, 48, 0.12);
  --shadow: 0 18px 40px rgba(16, 24, 40, 0.12);

  /* Upravte dle brandu Quanda (akcent) */
  --accent: #179AB9;

  --container: 1500px;
  --menu-width: 1000px;
  --nav-h: 76px;
  --radius: 6px;

  --font: "Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: var(--font);
}

/* Container */
.container{
  width: min(var(--container), calc(100% - 110px));
  margin: 0 auto;
}

/* Header: transparent */
.site-header{
  transform: scale(1);
  position: sticky;
  top: 0;
  margin-bottom:60px;
  z-index: 100;
  background: transparent;
  transition: background .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.site-header.is-scrolled{
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 22px rgba(16,24,40,0.06);
}

.nav{
  width: min(var(--container), calc(100% - 110px));
  margin: 0 auto;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

/* Logo */
.logo{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.2px;
}
.logo-text{ font-size: 18px; }

/* Desktop menu */
.menu{
  font-family: var(--font);
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.menu--desktop{ flex: 1; justify-content: center; }

.nav-link{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.nav-link:hover{ background: rgba(42, 58, 106, 0.05); }
.nav-link:focus-visible{
  outline: 2px solid rgba(37, 99, 235, 0.55);
  outline-offset: 2px;
}

.nav-link--button{
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: var(--font);
}

/* Right cluster */
.right{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pill-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(31, 36, 48, 0.06);
  color: var(--text);
}

.contact, .login{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
  padding: 10px 12px;
  border-radius: 8px;
  transition: background .15s ease;
}
.contact:hover, .login:hover{ background: rgba(42, 58, 106, 0.05); }
.contact:focus-visible, .login:focus-visible{
  outline: 2px solid rgba(37, 99, 235, 0.55);
  outline-offset: 2px;
}

.pill-text{ white-space: nowrap; }

/* Hamburger (default hidden) */
.hamburger{
  appearance: none;
  border: 0;
  background: transparent;
  padding: 10px 10px;
  border-radius: 12px;
  cursor: pointer;
  display: none;
}
.hamburger:hover{ background: rgba(31, 36, 48, 0.06); }
.hamburger:focus-visible{
  outline: 2px solid rgba(37, 99, 235, 0.55);
  outline-offset: 2px;
}
.hamburger-lines{
  width: 22px;
  height: 14px;
  position: relative;
  display: inline-block;
}
.hamburger-lines::before,
.hamburger-lines::after,
.hamburger-lines{
  background: transparent;
}
.hamburger-lines::before,
.hamburger-lines::after{
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: rgba(31,36,48,0.65);
  border-radius: 2px;
}
.hamburger-lines::before{ top: 4px; }
.hamburger-lines::after{ top: 10px; }
.hamburger-lines{
  border-top: 2px solid rgba(31,36,48,0.65);
  border-radius: 2px;
  padding-top: 6px;
}

/* Caret */
.caret{
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(31,36,48,0.55);
  border-bottom: 2px solid rgba(31,36,48,0.55);
  transform: rotate(45deg);
  margin-top: -2px;
  transition: transform .16s ease;
}

/* Mega menu */
.has-mega{ position: relative; }
.hover-bridge{
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  height: 14px;
}

.mega{
  position: absolute;
  left: 50%;
  top: calc(100% + 12px);
  transform: translate(-50%, 10px);
  width: min(var(--menu-width), calc(100vw - 110px));
  background: #fff;
  border: 1px solid rgba(31,36,48,0.10);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-family: var(--font);
  padding: 35px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .16s ease, transform .16s ease, visibility .16s linear;
}

.has-mega[data-open="true"] .mega{
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
.has-mega[data-open="true"] .caret{ transform: rotate(225deg); }

.mega-inner{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 35px;
  align-items: start;
}

.mega-item:hover{
  background: rgba(	231, 248, 252, 0.50);
  border-radius: 6px;
} 

.mega-list{
  font-family: var(--font);
  text-align: left;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.mega-link{
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: start;
  text-decoration: none;
  color: var(--text);
  padding: 6px 2px;
  border-radius: 10px;
}

.mega-link:focus-visible{
  outline: 2px solid rgba(37, 99, 235, 0.55);
  outline-offset: 3px;
  border-radius: 12px;
}
.mega-icon{
  width: 32px;
  height: 32px;
  margin-left: 4px;
  object-fit: contain;
  opacity: 0.95;
}
.mega-text strong{
  display: block;
  margin-left: 8px;
  margin-top: 2px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  transition: color .15s ease;
}
.mega-desc{
  display: block;
  margin-top: 4px;
  margin-left:6px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
}

/* CTA in mega menu */
.mega-cta{
  grid-column: 1 / -1;
  margin-top: 6px;
  padding-top: 35px;
  border-top: 1px solid rgba(31,36,48,0.10);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.mega-cta-text{
  display: grid;
  gap: 6px;
  max-width: 760px;
  text-align: left;
}
.mega-cta-text strong{ 
    font-size: 16px; 
    text-align: left;
}
.mega-cta-text span{
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
}
.mega-cta-actions{ display: flex; gap: 10px; }

/* Buttons */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.btn:active{ transform: translateY(1px); }

.btn-primary{ color: #fff; background: var(--accent); }
.btn-primary:hover{ color: #fff; background: #137d96; }

.btn-ghost{
  color: var(--text);
  background: transparent;
  border-color: rgba(31,36,48,0.16);
}
.btn-ghost:hover{ background: rgba(31,36,48,0.06); }

/* Page demo */
.page{ padding-bottom: 80px; }
.hero{ padding: 56px 0 18px; }
.hero h1{
  margin: 0 0 10px 0;
  font-size: 34px;
  letter-spacing: -0.6px;
}
.hero p{
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 15px;
}

/* Overlay + drawer */
.overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(2px);
  z-index: 200;
}

.drawer{
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(92vw, 420px);
  background: #fff;
  border-left: 1px solid rgba(31,36,48,0.12);
  box-shadow: -18px 0 40px rgba(16, 24, 40, 0.12);
  z-index: 210;
  transform: translateX(102%);
  transition: transform .2s ease;
  display: grid;
  grid-template-rows: auto 1fr;
}

.drawer.is-open{ transform: translateX(0); }

.drawer-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 10px;
  border-bottom: 1px solid rgba(31,36,48,0.08);
}

.drawer-close{
  appearance: none;
  border: 0;
  background: rgba(31,36,48,0.06);
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
}
.drawer-close:hover{ background: rgba(31,36,48,0.10); }
.drawer-close:focus-visible{
  outline: 2px solid rgba(37, 99, 235, 0.55);
  outline-offset: 2px;
}

.drawer-nav{
  padding: 10px 18px 18px;
  overflow: auto;
}

.drawer-link{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
  padding: 12px 10px;
  border-radius: 12px;
}
.drawer-link:hover{ background: rgba(31,36,48,0.06); }
.drawer-link:focus-visible{
  outline: 2px solid rgba(37, 99, 235, 0.55);
  outline-offset: 2px;
}

.drawer-accordion{
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: var(--font);
}

.drawer-caret{
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(31,36,48,0.55);
  border-bottom: 2px solid rgba(31,36,48,0.55);
  transform: rotate(45deg);
  transition: transform .16s ease;
}
.drawer-accordion[aria-expanded="true"] .drawer-caret{
  transform: rotate(225deg);
}

.drawer-obory{
  padding: 6px 6px 10px 6px;
}

.drawer-obory-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 6px 6px 12px;
}

.drawer-col{
  display: grid;
  gap: 12px;
}
.drawer-obor:hover strong{ color: var(--accent); }
.drawer-obor{
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: start;
  text-decoration: none;
  color: var(--text);
  padding: 6px 6px;
  border-radius: 12px;
}

.drawer-obor-text strong{
  display: block;
  font-size: 14px;
  text-align: left;
  line-height: 1.2;
}
.drawer-obor-text span{
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  text-align: left;
  line-height: 1.35;
}

.drawer-cta{
  border-top: 1px solid rgba(31,36,48,0.10);
  padding: 14px 12px 6px;
  margin: 0 6px;
  display: grid;
  text-align: left;
  gap: 6px;
}
.drawer-cta strong{ font-size: 14px; }
.drawer-cta span{ color: var(--muted); font-size: 13px; }
.drawer-cta-actions{ display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }

.drawer-divider{
  height: 1px;
  background: rgba(31,36,48,0.10);
  margin: 12px 8px;
}

.drawer-pill{
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  padding: 10px 10px;
  border-radius: 12px;
}
.drawer-pill:hover{ background: rgba(31,36,48,0.06); }

/* Responsive rules */
@media (max-width: 1040px){
  .pill-text { display: none; } /* telefon i login jen ikony */
  
  .nav {
  width: min(var(--container), calc(100% - 70px));
   }
  
  .contact {
  gap: 8px;
  padding: 8px 8px;
  }
  
  .login {
  display: none;      
  gap: 8px;
  padding: 8px 8px;
  }
  
}

@media (max-width: 900px){
  .menu--desktop{ display: none; }
  .hamburger{ display: inline-flex; }
  .mega-icon{ margin-left: 0;}
}

@media (max-width: 520px){
  .drawer-obory-grid{ grid-template-columns: 1fr; }
}

/* Prevent scroll when drawer open */
body.no-scroll{
  overflow: hidden;
}

/* Desktop overlay pod mega menu (nad obsahem) */
.page-dim {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 80;          /* musí být pod headerem a mega menu */
  opacity: 0;
  visibility: hidden;
  transition: opacity .16s ease, visibility .16s linear;
}

/* zobrazení overlaye */
.page-dim.is-visible {
  opacity: 1;
  visibility: visible;
}

/* jistota vrstvení (pokud už máte, není třeba měnit) */
.site-header { z-index: 100; }
.mega { z-index: 110; }

