/* ============================================================
   龙凤花鸟字 – Showcase Stylesheet
   Traditional Chinese aesthetic: crimson, gold, cream
   ============================================================ */

/* --- Reset & Base ------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-primary: #DC143C;
  --color-secondary: #FFD700;
  --color-bg: #8B0000;
  --color-bg-dark: #5C0000;
  --color-text: #FFF8DC;
  --color-text-muted: #F5DEB3;
  --color-card-bg: rgba(0, 0, 0, 0.25);
  --color-card-border: rgba(255, 215, 0, 0.3);
  --font-display: "STKaiti", "KaiTi", "楷体", "Noto Serif SC", "Georgia", serif;
  --font-body: "STSong", "SimSun", "宋体", "Noto Serif SC", "Georgia", serif;
  --font-english: "Georgia", "Times New Roman", serif;
  --max-width: 720px;
  --section-spacing: 1.5rem;
  --gold-line: rgba(255, 215, 0, 0.3);
  --shadow-depth: 0 4px 20px rgba(139, 0, 0, 0.3);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.8;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.05em;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(255, 215, 0, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(220, 20, 60, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(255, 215, 0, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--color-secondary);
  text-decoration: none;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}
a:hover, a:focus {
  color: #fff;
  text-decoration: underline;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}
a:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* --- Animations --------------------------------------------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes goldLineExpand {
  from { transform: scaleX(0); opacity: 0; }
  to { transform: scaleX(1); opacity: 1; }
}

.section-animate {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.section-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Language Switcher -------------------------------------- */
.lang-switcher {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  background: var(--color-bg-dark);
  border-bottom: 1px solid var(--color-card-border);
  animation: fadeIn 0.5s ease;
  flex-wrap: wrap;
}

.lang-select {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border: 1px solid var(--color-secondary);
  border-radius: 6px;
  color: var(--color-secondary);
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  outline: none;
  min-width: 140px;
  font-family: var(--font-body);
}
.lang-select:hover {
  background: var(--color-secondary);
  color: var(--color-bg-dark);
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}
.lang-select:focus {
  background: var(--color-secondary);
  color: var(--color-bg-dark);
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.4);
}
.lang-select option {
  background: #2a0a0a;
  color: var(--color-text);
  padding: 0.5rem;
}

/* Keep old .lang-btn styles for compatibility */
.lang-btn {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border: 1px solid var(--color-secondary);
  border-radius: 4px;
  color: var(--color-secondary);
  background: transparent;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}
.lang-btn:hover {
  background: var(--color-secondary);
  color: var(--color-bg-dark);
  text-decoration: none;
}
.lang-btn.active {
  background: var(--color-secondary);
  color: var(--color-bg-dark);
  text-decoration: none;
}

/* --- Hero --------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  text-align: center;
  padding: 3.5rem 1.5rem 2.5rem;
  background: linear-gradient(180deg, var(--color-bg-dark) 0%, var(--color-bg) 100%);
  overflow: hidden;
  z-index: 1;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    radial-gradient(circle at 15% 25%, rgba(255, 215, 0, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(255, 215, 0, 0.04) 0%, transparent 40%),
    repeating-linear-gradient(45deg, transparent, transparent 40px, rgba(255, 215, 0, 0.015) 40px, rgba(255, 215, 0, 0.015) 41px),
    repeating-linear-gradient(-45deg, transparent, transparent 40px, rgba(255, 215, 0, 0.015) 40px, rgba(255, 215, 0, 0.015) 41px);
  pointer-events: none;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(90%, 600px);
  height: min(80%, 400px);
  border: 1px solid rgba(255, 215, 0, 0.08);
  border-radius: 4px;
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  max-width: var(--max-width);
  z-index: 1;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 8vw, 4.5rem);
  font-weight: 700;
  color: var(--color-secondary);
  letter-spacing: 0.15em;
  line-height: 1.2;
  margin-bottom: 1rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 215, 0, 0.15);
  animation: fadeInUp 1s ease both;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 3vw, 1.35rem);
  color: var(--color-text-muted);
  letter-spacing: 0.1em;
  animation: fadeInUp 1s ease 0.3s both;
}

.hero-line {
  display: block;
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-secondary), transparent);
  margin: 1.25rem auto 0;
  animation: goldLineExpand 1s ease 0.6s both;
}

/* --- Main & Container --------------------------------------- */
.showcase-main {
  position: relative;
  z-index: 1;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.gold-divider {
  display: block;
  width: 60%;
  max-width: 300px;
  height: 1px;
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, var(--gold-line), transparent);
  border: none;
}

