/* ===========================================================
   INDELEC 2.0 – Navigace (sidebar + topbar + mobile)
   Autor: Patrik Suchý (2025)
   =========================================================== */

/* ===========================================================
   RESET & BASE STYLES
   =========================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'Poppins', 'system-ui', sans-serif;
  background: #f8fafc;
  color: #0f2540;
}

a {
  color: inherit;
  text-decoration: none;
}

body {
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

:root{
  --sb-w: 280px;   /* šírka sidebaru default */
  --belt-h: 78px;  /* výška bieleho top-beltu */
}

/* ===========================================================
   SIDEBAR (desktop)
   =========================================================== */
#sidebar {
  width: 280px;
  background: #152141;
  color: #fff;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0; left: 0;
  height: 100vh;
  transition: transform .35s ease;
  z-index: 200;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
}
.sidebar-inner::-webkit-scrollbar { width: 6px; }
.sidebar-inner::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
}

/* --- Logo --- */
.menu-logo {
  background: #2553E2;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.menu-logo img {
  height: 40px;
  width: auto;
  display: block;
}

/* --- Menu structure --- */
.menu ul { list-style: none; }
.menu li { border-bottom: 1px solid rgba(255,255,255,0.05); }

.menu a,
.menu button.opener {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.1rem 1.5rem;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background .25s ease, color .25s ease;
}

.menu a:hover,
.menu button.opener:hover {
  background: rgba(255,255,255,0.08);
}

.menu li.active > a,
.menu li.active > button.opener {
  background: rgba(37, 82, 227, 0.18);
  color: #3B5FFF;
}

/* --- Submenu --- */
.menu li.has-sub .submenu {
  display: none;
  background: rgba(37, 82, 227, 0.18);
}
.menu li.has-sub.open .submenu { display: block; }

.menu .submenu a {
  padding: 0.9rem 2.5rem;
  font-weight: 500;
  font-size: 15px;
  opacity: 0.9;
}

/* --- Chevron (šípka) --- */
.menu button.opener .chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform .25s ease;
}
.menu button.opener svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
  stroke: currentColor;
}
.menu li.has-sub.open > button.opener .chevron {
  transform: rotate(180deg);
}


/* ===========================================================
   LANGUAGE SWITCH – elegantný outline button (PC + Mobile)
   =========================================================== */

/* === Desktop (sidebar menu) === */
.menu li.langs {
  margin: 1rem 1rem 1.5rem; /* bočné okraje + spodný priestor */
  padding-top: 1.25rem;
  display: flex;
  justify-content: center;
  background: none;
}

.menu li.langs a.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.9;
  transition: all 0.25s ease;
  width: 100%;
  box-sizing: border-box;
}

.menu li.langs a.lang-switch:hover {
  border-color: #3B5FFF;
  background: rgba(59,95,255,0.15);
  opacity: 1;
}

.menu li.langs a.lang-switch .icon-globe {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  flex-shrink: 0;
  opacity: 0.9;
}


/* === Mobile (hamburger menu) === */
#mobile-menu li.langs {
  margin: 1rem 1rem 1.25rem;
  padding-top: 1rem;
  display: flex;
  justify-content: center;
  background: none;
}

#mobile-menu li.langs a.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.9;
  transition: all 0.25s ease;
  width: 100%;
  box-sizing: border-box;
}

#mobile-menu li.langs a.lang-switch:hover {
  border-color: #3B5FFF;
  background: rgba(59,95,255,0.18);
  opacity: 1;
}

#mobile-menu li.langs a.lang-switch .icon-globe {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  flex-shrink: 0;
  opacity: 0.9;
}

/* === Voliteľne: prilepi jazykový prepínač naspodu mobilného menu === */
@media (max-width: 1024px) {
  #mobile-menu {
    display: flex;
    flex-direction: column;
  }
  #mobile-menu ul {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
  }
  #mobile-menu li.langs {
    margin-top: auto; /* jazyk sa posunie naspodu */
  }
}


/* ===========================================================
   TOP BELT (bílý horní pás – desktop)
   =========================================================== */
