*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

:root {
  /* Match localhost header tone */
  --header-blue: #21375b;
  --header-china: #b8860b;
  --header-japan: #b91c1c;
  --header-korea: #166534;
  --header-symbolism: #4b5563;
  --header-production: #111111;
  --deco-strip-w: min(300px, max(180px, 16vw));
  --text: #1f2937;
  --text-muted: #6b7280;
  --bg: #f5f2eb;
  --main-panel-bg: #faf8f4;
  --card-bg: #fff;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
  --radius: 8px;
}

body {
  margin: 0;
  font-family: 'Times New Roman', Times, Georgia, serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Header — title row, then Gallery / Style / Symbolism / Production Techniques below */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 1rem 1.5rem 1.1rem;
  gap: 0;
  color: #fff;
  box-shadow: var(--shadow);
}

.header-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.25rem;
  padding: 0 5rem;
}

.header-home {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: inherit;
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 600;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius);
  z-index: 2;
}

.header-home:hover {
  background: rgba(255,255,255,.15);
}

.site-header.header-default {
  background: var(--header-blue);
}

.site-header.header-china {
  background: var(--header-china);
}

.site-header.header-japan {
  background: var(--header-japan);
}

.site-header.header-korea {
  background: var(--header-korea);
}

.site-header.header-symbolism {
  background: var(--header-symbolism);
}

.site-header.header-production {
  background: var(--header-production);
}

.header-title {
  display: block;
  margin: 0;
  max-width: min(90vw, 36rem);
  text-align: center;
  font-size: clamp(1.35rem, 3.5vw, 3rem);
  font-weight: 700;
  color: inherit;
  text-decoration: none;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.header-title:hover {
  opacity: 0.92;
}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 1.25rem;
  width: 100%;
  margin-top: 0.65rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  font-size: clamp(0.95rem, 1.35vw, 1.35rem);
  position: relative;
  z-index: 2;
}

@media (max-width: 600px) {
  .header-top {
    padding: 0 0 2.5rem;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 0;
  }

  .header-home {
    position: static;
    transform: none;
    align-self: flex-start;
    margin-bottom: 0.35rem;
  }

  .header-title {
    max-width: 100%;
  }

  .header-nav {
    gap: 0.5rem 0.75rem;
    margin-top: 0.5rem;
    padding-top: 0.65rem;
  }
}

.nav-btn {
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius);
  text-decoration: none;
}

.nav-btn:hover {
  background: rgba(255,255,255,.15);
}

.nav-item.dropdown {
  position: relative;
}

.dropdown-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  background: var(--card-bg);
  color: var(--text);
  min-width: 140px;
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  z-index: 100;
}

.dropdown-list.open {
  display: block;
}

.dropdown-list a {
  display: block;
  padding: 0.6rem 1.1rem;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}

.dropdown-list a:hover {
  background: var(--bg);
}

/* Left decorative strip (calligraphy) – background layer */
.page-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.left-deco {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--deco-strip-w);
  min-width: 180px;
  max-width: 300px;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.left-deco img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Right decorative strip (calligraphy) – background layer */
.right-deco {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: var(--deco-strip-w);
  min-width: 180px;
  max-width: 300px;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.right-deco img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Main — centered column between calligraphy strips (localhost layout) */
.main {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 2rem 1.75rem 2.5rem;
  margin: 0 auto;
  width: 100%;
  min-width: 0;
  max-width: min(1040px, calc(100vw - 2 * var(--deco-strip-w) - 2.5rem));
  background: var(--main-panel-bg);
  box-shadow: 0 0 0 1px rgba(33, 55, 91, 0.06);
}

@media (max-width: 768px) {
  .left-deco,
  .right-deco {
    display: none;
  }

  .main {
    max-width: 100%;
    box-shadow: none;
  }
}

.home-main .tagline {
  font-size: 1.25rem;
  color: var(--text-muted);
}

.home-hero {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: nowrap;
}

.hero-image {
  margin: 0;
  flex: 0 0 58%;
  max-width: 58%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-image img {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.hero-text {
  flex: 1;
  min-width: 0;
}

.hero-text p {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--text);
}

.home-section {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-top: 3rem;
  flex-wrap: nowrap;
}

.home-section-china .section-text {
  flex: 1;
  min-width: 0;
}

.home-section-china .section-image {
  margin: 0;
  flex: 0 0 26%;
  max-width: 26%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.home-section-korea .section-text {
  flex: 1;
  min-width: 0;
}

.home-section-korea .section-image {
  margin: 0;
  flex: 0 0 52%;
  max-width: 52%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.section-text p {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--text);
}

.section-text-full p {
  margin-bottom: 1rem;
}

.section-text-full p:last-child {
  margin-bottom: 0;
}

.section-image img {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.home-section-japan {
  flex-direction: column;
  align-items: center;
}

.home-section-japan .section-image-japan {
  flex: none;
  max-width: 92%;
  width: 92%;
  margin-left: auto;
  margin-right: auto;
}

.home-section-japan .section-text-below {
  margin-top: 1.5rem;
}

.home-section-symbolism {
  flex-wrap: nowrap;
}

.home-section-symbolism .section-image-symbolism {
  margin: 0;
  flex: 0 0 22%;
  max-width: 22%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.home-section-symbolism .section-image-symbolism-right {
  flex: 0 0 34%;
  max-width: 34%;
}

.home-section-symbolism .section-text-symbolism {
  flex: 1;
  min-width: 0;
}

.gallery-title {
  font-size: 2.5rem;
  margin: 0 0 1.5rem;
  color: var(--text);
}

.gallery-subtitle {
  font-size: 1.75rem;
  margin: 1.5rem 0 1rem;
  color: var(--text);
  font-weight: 600;
}

.art-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.art-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.art-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}

.art-card-link {
  text-decoration: none;
  color: inherit;
}

.art-card-featured {
  grid-column: 1 / -1;
  max-width: 900px;
  justify-self: center;
}

.art-card-featured .art-image-full {
  height: auto;
  min-height: 280px;
  max-height: 420px;
  object-fit: contain;
  object-position: center;
  background: #f3f4f6;
}

.art-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.art-placeholder {
  width: 100%;
  height: 220px;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.art-info {
  padding: 1rem;
}

.art-info h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.art-info p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.empty-state {
  color: var(--text-muted);
  font-style: italic;
}

/* Production techniques grid */
.production-techniques {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 1.5rem;
}

.production-technique-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  max-width: 320px;
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.production-technique-card-xieyi {
  max-width: 640px;
}

.production-technique-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}

.production-technique-figure {
  margin: 0;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.production-technique-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  vertical-align: middle;
}

.production-technique-figure img.symbolism-crane-image {
  object-position: top center;
}

.production-technique-figure img.xieyi-icon-image {
  transform: scale(1.3);
  transform-origin: center;
}

.production-technique-subtitle {
  margin: 0;
  padding: 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
}