/* --- Sections ----------------------------------------------- */
.section {
  padding: 1.5rem 1.25rem;
  margin: var(--section-spacing) 0;
}
.section:first-child {
  margin-top: 1rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 5vw, 2rem);
  color: var(--color-secondary);
  text-align: center;
  margin-bottom: 1rem;
  letter-spacing: 0.1em;
  position: relative;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: var(--color-secondary);
  margin: 0.75rem auto 0;
  opacity: 0.6;
  transition: width 0.4s ease, opacity 0.4s ease;
}
.section:hover .section-title::after {
  width: 100px;
  opacity: 0.9;
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  opacity: 0.8;
}

/* --- Card --------------------------------------------------- */
.card {
  position: relative;
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.1), rgba(220, 20, 60, 0.05));
  border: 1px solid var(--color-card-border);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--shadow-depth);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.card:hover {
  box-shadow: 0 6px 28px rgba(139, 0, 0, 0.45);
  transform: translateY(-2px);
}

.card::before, .card::after {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  border-color: rgba(255, 215, 0, 0.35);
  border-style: solid;
  transition: border-color 0.3s ease;
}
.card::before { top: 8px; left: 8px; border-width: 1px 0 0 1px; }
.card::after { bottom: 8px; right: 8px; border-width: 0 1px 1px 0; }
.card:hover::before, .card:hover::after {
  border-color: rgba(255, 215, 0, 0.6);
}

/* --- Intro -------------------------------------------------- */
.intro-text {
  font-size: 1rem;
  text-indent: 2em;
  text-align: justify;
  margin-bottom: 1em;
  line-height: 2;
}
.intro-text:last-child {
  margin-bottom: 0;
}

/* --- Artist ------------------------------------------------- */
.artist-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--color-secondary);
  margin-bottom: 0.5rem;
}

.artist-bio {
  font-size: 0.95rem;
  text-indent: 2em;
  text-align: justify;
  margin-bottom: 0.8em;
  line-height: 1.9;
}
.artist-bio:last-of-type {
  margin-bottom: 0;
}

.achievements-wrap {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-card-border);
}

.achievements-title {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--color-secondary);
  margin-bottom: 0.75rem;
}

.achievements-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.achievement-tag {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  font-size: 0.8rem;
  background: rgba(255, 215, 0, 0.1);
  color: var(--color-text-muted);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 4px;
  line-height: 1.5;
}

/* --- Work Showcase (artwork + description + tags) ----------- */
.work-showcase {
  margin-bottom: 2.5rem;
}

.work-showcase-image {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--color-card-border);
  background: var(--color-card-bg);
  margin-bottom: 1.5rem;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.work-showcase-image:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  transform: translateY(-4px);
}
.work-showcase-scroll {
  width: 100%;
}
.work-showcase-image .featured-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  cursor: pointer;
}

.work-showcase-info {
  padding: 0 0.5rem;
}

.work-showcase-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--color-secondary);
  margin-bottom: 0.875rem;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.work-showcase-desc {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.95;
  text-align: justify;
  margin-bottom: 1.5rem;
  opacity: 0.95;
}

.blessings-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.blessing-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.9rem;
  background: linear-gradient(135deg, rgba(220, 20, 60, 0.3), rgba(220, 20, 60, 0.15));
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 20px;
  transition: transform 0.2s ease, border-color 0.3s ease;
}
.blessing-tag:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 215, 0, 0.5);
}