#top-belt {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 78px;
  background: #fff;
  padding: 0 20px;
  box-shadow: 0 5px 20px rgba(28,40,70,0.07);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 15px;
  color: #1E2A48;
  z-index: 10 !important;
  pointer-events: none;
}

@media (min-width: 993px) {
  #top-belt { pointer-events: auto; }
}

#top-belt a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}
#top-belt a:hover { text-decoration: underline; }

/* --- Mobilní prvky v top-beltu --- */
#top-belt .mobile-logo,
#top-belt .phone-icon { display: none; }

@media (max-width: 992px) {
  #top-belt { display: none !important; }
  #top-belt .mobile-logo,
  #top-belt .phone-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* ===========================================================
   TOPBAR (modrý pás – len mobil + tablet)
   =========================================================== */
#topbar {
  display: none; /* defaultne skryté, zobrazí sa len na mobile */
  align-items: center;
  justify-content: space-between;
  background: #2553E2;
  color: #fff;
  height: 70px;
  padding: 0 1.2rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

#topbar .nav-toggle,
#topbar .mobile-logo,
#topbar .phone-icon {
  pointer-events: auto;
}

/* --- Logo (v strede, väčšie) --- */
#topbar .mobile-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 0 0 auto;
  text-align: center;
  width: auto;
}

#topbar .mobile-logo img {
  height: 42px;
  width: auto;
  display: block;
}

/* --- Telefónna ikona (vpravo, väčšia) --- */
#topbar .phone-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
}

#topbar .phone-icon img {
  width: 28px; /* bolo 22px */
  height: 28px;
  opacity: 0.9;
  transition: opacity 0.25s ease;
}
#topbar .phone-icon:hover img {
  opacity: 1;
}



/* ===========================================================
   RESPONSIVE LOGIC
   =========================================================== */

/* Mobil + tablet = topbar viditeľný */
@media screen and (max-width: 920px) {
  #topbar {
    display: flex;
  }
}

/* Desktop = topbar a mobile menu skryté */
@media screen and (min-width: 921px) {
  #topbar,
  #mobile-menu {
    display: none !important;
  }
}


/* ===========================================================
   MOBILE MENU – fixed k viewportu (viditeľné aj po scrolli)
   =========================================================== */
/* === MOBILE MENU (fixné pod topbarom, vlastný scroll) === */
#mobile-menu{
  position: fixed;           /* ⬅️ namiesto absolute */
  top: 70px;                 /* výška modrého topbaru */
  left: 0; right: 0; bottom: 0;
  background: #152141;
  color: #fff;
  overflow-y: auto;          /* scrolluje sa menu, nie stránka */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain; /* zabráni scroll-chainingu na iOS */
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity .25s ease, transform .25s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,.35);
  z-index: 10000;             /* nad všetkým */
}

/* vnútro nech ide pekne pod seba */
#mobile-menu ul{ list-style:none; }
#mobile-menu li{ border-bottom:1px solid rgba(255,255,255,.1); }

#mobile-menu.open{
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* keď je menu otvorené, zamkni pozadie */
html.menu-open, body.menu-open{
  height: 100%;
  overflow: hidden;          /* ⬅️ zákaz scrollu stránky */
}


/* Položky */
#mobile-menu ul { list-style: none; }
#mobile-menu li {
  border-bottom: 1px solid rgba(255,255,255,0.1); /* divider */
}

#mobile-menu a,
#mobile-menu button.opener {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.5rem;
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  background: none;
  border: none;
  text-align: left;
  width: 100%;
  cursor: pointer;
  transition: background .25s ease;
}

#mobile-menu a:hover,
#mobile-menu button.opener:hover {
  background: rgba(255,255,255,0.08);
}

/* Submenu */
#mobile-menu li.has-sub .submenu {
  display: none;
  background: rgba(255,255,255,0.05);
}

#mobile-menu li.has-sub.open .submenu {
  display: block;
}

#mobile-menu .submenu a {
  padding-left: 2.5rem;
  font-size: 15px;
  opacity: 0.85;
}


