﻿/* ## ---- [File Index] ---- ##
1) Page shell
2) Toolbar: count, filters, year selector
3) Grid and card
4) Pagination
5) Responsive
*/

/* ## ---- [Design Tokens] ---- ## */
:root {
  --text-1: #161616;
  --text-2: #505050;
  --text-3: #767676;
  --text-4: #909090;
  --point: #0056b3;

  --bg: #ffffff;
  --line: #dfdfdf;
  --dim: rgba(0, 0, 0, 0.06);
  --glass-black: rgba(0, 0, 0, 0.55);

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.08), 0 1px 1px rgba(0, 0, 0, 0.04);

  --radius-sm: 0px;
  --radius-pill: 0px;

  --font-main: "Noto Sans KR", sans-serif;
}

/* ## ---- [Base] ---- ## */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--font-main);
  line-height: 1.4;
  letter-spacing: -0.025em;
}

button {
  font-family: inherit;
}

/* ## ---- [Page Shell] ---- ## */
.photo-page {
  width: 100%;
  padding: 32px 0 72px;
}

.photo-shell {
  width: min(100%, 1280px);
  margin: 0 auto;
}

/* ## ---- [Toolbar] ---- ## */
.photo-toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
}

.photo-count {
  margin: 0;
  font-size: 18px;
  font-weight: 400;
  color: var(--text-2);
}

.photo-count strong {
  font-weight: 500;
  color: var(--text-1);
}

.photo-filters {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.filter-btn {
  padding: 6px 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-2);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.025em;
  cursor: pointer;
}

.filter-btn:hover {
  color: var(--text-1);
}

.filter-btn.is-active {
  color: var(--point);
  border-bottom-color: var(--point);
  font-weight: 500;
}

.year-select {
  position: relative;
  justify-self: end;
}

/* ## ---- [2026-03-02 Year Glass UI Update] ---- ## */
.year-select-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.55);
  color: var(--point);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.025em;
  cursor: pointer;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  overflow: hidden;
}

.year-select-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.08));
  mix-blend-mode: screen;
  opacity: 0.6;
}

.year-select-btn > * {
  position: relative;
  z-index: 1;
}

.year-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--text-3);
}

.arrow-icon {
  width: 18px;
  height: 18px;
}

.icon-up {
  display: none;
}

.year-select.is-open .icon-down {
  display: none;
}

.year-select.is-open .icon-up {
  display: block;
}

.year-select-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 10;
  min-width: 124px;
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.24);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  list-style: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.24s ease, transform 0.24s ease, visibility 0.24s ease;
}

.year-select.is-open .year-select-list {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.year-option {
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
  color: var(--text-2);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.025em;
  cursor: pointer;
}

.year-option:hover {
  background: #f8f8f8;
}

.year-option.is-active {
  color: var(--point);
  font-weight: 500;
}

/* ## ---- [Grid and Card] ---- ## */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 2px;
}

.photo-card {
  margin: 0;
  cursor: pointer;
}

.photo-thumb {
  position: relative;
  margin: 0 0 16px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #ebebeb;
}

/* ## ---- [2026-03-02 Thumbnail Hover Update] ---- ## */
.photo-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  pointer-events: none;
  transition: border-color 0.22s ease;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1);
  transition: transform 0.35s ease;
}

.photo-card:hover .photo-thumb::after {
  border-color: var(--point);
}

.photo-card:hover .photo-thumb img {
  transform: scale(1.06);
}

.photo-tag {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 10px;
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: var(--glass-black);
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.025em;
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
}

/* ## ---- [2026-03-02 Title Clamp Update] ---- ## */
.photo-title {
  margin: 0;
  color: var(--text-1);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.025em;
  word-break: break-word;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  height: calc(1.4em * 2);
  padding-left: 8px;
}

.photo-date {
  margin: 18px 0 0;
  color: var(--text-3);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.025em;
  padding-left: 8px;
}

.photo-empty {
  padding: 80px 0;
  text-align: center;
  color: var(--text-3);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.025em;
}

/* ## ---- [Pagination] ---- ## */
.photo-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 44px;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-2);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.015rem;
  cursor: pointer;
}

.page-btn:hover {
  background: #f5f5f5;
}

.page-btn.is-active {
  color: var(--point);
  font-weight: 500;
}

.page-btn.is-disabled {
  color: var(--text-4);
  cursor: default;
}

.page-btn.is-disabled:hover {
  background: transparent;
}

.page-btn.page-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.page-arrow-icon {
  width: 18px;
  height: 18px;
}

/* ## ---- [Responsive] ---- ## */
/* ## ---- [2026-03-02 16:19 Typography Scale Update] ---- ## */
@media (max-width: 1280px) {
  .photo-count,
  .filter-btn,
  .year-select-btn,
  .year-option {
    font-size: clamp(15px, 1.4vw, 18px);
  }

  .photo-title {
    font-size: clamp(14px, 1.35vw, 17px);
  }

  .photo-tag,
  .photo-date {
    font-size: clamp(12px, 1.2vw, 14px);
  }
}

@media (max-width: 1024px) {
  .photo-page {
    padding: 40px 20px 60px;
  }

  .photo-toolbar {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 14px;
  }

  .photo-filters {
    gap: 18px;
    flex-wrap: wrap;
  }

  .year-select {
    justify-self: start;
  }

  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 18px;
  }
}

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