.blessing-tag-icon {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--color-primary);
  text-shadow: 0 0 6px rgba(220, 20, 60, 0.4);
}

.blessing-tag-text {
  font-size: 0.9rem;
  color: var(--color-text);
  font-weight: 600;
}

/* --- Blessing Grid (3 rows × 2 cols) ------------------------ */
.blessing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.blessing-item {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--color-card-border);
  background: var(--color-card-bg);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.blessing-item:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transform: translateY(-3px);
}

.blessing-image {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.blessing-caption {
  padding: 0.5rem 0.6rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: center;
  background: rgba(0, 0, 0, 0.2);
  font-family: var(--font-display);
}

/* --- Artist Portrait (full-width large image) --------------- */
.artist-portrait-wrap {
  margin-top: 1.5rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--color-card-border);
  background: var(--color-card-bg);
}

.artist-portrait {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.artist-portrait:hover {
  transform: scale(1.01);
}

/* --- Timeline (artist experience) ---------------------------- */
.timeline-wrap {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-card-border);
}

.timeline-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline-item {
  position: relative;
  padding: 0.6rem 0 0.6rem 1.4rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  border-left: 2px solid var(--color-card-border);
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 0.9rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid var(--color-bg);
}
.timeline-item:last-child {
  border-left-color: transparent;
}

/* --- Banbi Fo Section --------------------------------------- */
.banbi-fo-card {
  padding: 1.5rem;
}

.banbi-fo-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.banbi-fo-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--color-secondary);
  margin-bottom: 0.3rem;
}

.banbi-fo-subtitle {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-style: italic;
}

.banbi-fo-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.banbi-fo-image-wrap {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--color-card-border);
  background: var(--color-card-bg);
}

.banbi-fo-image {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  display: block;
  cursor: pointer;
  background: #fff;
}

.banbi-fo-text {
  border-top: 1px solid var(--color-card-border);
  padding-top: 1.2rem;
}

.banbi-fo-verse {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 2;
  text-align: center;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}
.banbi-fo-verse:last-child {
  margin-bottom: 0;
}

/* --- Featured Gallery --------------------------------------- */
.featured-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}

