/* ====== ZÁKLAD HLAVIČKY + GRID ====== */
header {
  background: var(--beige-light);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background-color .24s, box-shadow .24s, backdrop-filter .24s;
}

header.is-scrolled {
  background: var(--white);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .08);
  backdrop-filter: saturate(160%) blur(6px);
}

/* Navbar layout: [menu] [logo] [kontakt] */
.navbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 1rem;
  min-height: 115px;
  position: relative;
}

.brand {
  justify-self: center;
}

.contact-row a:hover,
.contact-row a:hover .icon {
  color: var(--accent);
}

/* =========================== KONTAKTY =========================== */
.navbar-contact {
  flex: 1;
  display: flex;
  justify-self: start;
  flex-direction: column;
  min-width: 170px;
}

.navbar-contact-social {
  display: flex;
  flex-direction: column;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 0.45em;
}

.contact-row .icon {
  color: var(--antracit);
  margin: 0 0.3em;
}

.contact-row a {
  color: var(--antracit);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: color .18s;
  display: flex;
  align-items: center;
}

.contact-row a:hover,
.contact-row a:hover .icon {
  color: var(--accent);
}

.contact-row .instagram i {
  background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.contact-row .facebook i {
  color: #1877F3;
}

.contact-row .icon,
.contact-row .instagram,
.contact-row .facebook {
  margin-left: 0.36em;
  font-size: 1.6em;
}

.contact-row .instagram:hover i,
.contact-row .facebook:hover i {
  filter: brightness(1.18) drop-shadow(0 0 4px rgba(0, 0, 0, .13));
}
.brand img {
  display: block;
  width: 250px;
  max-width: 100%;
  height: auto;
}

@media (max-width:950px) {
  .brand img {
    width: 180px;
  }
}

@media (max-width:768px) {
  .brand img {
    width: 160px;
  }
}

@media (max-width:480px) {
  .brand img {
    width: 140px;
  }
}


/* ====== VIDITELNOST MENUS ====== */
.nav-desktop {
  display: block;
}

.nav-mobile {
  display: none;
}

@media (max-width:1024px) {
  .nav-desktop {
    display: none !important;
  }

  .nav-mobile {
    display: block !important;
  }
}

/* ====== HAMBURGER (jen mobil) ====== */
.navbar-toggle {
  display: none;
  border: 0;
  background: none;
  padding: 8px;
  color: var(--antracit);
  cursor: pointer;
}

.navbar-toggle .bar {
  display: block;
  width: 26px;
  height: 3px;
  margin: 5px 0;
  background: currentColor;
  transition: transform .25s, opacity .25s;
}

.navbar-toggle.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.navbar-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

.navbar-toggle.active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width:1024px) {
  .navbar {
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas: "toggle brand contact";
    min-height: unset;
    padding: .5rem .75rem;
  }

  .navbar-toggle {
    display: block;
    grid-area: toggle;
    justify-self: start;
  }

  .brand {
    grid-area: brand;
    justify-self: center;
  }

  .navbar-contact {
    grid-area: contact;
    justify-self: end;
    min-width: 0;
  }

  .brand img {
    width: 200px;
  }

  .contact-row .icon,
  .contact-row .instagram,
  .contact-row .facebook {
    font-size: 1.3em;
  }
}

/* ====== DESKTOP MENU (#1) – dropdowny ====== */
.nav-desktop {
  flex: 1;
  justify-self: end;
}

.nav-desktop ul {
  display: flex;
  gap: 1.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: flex-end;
}

.nav-desktop>ul>li {
  display: inline-block;
  position: relative;
}

.nav-desktop a {
  color: var(--antracit);
  text-decoration: none;
  font-weight: 500;
  font-size: .9rem;
  position: relative;
  letter-spacing: .2px;
  padding: .22em 0;
  transition: color .18s;
}

.nav-desktop a::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width .2s;
  position: absolute;
  bottom: -2px;
  left: 0;
}

.nav-desktop a:hover,
.nav-desktop .active {
  color: var(--accent);
}

.nav-desktop a:hover::after,
.nav-desktop .active::after {
  width: 100%;
}

