/* ============================================
   Bun Bo Hue — A Vietnamese Food Blog
   Elegant, warm, typographically rich design
   ============================================ */

/* ---------- Google Fonts loaded in HTML ---------- */

:root {
  /* Colors — inspired by bun bo hue's vibrant broth */
  --color-primary: #9B2335;
  --color-primary-light: #C7384F;
  --color-primary-dark: #7A1B2A;
  --color-accent: #D4873F;
  --color-accent-light: #E6A55A;
  --color-bg: #FFFBF5;
  --color-bg-alt: #FFF5EB;
  --color-text: #2C1810;
  --color-text-light: #6B5B54;
  --color-text-muted: #9B8E87;
  --color-border: #E8DDD4;
  --color-card: #FFFFFF;
  --color-code-bg: #F5EDE6;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  /* Layout */
  --max-width: 1200px;
  --content-width: 740px;
  --gap: 2rem;
  --radius: 12px;
  --radius-sm: 8px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(44, 24, 16, 0.06);
  --shadow-md: 0 4px 16px rgba(44, 24, 16, 0.08);
  --shadow-lg: 0 8px 32px rgba(44, 24, 16, 0.12);
  --shadow-xl: 0 16px 48px rgba(44, 24, 16, 0.16);

  /* Transitions */
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset & Base ---------- */

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

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

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-primary-light);
}

/* ---------- Typography ---------- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1.25em;
  font-size: 1.125rem;
}

/* ---------- Utility ---------- */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gap);
}

.container--narrow {
  max-width: var(--content-width);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Header / Navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 251, 245, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}

.site-logo:hover {
  color: var(--color-primary-dark);
}

.site-logo .logo-icon {
  width: 40px;
  height: 40px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-nav a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  padding: 0.25rem 0;
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--transition);
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--color-primary);
}

.site-nav a:hover::after,
.site-nav a.active::after {
  width: 100%;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  margin: 5px 0;
  transition: var(--transition);
}

/* ---------- Hero Section ---------- */

.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    var(--color-primary-dark) 0%,
    var(--color-primary) 30%,
    var(--color-accent) 70%,
    #E6A55A 100%
  );
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.08) 0%, transparent 40%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 4rem var(--gap);
  max-width: 800px;
}

.hero-badge {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 100px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(8px);
}

.hero h1 {
  color: #FFFFFF;
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.15);
}

.hero h1 .accent {
  display: block;
  font-style: italic;
  font-weight: 400;
  font-size: 0.5em;
  opacity: 0.9;
  margin-top: 0.3em;
}

.hero-description {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2.5rem;
  background: #FFFFFF;
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  color: var(--color-primary-dark);
}

.hero-cta svg {
  width: 18px;
  height: 18px;
  transition: transform var(--transition);
}

.hero-cta:hover svg {
  transform: translateX(4px);
}

/* Decorative floating bowl illustration */
.hero-illustration {
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.08;
  pointer-events: none;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: float 2s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(-8px); }
}

/* ---------- Section Commons ---------- */

.section {
  padding: 5rem 0;
}

