/* ===== Tattoo Wien – Gallery ===== */
.tw-container {
  width: min(1200px, calc(100% - 2rem));
  margin-inline: auto;
}

.tw-section {
  padding: clamp(3rem, 5vw, 5rem) 0;
}

.tw-section-header h2 {
  font-family: "Bebas Neue", ui-sans-serif, system-ui, -apple-system, Segoe UI,
    Roboto, Helvetica, Arial;
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  margin: 0 0 0.4rem 0;
}

.tw-section-header p {
  margin: 0;
  opacity: 0.8;
  max-width: 60ch;
}

/* Controls */
.tw-gallery-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.tw-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tw-chip {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease,
    border-color 0.12s ease;
}

.tw-chip:hover {
  transform: translateY(-1px);
}
.tw-chip.is-active {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
}

.tw-count {
  opacity: 0.75;
}

/* Grid */
.tw-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 700px) {
  .tw-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (min-width: 1100px) {
  .tw-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Tile */
.tw-tile {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: zoom-in;
  transform: translateZ(0);
  padding: 0;
}

.tw-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.55),
    rgba(0, 0, 0, 0) 55%
  );
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}

.tw-tile:hover::after {
  opacity: 1;
}

.tw-tile img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 3 / 4;
  transform: scale(1.01);
  transition: transform 0.2s ease;
}

.tw-tile:hover img {
  transform: scale(1.05);
}

.tw-tile-badge {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  font-size: 0.78rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  color: #fff;
}
.tw-tile:hover .tw-tile-badge {
  opacity: 1;
  transform: translateY(0);
}

/* Actions */
.tw-gallery-actions {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.tw-btn {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  padding: 0.8rem 1.1rem;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease,
    border-color 0.12s ease;
}
.tw-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
}

/* ===== Lightbox ===== */
.tw-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.tw-lightbox.is-open {
  display: block;
}

.tw-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.tw-lightbox-card {
  position: absolute;
  inset: 5%;
  margin: 0;
  display: grid;
  place-items: center;
}

.tw-lightbox-img {
  max-height: 86vh;
  max-width: min(92vw, 900px);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.tw-lightbox-caption {
  margin-top: 0.75rem;
  opacity: 0.8;
  font-size: 0.95rem;
  max-width: min(92vw, 900px);
  text-align: center;
}

.tw-lightbox-close {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(10px, -10px);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.tw-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.tw-lightbox-nav.prev {
  left: 0;
  transform: translate(-10px, -50%);
}
.tw-lightbox-nav.next {
  right: 0;
  transform: translate(10px, -50%);
}

@media (max-width: 600px) {
  .tw-lightbox-nav {
    display: none;
  }
}
