/* ========== BLOG SHARED CSS ========== */
/* Inherits variables from homepage.css: --charcoal, --sand, --gold, --teal, --font-display, --font-body */

:root {
  --charcoal: #1A1A1A;
  --charcoal-deep: #111111;
  --sand: #F5EDE0;
  --sand-light: #FAF6F0;
  --gold: #C4944A;
  --gold-light: #D4A85C;
  --teal: #1B5E6B;
  --teal-dark: #154C57;
  --white: #FFFFFF;
  --off-white: #E8E0D4;
  --text-dark: #1A1A1A;
  --text-light: #F5EDE0;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-zh-display: 'Noto Serif SC', 'Playfair Display', serif;
  --font-zh-body: 'Noto Sans SC', 'Source Sans 3', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--text-light);
  background: var(--charcoal);
  overflow-x: hidden;
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ========== NAVIGATION ========== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 24px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
  background: rgba(17, 17, 17, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav.scrolled {
  padding: 16px 48px;
  box-shadow: 0 2px 40px rgba(0,0,0,0.3);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav-logo svg {
  width: 36px;
  height: 36px;
}
.nav-logo-text {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  color: var(--sand);
  text-transform: uppercase;
}
.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--sand);
  text-transform: uppercase;
  transition: color 0.3s ease;
}
.nav-links a:hover {
  color: var(--gold);
}
.nav-cta-btn {
  background: var(--gold) !important;
  color: var(--charcoal) !important;
  padding: 10px 24px !important;
  font-weight: 600 !important;
  letter-spacing: 0.12em !important;
  transition: background 0.3s ease !important;
}
.nav-cta-btn:hover {
  background: var(--gold-light) !important;
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--sand);
  transition: all 0.3s ease;
}
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--charcoal-deep);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.mobile-menu.active {
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu a {
  font-family: var(--font-body);
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sand);
  transition: color 0.3s ease;
}
.mobile-menu a:hover {
  color: var(--gold);
}

/* ========== LANGUAGE SWITCHER ========== */
.lang-switcher {
  display: flex;
  align-items: center;
  background: rgba(245, 237, 224, 0.1);
  border-radius: 20px;
  padding: 2px;
  gap: 0;
  margin-left: 12px;
}
.lang-btn {
  background: none;
  border: none;
  color: var(--sand);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.6;
}
.lang-btn.active {
  background: var(--gold);
  color: var(--charcoal);
  opacity: 1;
  font-weight: 600;
}

/* ========== BLOG INDEX ========== */
.blog-hero {
  padding: 160px 48px 80px;
  text-align: center;
  position: relative;
}
.blog-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 400;
  color: var(--sand);
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}
.blog-hero p {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--off-white);
  opacity: 0.7;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Category Filter */
.blog-filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 0 48px 48px;
  flex-wrap: wrap;
}
.filter-btn {
  background: rgba(245, 237, 224, 0.08);
  border: 1px solid rgba(245, 237, 224, 0.15);
  color: var(--sand);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 20px;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--charcoal);
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 32px;
  padding: 0 48px 80px;
  max-width: 1280px;
  margin: 0 auto;
}

.blog-card {
  background: rgba(245, 237, 224, 0.04);
  border: 1px solid rgba(245, 237, 224, 0.08);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease, border-color 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
  border-color: rgba(196, 148, 74, 0.3);
}
.blog-card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.blog-card:hover .blog-card-image {
  transform: scale(1.03);
}
.blog-card-image-wrap {
  overflow: hidden;
}
.blog-card-body {
  padding: 28px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog-card-category {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.blog-card-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--sand);
  line-height: 1.35;
  margin-bottom: 12px;
}
.blog-card-excerpt {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--off-white);
  opacity: 0.65;
  line-height: 1.65;
  flex: 1;
  margin-bottom: 16px;
}
.blog-card-meta {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--off-white);
  opacity: 0.4;
  letter-spacing: 0.05em;
}

/* ========== BLOG POST ========== */
.post-hero {
  position: relative;
  height: 65vh;
  min-height: 480px;
  max-height: 720px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.post-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,26,26,0.95) 0%, rgba(26,26,26,0.4) 50%, rgba(26,26,26,0.2) 100%);
}
.post-hero-content {
  position: relative;
  z-index: 2;
  padding: 0 48px 56px;
  max-width: 860px;
}
.post-hero-category {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  display: inline-block;
}
.post-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 400;
  color: var(--sand);
  line-height: 1.2;
  letter-spacing: 0.01em;
  margin-bottom: 16px;
}
.post-hero-meta {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--off-white);
  opacity: 0.6;
  letter-spacing: 0.04em;
}