.section--alt {
  background: var(--color-bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header h2 {
  margin-bottom: 0.75rem;
}

.section-header .subtitle {
  font-size: 1.125rem;
  color: var(--color-text-light);
  max-width: 520px;
  margin: 0 auto;
}

.section-header .divider {
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 2px;
  margin: 1rem auto 0;
}

/* ---------- Featured / Blog Cards ---------- */

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

.post-card {
  background: var(--color-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

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

.post-card__image {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.post-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.post-card:hover .post-card__image img {
  transform: scale(1.05);
}

.post-card__image .tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.3rem 0.8rem;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 100px;
}

.post-card__body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.post-card__meta svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

.post-card__title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.post-card__title a {
  color: var(--color-text);
  text-decoration: none;
}

.post-card__title a:hover {
  color: var(--color-primary);
}

.post-card__excerpt {
  font-size: 0.95rem;
  color: var(--color-text-light);
  line-height: 1.6;
  flex: 1;
}

.post-card__footer {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.post-card__read-more {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.post-card__read-more svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition);
}

.post-card:hover .post-card__read-more svg {
  transform: translateX(4px);
}

/* ---------- About Preview (Landing) ---------- */

.about-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-preview__image {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
}

.about-preview__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-preview__image::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 3px solid var(--color-primary);
  border-radius: var(--radius);
  opacity: 0.1;
}

.about-preview__content h2 {
  margin-bottom: 1rem;
}

.about-preview__content p {
  color: var(--color-text-light);
  font-size: 1.05rem;
}

.about-preview__content .signature {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--color-primary);
  margin-top: 1.5rem;
}

/* ---------- Newsletter Section ---------- */

.newsletter {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  border-radius: var(--radius);
  color: #fff;
  margin: 0 var(--gap);
  position: relative;
  overflow: hidden;
}

.newsletter::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'%3E%3Cpath d='m0 40 40-40h-10l-40 40zm40 0v-10l-40 40z'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.newsletter h2 {
  color: #fff;
  margin-bottom: 0.5rem;
  position: relative;
}

.newsletter p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  position: relative;
}

.newsletter-form {
  display: flex;
  gap: 0.75rem;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

.newsletter-form input {
  flex: 1;
  padding: 0.9rem 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition);
}

.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.newsletter-form input:focus {
  border-color: rgba(255, 255, 255, 0.6);
}

.newsletter-form button {
  padding: 0.9rem 2rem;
  background: #fff;
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.newsletter-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: auto;
  padding: 3rem 0;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
}

.footer-text {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

.footer-links a:hover {
  color: var(--color-primary);
}

/* ---------- Blog Listing Page ---------- */

.page-header {
  text-align: center;
  padding: 4rem 0 3rem;
}

.page-header h1 {
  margin-bottom: 0.5rem;
}

.page-header p {
  font-size: 1.15rem;
  color: var(--color-text-light);
  max-width: 500px;
  margin: 0 auto;
}

.blog-listing {
  padding-bottom: 5rem;
}

/* ---------- Article / Post Page ---------- */

.article-header {
  text-align: center;
  padding: 3rem 0 2rem;
  max-width: var(--content-width);
  margin: 0 auto;
}

.article-header .tag {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: var(--color-bg-alt);
  color: var(--color-primary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 100px;
  margin-bottom: 1.25rem;
}

.article-header h1 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 5vw, 3rem);
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  flex-wrap: wrap;
}

.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.article-meta svg {
  width: 16px;
  height: 16px;
  opacity: 0.5;
}

.article-cover {
  max-width: 920px;
  margin: 2rem auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.article-cover img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
}

/* ---------- Markdown Content Styling ---------- */

.article-content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2rem var(--gap) 4rem;
}

.article-content h1 {
  font-size: 2.2rem;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-border);
}

.article-content h2 {
  font-size: 1.75rem;
  margin: 2.25rem 0 0.75rem;
  color: var(--color-primary-dark);
}

.article-content h3 {
  font-size: 1.35rem;
  margin: 1.75rem 0 0.5rem;
}

.article-content p {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--color-text);
}

.article-content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-color: rgba(155, 35, 53, 0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--transition);
}

.article-content a:hover {
  text-decoration-color: var(--color-primary);
}

.article-content strong {
  font-weight: 700;
  color: var(--color-text);
}

.article-content em {
  font-style: italic;
}

.article-content ul,
.article-content ol {
  margin: 1rem 0 1.5rem;
  padding-left: 1.75rem;
}

.article-content li {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.article-content li::marker {
  color: var(--color-primary);
}

.article-content blockquote {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--color-primary);
  background: var(--color-bg-alt);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--color-text-light);
}

.article-content blockquote p {
  margin-bottom: 0;
  font-size: 1.1rem;
}

.article-content pre {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: #1e1e2e;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.article-content pre code {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: #cdd6f4;
  background: none;
  padding: 0;
  border-radius: 0;
}

.article-content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.15em 0.4em;
  background: var(--color-code-bg);
  border-radius: 4px;
  color: var(--color-primary);
}

