/* S-TYPO Nenačovice — Varianta 5 | Precision Outdoor */

html { scroll-behavior: smooth; }
html.nav-open { overflow: hidden; }

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[x-cloak] { display: none !important; }

iframe { border: 0; }

/* Položky gridu mají min-width:auto, takže sloupec s mapou nejde zúžit pod
   jeho vlastní minimum a pod 340 px šířky okna přeteče stránka doprava.
   Utilita min-w-0 v sestaveném tailwind.css není, proto ručně. */
#kontakt .grid > * { min-width: 0; }

/* --- MOBILE NAV OVERLAY --- */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #0d2030;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  transform: translateX(100%);
  /* visibility až po dojezdu — jinak by menu zmizelo dřív, než se odsune.
     Bez ní zůstávají odkazy zavřeného menu v pořadí tabulátoru. */
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              visibility 0s linear 0.35s;
  pointer-events: none;
}
html.nav-open .nav-overlay {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              visibility 0s;
  pointer-events: auto;
}

/* --- BUTTONS --- */

/* `display` zvlášť a v :where() (nulová specificita), aby ho vždy přebily
   utility Tailwindu — `hidden` i `md:inline-flex`. tailwind.css se načítá dřív
   než tenhle soubor, takže při stejné specificitě rozhoduje pořadí a `hidden`
   na tlačítku v hlavičce by neúčinkovalo. */
:where(.btn-amber, .btn-navy, .btn-ghost, .btn-outline-white) {
  display: inline-flex;
}

.btn-amber,
.btn-navy,
.btn-ghost,
.btn-outline-white {
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.375rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 3px;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color .2s, color .2s, border-color .2s, opacity .2s;
}

.btn-amber {
  background: #e9a000;
  color: #0d2030;
}
.btn-amber:hover { background: #c07c00; }

.btn-navy {
  background: #0d2030;
  color: #fff;
}
.btn-navy:hover { background: #122d3f; }

.btn-ghost {
  background: transparent;
  color: #1e2d3d;
  border: 1.5px solid #e2e8f0;
}
.btn-ghost:hover {
  background: #f1f5f8;
  border-color: #e9a000;
  color: #0d2030;
}

.btn-outline-white {
  background: transparent;
  color: rgba(255,255,255,0.85);
  border: 1.5px solid rgba(255,255,255,0.35);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.7);
  color: #fff;
}

/* --- GALLERY CARD --- */
.gallery-card {
  display: block;
  width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
}
.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
  display: block;
}
.gallery-card:hover img { transform: scale(1.07); }

/* --- CATEGORY CARD --- */
.category-card {
  position: relative;
  overflow: hidden;
  transition: border-color .25s, box-shadow .25s;
}
.category-card:hover {
  border-color: #e9a000 !important;
  box-shadow: 0 8px 32px -10px rgba(13,32,48,0.15);
}
.cat-num {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  font-size: 5.5rem;
  font-weight: 700;
  line-height: 1;
  color: #e2e8f0;
  user-select: none;
  transition: color .25s;
  font-family: 'Space Grotesk', ui-sans-serif, sans-serif;
}
.category-card:hover .cat-num { color: #fef3c0; }

/* --- HERO FADE IN --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-content > * {
  animation: fadeUp 0.75s ease-out both;
}
.hero-content > *:nth-child(1) { animation-delay: 0.05s; }
.hero-content > *:nth-child(2) { animation-delay: 0.18s; }
.hero-content > *:nth-child(3) { animation-delay: 0.3s; }
.hero-content > *:nth-child(4) { animation-delay: 0.42s; }

/* --- HEADER NAV UNDERLINE HOVER --- */
header nav a {
  position: relative;
  padding-bottom: 3px;
}
header nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1.5px;
  background: #e9a000;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .28s ease;
}
header nav a:hover::after { transform: scaleX(1); }

/* --- FOCUS --- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #e9a000;
  outline-offset: 3px;
  border-radius: 3px;
}

/* --- SCROLLBAR --- */
@media (min-width: 1024px) {
  ::-webkit-scrollbar { width: 8px; }
  ::-webkit-scrollbar-track { background: #f1f5f8; }
  ::-webkit-scrollbar-thumb { background: #7fb0c9; border-radius: 0; }
  ::-webkit-scrollbar-thumb:hover { background: #0d2030; }
}

/* --- PRINT --- */
@media print {
  header, footer, .nav-overlay { display: none !important; }
  body { background: white; color: black; }
}
