/* ==========================================================================
   BB HODONÍN s.r.o. - BASE CSS STYLES
   ========================================================================== */

:root {
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --border-radius-sm: 6px;
  --border-radius-md: 12px;
  --border-radius-lg: 20px;
  --container-max: 1240px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

button, input, select, textarea {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ==========================================================================
   DESIGN SWITCHER BAR (Floating top toolbar for reviewing all 3 designs)
   ========================================================================== */
.theme-switcher-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  padding: 0.6rem 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.theme-switcher-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 500;
}

.theme-badge-current {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  color: #38bdf8;
  font-family: var(--font-mono);
}

.theme-switcher-tabs {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.25rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  gap: 0.25rem;
}

.theme-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.theme-tab-btn:hover {
  color: #ffffff;
}

.theme-tab-btn.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.5);
}

.theme-tab-btn[data-target="cyber"].active {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  box-shadow: 0 0 15px rgba(14, 165, 233, 0.6);
}

.theme-tab-btn[data-target="corporate"].active {
  background: linear-gradient(135deg, #0f2b5c, #1e40af);
  box-shadow: 0 4px 12px rgba(15, 43, 92, 0.5);
}

.theme-tab-btn[data-target="bento"].active {
  background: linear-gradient(135deg, #18181b, #27272a);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fafafa;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Production: Clean full-height layout without switcher bar */
body {
  padding-top: 0;
}

/* ==========================================================================
   MOBILE RESPONSIVE ENHANCEMENTS
   ========================================================================== */

/* Hamburger Toggle Button */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(125, 125, 125, 0.12);
  border: 1px solid rgba(125, 125, 125, 0.2);
  cursor: pointer;
  padding: 8px;
  z-index: 1002;
}

.mobile-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: all 0.25s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Sticky Mobile Bottom Bar */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9990;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom, 0px)) 1rem;
  box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.35);
  gap: 0.75rem;
}

.mobile-action-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  text-align: center;
}

.mobile-action-call {
  background: #16a34a;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(22, 163, 74, 0.35);
}

.mobile-action-inquiry {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35);
}

@media (max-width: 992px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 1.5rem;
    gap: 0.8rem;
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
  }

  [data-theme="corporate"] .nav-links {
    background: #ffffff;
    border-bottom: 2px solid var(--corp-navy);
  }

  [data-theme="bento"] .nav-links {
    background: #ffffff;
    border-radius: 0 0 20px 20px;
    border: 1px solid var(--border-color);
  }

  .nav-links.active {
    display: flex !important;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-links li {
    width: 100%;
  }

  .nav-link {
    display: block;
    padding: 0.75rem 1rem !important;
    border-radius: 8px;
    font-size: 1.05rem !important;
  }

  [data-theme="cyber"] .nav-link:hover {
    background: rgba(0, 240, 255, 0.08);
  }

  [data-theme="corporate"] .nav-link:hover {
    background: #f1f5f9;
  }

  [data-theme="bento"] .nav-link:hover {
    background: #f4f4f5;
  }
}

@media (max-width: 768px) {
  .theme-switcher-bar {
    padding: 0.5rem;
    justify-content: center;
  }
  .theme-switcher-info {
    display: none;
  }
  .theme-tab-btn {
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
  }
  body {
    padding-top: 0;
    padding-bottom: 74px; /* Space for sticky mobile action bar */
  }
  .mobile-bottom-bar {
    display: flex;
  }
  .desktop-only-cta {
    display: none !important;
  }
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  .form-row {
    grid-template-columns: 1fr !important;
  }
  .about-badges-grid {
    grid-template-columns: 1fr !important;
  }
  .services-grid {
    grid-template-columns: 1fr !important;
  }
  .contact-wrapper {
    grid-template-columns: 1fr !important;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 480px) {
  .telemetry-grid {
    grid-template-columns: 1fr !important;
  }
  .stats-grid {
    grid-template-columns: 1fr !important;
  }
  .floating-security-badge {
    position: static !important;
    margin-top: 1rem;
    transform: none !important;
  }
  .hero-title {
    font-size: 2rem !important;
  }
}

/* Accessible focus outline */
:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}



/* ==========================================================
   Úpravy pro telefony — doplněno 7. 9. 2026
   Horní lišta se na úzkém displeji lámala do čtyř řádků
   a telefonní čísla se trhala uprostřed.
   ========================================================== */
@media (max-width: 768px) {

  /* Adresa a slogan zaberou na mobilu dva řádky a nic neřeší —
     adresa je v patičce i v kontaktech. Zůstanou jen telefony,
     tedy to, na co jde kliknout. */
  .top-bar .container > div:first-child {
    display: none !important;
  }

  .top-bar .container {
    justify-content: center !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
  }

  .top-bar .container > div:last-child {
    gap: 1.1rem !important;
    justify-content: center;
    width: 100%;
  }

  .top-bar {
    font-size: 0.8rem;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
  }

  /* Telefonní číslo se nikdy nesmí zalomit uprostřed. */
  .top-bar a[href^="tel:"],
  .mobile-action-btn,
  a[href^="tel:"] {
    white-space: nowrap;
  }

  /* E-mail se na 375 px k telefonům nevejde; je hned v poptávce
     i v patičce, takže tady jen překáží. */
  .top-bar a[href^="mailto:"] {
    display: none !important;
  }

  /* "Napsat poptávku" se lámalo na dva řádky a lišta rostla. */
  .mobile-action-btn {
    font-size: 0.85rem;
    padding: 0.7rem 0.5rem;
    gap: 0.35rem;
  }
}

@media (max-width: 380px) {
  /* Na nejužších displejích už se dvě čísla vedle sebe nevejdou. */
  .top-bar .container > div:last-child {
    gap: 0.7rem !important;
  }
  .top-bar {
    font-size: 0.74rem;
  }
  .mobile-action-btn {
    font-size: 0.8rem;
  }
}

@media (max-width: 768px) {
  /* Odkazy s telefonem a e-mailem mely v kontaktech a v paticce vysku
     17-19 px. Prstem se to trefuje spatne a zrovna telefon je u tehle
     firmy to hlavni, na co ma navstevnik kliknout. 44 px je bezna
     doporucena mez. Horni listy a spodniho pruhu se to netyka - tam jsou
     zamerne kompaktni a spodni tlacitka uz 43 px maji. */
  .section-contact a[href^="tel:"],
  .section-contact a[href^="mailto:"],
  .site-footer a[href^="tel:"],
  .site-footer a[href^="mailto:"] {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.25rem 0;
  }
}

/* Položky menu se nesmí lámat do dvou řádků. Po přidání čtvrté služby
   se na ně nedostávalo místo, názvy se zalomily a menu vypadalo rozsypaně;
   "Kontakt" se navíc opticky dotýkal tlačítka Poptat servis. */
.nav-links a,
.nav-link {
  white-space: nowrap;
}

@media (min-width: 993px) {
  .nav-links {
    gap: 1.5rem;
  }
}
