/* =========================================
   GALLERY
========================================= */

.gallery {
  position: relative;
  background: var(--color-bg);
  overflow: hidden;
}

/* jemný brand gradient v pozadí */
.gallery::before {
  content: "";
  position: absolute;
  inset: -120px -120px auto -120px;
  height: 420px;
  background:
    radial-gradient(600px 260px at 12% 20%, rgba(224, 106, 42, 0.18), transparent 60%),
    radial-gradient(520px 240px at 55% 10%, rgba(224, 106, 42, 0.10), transparent 60%),
    radial-gradient(520px 260px at 92% 35%, rgba(17, 24, 39, 0.08), transparent 60%);
  pointer-events: none;
}

/* Header */
.gallery__head {
  position: relative;
  max-width: 920px;
  text-align: left;
}

.gallery__eyebrow {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;

  color: var(--color-text-muted);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.gallery__eyebrow::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 6px;
  background: rgba(224, 106, 42, 0.92);
  box-shadow: 0 8px 20px rgba(224, 106, 42, 0.25);
}

/* BackButton */
.galleryCrumb__link{
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;

  padding: 0.55rem 0.1rem;
  border-radius: 999px;

  text-decoration: none;
  font-weight: 800;
  color: var(--color-text);

  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.galleryCrumb__link:hover{
  border-color: rgba(224, 106, 42, 0.28);
  span{
    background: rgba(224,106,42,0.92);
  }
}

.galleryCrumb__link span{
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;

  background: rgba(224,106,42,0.12);
  font-weight: 900;
}



.gallery__title {
  margin-top: 0.55rem;
  text-wrap: balance;
}

.gallery__intro {
  margin: 0.85rem 0 0;
  color: var(--color-text-muted);
  line-height: 1.65;
  max-width: 70ch;
}

/* Filters */
.gallery__filters {
  margin-top: 1.15rem;
  display: flex;
  gap: 0.6rem;
  align-items: center;

  overflow-x: auto;
  padding: 0.25rem 0 0.55rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.gallery__filters::-webkit-scrollbar { height: 8px; }
.gallery__filters::-webkit-scrollbar-thumb {
  background: rgba(17, 24, 39, 0.12);
  border-radius: 999px;
}

.galleryFilter {
  flex: 0 0 auto;
  scroll-snap-align: start;

  border: 1px solid rgba(17, 24, 39, 0.10);
  background: rgba(255, 255, 255, 0.86);
  border-radius: 999px;

  padding: 0.65rem 0.95rem;
  font-weight: 800;
  font-size: 0.95rem;

  cursor: pointer;
  user-select: none;

  transition:
    transform var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    background var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    color var(--dur) var(--ease);
}

.galleryFilter:hover {
  transform: translateY(-1px);
  border-color: rgba(224, 106, 42, 0.28);
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.06);
}

/* active = tmavý pill + oranžový highlight */
.galleryFilter.is-active {
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  border-color: rgba(17, 24, 39, 0.92);
  box-shadow:
    0 14px 34px rgba(17, 24, 39, 0.18),
}

/* focus */
.galleryFilter:focus-visible {
  outline: 2px solid rgba(224, 106, 42, 0.95);
  outline-offset: 2px;
}

/* Grid */
.galleryGrid {
  position: relative;
  margin-top: 1.2rem;

  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.95rem;
}

.galleryCard {
  grid-column: span 4;
  min-width: 0;
}

@media (max-width: 1100px) {
  .galleryCard { grid-column: span 6; }
}

@media (max-width: 700px) {
  .galleryGrid { gap: 0.85rem; }
  .galleryCard { grid-column: span 12; }
}

/* Card */
.galleryCard__hit {
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.galleryCard__media {
  position: relative;
  overflow: hidden;
  border-radius: 22px;

  border: 1px solid rgba(17, 24, 39, 0.10);
  background: rgba(255, 255, 255, 0.9);

  box-shadow:
    0 14px 40px rgba(17, 24, 39, 0.08),
    0 2px 10px rgba(17, 24, 39, 0.06);

  transition:
    transform 420ms var(--ease),
    box-shadow 420ms var(--ease),
    border-color 420ms var(--ease);
}

/* tenký oranžový “edge” efekt jen při hoveru */
.galleryCard__media::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 22px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 420ms var(--ease);
}

.galleryCard__img {
  width: 100%;
  height: 320px;
  display: block;
  object-fit: cover;

  transform: scale(1.01);
  transition: transform 520ms var(--ease), filter 520ms var(--ease);
}

@media (max-width: 700px) {
  .galleryCard__img { height: 260px; }
}

/* Overlay */
.galleryCard__overlay {
  position: absolute;
  inset: 0;

  display: grid;
  place-items: center;

  background: radial-gradient(
    900px 360px at 25% 10%,

    rgba(17, 24, 39, 0.58) 55%
  );

  opacity: 0;
  transition: opacity 320ms var(--ease);
}

.galleryCard__overlayText {
  padding: 0.68rem 0.95rem;
  border-radius: 999px;

  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(17, 24, 39, 0.10);

  font-weight: 900;
  letter-spacing: 0.01em;
}

.galleryCard__hit:hover .galleryCard__overlay {
  opacity: 1;
}

.galleryCard__hit:hover .galleryCard__img {
  transform: scale(1.06);
  filter: saturate(1.08) contrast(1.02);
}

.galleryCard__hit:hover .galleryCard__media {
  transform: translateY(-2px);
  border-color: rgba(224, 106, 42, 0.95);
  box-shadow:
    0 18px 46px rgba(17, 24, 39, 0.12),
}

.galleryCard__hit:hover .galleryCard__media::after {
  opacity: 1;
}

.galleryCard__hit:focus-visible {
  outline: none;
}

.galleryCard__hit:focus-visible .galleryCard__media {
  border-color: rgba(224, 106, 42, 0.35);
  box-shadow:
    0 18px 46px rgba(17, 24, 39, 0.12),
    0 0 0 6px rgba(224, 106, 42, 0.18);
}

/* Hidden by filter */
.galleryCard.is-hidden {
  display: none;
}


/* Scroll reveal */
.galleryCard{
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 500ms var(--ease),
    transform 500ms var(--ease);
}

.galleryCard.is-in{
  opacity: 1;
  transform: translateY(0);
}


/* Motion reduce */
@media (prefers-reduced-motion: reduce) {
  .galleryCard__media,
  .galleryCard__img,
  .galleryCard__overlay,
  .galleryFilter {
    transition: none !important;
  }
  .galleryCard{
    opacity: 1;
    transform: none;
    transition: none !important;
  }
}