/* ============================================================
   TK Mníšek pod Brdy — hlavní styl (ručně psané, bez build kroku)
   ============================================================ */

/* ---------- Palette ---------- */
:root {
  --tennis-green: hsl(150 48% 25%);
  --tennis-green-light: hsl(150 40% 35%);
  --tennis-clay: hsl(18 68% 48%);
  --tennis-clay-light: hsl(20 70% 58%);
  --tennis-sand: hsl(42 30% 94%);
  --tennis-dark: hsl(150 20% 10%);

  --background: hsl(40 20% 98%);
  --foreground: hsl(150 20% 10%);
  --card: hsl(0 0% 100%);
  --muted: hsl(150 10% 94%);
  --muted-foreground: hsl(150 10% 45%);
  --border: hsl(150 10% 88%);

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;

  --maxw: 72rem;      /* ~1152px */
  --maxw-narrow: 56rem;
  --radius: 0.75rem;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; font-weight: 700; }

/* ---------- Utility ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.container-narrow { max-width: var(--maxw-narrow); }
.section { padding: 6rem 0; }
.section-eyebrow {
  color: var(--tennis-clay);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-top: 0.75rem;
}
.section-head { text-align: center; margin-bottom: 4rem; }
.section-head .section-lead {
  color: var(--muted-foreground);
  font-size: 1.125rem;
  margin-top: 1rem;
  max-width: 34rem;
  margin-left: auto;
  margin-right: auto;
}
.text-clay { color: var(--tennis-clay); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: 999px;
  font-weight: 600;
  transition: all 0.25s ease;
  text-align: center;
}
.btn-clay { background: var(--tennis-clay); color: #fff; }
.btn-clay:hover { background: var(--tennis-clay-light); }
.btn-green { background: var(--tennis-green); color: #fff; }
.btn-green:hover { background: var(--tennis-green-light); }
.btn-ghost {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover { background: rgba(255,255,255,0.2); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-md { padding: 0.85rem 2rem; font-size: 1.0625rem; }
.btn-lg { padding: 1.15rem 2.5rem; font-size: 1.125rem; }
.btn-lg:hover { transform: translateY(-2px); box-shadow: 0 15px 30px -10px rgba(0,0,0,0.25); }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background-color 0.3s, box-shadow 0.3s;
  background: transparent;
}
.navbar.scrolled {
  background: hsl(150 20% 10% / 0.95);
  box-shadow: 0 10px 30px -12px rgba(0,0,0,0.4);
  backdrop-filter: blur(6px);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}
.navbar-logo img {
  height: 2.5rem;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1); /* bílé logo na tmavém pozadí */
}
.nav-links { display: none; align-items: center; gap: 0.25rem; }
.nav-links a[data-nav] {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 0.375rem;
  color: rgba(255,255,255,0.8);
  transition: color 0.2s;
}
.nav-links a[data-nav]:hover { color: #fff; }
.nav-links a[data-nav].active { color: var(--tennis-clay); font-weight: 500; }
.nav-cta { margin-left: 0.75rem; }

/* Burger */
.burger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 1.75rem;
  background: none;
  border: none;
  padding: 0.5rem 0;
  color: #fff;
}
.burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  transition: all 0.3s ease;
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none;
  background: hsl(150 20% 10% / 0.97);
  backdrop-filter: blur(6px);
  border-top: 1px solid rgba(255,255,255,0.1);
}
.mobile-menu.open { display: block; }
.mobile-menu nav { display: flex; flex-direction: column; padding: 1rem 0; }
.mobile-menu a[data-mobile-link] {
  padding: 0.75rem 0;
  color: rgba(255,255,255,0.8);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mobile-menu a[data-mobile-link]:last-of-type { border-bottom: none; }
.mobile-menu .btn { margin-top: 0.75rem; }

@media (min-width: 768px) {
  .navbar-inner { height: 5rem; }
  .navbar-logo img { height: 3rem; }
  .nav-links { display: flex; }
  .burger { display: none; }
  .mobile-menu { display: none !important; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
}
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom,
    hsl(150 20% 10% / 0.7),
    hsl(150 20% 10% / 0.5),
    hsl(150 20% 10% / 0.8));
}
.hero-content { position: relative; z-index: 10; padding: 0 1rem; max-width: 56rem; }
.hero h1 {
  font-size: clamp(2.75rem, 8vw, 4.5rem);
  color: #fff;
  margin-bottom: 1.5rem;
}
.hero p {
  color: rgba(255,255,255,0.82);
  font-size: clamp(1.0625rem, 2.5vw, 1.25rem);
  max-width: 40rem;
  margin: 0 auto 2.5rem;
}
.hero-buttons { display: flex; flex-direction: column; gap: 1rem; justify-content: center; }
@media (min-width: 640px) { .hero-buttons { flex-direction: row; } }
.hero-scroll {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.hero-scroll .line {
  width: 1px; height: 3rem;
  background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
  animation: pulse 2s infinite;
}
.hero-scroll span {
  color: rgba(255,255,255,0.4);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* ============================================================
   ABOUT
   ============================================================ */
.about { background: var(--background); }
.about-grid { display: grid; gap: 4rem; align-items: center; }
@media (min-width: 1024px) { .about-grid { grid-template-columns: 1fr 1fr; } }
.about-text h2 { font-size: clamp(2rem, 5vw, 3rem); margin: 0.75rem 0 1.5rem; }
.about-text p { color: var(--muted-foreground); font-size: 1.125rem; margin-bottom: 1rem; }
.about-text strong { color: var(--foreground); }
.about-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  color: var(--tennis-clay);
  font-weight: 600;
  transition: gap 0.2s;
}
.about-link:hover { gap: 0.75rem; }
.about-media .about-img {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}
.about-img img { width: 100%; height: 20rem; object-fit: cover; }
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 1rem; }
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--tennis-green);
}
.stat-card .stat-label { color: var(--muted-foreground); font-size: 0.875rem; margin-top: 0.25rem; }