@media (min-width: 768px) {
  .featured-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

.featured-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--color-card-border);
  background: var(--color-card-bg);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.featured-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.featured-item.featured-wide {
  grid-column: 1 / -1;
  position: relative;
  overflow: hidden;
}
.featured-wide-scroll {
  width: 100%;
}
.featured-item.featured-wide .featured-image {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.featured-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.featured-item:hover .featured-image {
  transform: scale(1.05);
}

/* Scroll hint for horizontally scrollable containers */
.scroll-hint {
  position: relative;
}
.scroll-hint::after {
  content: '← →';
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: var(--color-secondary);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  pointer-events: none;
  opacity: 0.8;
  transition: opacity 0.3s;
}
.scroll-hint.scrolled::after {
  opacity: 0;
}

/* --- Save as Image Button ----------------------------------- */
.save-image-btn {
  position: fixed;
  bottom: 5rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-bg-dark);
  border: 1px solid var(--color-card-border);
  color: var(--color-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: opacity 0.3s ease, background 0.3s ease, transform 0.3s ease;
  z-index: 150;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.save-image-btn:hover {
  opacity: 1;
  background: var(--color-secondary);
  color: var(--color-bg-dark);
  transform: scale(1.1);
}
.save-image-btn.saving {
  opacity: 1;
  background: var(--color-primary);
  color: #fff;
  pointer-events: none;
  animation: pulse 1s ease infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.save-tooltip {
  position: absolute;
  right: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-bg-dark);
  color: var(--color-text);
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  border: 1px solid var(--color-card-border);
}
.save-image-btn:hover .save-tooltip {
  opacity: 1;
}

.featured-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1rem 1rem 0.75rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
}

.featured-title {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

/* --- Baijiaxing (Hundred Family Names) ---------------------- */
.baijiaxing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.baijiaxing-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--color-card-border);
  background: var(--color-card-bg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.baijiaxing-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.baijiaxing-image {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.baijiaxing-item:hover .baijiaxing-image {
  transform: scale(1.05);
}

.baijiaxing-label {
  text-align: center;
  padding: 0.5rem 0.25rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--color-secondary);
  background: rgba(0, 0, 0, 0.4);
}

/* --- Photo Grid (Teaching & Events) ------------------------- */
.photo-grid {
  display: grid;
  gap: 1rem;
}
.photo-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.photo-grid-3 {
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
  .photo-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.photo-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--color-card-border);
  background: var(--color-card-bg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.photo-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}

.photo-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.photo-item:hover .photo-image {
  transform: scale(1.05);
}

.photo-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 0.75rem 0.75rem 0.6rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.photo-item:hover .photo-caption {
  opacity: 1;
}

/* --- International Exchange --------------------------------- */
.intl-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.intl-item {
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.intl-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.intl-image-wrap {
  overflow: hidden;
}

.intl-image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.intl-item:hover .intl-image {
  transform: scale(1.05);
}

.intl-caption {
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.5;
}

/* --- Heritage ----------------------------------------------- */
.heritage-grid {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.heritage-item {
  max-width: 400px;
  border-radius: 8px;
  border: 1px solid var(--color-card-border);
  overflow: hidden;
  background: var(--color-card-bg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.heritage-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.heritage-image {
  width: 100%;
  height: auto;
  display: block;
}

.heritage-caption {
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* --- Contact ------------------------------------------------ */
.contact-section {
  background: var(--color-bg-dark);
  border-top: 1px solid var(--gold-line);
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.contact-list { list-style: none; }

.contact-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid rgba(255, 215, 0, 0.12);
  transition: background 0.3s ease, transform 0.3s ease;
  border-radius: 4px;
}
.contact-item:hover {
  background: rgba(255, 215, 0, 0.04);
  transform: translateX(0.25rem);
}
.contact-item:last-child { border-bottom: none; }

.contact-label {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  flex-shrink: 0;
  margin-right: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  font-size: 1.1rem;
  color: var(--color-secondary);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.contact-item:hover .contact-icon { transform: scale(1.15); }

.contact-value {
  font-size: 0.9rem;
  text-align: right;
  word-break: break-all;
}

.contact-badge {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.1));
  color: var(--color-secondary);
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 999px;
  transition: background 0.3s ease, transform 0.3s ease;
}
.contact-badge:hover {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.35), rgba(255, 215, 0, 0.2));
  transform: translateY(-1px);
  text-decoration: none;
}

.contact-placeholder {
  text-align: center;
  color: var(--color-text-muted);
  font-style: italic;
  padding: 1rem 0;
}

/* --- Footer ------------------------------------------------- */
.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  opacity: 0.8;
  border-top: 1px solid var(--gold-line);
}
.site-footer::before {
  content: '';
  display: block;
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-secondary), transparent);
  margin: 0 auto 1.5rem;
}
.site-footer p { margin-bottom: 0.25rem; }

/* --- Scroll Progress Bar ------------------------------------ */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  z-index: 200;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* --- Back to Top Button ------------------------------------- */
.back-to-top {
  position: fixed;
  bottom: 2rem; right: 2rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--color-bg-dark);
  border: 1px solid var(--color-card-border);
  color: var(--color-secondary);
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.3s ease;
  z-index: 150;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--color-secondary);
  color: var(--color-bg-dark);
  box-shadow: 0 4px 16px rgba(255, 215, 0, 0.3);
}

/* --- Social Share ------------------------------------------- */
.social-share {
  position: fixed;
  bottom: 2rem; right: 5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 150;
}

.share-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--color-bg-dark);
  border: 1px solid var(--color-card-border);
  color: var(--color-text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
  position: relative;
  text-decoration: none;
}
.share-btn:hover {
  background: var(--color-secondary);
  color: var(--color-bg-dark);
  transform: scale(1.1);
  text-decoration: none;
}
.share-btn.copied {
  background: #228B22;
  color: #fff;
  border-color: #228B22;
}

