/* =========================================================================
   ART GALLERY PORTFOLIO STYLES
   Inspired by ARTE / Editorial Art Gallery aesthetics
   All paths and assets are strictly relative.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --bg-main: #fcfcfb;
  --bg-card: #ffffff;
  --bg-alt: #f5f5f2;
  --text-primary: #181818;
  --text-secondary: #6e6e6e;
  --text-muted: #9e9e9e;
  --accent-gold: #b38b59;
  --accent-gold-hover: #967041;
  --border-light: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.16);
  --shadow-subtle: 0 10px 30px rgba(0, 0, 0, 0.06);
  --shadow-art: 0 20px 48px rgba(0, 0, 0, 0.14);
  --shadow-hover: 0 28px 60px rgba(0, 0, 0, 0.22);
  --font-serif: "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
  --transition-smooth: all 0.4s cubic-bezier(0.2, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
}

/* =========================================================================
   NAVIGATION BAR
   ========================================================================= */
.gallery-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(252, 252, 251, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
  padding: 18px 0;
  transition: var(--transition-smooth);
}

.nav-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gallery-logo {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.gallery-logo:hover {
  color: var(--accent-gold);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.25s ease;
  position: relative;
  padding-bottom: 4px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1.5px;
  background-color: var(--text-primary);
}

.nav-cta-btn {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background-color: var(--text-primary);
  padding: 10px 22px;
  border-radius: 2px;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.nav-cta-btn:hover {
  background-color: var(--accent-gold);
}

/* =========================================================================
   HERO / FEATURED SECTION
   ========================================================================= */
.hero-section {
  position: relative;
  min-height: 82vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 40px 80px;
  max-width: 1360px;
  margin: 0 auto;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.05fr 1.25fr;
  align-items: center;
  gap: 60px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent-gold);
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 3.8rem;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 2px;
}

.hero-date {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

.hero-location {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-top: 6px;
  max-width: 480px;
}

.hero-actions {
  margin-top: 14px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background-color: var(--text-primary);
  color: #fff;
  border: none;
  padding: 14px 28px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary svg {
  width: 16px;
  height: 16px;
  transition: transform 0.25s ease;
}

.btn-primary:hover {
  background-color: var(--accent-gold);
  box-shadow: 0 8px 24px rgba(179, 139, 89, 0.3);
}

.btn-primary:hover svg {
  transform: translateX(4px);
}

/* Hero Image Card (Hover Zoom Feature) */
.hero-image-card {
  position: relative;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: var(--shadow-art);
  transition: var(--transition-smooth);
}

.hero-image-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.hero-image-zoom-box {
  position: relative;
  width: 100%;
  height: 480px;
  overflow: hidden;
  border-radius: 4px;
  background-color: #f0f0ee;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), filter 0.3s ease;
}

/* Mouse hover zoom requested by user */
.hero-image-card:hover .hero-img {
  transform: scale(1.08);
}

.hero-image-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 2px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.scroll-down-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 40px auto 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.scroll-down-btn svg {
  width: 28px;
  height: 28px;
  transition: transform 0.3s ease, color 0.3s ease;
}

.scroll-down-btn:hover {
  color: var(--text-primary);
}

.scroll-down-btn:hover svg {
  transform: translateY(3px);
}

/* =========================================================================
   EXHIBITIONS SECTION
   ========================================================================= */
.exhibitions-section {
  padding: 80px 40px 100px;
  max-width: 1360px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 3.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.title-divider {
  width: 1px;
  height: 40px;
  background-color: var(--border-strong);
  margin: 18px auto 16px;
}

.section-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  max-width: 600px;
  margin: 0 auto;
}

/* Artwork Grid / Carousel */
.gallery-wrapper {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  scroll-behavior: smooth;
}

/* Individual Artwork Card */
.art-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  background: transparent;
  transition: transform 0.35s ease;
}

.art-card:hover {
  transform: translateY(-5px);
}

/* Mouse Hover Zoom Container */
.art-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 4px;
  background-color: #eee;
  box-shadow: var(--shadow-art);
  transition: box-shadow 0.4s ease;
}

.art-card:hover .art-image-wrapper {
  box-shadow: var(--shadow-hover);
}

.art-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

/* User requirement: "마우스를 사진에 대면 이미지가 확대되는 형식" */
.art-card:hover .art-card-img {
  transform: scale(1.12);
}

.art-card-info {
  margin-top: 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.art-card-title {
  font-family: var(--font-serif);
  font-size: 1.32rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

.art-card:hover .art-card-title {
  color: var(--accent-gold);
}

.art-card-meta {
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-gold);
}

.art-card-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* Gallery Arrows */
.gallery-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.carousel-arrow {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.carousel-arrow svg {
  width: 18px;
  height: 18px;
}

.carousel-arrow:hover {
  background-color: var(--text-primary);
  color: #fff;
  border-color: var(--text-primary);
}

/* =========================================================================
   BOTTOM BANNER & FOOTER
   ========================================================================= */
.gallery-footer-banner {
  background-color: var(--bg-alt);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 90px 40px;
  text-align: center;
}

.banner-heading {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.banner-subtext {
  font-size: 0.96rem;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-footer {
  padding: 32px 40px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  background-color: var(--bg-main);
}

/* =========================================================================
   ARTWORK DETAIL POPUP MODAL (User requirement: 개별 팝업 & 우측 정보)
   ========================================================================= */
.artwork-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.artwork-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 18, 18, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  background-color: #ffffff;
  border-radius: 6px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.4);
  z-index: 10;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96) translateY(12px);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.artwork-modal.open .modal-dialog {
  transform: scale(1) translateY(0);
}

/* Close button */
.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(245, 245, 242, 0.9);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 30;
  transition: var(--transition-smooth);
}

.modal-close-btn svg {
  width: 20px;
  height: 20px;
}

.modal-close-btn:hover {
  background-color: var(--text-primary);
  color: #fff;
  transform: rotate(90deg);
}

/* Modal Body Layout: Left Image / Right Info */
.modal-body {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  height: 100%;
  max-height: 90vh;
  overflow: hidden;
}

/* Left Image Column */
.modal-image-col {
  background: #111317;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 32px;
  overflow: hidden;
  user-select: none;
}

.modal-image-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
}

.modal-image {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  transition: transform 0.35s cubic-bezier(0.2, 0, 0.2, 1);
  will-change: transform;
}

.modal-image-wrapper.zoomed .modal-image {
  transform: scale(1.85);
  cursor: zoom-out;
}

.zoom-magnifier-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.65);
  color: #d1d5db;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 5px 14px;
  border-radius: 20px;
  pointer-events: none;
}