/* ============================================================
   COURTS
   ============================================================ */
.courts { background: hsl(42 30% 94% / 0.5); }
.courts-grid { display: grid; gap: 2rem; }
@media (min-width: 768px) { .courts-grid { grid-template-columns: repeat(3, 1fr); } }
.court-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: box-shadow 0.3s;
}
.court-card:hover { box-shadow: 0 20px 40px -15px rgba(0,0,0,0.2); }
.court-card .court-img { height: 13rem; overflow: hidden; }
.court-card .court-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.court-card:hover .court-img img { transform: scale(1.05); }
.court-body { padding: 1.5rem; }
.court-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.court-head .court-icon { font-size: 1.5rem; }
.court-head h3 { font-size: 1.125rem; font-weight: 600; }
.court-head .court-count { color: var(--tennis-clay); font-weight: 500; font-size: 0.875rem; }
.court-body p { color: var(--muted-foreground); }

/* ============================================================
   GALLERY
   ============================================================ */
.gallery { background: var(--background); }
.gallery-grid { columns: 2; column-gap: 0.75rem; }
@media (min-width: 640px) { .gallery-grid { columns: 3; } }
@media (min-width: 1024px) { .gallery-grid { columns: 4; } }
.gallery-item {
  break-inside: avoid;
  margin-bottom: 0.75rem;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
}
.gallery-item img { width: 100%; display: block; transition: transform 0.5s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item .gallery-overlay {
  position: absolute; inset: 0;
  background: hsl(150 20% 10% / 0);
  display: flex; align-items: center; justify-content: center;
  transition: background-color 0.3s;
}
.gallery-item:hover .gallery-overlay { background: hsl(150 20% 10% / 0.3); }
.gallery-overlay svg { width: 2.5rem; height: 2.5rem; color: #fff; opacity: 0; transition: opacity 0.3s; }
.gallery-item:hover .gallery-overlay svg { opacity: 1; }
.gallery-empty { text-align: center; color: var(--muted-foreground); padding: 5rem 0; }

/* Odkaz nad galerií (např. na externí fotogalerii) */
.gallery-external { color: var(--muted-foreground); font-size: 1rem; margin-top: 0.75rem; }
.gallery-external a { color: var(--tennis-clay); font-weight: 500; word-break: break-all; }
.gallery-external a:hover { text-decoration: underline; }

/* Přehled kategorií (alba) */
.gallery-cats { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 640px) { .gallery-cats { grid-template-columns: 1fr 1fr; } }
.gallery-cat-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  border-radius: 1rem;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 16 / 10;
  background: var(--muted);
  box-shadow: 0 10px 25px -12px rgba(0,0,0,0.25);
  text-align: left;
}
.cat-cover { position: absolute; inset: 0; }
.cat-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.gallery-cat-card:hover .cat-cover img { transform: scale(1.05); }
.gallery-cat-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, hsl(150 20% 8% / 0.85) 0%, hsl(150 20% 8% / 0.15) 45%, transparent 70%);
}
.cat-folder {
  position: absolute; top: 0.85rem; right: 0.85rem; z-index: 2;
  width: 2.25rem; height: 2.25rem;
  display: flex; align-items: center; justify-content: center;
  background: hsl(150 20% 10% / 0.45);
  backdrop-filter: blur(4px);
  border-radius: 0.6rem;
  color: #fff;
}
.cat-folder svg { width: 1.15rem; height: 1.15rem; }
.cat-meta { position: absolute; left: 1.25rem; bottom: 1.1rem; right: 1.25rem; z-index: 2; }
.cat-meta h3 { font-family: var(--font-display); color: #fff; font-size: 1.5rem; font-weight: 700; }
.cat-meta p { color: var(--tennis-clay-light); font-weight: 500; margin-top: 0.15rem; }

/* Zpět na galerie */
.gallery-back { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1.75rem; }
.back-btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: none; border: none; cursor: pointer;
  color: var(--tennis-clay); font-weight: 600; font-size: 0.95rem;
}
.back-btn svg { width: 1rem; height: 1rem; }
.back-btn:hover { color: var(--tennis-clay-light); }
.back-sep { width: 1px; height: 1.25rem; background: var(--border); }
.back-title { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed; inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox-stage { max-width: 64rem; max-height: 85vh; padding: 0 4rem; text-align: center; }
.lightbox-stage img { max-width: 100%; max-height: 80vh; object-fit: contain; border-radius: 0.375rem; margin: 0 auto; }
.lightbox-caption { color: rgba(255,255,255,0.7); margin-top: 0.75rem; font-size: 0.875rem; }
.lightbox-btn {
  position: absolute;
  background: none; border: none;
  color: rgba(255,255,255,0.7);
  padding: 0.5rem;
  transition: color 0.2s;
}
.lightbox-btn:hover { color: #fff; }
.lightbox-btn svg { width: 2rem; height: 2rem; }
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: 0.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 0.5rem; top: 50%; transform: translateY(-50%); }

/* ============================================================
   HISTORY
   ============================================================ */
.history { background: var(--tennis-dark); color: #fff; }
.history .section-head h2 { color: #fff; }
.history-body { position: relative; }
.history-line {
  display: none;
  position: absolute;
  left: 1rem; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom,
    hsl(18 68% 48% / 0.5), var(--tennis-clay), hsl(18 68% 48% / 0.1));
}
@media (min-width: 768px) { .history-line { display: block; } }
.history-content { }
@media (min-width: 768px) { .history-content { padding-left: 3rem; } }
.history-content p { color: rgba(255,255,255,0.75); margin-bottom: 1.5rem; }
.history-content strong { color: #fff; }
.history-collage {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 4rem;
}
.history-collage .collage-item { border-radius: var(--radius); overflow: hidden; aspect-ratio: 1 / 1; }
.history-collage img { width: 100%; height: 100%; object-fit: cover; opacity: 0.8; }

/* ============================================================
   RESERVATION
   ============================================================ */
.reservation { background: hsl(42 30% 94% / 0.5); text-align: center; }
.reservation h2 { font-size: clamp(2rem, 5vw, 3rem); margin: 0.75rem 0 1.5rem; }
.reservation .reservation-lead { color: var(--muted-foreground); font-size: 1.125rem; max-width: 34rem; margin: 0 auto 2.5rem; }
.steps { display: grid; gap: 1.5rem; margin-bottom: 3rem; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
}
.step-card .step-icon { font-size: 2.25rem; margin-bottom: 0.75rem; }
.step-card h3 { font-family: var(--font-sans); font-weight: 600; font-size: 1rem; margin-bottom: 0.5rem; }
.step-card p { color: var(--muted-foreground); font-size: 0.875rem; }
.reservation-note { color: var(--muted-foreground); font-size: 0.875rem; margin-top: 1rem; }

/* ============================================================
   CONTACTS
   ============================================================ */
.contacts { background: var(--background); }
.contacts-grid { display: grid; gap: 4rem; }
@media (min-width: 1024px) { .contacts-grid { grid-template-columns: 1fr 1fr; } }
.contact-info { display: flex; flex-direction: column; gap: 2rem; }
.contact-row { display: flex; gap: 1rem; }
.contact-icon {
  width: 3rem; height: 3rem;
  border-radius: var(--radius);
  background: hsl(150 48% 25% / 0.1);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-icon svg { width: 1.25rem; height: 1.25rem; color: var(--tennis-green); }
.contact-row h3 { font-family: var(--font-sans); font-weight: 600; font-size: 1rem; margin-bottom: 0.25rem; }
.contact-row p, .contact-row a { color: var(--muted-foreground); }
.contact-row a.link-clay { color: var(--tennis-clay); }
.contact-row a.link-clay:hover { text-decoration: underline; }
.contact-map {
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--border);
  height: 13rem;
}
.contact-map iframe { width: 100%; height: 100%; border: 0; }

.contact-lists { display: flex; flex-direction: column; gap: 2.5rem; }
.contact-lists h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.contact-lists h3::before {
  content: '';
  width: 1.5rem; height: 2px;
  background: var(--tennis-clay);
  display: inline-block;
}
.contact-person {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.contact-person:last-child { border-bottom: none; }
.contact-person .cp-name { font-weight: 500; }
.contact-person .cp-role { color: var(--muted-foreground); font-size: 0.875rem; }
.contact-person a { color: var(--tennis-clay); font-size: 0.875rem; }
.contact-person a:hover { text-decoration: underline; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--tennis-dark); color: rgba(255,255,255,0.6); padding: 2.5rem 0; }
.footer-inner {
  display: flex; flex-direction: column; align-items: center;
  gap: 1rem; text-align: center;
}
@media (min-width: 768px) { .footer-inner { flex-direction: row; justify-content: space-between; text-align: left; } }
.footer-brand { display: flex; align-items: center; gap: 0.75rem; }
.footer-badge {
  width: 2rem; height: 2rem;
  border-radius: 999px;
  background: var(--tennis-clay);
  color: #fff; font-weight: 700; font-size: 0.75rem;
  display: flex; align-items: center; justify-content: center;
}
.footer-brand span { color: #fff; font-weight: 600; }
.footer-links { display: flex; align-items: center; gap: 1rem; font-size: 0.875rem; }
.footer-links a:hover { color: #fff; }

/* ============================================================
   HELPERS
   ============================================================ */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
