/* ============================================================
   Klimastyle – Realizace page
   Inherits design tokens from styles.css
   ============================================================ */

/* ---------- Hero ---------- */
.rlz-hero {
  position: relative;
  min-height: clamp(260px, 30vw, 360px);
  display: flex;
  align-items: center;
  padding-top: 70px;
  overflow: hidden;
}
.rlz-hero-bg { position: absolute; inset: 0; z-index: 0; }
.rlz-hero-img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.rlz-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(26,35,50,.94) 0%, rgba(26,35,50,.76) 55%, rgba(26,35,50,.42) 100%);
}
.rlz-hero-content {
  position: relative; z-index: 1;
  padding-block: clamp(2.5rem, 5vw, 3.75rem);
}
.rlz-hero-content h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800; color: var(--white);
  line-height: 1.1; letter-spacing: -.02em;
  margin-block: 0 .75rem;
}
.rlz-hero-content > p {
  font-size: clamp(.9rem, 1.4vw, 1.05rem);
  color: rgba(255,255,255,.75);
  max-width: 540px; line-height: 1.65;
  margin-bottom: 1.75rem;
}
.rlz-hero-meta {
  display: flex; flex-wrap: wrap; gap: 1.25rem;
  font-size: .82rem; color: rgba(255,255,255,.55);
}
.rlz-hero-meta span { display: flex; align-items: center; gap: .375rem; }
.rlz-hero-meta svg { width: 14px; height: 14px; stroke: var(--teal); flex-shrink: 0; }

/* Breadcrumb — shared pattern */
.breadcrumb {
  display: flex; align-items: center; gap: .5rem;
  font-size: .82rem; color: rgba(255,255,255,.55);
  margin-bottom: 1.25rem;
}
.breadcrumb a { color: rgba(255,255,255,.65); transition: color .2s; }
.breadcrumb a:hover { color: var(--teal); }
.breadcrumb span:last-child { color: rgba(255,255,255,.9); }

/* ---------- Category chips ---------- */
.rlz-chips-section {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding-block: 1rem;
  position: sticky;
  top: 70px;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.rlz-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: .5rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.rlz-chips::-webkit-scrollbar { display: none; }
.rlz-chip {
  flex-shrink: 0;
  padding: .45rem 1.1rem;
  border-radius: 100px;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-700);
  font-size: .875rem; font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all .2s ease;
  white-space: nowrap;
}
.rlz-chip:hover { border-color: var(--teal); color: var(--teal); }
.rlz-chip.active {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
  font-weight: 600;
}

/* ---------- Gallery section ---------- */
.rlz-section { background: var(--gray-50); }
.rlz-header {
  display: flex; align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap; gap: .75rem;
  margin-bottom: 2rem;
}
.rlz-header-left .section-tag { margin-bottom: .625rem; display: inline-block; }
.rlz-header-left h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 800; color: var(--navy); line-height: 1.2;
}
.rlz-count {
  font-size: .875rem; color: var(--gray-500);
  white-space: nowrap;
}
.rlz-count strong { color: var(--navy); }

/* ---------- Masonry-ish CSS Grid ---------- */
.rlz-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: clamp(220px, 19vw, 290px);
  gap: .875rem;
  grid-auto-flow: dense;
}
.rlz-item--wide { grid-column: span 2; }

@media (max-width: 900px) {
  .rlz-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: clamp(180px, 28vw, 260px); }
}
@media (max-width: 540px) {
  .rlz-grid { grid-template-columns: 1fr; grid-auto-rows: 220px; }
  .rlz-item--wide { grid-column: span 1; }
}

/* ---------- Gallery item ---------- */
.rlz-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--gray-200);
  cursor: pointer;
}
.rlz-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .45s ease;
  display: block;
}
.rlz-item:hover img { transform: scale(1.05); }