/* === Aktívna položka v MOBILE MENU === */
#mobile-menu li.active > a,
#mobile-menu li.active > button.opener {
  background: rgba(37, 82, 227, 0.18); /* jemné modré pozadie */
  color: #fff;                      /* svetlomodrý text */
}

#mobile-menu li.active > a:hover,
#mobile-menu li.active > button.opener:hover {
  background: rgba(59, 95, 255, 0.28);
  color: #fff;
}

/* Ak má submenu a je otvorené + aktívne */
#mobile-menu li.has-sub.active > button.opener {
  background: rgba(59, 95, 255, 0.25);
  color: #fff;
}

/* Šípka */
#mobile-menu .chevron svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  stroke: currentColor;
  transition: transform .25s ease;
}

#mobile-menu li.has-sub.open .chevron svg {
  transform: rotate(180deg);
}



/* ===========================================================
   HAMBURGER ICON – perfektne zarovnaný v každom prehliadači
   =========================================================== */
.nav-toggle {
  position: relative;
  width: 24px;
  height: 18px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0;
  z-index: 10000;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
  position: absolute;
  width: 100%;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: all 0.35s ease;
  transform-origin: center;
}

/* --- tri prúžky --- */
.nav-toggle span:nth-child(1) {
  top: 0;
}
.nav-toggle span:nth-child(2) {
  top: 8px;
}
.nav-toggle span:nth-child(3) {
  top: 16px;
}

/* --- otvorené menu → X --- */
.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg);
  top: 8px;
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg);
  top: 8px;
}

/* --- jemný hover efekt --- */
.nav-toggle:hover span {
  background: #dbe4ff;
}


/* ===========================================================
   CONTENT AREA
   =========================================================== */

#content {
  flex-grow: 1;
  padding: .5rem;
  transition: margin-left .35s ease;
}

#content .inner {
  max-width: 1180px;
  margin: 0 auto;
}

/* Desktop – odsadenie pod top-belt */
@media (min-width: 993px) {
  #content {
    padding-top: 78px; /* výška top-beltu */
  }
}




/* ===========================================================
   RESPONSIVE RULES – jednotný breakpoint 1024px
   =========================================================== */

/* Mobil + tablet (do 1024px vrátane) */
@media (max-width: 1024px) {
  /* Skry desktopové prvky */
  #sidebar,
  #top-belt {
    display: none !important;
  }

  /* Zobraz mobilné prvky */
  #topbar {
    display: flex !important;
  }

  #mobile-menu {
    display: block !important;
  }

  #content {
    margin-left: 0;
    padding-top: 70px; /* výška modrého topbaru */
  }
}

/* ⚪ Desktop (od 1025px vyššie) */
@media (min-width: 1025px) {
  /* Skry modrý topbar a mobil menu */
  #topbar,
  #mobile-menu {
    display: none !important;
  }

  /* Zobraz biely top-belt */
  #top-belt {
    display: flex !important;
  }

  #content {
    padding-top: 78px; /* výška bieleho top-beltu */
  }
}






/* ===========================================================
   UTILITY CLASSES
   =========================================================== */
.small-visible-only { display: none !important; }
@media (max-width: 1024px) {
  .small-visible-only {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }
}




/* ===========================================================
   TABLET & SMALL LAPTOP – globálne zúženie sidebaru + úprava písma
   (rovnaký vzhľad ako na Poptávce)
   =========================================================== */
/* TABLET & SMALL LAPTOP – zúžený sidebar + typografia */
@media (max-width:1366px) and (min-width:901px){
  :root { --sb-w: 240px; }              /* zúžený sidebar v tomto rozsahu */
  #sidebar { width: 240px !important; } /* (alebo môžeš všade používať var(--sb-w)) */

  #sidebar .menu a,
  #sidebar .menu button.opener,
  #sidebar .submenu a {
    font-size: 0.95rem !important;
    line-height: 1.55 !important;
  }

  #sidebar .menu a,
  #sidebar .menu button.opener {
    padding: 1rem 1.25rem !important;
  }

  #sidebar .langs a.lang-switch {
    font-size: 0.9rem !important;
    padding: 7px 14px !important;
  }

  .menu-logo img { height: 34px !important; }
}u





