/* =====================================================================
   PROJEKTOVNÍK – KOMPONENTY (Header, Footer, Cookies, ScrollTop, Mobile menu)
   ===================================================================== */

/* ---------- HEADER ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 249, 244, .85);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t), background var(--t), box-shadow var(--t);
}
.site-header.is-scrolled {
  background: rgba(251, 249, 244, .95);
  border-bottom-color: var(--c-line);
  box-shadow: 0 1px 0 rgba(44,60,75,.02);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h); gap: var(--s-5);
}
.site-header__brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--c-ink); font-family: var(--font-display); font-weight: 700;
  font-size: var(--fs-400); letter-spacing: -0.01em;
}
.site-header__brand img { height: 65px; width: auto; transition: transform var(--t-fast); }
.site-header__brand:hover img { transform: scale(1.04); }
.site-header__brand:hover { color: var(--c-primary); }
@media (max-width: 540px) {
  .site-header__brand img { height: 50px; }
}

.site-nav {
  display: flex; align-items: center; gap: var(--s-2);
}
.site-nav a {
  color: var(--c-ink-soft); font-weight: 500; font-size: var(--fs-300);
  padding: 10px 14px; border-radius: var(--r-2);
  transition: color var(--t-fast), background var(--t-fast);
}
.site-nav a:hover { color: var(--c-primary); background: var(--c-primary-50); }
.site-nav a.is-active { color: var(--c-primary); }
.site-nav a.is-active::after {
  content: ''; display: block; width: 18px; height: 2px;
  background: var(--c-primary); border-radius: 2px;
  margin: 4px auto -2px;
}
.site-header__cta { display: flex; align-items: center; gap: var(--s-3); }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  width: 44px; height: 44px; border-radius: var(--r-2);
  border: 1px solid var(--c-line); background: var(--c-surface);
  align-items: center; justify-content: center;
}
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  content: ''; display: block; width: 20px; height: 2px;
  background: var(--c-ink); border-radius: 2px;
  transition: transform var(--t), top var(--t), opacity var(--t-fast);
  position: relative;
}
.menu-toggle span::before { position: absolute; top: -6px; }
.menu-toggle span::after  { position: absolute; top: 6px; }
body.menu-open .menu-toggle span { background: transparent; }
body.menu-open .menu-toggle span::before { top: 0; transform: rotate(45deg); }
body.menu-open .menu-toggle span::after  { top: 0; transform: rotate(-45deg); }

@media (max-width: 960px) {
  .site-nav, .site-header__cta .btn-ghost { display: none; }
  .menu-toggle { display: inline-flex; }
}

/* ---------- MOBILE BOTTOM NAV (mobile only) ---------- */
.mobile-tabbar {
  display: none;
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 90;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  border: 1px solid var(--c-line); border-radius: var(--r-pill);
  padding: 6px;
  box-shadow: var(--sh-3);
}
.mobile-tabbar__inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.mobile-tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; padding: 8px 4px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 600; color: var(--c-ink-soft);
  transition: color var(--t-fast), background var(--t-fast);
}
.mobile-tabbar a svg { width: 22px; height: 22px; stroke-width: 1.6; }
.mobile-tabbar a.is-active, .mobile-tabbar a:hover {
  color: var(--c-primary); background: var(--c-primary-50);
}
@media (max-width: 768px) {
  .mobile-tabbar { display: block; }
  body { padding-bottom: 80px; }
}

/* ---------- MOBILE FULL MENU OVERLAY ---------- */
.mobile-menu {
  position: fixed; inset: 0; z-index: 95;
  background: var(--c-bg);
  padding: calc(var(--header-h) + var(--s-5)) var(--s-5) var(--s-7);
  transform: translateX(100%); transition: transform var(--t-slow);
  overflow-y: auto; display: flex; flex-direction: column; gap: var(--s-3);
}
body.menu-open .mobile-menu { transform: translateX(0); }
.mobile-menu a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; font-size: var(--fs-500); font-weight: 600;
  color: var(--c-ink); background: var(--c-surface);
  border: 1px solid var(--c-line); border-radius: var(--r-3);
}
.mobile-menu a:hover, .mobile-menu a.is-active { color: var(--c-primary); border-color: var(--c-primary); }
.mobile-menu a::after { content: '→'; opacity: .4; }
.mobile-menu .mobile-menu__cta { margin-top: auto; }

