/* === Locations — Catalog + Detail page === */

body.page-locations,
body.page-location {
  background: linear-gradient(270deg, #1a1a1a, #222, #1a1a1a);
  background-size: 600% 600%;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Background image */
.loc-bg {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(6px);
  transform: scale(1.05);
  z-index: 0;
  pointer-events: none;
}

.loc-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(26, 26, 26, 0.95) 0%, rgba(26, 26, 26, 0.7) 50%, #1a1a1a 100%);
}

/* --- Catalog --- */

.loc-page {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 20px 60px;
  min-height: 100vh;
}

.loc-header {
  margin-bottom: 40px;
  text-align: center;
}

.loc-heading {
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.loc-sub {
  font-size: 0.95rem;
  color: #757575;
}

/* Grid: 1 → 2 → 3 columns */
.loc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 600px) {
  .loc-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .loc-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Card */
.loc-card {
  display: flex;
  flex-direction: column;
  background: none;
  text-decoration: none;
  overflow: hidden;
  transition: border-color 0.4s ease;
  border: 2px solid transparent;
}

.loc-card:hover {
  border-color: #D4A373;
}

.loc-card-img {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #313131;
}

.loc-card-img img,
.loc-card-img picture {
  display: block;
  width: 100%;
  height: 100%;
}

.loc-card-img img {
  object-fit: cover;
  transition: transform 0.35s ease;
}

.loc-card:hover .loc-card-img img {
  transform: scale(1.05);
}

.loc-card-body {
  padding: 16px 18px;
  background: rgba(36, 37, 37, 0.75);
  backdrop-filter: blur(8px);
  flex: 1;
}

.loc-card-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #D4A373;
  margin-bottom: 4px;
}

.loc-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  line-height: 1.3;
}

.loc-card-author {
  font-size: 0.8rem;
  color: #757575;
}

.loc-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.loc-card-likes {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: #d1cfce;
}

.loc-card-likes svg {
  color: rgb(212 163 115);
}

/* Staggered entrance */
@media (min-width: 769px) {
  .loc-grid > .loc-card {
    opacity: 0;
    transform: translateY(20px);
    animation: locCardIn 0.5s ease forwards;
  }
  .loc-grid > .loc-card:nth-child(1)  { animation-delay: 0s; }
  .loc-grid > .loc-card:nth-child(2)  { animation-delay: 0.06s; }
  .loc-grid > .loc-card:nth-child(3)  { animation-delay: 0.12s; }
  .loc-grid > .loc-card:nth-child(4)  { animation-delay: 0.18s; }
  .loc-grid > .loc-card:nth-child(5)  { animation-delay: 0.24s; }
  .loc-grid > .loc-card:nth-child(6)  { animation-delay: 0.30s; }
  .loc-grid > .loc-card:nth-child(7)  { animation-delay: 0.36s; }
  .loc-grid > .loc-card:nth-child(8)  { animation-delay: 0.42s; }
  .loc-grid > .loc-card:nth-child(9)  { animation-delay: 0.48s; }
  .loc-grid > .loc-card:nth-child(10) { animation-delay: 0.54s; }

  @keyframes locCardIn {
    to { opacity: 1; transform: translateY(0); }
  }
}

/* --- Tag filter --- */

.loc-filter-tags {
  position: relative;
  z-index: 1;
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.loc-filter-chip {
  background: rgba(26, 26, 26, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 0;
  color: rgba(255, 255, 255, 0.8);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 5px 12px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.loc-filter-chip:hover {
  border-color: #D4A373;
  color: #D4A373;
}

.loc-filter-chip.active {
  background: rgba(212, 163, 115, 0.15);
  border-color: #D4A373;
  color: #D4A373;
}

/* --- Author links (detail page) --- */

.loc-author-link {
  color: inherit;
  transition: color 0.15s;
}

.loc-author-link.known {
  cursor: pointer;
}

.loc-author-link.known:hover {
  color: #D4A373;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --- Like button --- */

.loc-info-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.loc-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
  color: #757575;
  font-family: inherit;
  font-size: 0.85rem;
  padding: 6px 14px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.loc-like-btn:hover {
  border-color: #D4A373;
  color: #D4A373;
}

.loc-like-btn.liked {
  background: rgba(212, 163, 115, 0.12);
  border-color: rgba(212, 163, 115, 0.4);
  color: #D4A373;
}

.loc-like-btn.liked .loc-like-icon {
  fill: #D4A373;
  stroke: #D4A373;
}

.loc-like-btn.loc-like-pop {
  animation: likePop 0.3s ease;
}

@keyframes likePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* --- Share button --- */

.loc-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
  color: #757575;
  font-family: inherit;
  font-size: 0.85rem;
  padding: 6px 14px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  position: relative;
}

.loc-share-btn:hover {
  border-color: #D4A373;
  color: #D4A373;
}

.loc-share-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #D4A373;
  color: #1a1a1a;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  white-space: nowrap;
  pointer-events: none;
  animation: shareTooltipIn 0.15s ease;
}

@keyframes shareTooltipIn {
  from { opacity: 0; transform: translateX(-50%) translateY(4px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* --- Detail page --- */

.loc-detail {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 100px 20px 60px;
  min-height: 100vh;
}

/* Hero cover banner — full page blurred background */
.loc-hero {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(4px);
  transform: scale(1.04);
  z-index: 0;
  pointer-events: none;
}

.loc-detail::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(26, 26, 26, 0.4) 0%, rgba(26, 26, 26, 0.6) 50%, #1a1a1a 100%);
  z-index: 1;
  pointer-events: none;
}

/* Top bar: back + pager */
.loc-topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.loc-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #949494;
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid #3a3a3a;
  background: #242525;
  transition: border-color 0.15s, color 0.15s;
}

.loc-back-btn:hover {
  color: #D4A373;
  border-color: #D4A373;
}

/* Pager arrows */
.loc-pager {
  display: flex;
  gap: 6px;
}

.loc-pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 36px;
  background: rgb(36, 37, 37);
  border: 1px solid #3a3a3a;
  color: #949494;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
  cursor: pointer;
}

.loc-pager-btn:hover {
  color: #D4A373;
  border-color: #D4A373;
}

.loc-pager-btn.disabled {
  opacity: 0.25;
  pointer-events: none;
  cursor: default;
}

/* Info (detail page — top block) */
.loc-info {
  position: relative;
  z-index: 2;
  background: rgba(36, 37, 37, 0.82);
  padding: 28px;
  margin-bottom: 24px;
  overflow: hidden;
  overflow-wrap: break-word;
  word-break: break-word;
}

.loc-info-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.loc-info-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #D4A373;
}

.loc-info-date {
  font-size: 0.7rem;
  color: #757575;
}

/* Gallery grid — 4 per row */
.loc-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 26px;
}