/* Post Body */
.post-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 48px 80px;
}
.post-body h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--sand);
  margin: 48px 0 20px;
  letter-spacing: 0.01em;
  line-height: 1.3;
}
.post-body h2:first-child {
  margin-top: 0;
}
.post-body h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--sand);
  margin: 36px 0 16px;
  letter-spacing: 0.01em;
  line-height: 1.35;
}
.post-body p {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--off-white);
  line-height: 1.8;
  margin-bottom: 20px;
  opacity: 0.85;
}
.post-body ul, .post-body ol {
  margin: 0 0 20px 24px;
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--off-white);
  line-height: 1.8;
  opacity: 0.85;
}
.post-body li {
  margin-bottom: 8px;
}
.post-body strong {
  color: var(--sand);
  font-weight: 600;
}
.post-body em {
  font-style: italic;
  color: var(--sand);
  opacity: 0.9;
}
.post-body a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.3s ease;
}
.post-body a:hover {
  color: var(--gold-light);
}
.post-body blockquote {
  border-left: 3px solid var(--gold);
  padding: 16px 0 16px 24px;
  margin: 32px 0;
  font-style: italic;
  color: var(--sand);
  opacity: 0.9;
  font-size: 1.1rem;
  line-height: 1.7;
}
.post-body hr {
  border: none;
  border-top: 1px solid rgba(245, 237, 224, 0.1);
  margin: 48px 0;
}
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0 32px;
  font-size: 0.95rem;
}
.post-body table th {
  text-align: left;
  font-weight: 600;
  color: var(--sand);
  padding: 12px 16px;
  border-bottom: 2px solid rgba(196, 148, 74, 0.3);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.post-body table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(245, 237, 224, 0.08);
  color: var(--off-white);
  opacity: 0.85;
}
.post-body table tr:hover td {
  background: rgba(245, 237, 224, 0.03);
}

/* In-post images */
.post-image {
  width: calc(100% + 96px);
  margin: 40px -48px;
  border-radius: 0;
}
.post-image img {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
}
.post-image figcaption {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--off-white);
  opacity: 0.45;
  text-align: center;
  padding: 12px 48px 0;
  letter-spacing: 0.03em;
}

/* CTA Box */
.post-cta {
  background: rgba(196, 148, 74, 0.08);
  border: 1px solid rgba(196, 148, 74, 0.2);
  border-radius: 8px;
  padding: 40px;
  text-align: center;
  margin: 56px 0 0;
}
.post-cta h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--sand);
  margin: 0 0 12px;
}
.post-cta p {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--off-white);
  opacity: 0.7;
  margin-bottom: 24px;
  line-height: 1.6;
}
.post-cta .cta-btn {
  display: inline-block;
  background: var(--gold);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 14px 36px;
  border-radius: 0;
  transition: background 0.3s ease;
  text-decoration: none;
}
.post-cta .cta-btn:hover {
  background: var(--gold-light);
}

/* Related Posts */
.related-posts {
  padding: 64px 48px 80px;
  max-width: 1280px;
  margin: 0 auto;
  border-top: 1px solid rgba(245, 237, 224, 0.08);
}
.related-posts h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--sand);
  text-align: center;
  margin-bottom: 40px;
  letter-spacing: 0.02em;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

/* ========== FOOTER ========== */
.blog-footer {
  border-top: 1px solid rgba(245, 237, 224, 0.08);
  padding: 48px;
  text-align: center;
}
.blog-footer p {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--off-white);
  opacity: 0.35;
  letter-spacing: 0.06em;
}
.blog-footer a {
  color: var(--gold);
  transition: color 0.3s ease;
}
.blog-footer a:hover {
  color: var(--gold-light);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .nav {
    padding: 16px 24px;
  }
  .nav-links {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .mobile-menu {
    display: flex;
  }

  .blog-hero {
    padding: 120px 24px 48px;
  }
  .blog-filters {
    padding: 0 24px 32px;
  }
  .blog-grid {
    grid-template-columns: 1fr;
    padding: 0 24px 48px;
    gap: 24px;
  }

  .post-hero {
    height: 50vh;
    min-height: 360px;
  }
  .post-hero-content {
    padding: 0 24px 40px;
  }
  .post-body {
    padding: 40px 24px 56px;
  }
  .post-body h2 {
    font-size: 1.45rem;
    margin: 36px 0 16px;
  }
  .post-body h3 {
    font-size: 1.15rem;
  }
  .post-image {
    width: calc(100% + 48px);
    margin: 32px -24px;
  }
  .post-image figcaption {
    padding: 12px 24px 0;
  }
  .post-cta {
    padding: 28px 20px;
  }

  .related-posts {
    padding: 48px 24px 56px;
  }
  .related-grid {
    grid-template-columns: 1fr;
  }

  .blog-footer {
    padding: 32px 24px;
  }
}

@media (max-width: 480px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .blog-card-image {
    height: 180px;
  }
  .post-hero h1 {
    font-size: 1.6rem;
  }
}