.article-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 2.5rem auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.article-content hr {
  margin: 2.5rem auto;
  border: none;
  height: 3px;
  width: 60px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 2px;
}

.article-content table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
}

.article-content th,
.article-content td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: 1rem;
}

.article-content th {
  font-weight: 700;
  background: var(--color-bg-alt);
  color: var(--color-text);
}

/* ---------- Back to Blog Link ---------- */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-light);
  margin-bottom: 1rem;
  transition: color var(--transition);
}

.back-link:hover {
  color: var(--color-primary);
}

.back-link svg {
  width: 18px;
  height: 18px;
  transition: transform var(--transition);
}

.back-link:hover svg {
  transform: translateX(-4px);
}

/* ---------- Loading States ---------- */

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  flex-direction: column;
  gap: 1rem;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* ---------- 404 / Error ---------- */

.error-page {
  text-align: center;
  padding: 6rem 2rem;
}

.error-page h1 {
  font-size: 5rem;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.error-page p {
  color: var(--color-text-light);
  font-size: 1.15rem;
}

.error-page a {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.75rem 2rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: 100px;
  font-weight: 600;
}

/* ---------- Fade-in Animation ---------- */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Tags (clickable) ---------- */

.post-card__image .tag,
.article-header .tag {
  text-decoration: none;
  transition: opacity var(--transition), transform var(--transition);
  cursor: pointer;
}

.post-card__image .tag:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.article-header .tag:hover {
  background: var(--color-primary);
  color: #fff;
}

/* ---------- Breadcrumb ---------- */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span[aria-hidden] {
  opacity: 0.4;
}

.breadcrumb--light {
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 1.25rem;
}

.breadcrumb--light a {
  color: #fff;
}

.breadcrumb--light a:hover {
  color: #fff;
  text-decoration: underline;
}

.breadcrumb--light span[aria-hidden] {
  opacity: 0.5;
  display: inline-flex;
  align-items: center;
}

.breadcrumb--light svg {
  opacity: 0.5;
}

/* ---------- Tags Index Hero ---------- */

.tags-hero {
  position: relative;
  padding: 6rem 0 5rem;
  text-align: center;
  background: linear-gradient(
    135deg,
    var(--color-primary-dark) 0%,
    var(--color-primary) 40%,
    var(--color-accent) 100%
  );
  overflow: hidden;
}

.tags-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 20%, rgba(255,255,255,0.06) 0%, transparent 40%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.tags-hero__content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 var(--gap);
}

.tags-hero__badge {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 100px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(8px);
}

.tags-hero h1 {
  color: #fff;
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.tags-hero__accent {
  display: block;
  font-style: italic;
  font-weight: 400;
  font-size: 0.48em;
  opacity: 0.85;
  margin-top: 0.5em;
}

.tags-hero__divider {
  display: inline-block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, rgba(255,255,255,0.2), rgba(255,255,255,0.6), rgba(255,255,255,0.2));
  border-radius: 2px;
}

/* ---------- Tags Showcase Grid ---------- */

.tags-showcase {
  padding: 4rem 0 5rem;
  background: var(--color-bg);
}

.tags-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

/* Individual Tag Card — Magazine Style */
.tag-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 380px;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), box-shadow var(--transition);
}

.tag-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.tag-card__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.tag-card:hover .tag-card__bg {
  transform: scale(1.06);
}

.tag-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(30, 12, 8, 0.95) 0%,
    rgba(30, 12, 8, 0.65) 45%,
    rgba(30, 12, 8, 0.25) 100%
  );
  transition: background 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.tag-card:hover .tag-card__overlay {
  background: linear-gradient(
    to top,
    rgba(30, 12, 8, 0.9) 0%,
    rgba(30, 12, 8, 0.55) 45%,
    rgba(30, 12, 8, 0.2) 100%
  );
}

.tag-card__content {
  position: relative;
  z-index: 2;
  padding: 2rem;
}

.tag-card__count {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 100px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  backdrop-filter: blur(4px);
}

.tag-card__title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 0.6rem;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}

