/* ===== gallery.css ===== */

/* Gallery search bar */
.gallery-search {
  margin: 30px 0 25px;
  text-align: center;
}

.gallery-search .search-input {
  width: 100%;
  max-width: 500px;
  padding: 12px 20px;
  border: 1px solid #ddd;
  border-radius: 25px;
  font-size: 16px;
  background: #f9f9f9;
  transition: all 0.3s ease;
}

.gallery-search .search-input:focus {
  outline: none;
  border-color: #FFC109;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 193, 9, 0.15);
}
/* Gallery search bar */

/* ---- Gallery filter buttons ---- */
.gallery-filters {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 25px 0 40px;
}

/* 공통 필터 버튼 스타일 (pub / gallery 둘 다 사용) */
.filter-btn {
  padding: 8px 16px;
  border: 1px solid #ddd;
  background: #fff;
  color: #666;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.filter-btn.active,
.filter-btn:hover {
  background: #FFC109;
  color: #fff;
  border-color: #FFC109;
}
/* ---- Gallery filter buttons ---- */


.gallery-section {
  padding: 50px 0;
}

.gallery-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 40px;
  justify-content: center;
  flex-wrap: wrap;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #f5f5f5;
}

.gallery-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.7),
    rgba(0, 0, 0, 0)
  );
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  pointer-events: none;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 5px;
}

.gallery-description {
  font-size: 14px;
  opacity: 0.9;
}

.gallery-actions {
  text-align: center;
}

/* Modal */
.gallery-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.gallery-modal .modal-content {
  position: relative;
  max-width: 70vw;
  max-height: 80vh;
}

.gallery-modal .modal-img {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  margin: 0 auto;
}

.gallery-modal .modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 28px;
  color: #fff;
  cursor: pointer;
}

.gallery-modal .modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(0, 0, 0, 0.4);
  padding: 8px 12px;
  font-size: 24px;
  color: #fff;
  cursor: pointer;
}

.gallery-modal .modal-prev {
  left: 10px;
}

.gallery-modal .modal-next {
  right: 10px;
}

.gallery-modal .modal-counter {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 14px;
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 8px;
  border-radius: 4px;
}

/* Meta chips in modal */
.gallery-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: transparent !important;
}

.gallery-meta .gallery-date,
.gallery-meta .venue,
.gallery-meta .location {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: #fff;
  border: none !important;
  text-decoration: none !important;
  margin: 0;
}

.gallery-meta .location {
  padding-top: 0 !important;
  margin-top: 0 !important;
}