.share-tooltip {
  position: absolute;
  right: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-bg-dark);
  color: var(--color-text);
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  border: 1px solid var(--color-card-border);
}
.share-btn:hover .share-tooltip { opacity: 1; }

/* --- Language Modal ----------------------------------------- */
.lang-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lang-modal.active {
  opacity: 1;
  visibility: visible;
}

.lang-modal-content {
  background: linear-gradient(135deg, #2a0a0a, #1a0505);
  border: 1px solid var(--color-card-border);
  border-radius: 16px;
  padding: 2rem;
  max-width: 420px;
  width: 90%;
  position: relative;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}

.lang-modal-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.lang-modal-header h3 {
  font-family: var(--font-display);
  color: var(--color-secondary);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.lang-modal-hint {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  opacity: 0.8;
  line-height: 1.6;
}

.lang-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.lang-modal-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.6rem 0.4rem;
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.2s ease, border-color 0.3s ease;
}
.lang-modal-btn:hover {
  background: rgba(255, 215, 0, 0.2);
  border-color: rgba(255, 215, 0, 0.5);
  transform: translateY(-2px);
  text-decoration: none;
}

.lang-modal-code {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-secondary);
  letter-spacing: 0.05em;
}

.lang-modal-name {
  font-size: 0.85rem;
  color: var(--color-text);
  margin-top: 0.15rem;
}

.lang-modal-close {
  position: absolute;
  top: 0.75rem; right: 0.75rem;
  width: 32px; height: 32px;
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.3s ease, color 0.3s ease;
}
.lang-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* --- Lightbox Overlay --------------------------------------- */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s ease;
}

.lightbox-caption {
  margin-top: 0.75rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 44px; height: 44px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, transform 0.3s ease;
  z-index: 1001;
}
.lightbox-close:hover {
  background: var(--color-primary);
  transform: scale(1.1);
}

.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, transform 0.3s ease;
  z-index: 1001;
}
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-prev:hover, .lightbox-next:hover {
  background: var(--color-primary);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-close:focus-visible,
.lightbox-prev:focus-visible,
.lightbox-next:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 3px;
}

/* --- Contact Form ------------------------------------------- */
.contact-form {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-label {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 600;
  letter-spacing: 0.03em;
}
.form-label .required {
  color: var(--color-primary);
  margin-left: 0.25rem;
}

.form-input, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--color-card-border);
  border-radius: 6px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  line-height: 1.6;
}
.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15);
}
.form-input::placeholder, .form-textarea::placeholder {
  color: rgba(245, 222, 179, 0.4);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-input.field-invalid, .form-textarea.field-invalid {
  border-color: var(--color-primary);
}

.field-error {
  font-size: 0.8rem;
  color: var(--color-primary);
  min-height: 1em;
}

.contact-submit {
  padding: 0.85rem 2rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--color-bg-dark);
  background: var(--color-secondary);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  align-self: flex-start;
}
.contact-submit:hover:not(:disabled) {
  background: #fff;
  transform: translateY(-2px);
}
.contact-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.contact-status {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.95rem;
  display: none;
}
.contact-status-success {
  display: block;
  background: rgba(34, 139, 34, 0.15);
  border: 1px solid rgba(34, 139, 34, 0.3);
  color: #90EE90;
}
.contact-status-error {
  display: block;
  background: rgba(220, 20, 60, 0.15);
  border: 1px solid rgba(220, 20, 60, 0.3);
  color: #FFB6C1;
}

/* --- WeChat QR Modal ---------------------------------------- */
.wechat-qr-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.wechat-qr-modal.active { opacity: 1; visibility: visible; }

.wechat-qr-content {
  background: var(--color-bg-dark);
  border: 1px solid var(--color-card-border);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  max-width: 320px;
  position: relative;
}
.wechat-qr-content h3 {
  font-family: var(--font-display);
  color: var(--color-secondary);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}
.wechat-qr-content p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-top: 1rem;
}
.wechat-qr-img { width: 200px; height: 200px; border-radius: 4px; }

