/* 나의 여행지 — 여행 갤러리 */

.trip {
  max-width: 64rem;
  margin: var(--space-6) auto var(--space-7);
  padding-inline: var(--space-5);
  word-break: keep-all;
}
.trip__intro {
  margin-bottom: var(--space-6);
}
.trip__intro h1 {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: 0 0 var(--space-3);
  font-size: var(--fs-800);
}
.trip__intro p {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--fs-500);
}
.trip__h2 {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--fs-600);
  margin: 0 0 var(--space-5);
}

/* ── 미디어(음악·브이로그) 2열 ── */
.trip__media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-7);
  align-items: stretch;
}
/* 두 카드의 높이를 맞추기 위해 컨트롤 영역이 남는 공간을 채운다 */
.media-card__control {
  flex: 1;
  display: flex;
  align-items: center;
}
.media-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.music-card {
  border-color: color-mix(in srgb, var(--brand) 30%, var(--color-border));
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--brand) 14%, var(--color-surface)),
    var(--color-surface) 72%
  );
}
.media-card__head {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.media-card__meta {
  min-width: 0;
}
.media-card__eyebrow {
  margin: 0;
  font-size: var(--fs-300);
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--brand);
}
.media-card__title {
  margin: var(--space-1) 0 0;
  font-size: var(--fs-500);
}
.media-card__sub {
  margin: var(--space-1) 0 0;
  color: var(--color-muted);
  font-size: var(--fs-300);
}
.music__art {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--brand), #0d1730);
  color: #fff;
  font-size: 1.8rem;
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.08), var(--shadow-sm);
  animation: spin 8s linear infinite;
}
.vlog__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, var(--route-gold), #7a4a05);
  font-size: 1.7rem;
}
.music__player {
  width: 100%;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .music__art {
    animation: none;
  }
}

/* ── 갤러리 ── */
.gallery {
  list-style: none;
  margin: 0 0 var(--space-7);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-4);
}
.gcard {
  margin: 0;
}
.gcard__btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: var(--color-surface-alt);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.gcard__btn:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.gcard__btn:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}
.gcard__btn img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gcard__btn:hover img {
  transform: scale(1.06);
}
.gcard__info {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-5) var(--space-4) var(--space-3);
  color: #fff;
  background: linear-gradient(to top, rgba(6, 10, 24, 0.82), rgba(6, 10, 24, 0));
  text-align: left;
}
.gcard__place {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}
.gcard__place b {
  font-size: var(--fs-500);
  font-weight: 800;
}
.gcard__iata {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--route-gold);
}
.gcard__meta {
  font-size: var(--fs-300);
  font-weight: 700;
  white-space: nowrap;
}

/* ── 브이로그 재생 버튼 ── */
.vlog__play {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  width: 100%;
  height: 100%;
  min-height: 4.5rem;
  padding: var(--space-5);
  border: 1px dashed color-mix(in srgb, var(--route-gold) 45%, transparent);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--route-gold) 8%, var(--color-surface));
  color: var(--color-text);
  font-weight: 700;
  font-size: var(--fs-500);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.vlog__play:hover {
  border-color: var(--route-gold);
  background: color-mix(in srgb, var(--route-gold) 14%, var(--color-surface));
}
.vlog__play:focus-visible {
  outline: 2px solid var(--route-gold);
  outline-offset: 2px;
}
.vlog__play-circle {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--route-gold);
  color: #1a1200;
  font-size: 1rem;
  padding-left: 2px;
}

/* ── 영상 모달 ── */
.video-modal {
  width: min(900px, 94vw);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-lg);
}
.video-modal[open] {
  animation: lb-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.video-modal::backdrop {
  background: rgba(6, 10, 24, 0.82);
  animation: lb-backdrop 0.3s ease;
}
.video-modal video {
  display: block;
  width: 100%;
  max-height: 84vh;
  background: #000;
}
.video-modal__close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  z-index: 1;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
}
.video-modal__close:hover {
  background: rgba(0, 0, 0, 0.75);
}

/* ── 라이트박스 ── */
.lightbox {
  width: min(920px, 94vw);
  max-height: 92vh;
  margin: auto; /* 화면 정중앙 정렬 */
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0a1020;
  box-shadow: var(--shadow-lg);
}
.lightbox[open] {
  animation: lb-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.lightbox::backdrop {
  background: rgba(6, 10, 24, 0.78);
  animation: lb-backdrop 0.3s ease;
}
@keyframes lb-in {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes lb-backdrop {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .lightbox[open],
  .lightbox::backdrop,
  .video-modal[open],
  .video-modal::backdrop {
    animation: none;
  }
}
.lightbox__close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  z-index: 1;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
}
.lightbox__close:hover {
  background: rgba(0, 0, 0, 0.75);
}
.lightbox__fig {
  margin: 0;
}
.lightbox__fig img {
  display: block;
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  background: #000;
}
.lightbox__fig figcaption {
  padding: var(--space-4);
  color: #e6eefc;
  font-weight: 700;
  text-align: center;
}

/* ── 반응형 — 강의 지정 786px 분기: 3열 갤러리를 1열로 ── */
@media (max-width: 786px) {
  .trip__media {
    grid-template-columns: 1fr;
  }
  .gallery {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 400px) {
  .trip {
    padding-inline: var(--space-4);
  }
}