/* ---------- FOOTER ---------- */
.site-footer {
  margin-top: var(--s-9);
  background: var(--c-ink);
  color: #cdd5dd;
  padding: var(--s-8) 0 var(--s-5);
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--c-secondary); }
.site-footer__grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--s-7);
  align-items: stretch;
  margin-bottom: var(--s-7);
}
.site-footer__brand { display: flex; align-items: stretch; }
.site-footer__logo {
  display: flex; align-items: center; justify-content: center;
  padding: var(--s-4) var(--s-5); border-radius: var(--r-3);
  background: #fff;
  box-shadow: 0 4px 18px rgba(0,0,0,.18);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
  cursor: pointer;
  align-self: stretch;
  width: 100%;
}
.site-footer__logo:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 8px 28px rgba(0,0,0,.28); }
.site-footer__logo img { height: 100%; max-height: 180px; min-height: 110px; width: auto; display: block; object-fit: contain; }

.site-footer__nav { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.site-footer h4 { color: #fff; font-size: var(--fs-300); font-family: var(--font-sans); margin-bottom: var(--s-3); letter-spacing: .04em; text-transform: uppercase; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; font-size: var(--fs-300); }
.site-footer__nav ul { align-items: center; font-size: var(--fs-400); }

.site-footer__contact { display: flex; flex-direction: column; align-items: stretch; justify-content: center; }
.site-footer__contact h4 { text-align: center; align-self: center; }
.site-footer__contact ul { align-items: stretch; font-size: var(--fs-300); }
.site-footer__contact ul li { display: flex; align-items: center; gap: 12px; }
.site-footer__contact .ico {
  flex-shrink: 0;
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(255,255,255,.08);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.site-footer__contact .ico svg { width: 20px; height: 20px; }
.site-footer__contact ul li:hover .ico { background: var(--c-primary); transform: scale(1.06); }
.site-footer__contact .ico.ig { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); color: #fff; }
.site-footer__contact ul li:hover .ico.ig { transform: scale(1.06); }

.site-footer__about p { color: #98a4b1; font-size: var(--fs-200); line-height: 1.7; max-width: 38ch; }

.site-footer__bottom {
  display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: space-between; align-items: center;
  padding-top: var(--s-5);
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: var(--fs-200); color: #98a4b1;
}
.site-footer__bottom a { color: #98a4b1; }
.site-footer__bottom a:hover { color: var(--c-secondary); }
.site-footer__legal { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.site-footer__legal .dot-sep { color: #4a5867; }
.site-footer__legal .btn-link {
  background: none; border: 0; color: #98a4b1; cursor: pointer;
  font: inherit; padding: 0; text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: rgba(255,255,255,.2);
  transition: color var(--t-fast), text-decoration-color var(--t-fast);
}
.site-footer__legal .btn-link:hover { color: var(--c-secondary); text-decoration-color: var(--c-secondary); }

@media (max-width: 960px) {
  .site-footer__grid { grid-template-columns: 1fr; gap: var(--s-5); }
  .site-footer__brand { justify-content: center; }
  .site-footer__logo { width: auto; }
  .site-footer__logo img { max-height: 100px; min-height: 70px; }
  .site-footer__nav, .site-footer__contact { text-align: center; align-items: center; }
  .site-footer__contact h4 { align-self: center; }
  .site-footer__contact ul li { justify-content: center; }
}
@media (max-width: 540px) {
  .site-footer__bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .site-footer__legal { justify-content: center; }
}

/* ---------- COOKIES BANNER ---------- */
.cookie-banner {
  position: fixed; right: 20px; bottom: 20px; z-index: 1000;
  width: min(380px, calc(100vw - 32px));
  background: var(--c-surface); color: var(--c-ink);
  border: 1px solid var(--c-line); border-radius: var(--r-3);
  padding: var(--s-5); box-shadow: var(--sh-3);
  transform: translateY(140%); opacity: 0; transition: transform .5s cubic-bezier(.34,1.56,.64,1), opacity .3s;
}
.cookie-banner.is-visible { transform: translateY(0); opacity: 1; }
.cookie-banner__title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-500);
  margin-bottom: 6px;
}
.cookie-banner__title .emoji { font-size: 28px; }
.cookie-banner p { font-size: var(--fs-200); color: var(--c-ink-soft); margin-bottom: var(--s-3); }
.cookie-banner__links { display: flex; gap: var(--s-3); font-size: var(--fs-100); margin-bottom: var(--s-4); }
.cookie-banner__actions { display: flex; gap: var(--s-2); }
.cookie-banner__actions .btn { flex: 1; padding: 12px; font-size: var(--fs-200); }
@media (max-width: 480px) {
  .cookie-banner { right: 12px; left: 12px; bottom: 12px; width: auto; }
}

/* Cookies floating bubble (after consent) */
.cookie-bubble {
  position: fixed; left: 16px; bottom: 16px; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--c-surface); border: 1px solid var(--c-line);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sh-2); cursor: pointer;
  transition: transform var(--t), box-shadow var(--t);
}
.cookie-bubble:hover { transform: scale(1.06); box-shadow: var(--sh-3); }
.cookie-bubble span { font-size: 22px; }
@media (max-width: 768px) {
  /* Zůstává vlevo (vpravo dole je scroll-to-top + případně mobilní tabbar) */
  /* bottom musí být nad mobilním tabbarem (~70px) + menší odsazení */
  .cookie-bubble { left: 16px; right: auto; bottom: 96px; }
}

/* Cookies modal (preferences) */
.cookie-modal-backdrop {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(44, 60, 75, .55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0; pointer-events: none; transition: opacity var(--t);
}
.cookie-modal-backdrop.is-visible { opacity: 1; pointer-events: auto; }
.cookie-modal {
  background: var(--c-surface); border-radius: var(--r-4);
  max-width: 540px; width: 100%; padding: var(--s-7);
  box-shadow: var(--sh-3);
  transform: scale(.96); transition: transform var(--t);
  max-height: calc(100vh - 32px); overflow-y: auto;
}
.cookie-modal-backdrop.is-visible .cookie-modal { transform: scale(1); }
.cookie-modal h3 { margin-bottom: var(--s-3); }
.cookie-pref {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--s-4); padding: var(--s-4) 0;
  border-bottom: 1px solid var(--c-line);
}
.cookie-pref:last-of-type { border-bottom: 0; }
.cookie-pref strong { display: block; margin-bottom: 4px; }
.cookie-pref small { color: var(--c-muted); font-size: var(--fs-200); }
.cookie-modal__actions {
  display: flex; gap: var(--s-3); margin-top: var(--s-6); flex-wrap: wrap;
}
.cookie-modal__actions .btn {
  flex: 1 1 140px; min-width: 0; padding: 12px;
}
@media (max-width: 420px) {
  .cookie-modal { padding: var(--s-5); }
  .cookie-modal__actions .btn { flex: 1 1 100%; }
}

/* Switch */
.switch { position: relative; display: inline-block; width: 48px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-track {
  position: absolute; inset: 0; background: #d6d2c7; border-radius: 999px;
  transition: background var(--t-fast);
}
.switch-track::after {
  content: ''; position: absolute; left: 3px; top: 3px;
  width: 20px; height: 20px; background: #fff; border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
  transition: transform var(--t);
}
.switch input:checked + .switch-track { background: var(--c-primary); }
.switch input:checked + .switch-track::after { transform: translateX(22px); }
.switch input:disabled + .switch-track { opacity: .55; cursor: not-allowed; }

/* ---------- SCROLL-TO-TOP ---------- */
.scroll-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 80;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--c-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sh-glow-primary);
  opacity: 0; transform: translateY(20px) scale(.9); pointer-events: none;
  transition: opacity var(--t), transform var(--t);
}
.scroll-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.scroll-top:hover { background: var(--c-primary-600); }
.scroll-top svg { width: 20px; height: 20px; }
@media (max-width: 768px) {
  .scroll-top { bottom: 96px; right: 16px; }
}