/* Right Info Column */
.modal-info-col {
  padding: 44px 38px 36px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: #ffffff;
}

.info-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-category {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-gold);
}

.info-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

.info-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.info-divider {
  width: 100%;
  height: 1px;
  background-color: var(--border-light);
  margin: 22px 0 20px;
}

.info-description-box {
  margin-bottom: 24px;
}

.meta-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.info-description {
  font-size: 0.94rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* Meta Table */
.info-meta-table {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background-color: var(--bg-alt);
  padding: 18px 20px;
  border-radius: 4px;
  border: 1px solid var(--border-light);
  margin-bottom: auto;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
}

.meta-key {
  color: var(--text-muted);
  font-weight: 500;
}

.meta-value {
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
}

/* Modal Bottom Navigation */
.modal-nav-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
}

.modal-step-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid var(--border-strong);
  padding: 8px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  cursor: pointer;
  color: var(--text-primary);
  transition: var(--transition-smooth);
}

.modal-step-btn svg {
  width: 15px;
  height: 15px;
}

.modal-step-btn:hover {
  background-color: var(--text-primary);
  color: #fff;
  border-color: var(--text-primary);
}

.modal-page-counter {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

/* =========================================================================
   RESPONSIVE STYLES
   ========================================================================= */
@media (max-width: 1080px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .modal-body {
    grid-template-columns: 1fr;
    max-height: 85vh;
    overflow-y: auto;
  }

  .modal-image-col {
    padding: 24px;
    height: 380px;
  }
}

@media (max-width: 768px) {
  .nav-container {
    padding: 0 20px;
  }

  .nav-menu {
    display: none;
  }

  .hero-section {
    padding: 40px 20px 60px;
  }

  .hero-title {
    font-size: 2.8rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .section-title {
    font-size: 2.4rem;
  }

  .modal-dialog {
    max-height: 94vh;
  }

  .modal-info-col {
    padding: 24px 20px;
  }
}

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

  .hero-title {
    font-size: 2.2rem;
  }
}