/* dropdown */
.nav-desktop .has-dropdown .dropdown-arrow {
  font-size: 1em;
  margin-left: 3px;
  transition: transform .2s;
}

.nav-desktop .dropdown {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
  min-width: 220px;
  padding: 8px 0;
  z-index: 999;
}

.nav-desktop li.show>.dropdown {
  display: block;
}

.nav-desktop .dropdown>li {
  padding: 0 16px;
}

.nav-desktop .dropdown>li>a {
  font-weight: 700;
}

.nav-desktop .submenu {
  list-style: none;
  margin: 0 0 8px 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: .9em;
}

.nav-desktop li.show .dropdown-arrow {
  transform: rotate(180deg);
}

.nav-desktop .dropdown a:hover,
.nav-desktop .submenu a:hover {
  background: #f0f0f0;
  border-radius: 3px;
}

/*-------------------------------------------------------------*/


/* ====== MOBIL/TABLET MENU (#2) – off-canvas + zploštělé SLUŽBY ====== */
@media (max-width:1024px) {
  .nav-mobile {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(82vw, 360px);
    height: 100dvh;
    background: #fff;
    border-right: 1px solid #eee;
    box-shadow: 6px 0 24px rgba(0, 0, 0, .08);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    transform: translateX(-100%);
    transition: transform .3s ease;
    z-index: 1000;
  }

  .nav-mobile.open {
    transform: translateX(0);
  }

  /* 1) nativní odrážky pryč, nulové odsazení seznamu */
  .nav-mobile ul {
    margin: 0;
    padding: .25rem 0;
    list-style: none;
  }

  .nav-mobile li::marker {
    content: '';
  }

  .nav-mobile li {
    border: 0;
    color: var(--antracit);
  }

  .nav-mobile a {
    display: block;
    padding: 12px 16px;    
    text-decoration: none;
    font-weight: 500;
    color: var(--antracit);
  }


  /* SLUŽBY jako label + odsazené úrovně */
  .nav-mobile .label {
    padding: 12px 16px;
    font-weight: 700;
    letter-spacing: .2px;
    opacity: .9;
    cursor: default;
  }

  .nav-mobile .label a {
    pointer-events: none;
    color: inherit;
  }

  /* 2) ZRUŠ „fake“ pomlčky (tahle řádka přepíše dřívější pravidlo) */
  .nav-mobile .lvl2>a::before {
    content: none !important;
  }

  /* 3) IKONA + TEXT vedle sebe a pěkně na střed */
  .nav-mobile li {
    display: flex;
    align-items: center;
  }

  .nav-mobile li i {
    flex-shrink: 0;
  }

  /* 4) Zrušit přehnané odsazení na <a>, necháme jen základ */
  .nav-mobile .lvl1>a,
  .nav-mobile .lvl2>a {
    padding-left: 16px;
  }

  /* 5) Odsazení podle úrovně dej na <li> (čistší a stabilní) */
  .nav-mobile .lvl1 {
    padding-left: 12px;
  }

  .nav-mobile .lvl2 {
    padding-left: 28px;
  }

  .hide-mobile {
    display: none;
  }

  /* Zneškodnění desktop dropdownu v mobilu */
  .nav-mobile .has-dropdown>.dropdown-toggle {
    pointer-events: none;
    cursor: default;
  }

  .nav-mobile .dropdown-arrow {
    display: none;
  }

  .nav-mobile .dropdown {
    display: block !important;
    max-height: none !important;
    overflow: visible !important;
    transition: none !important;
    padding: 0;
    margin: 0;
    position: static;
    box-shadow: none;
  }

  .nav-mobile .submenu {
    display: block;
    padding: 0;
    border: 0;
  }
}
/* ====== BACKDROP + BODY LOCK ====== */
.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .28s, visibility .28s;
  z-index: 999;
  display: none;
}

body.menu-open .menu-backdrop {
  display: block !important;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.menu-open {
  overflow: hidden;
  touch-action: none;
}

/* ====== FOCUS ====== */
.navbar-toggle:focus-visible,
.nav-desktop a:focus-visible,
.nav-mobile a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