.wechat-qr-close {
  position: absolute;
  top: 0.5rem; right: 0.5rem;
  width: 32px; height: 32px;
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.3s ease;
}
.wechat-qr-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ============================================================
   Responsive — Mobile First → Desktop
   ============================================================ */

/* Small phones (< 400px) */
@media (max-width: 399px) {
  .hero { padding: 3rem 1rem 2rem; min-height: 40vh; }
  .hero-title { letter-spacing: 0.1em; }
  .section { padding: 2rem 1rem; }
  .blessings-list { grid-template-columns: repeat(3, 1fr); }
  .baijiaxing-grid { grid-template-columns: repeat(2, 1fr); }
  .intl-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-grid-2 { grid-template-columns: repeat(2, 1fr); }
  .photo-grid-3 { grid-template-columns: 1fr; }
  .lang-modal-grid { grid-template-columns: repeat(2, 1fr); }
  .lang-btn { padding: 0.15rem 0.4rem; font-size: 0.7rem; }
}

/* Phones (400-599px) */
@media (min-width: 400px) and (max-width: 599px) {
  .baijiaxing-grid { grid-template-columns: repeat(2, 1fr); }
  .intl-grid { grid-template-columns: repeat(2, 1fr); }
  .lang-modal-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Tablets and up (600px+) */
@media (min-width: 600px) {
  .hero { min-height: 60vh; padding: 4rem 2rem 3rem; }
  .section { padding: 2rem 2rem; }
  .card { padding: 2rem; }
  .photo-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .card::before, .card::after { width: 28px; height: 28px; }

  /* Work showcase: image + info side by side on desktop */
  .work-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
  }
  .work-showcase-image { margin-bottom: 0; }
  .work-showcase-info { padding: 0.5rem 0; }

  .contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }
  .form-group.full-width { grid-column: 1 / -1; }

  .social-share {
    position: fixed;
    bottom: 2rem;
    right: 5rem;
  }
}

/* Desktop (900px+) */
@media (min-width: 900px) {
  :root {
    --max-width: 900px;
    --section-spacing: 2rem;
  }

  .hero-title { letter-spacing: 0.25em; }
  .hero { min-height: 65vh; padding: 5rem 2rem 4rem; }

  .work-showcase { gap: 2.5rem; }
  .work-showcase-title { font-size: 1.5rem; }
  .work-showcase-desc { font-size: 1rem; }

  .featured-gallery {
    grid-template-columns: 1fr 1fr;
  }
  .featured-hero {
    grid-column: 1 / -1;
  }

  .baijiaxing-grid { gap: 1rem; }
  .intl-grid { gap: 1.5rem; }

  .contact-submit { align-self: start; }
}

/* Large desktop (1200px+) */
@media (min-width: 1200px) {
  :root {
    --max-width: 1000px;
  }
}

/* --- Mobile adjustments ------------------------------------- */
@media (max-width: 599px) {
  .social-share {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    flex-direction: row;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--color-bg-dark);
    border-top: 1px solid var(--color-card-border);
  }
  .share-tooltip { display: none; }

  .back-to-top { bottom: 5rem; right: 1rem; }

  .save-image-btn { bottom: 8rem; right: 1rem; }
  .save-tooltip { display: none; }

  .contact-submit {
    width: 100%;
    text-align: center;
  }

  /* Gallery mobile optimizations */
  .featured-gallery {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .work-showcase {
    display: block;
  }

  .work-showcase-image {
    margin-bottom: 1.25rem;
  }

  .work-showcase-info {
    padding: 0;
  }

  .work-showcase-title {
    font-size: 1.25rem;
  }

  .work-showcase-desc {
    font-size: 0.95rem;
  }

  .photo-grid-2,
  .photo-grid-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .baijiaxing-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .intl-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lightbox-prev {
    left: 0.5rem;
    width: 36px; height: 36px;
    font-size: 1.5rem;
  }
  .lightbox-next {
    right: 0.5rem;
    width: 36px; height: 36px;
    font-size: 1.5rem;
  }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .section-animate { opacity: 1; transform: none; }
}
