.gallery-page {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.gallery-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.gallery-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.gal-tab-btn {
  padding: 0.42rem 0.92rem;
  border-radius: var(--radius-pill);
  background: var(--bg-white);
  color: var(--navy-900);
  font-size: 0.83rem;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(15, 41, 66, 0.05);
}

.gal-tab-btn.is-active {
  background: var(--navy-900);
  color: #FFFFFF;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.gallery-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(15, 41, 66, 0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.gallery-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 41, 66, 0.1);
}

.gallery-thumb {
  height: 164px;
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--blue-600) 100%);
  color: #FFFFFF;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-thumb svg {
  width: 48px;
  height: 48px;
  opacity: 0.85;
}

.gallery-date-pill {
  position: absolute;
  left: 10px;
  bottom: 10px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--navy-900);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.62rem;
  border-radius: var(--radius-pill);
}

.gallery-card-body {
  padding: 0.95rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.gallery-card-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--navy-900);
  line-height: 1.35;
}

.gallery-card-desc {
  font-size: 0.82rem;
  color: var(--text-body);
  line-height: 1.48;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery-card-foot {
  padding: 0.7rem 1.05rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.gal-preview-box {
  width: 100%;
  height: 150px;
  border-radius: var(--radius-md);
  background: var(--bg-page);
  border: 1px dashed var(--blue-400);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--blue-600);
  font-size: 0.84rem;
  font-weight: 600;
}

.gal-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 960px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}