/* gallery.css — stiluri specifice paginii Galerie */

/* Page header */
.page-header { padding: 46px var(--pad) 0; }
.page-header__inner {
  display: -webkit-flex; display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  -webkit-flex-wrap: wrap; flex-wrap: wrap;
}
.page-header__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 50px);
  letter-spacing: -.01em;
  margin: 8px 0 0;
}
.page-header__desc {
  color: var(--text-mid);
  font-size: 18px;
  margin: 10px 0 0;
  font-weight: 500;
  max-width: 560px;
}

/* Filter bar */
.filter-bar { padding: 24px var(--pad) 0; }
.filter-bar__inner {
  display: -webkit-flex; display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  -webkit-flex-wrap: wrap; flex-wrap: wrap;
}

.filter-chips { display: -webkit-flex; display: flex; gap: 8px; -webkit-flex-wrap: wrap; flex-wrap: wrap; }

.chip {
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 14px;
  background: var(--bg-white);
  color: var(--text-mid);
  border: 1px solid var(--border-mid);
  cursor: pointer;
  -webkit-transition: all .18s; transition: all .18s;
}
.chip:hover { background: var(--teal-light); color: var(--teal); border-color: var(--teal-light); }
.chip--active { background: var(--teal-mid); color: #fff; border-color: var(--teal-mid); }

.filter-controls { display: -webkit-flex; display: flex; gap: 10px; -webkit-flex-wrap: wrap; flex-wrap: wrap; align-items: center; }

.filter-search {
  padding: 11px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-mid);
  font-size: 14px;
  background: var(--bg-white);
  color: var(--text);
  min-width: 200px;
  outline: none;
  font-family: var(--font-body);
  -webkit-transition: border-color .18s; transition: border-color .18s;
}
.filter-search:focus { border-color: var(--teal-mid); }

.filter-sort {
  padding: 11px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-mid);
  font-size: 14px;
  background: var(--bg-white);
  color: var(--text);
  font-weight: 700;
  outline: none;
  cursor: pointer;
  font-family: var(--font-body);
}

/* Gallery grid — masonry columns */
.g-grid { columns: 4; column-gap: 18px; }

.g-card {
  break-inside: avoid;
  margin-bottom: 18px;
  background: var(--bg-white);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  -webkit-transition: -webkit-transform .2s, box-shadow .2s; transition: transform .2s, box-shadow .2s;
  display: block;
}
.g-card:hover {
  -webkit-transform: translateY(-4px); transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(58,46,38,.12);
}

.g-card__photo {
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.5) 0 12px, transparent 12px 24px);
  display: -webkit-flex; display: flex;
  align-items: flex-end;
  padding: 10px;
}
.g-card__photo--orange { aspect-ratio: 3/4; background-color: var(--orange-light); }
.g-card__photo--teal   { aspect-ratio: 1/1; background-color: var(--teal-light); }
.g-card__photo--yellow { aspect-ratio: 4/5; background-color: var(--cream-light); }
.g-card__photo--pink   { aspect-ratio: 1/1; background-color: var(--pink-light); }

.g-card__photo-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-mid);
  background: rgba(255,255,255,.8);
  padding: 3px 7px;
  border-radius: 6px;
}

.g-card__footer {
  padding: 12px 14px;
  display: -webkit-flex; display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.g-card__info { min-width: 0; }
.g-card__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.g-card__breed {
  color: var(--text-light);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.g-vote {
  display: -webkit-flex; display: flex;
  align-items: center;
  gap: 5px;
  background: var(--border);
  color: var(--text-mid);
  font-weight: 800;
  font-size: 13px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  -webkit-flex-shrink: 0; flex-shrink: 0;
  cursor: pointer;
  -webkit-transition: background .18s; transition: background .18s;
}
.g-vote:hover { background: var(--orange-light); }
.g-vote__heart { color: #FF6B6B; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(58,46,38,.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: -webkit-flex;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox[hidden] { display: none; }

.lightbox__inner {
  background: var(--bg-white);
  border-radius: 24px;
  max-width: 520px;
  width: 100%;
  overflow: hidden;
  position: relative;
  box-shadow: 0 40px 80px rgba(0,0,0,.4);
}

.lightbox__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  display: -webkit-flex;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox__photo {
  aspect-ratio: 4/3;
  background: var(--orange-light);
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.5) 0 12px, transparent 12px 24px);
}

.lightbox__footer {
  padding: 22px 24px;
  display: -webkit-flex; display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  -webkit-flex-wrap: wrap; flex-wrap: wrap;
}
.lightbox__name { font-family: var(--font-display); font-weight: 600; font-size: 24px; }
.lightbox__breed { color: var(--text-light); font-size: 14px; font-weight: 600; }
.lightbox__actions { display: -webkit-flex; display: flex; align-items: center; gap: 14px; }
.lightbox__votes { color: var(--text-mid); font-weight: 800; font-size: 15px; }

/* Responsive */
@media (max-width: 880px) {
  .g-grid { columns: 2 !important; }
  .filter-bar__inner { -webkit-flex-direction: column; flex-direction: column; align-items: stretch; }
  .page-header__inner { -webkit-flex-direction: column; flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) {
  .g-grid { columns: 1 !important; }
}
