/* AUTO BV – jednotná hlavička (rovnaké menu na landingu aj na všetkých podstránkach).
   Samostatné, bez závislosti na modern.css – funguje aj na šablónovom landingu. */

.topbar { background: #16222a; color: rgba(255,255,255,.7); font-size: 13px; }
.topbar .container { position: relative; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 42px; }
.topbar a { color: rgba(255,255,255,.7); text-decoration: none; }
.topbar a:hover { color: #fff; }
.topbar-left { display: flex; align-items: center; gap: 26px; }
.tb-item { display: inline-flex; align-items: center; gap: 7px; }
.tb-item .ei { color: #e30000; font-size: 15px; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-right > a { font-size: 14px; }
.tb-cta { background: #e30000; color: #fff !important; padding: 5px 14px; border-radius: 6px; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.tb-cta:hover { background: #c20000; }

.site-header { background: #fff; position: sticky; top: 0; z-index: 1000; border-bottom: 1px solid #e7ecef; transition: box-shadow .3s, padding .3s; }
.site-header.is-stuck { box-shadow: 0 10px 30px -16px rgba(16,24,29,.22); }
.site-header .header-inner { display: flex; align-items: center; justify-content: space-between; height: 84px; }
.site-header .brand { display: inline-flex; align-items: center; }
.site-header .brand-logo { height: 46px; width: auto; }

.main-nav > ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
/* dropdown položky vždy pod sebou (nie flex z hlavného menu) */
.has-drop .drop { display: block !important; }
.has-drop .drop li { display: block; width: 100%; }
.main-nav a { color: #1c2931; font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: .6px; padding: 12px 16px; border-radius: 8px; transition: color .2s, background .2s; text-decoration: none; display: block; }
.main-nav a:hover { color: #e30000; }
.main-nav a.active { color: #e30000; }
.main-nav a.active::after { content: ''; display: block; height: 2px; background: #e30000; margin-top: 6px; border-radius: 2px; }
.main-nav .nav-phone { display: none; }

.has-drop { position: relative; }
.has-drop > a i { font-size: 12px; margin-left: 4px; }
.has-drop .drop { position: absolute; top: 100%; left: 0; min-width: 250px; background: #fff; border-radius: 12px;
  box-shadow: 0 18px 40px -18px rgba(28,41,49,.28); padding: 8px; list-style: none; margin: 8px 0 0; opacity: 0; visibility: hidden;
  transform: translateY(8px); transition: .22s cubic-bezier(.22,.61,.36,1); z-index: 1100; }
.has-drop:hover .drop { opacity: 1; visibility: visible; transform: translateY(0); }
.has-drop .drop li { display: block; }
.has-drop .drop a { display: block; padding: 11px 14px; color: #1c2931; font-size: 13.5px; text-transform: none;
  letter-spacing: 0; border-radius: 8px; font-weight: 600; }
.has-drop .drop a::after { display: none; }
.has-drop .drop a:hover { background: #f5f7f9; color: #e30000; }

/* Čisté CSS menu (checkbox-hack) – bez JS, funguje na každom zariadení */
.nav-check { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 10px; position: relative; z-index: 1060; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: #1c2931; border-radius: 2px; transition: .3s; }
.nav-check:checked ~ .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-check:checked ~ .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-check:checked ~ .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-backdrop { display: none; }

@media (max-width: 991px) {
  html, body { overflow-x: hidden; }   /* odsunuté menu nesmie tvoriť horizontálny pretok */
  .topbar-left .tb-hide-sm { display: none; }
  .site-header .header-inner { height: 72px; }
  .site-header .brand-logo { height: 40px; }
  .nav-toggle { display: flex; }
  .main-nav { position: fixed; inset: 0 0 0 auto; width: min(320px, 84vw); background: #1c2931; padding: 90px 28px 28px; transform: translateX(100%); transition: transform .35s cubic-bezier(.22,.61,.36,1); box-shadow: -20px 0 50px -20px rgba(0,0,0,.6); overflow-y: auto; z-index: 1050; }
  .nav-check:checked ~ .main-nav { transform: translateX(0); }
  /* backdrop VNÚTRI hlavičky, POD nav (preto odkazy chytajú ťuknutie) */
  .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); opacity: 0; visibility: hidden; transition: .3s; z-index: 1040; }
  .nav-check:checked ~ .nav-backdrop { opacity: 1; visibility: visible; }
  html:has(.nav-check:checked), html:has(.nav-check:checked) body { overflow: hidden; }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .main-nav a { padding: 14px 16px; font-size: 16px; border-radius: 8px; color: rgba(255,255,255,.9); }
  .main-nav a:hover, .main-nav a.active { color: #fff; }
  .main-nav a.active { background: rgba(255,255,255,.08); }
  .main-nav a.active::after { display: none; }
  .main-nav .nav-phone { display: block; margin-top: 10px; border-top: 1px solid rgba(255,255,255,.1); padding-top: 12px; }
  .main-nav .nav-phone a { color: #c29032; }
  .has-drop .drop { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: rgba(255,255,255,.05); margin: 4px 0; min-width: 0; }
  .has-drop .drop a { color: rgba(255,255,255,.8); }
  body.nav-open { overflow: hidden; }
}
@media (max-width: 600px) {
  .topbar-inner { height: auto; padding: 8px 0; }
  .topbar-left { gap: 16px; }
  .tb-item:first-child { display: none; }
  .topbar-right .tb-cta { display: none; }
}

/* Tmavý režim */
html[data-theme="dark"] .site-header { background: #0f171c; border-bottom-color: #26333b; }
html[data-theme="dark"] .main-nav a { color: #e7eef1; }
html[data-theme="dark"] .main-nav a:hover,
html[data-theme="dark"] .main-nav a.active { color: #ff4d4d; }
html[data-theme="dark"] .nav-toggle span { background: #e7eef1; }
html[data-theme="dark"] .has-drop .drop { background: #16222a; }
html[data-theme="dark"] .has-drop .drop a { color: #e7eef1; }