.tag-card__desc {
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 1.25rem;
}

.tag-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--transition), transform var(--transition);
}

.tag-card:hover .tag-card__cta {
  opacity: 1;
  transform: translateY(0);
}

.tag-card__cta svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition);
}

.tag-card:hover .tag-card__cta svg {
  transform: translateX(4px);
}

/* ---------- Individual Tag Page Hero ---------- */

.tag-hero {
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.tag-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.tag-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(44, 24, 16, 0.92) 0%,
    rgba(44, 24, 16, 0.6) 50%,
    rgba(44, 24, 16, 0.3) 100%
  );
}

.tag-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem var(--gap) 3.5rem;
}

.tag-hero h1 {
  color: #fff;
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 3.8rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}

.tag-hero__desc {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.65;
  max-width: 560px;
  margin-bottom: 1.5rem;
}

.tag-hero__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tag-hero__count {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

.tag-hero__divider {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.3), transparent);
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
  :root {
    --gap: 1.25rem;
  }

  .hero {
    min-height: 70vh;
  }

  .about-preview {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-preview__image {
    order: -1;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }

  .tags-grid {
    grid-template-columns: 1fr;
  }

  .tag-card {
    min-height: 300px;
  }

  .tags-hero {
    padding: 4rem 0 3rem;
  }

  .tag-hero {
    min-height: 280px;
  }

  .newsletter {
    margin: 0 1rem;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    flex-direction: column;
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    gap: 1rem;
  }

  .site-nav.open {
    display: flex;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-description {
    font-size: 1.05rem;
  }

  .post-card__image {
    height: 180px;
  }
}

/* ── Pronunciation Guide ─────────────────────────────── */
.pronunciation-guide {
  margin: 2rem 0;
  border: 1px solid rgba(155, 35, 53, 0.15);
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(155, 35, 53, 0.03), rgba(212, 135, 63, 0.03));
}

.pronunciation-guide__header {
  padding: 0.5rem 1.25rem;
  background: rgba(155, 35, 53, 0.06);
  border-bottom: 1px solid rgba(155, 35, 53, 0.1);
}

.pronunciation-guide__label {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--clr-primary);
}

.pronunciation-guide__body {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  flex-wrap: wrap;
}

.pronunciation-guide__word {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--clr-heading);
}

.pronunciation-guide__phonetic {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--clr-text-light);
  font-style: italic;
}

.pronunciation-guide__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--clr-primary);
  border-radius: 2rem;
  background: transparent;
  color: var(--clr-primary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.pronunciation-guide__btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.pronunciation-guide__btn:hover {
  background: var(--clr-primary);
  color: #fff;
}

.pronunciation-guide__btn:active {
  transform: scale(0.96);
}

.pronunciation-guide__btn.is-playing {
  background: var(--clr-primary);
  color: #fff;
  animation: pulse-glow 1s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(155, 35, 53, 0.3); }
  50% { box-shadow: 0 0 0 6px rgba(155, 35, 53, 0); }
}

@media (max-width: 480px) {
  .pronunciation-guide__body {
    gap: 0.5rem;
  }

  .pronunciation-guide__word {
    font-size: 1.25rem;
  }

  .pronunciation-guide__btn {
    margin-left: 0;
    margin-top: 0.25rem;
  }
}

/* ── Maps & CTA ── */
.bbh-map {
  position: relative;
  z-index: 0;
  border: 1px solid #ddd;
}

.bbh-maps-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.55em 1.2em;
  background: var(--clr-primary, #9B2335);
  color: #fff !important;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none !important;
  transition: background 0.2s, transform 0.15s;
}

.bbh-maps-cta:hover {
  background: #7a1c2a;
  transform: translateY(-1px);
}

.bbh-pin {
  background: none !important;
  border: none !important;
}

@media (max-width: 600px) {
  .bbh-map[data-map-type="mini"] { height: 180px !important; }
  .bbh-map[data-map-type="overview"],
  .bbh-map[data-map-type="full"] { height: 300px !important; }
  .bbh-maps-cta { width: 100%; justify-content: center; }
}