.loc-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #313131;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}

.loc-thumb:hover {
  border-color: #D4A373;
}

.loc-thumb img,
.loc-thumb picture {
  display: block;
  width: 100%;
  height: 100%;
}

.loc-thumb img {
  object-fit: cover;
  transition: transform 0.3s ease;
}

.loc-thumb:hover img {
  transform: scale(1.05);
}

.loc-info-title {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.loc-info-author {
  display: block;
  font-size: 0.85rem;
  color: #757575;
  font-weight: 600;
  margin-bottom: 16px;
}

.loc-info-desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #949494;
  margin-bottom: 26px;
}

/* Lightbox */
.loc-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 20px 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.loc-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.loc-lightbox-img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  display: block;
  transition: opacity 0.2s ease;
}
.loc-lightbox-img.lb-fading { opacity: 0; }

/* Lightbox thumbnail strip */
.loc-lb-strip {
  display: flex;
  gap: 6px;
  padding: 12px 0 14px;
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: none;
}
.loc-lb-strip::-webkit-scrollbar { display: none; }

.loc-lb-strip-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.45;
  transition: opacity 0.2s, border-color 0.2s;
}
.loc-lb-strip-thumb:hover { opacity: 0.75; }
.loc-lb-strip-thumb.active {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.7);
}
.loc-lb-strip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.loc-lightbox .modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 201;
  width: 44px;
  height: 44px;
  font-size: 28px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loc-lb-btn {
  position: absolute;
  top: calc(50% - 40px);
  transform: translateY(-50%);
  z-index: 201;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}

.loc-lb-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.loc-lb-prev { left: 12px; }
.loc-lb-next { right: 12px; }

/* --- Mobile --- */

@media (max-width: 768px) {
  .honeycomb-fixed {
    display: none;
  }

  .loc-page {
    padding: 80px 16px 40px;
  }

  .loc-heading {
    font-size: 22px;
  }

  .loc-filter-tags {
    gap: 6px;
  }

  .loc-detail {
    padding: 80px 16px 40px;
  }

  .loc-info {
    padding: 20px;
  }

  .loc-info-title {
    font-size: 20px;
  }

  .loc-info-actions {
    flex-wrap: wrap;
  }

  .loc-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .loc-lb-btn {
    width: 40px;
    height: 40px;
  }

  .loc-lb-btn svg {
    width: 24px;
    height: 24px;
  }

  .loc-lb-strip-thumb {
    width: 44px;
    height: 44px;
  }

  .loc-lightbox-img {
    max-height: calc(100vh - 100px);
  }
}

@media (max-width: 480px) {
  .loc-heading {
    font-size: 20px;
  }

  .loc-card-body {
    padding: 12px 14px;
  }

  .loc-card-title {
    font-size: 14px;
  }

  .loc-info {
    padding: 16px;
  }

  .loc-info-title {
    font-size: 18px;
  }
}

/* --- Large screens --- */

@media (min-width: 1440px) {
  .loc-page {
    max-width: 1300px;
    padding: 110px 24px 60px;
  }

  .loc-heading {
    font-size: 32px;
  }

  .loc-detail {
    max-width: 1100px;
    padding: 110px 24px 60px;
  }

  .loc-info-title {
    font-size: 28px;
  }
}

@media (min-width: 1920px) {
  .loc-page {
    max-width: 1500px;
    padding: 120px 32px 70px;
  }

  .loc-heading {
    font-size: 36px;
  }

  .loc-sub {
    font-size: 1.05rem;
  }

  .loc-detail {
    max-width: 1300px;
    padding: 120px 32px 70px;
  }

  .loc-info {
    padding: 32px;
  }

  .loc-info-title {
    font-size: 30px;
  }

  .loc-info-desc {
    font-size: 1rem;
  }
}