/* Hover overlay with caption */
.rlz-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top,
    rgba(26,35,50,.78) 0%,
    rgba(26,35,50,.18) 55%,
    transparent 100%);
  opacity: 0;
  transition: opacity .3s ease;
  display: flex;
  align-items: flex-end;
  padding: 1rem 1.125rem;
}
.rlz-item:hover .rlz-overlay { opacity: 1; }
.rlz-overlay-inner { display: flex; flex-direction: column; gap: .25rem; }
.rlz-caption { color: var(--white); font-size: .82rem; font-weight: 600; line-height: 1.35; }
.rlz-cat-badge {
  display: inline-block;
  background: rgba(0,180,204,.3);
  border: 1px solid rgba(0,180,204,.5);
  color: #7FDFEC;
  font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  padding: .15rem .55rem;
  border-radius: 100px;
  align-self: flex-start;
}

/* No results */
.rlz-empty {
  display: none;
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--gray-500);
}
.rlz-empty svg { margin: 0 auto 1rem; opacity: .25; }
.rlz-empty h3 { font-size: 1.1rem; color: var(--navy); margin-bottom: .5rem; }

/* ---------- Active nav link ---------- */
.nav-active { color: var(--teal) !important; }

/* ---------- Gallery item — clickable cursor ---------- */
.rlz-item { cursor: zoom-in; }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lb {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.lb.is-open { opacity: 1; pointer-events: all; }

/* Backdrop */
.lb-backdrop {
  position: absolute; inset: 0;
  background: rgba(8, 12, 18, 0.93);
  cursor: zoom-out;
}

/* Image stage */
.lb-stage {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  max-width: calc(100vw - 6rem);
  max-height: calc(100vh - 7rem);
  transform: scale(.97);
  transition: transform .28s ease;
}
.lb.is-open .lb-stage { transform: scale(1); }

.lb-img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 8rem);
  width: auto; height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .65);
  user-select: none;
  -webkit-user-drag: none;
  transition: opacity .18s ease;
}

/* Close button */
.lb-close {
  position: absolute; z-index: 3; top: 1rem; right: 1rem;
  width: 44px; height: 44px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.85);
  cursor: pointer;
  font-family: inherit;
  transition: background .2s, border-color .2s, color .2s;
}
.lb-close:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.4); color: #fff; }
.lb-close svg { width: 18px; height: 18px; stroke: currentColor; flex-shrink: 0; }

/* Prev / Next buttons */
.lb-prev,
.lb-next {
  position: absolute; z-index: 2; top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.8);
  cursor: pointer;
  font-family: inherit;
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }
.lb-prev:hover,
.lb-next:hover {
  background: rgba(0,180,204,.25);
  border-color: rgba(0,180,204,.5);
  color: #fff;
}
.lb-prev:hover { transform: translateY(-50%) translateX(-2px); }
.lb-next:hover { transform: translateY(-50%) translateX(2px); }
.lb-prev svg,
.lb-next svg { width: 20px; height: 20px; stroke: currentColor; flex-shrink: 0; }

/* Footer bar */
.lb-footer {
  position: absolute; z-index: 2; bottom: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: .75rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(to top, rgba(8,12,18,.75) 0%, transparent 100%);
  pointer-events: none;
}
.lb-cat {
  display: inline-block;
  background: rgba(0,180,204,.28);
  border: 1px solid rgba(0,180,204,.45);
  color: #7FDFEC;
  font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  padding: .15rem .6rem;
  border-radius: 100px;
  flex-shrink: 0;
}
.lb-caption {
  font-size: .85rem; font-weight: 500;
  color: rgba(255,255,255,.8);
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.lb-counter {
  font-size: .78rem; color: rgba(255,255,255,.4);
  flex-shrink: 0; margin-left: auto;
  font-variant-numeric: tabular-nums;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .lb-stage { max-width: 100vw; max-height: calc(100vh - 5rem); }
  .lb-img { max-height: calc(100vh - 6rem); border-radius: 0; }
  .lb-prev { left: .375rem; }
  .lb-next { right: .375rem; }
  .lb-prev, .lb-next { width: 40px; height: 40px; }
  .lb-footer { padding: .75rem 1rem; }
  .lb-caption { display: none; }
}
