:root {
  --green: #063b32;
  --green-deep: #042822;
  --green-soft: #0a5246;
  --gold: #c5a059;
  --gold-soft: #d4b67a;
  --cream: #fdfaf5;
  --cream-2: #f5efe4;
  --lavender: #e8e4f0;
  --ink: #1a2421;
  --muted: #5c6b66;
  --white: #ffffff;
  --surface: #ffffff;
  --surface-2: #fdfaf5;
  --header-bg: rgba(253, 250, 245, 0.92);
  --border: rgba(197, 160, 89, 0.35);
  --border-soft: rgba(197, 160, 89, 0.25);
  --shadow: 0 10px 30px rgba(6, 59, 50, 0.08);
  --shadow-hover: 0 16px 36px rgba(6, 59, 50, 0.12);
  --empty-bg: rgba(255, 255, 255, 0.55);
  --bg-glow: rgba(197, 160, 89, 0.12);
  --heading: #063b32;
  --link: #063b32;
  --radius: 14px;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --theme-duration: 0.45s;
}

html[data-theme="dark"] {
  --green: #9fd0c4;
  --green-deep: #071412;
  --green-soft: #1a3d35;
  --gold: #d4b67a;
  --gold-soft: #e2c994;
  --cream: #e8e2d6;
  --cream-2: #121c19;
  --lavender: #2a2433;
  --ink: #efe9df;
  --muted: #a7b4af;
  --white: #162421;
  --surface: #1a2a26;
  --surface-2: #13201c;
  --header-bg: rgba(10, 18, 16, 0.88);
  --border: rgba(212, 182, 122, 0.32);
  --border-soft: rgba(212, 182, 122, 0.2);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 18px 40px rgba(0, 0, 0, 0.45);
  --empty-bg: rgba(26, 42, 38, 0.7);
  --bg-glow: rgba(197, 160, 89, 0.08);
  --heading: #f0e6d2;
  --link: #e2c994;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, var(--bg-glow), transparent 36%),
    linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 100%);
  min-height: 100vh;
  line-height: 1.65;
  transition:
    background var(--theme-duration) ease,
    color var(--theme-duration) ease;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at top right, rgba(197, 160, 89, 0.1), transparent 40%),
    radial-gradient(circle at bottom left, rgba(15, 60, 50, 0.55), transparent 45%),
    linear-gradient(180deg, #0d1714 0%, #0a1210 100%);
}

img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; transition: color var(--theme-duration) ease; }
a:hover { color: var(--gold); }

.container {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: background var(--theme-duration) ease, border-color var(--theme-duration) ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: inherit;
}

.brand img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--white);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-text strong {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  font-weight: 700;
  color: var(--heading);
  line-height: 1.1;
  transition: color var(--theme-duration) ease;
}

.brand-text small {
  color: var(--muted);
  font-size: 0.85rem;
}

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

.site-nav > a {
  font-weight: 600;
  color: var(--heading);
  position: relative;
}

.site-nav > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.25s ease;
}

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

.lang-switch {
  display: flex;
  gap: 0.35rem;
  margin-inline-start: 0.5rem;
  padding: 0.2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  transition: background var(--theme-duration) ease, border-color var(--theme-duration) ease;
}

.lang-switch a {
  min-width: 2.2rem;
  text-align: center;
  padding: 0.25rem 0.45rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--heading);
}

.lang-switch a.active {
  background: var(--green-deep);
  color: var(--cream);
}

html[data-theme="dark"] .lang-switch a.active {
  background: var(--gold);
  color: #0d1714;
}

.theme-toggle {
  --toggle-w: 56px;
  --toggle-h: 30px;
  position: relative;
  width: var(--toggle-w);
  height: var(--toggle-h);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: linear-gradient(135deg, #f4e7c8, #dff0ea);
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--theme-duration) ease, border-color var(--theme-duration) ease, box-shadow var(--theme-duration) ease;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.45);
}

html[data-theme="dark"] .theme-toggle {
  background: linear-gradient(135deg, #1a2f2a, #0f1c19);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.45);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.theme-toggle__icons {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  pointer-events: none;
  font-size: 12px;
  line-height: 1;
}

.theme-toggle__sun,
.theme-toggle__moon {
  transition: opacity 0.35s ease, transform 0.45s ease;
}

.theme-toggle__sun { opacity: 1; transform: scale(1); }
.theme-toggle__moon { opacity: 0.35; transform: scale(0.85); }

html[data-theme="dark"] .theme-toggle__sun {
  opacity: 0.35;
  transform: scale(0.85);
}

html[data-theme="dark"] .theme-toggle__moon {
  opacity: 1;
  transform: scale(1);
}

.theme-toggle__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff7e6, #c5a059 70%);
  box-shadow: 0 2px 8px rgba(6, 59, 50, 0.25);
  transition: transform 0.45s cubic-bezier(0.34, 1.45, 0.64, 1), background 0.45s ease;
}

html[data-theme="dark"] .theme-toggle__knob {
  transform: translateX(26px);
  background: radial-gradient(circle at 35% 30%, #f5f1e8, #8ea39c 75%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 10px;
  flex-direction: column;
  justify-content: space-between;
  z-index: 70;
  transition: background var(--theme-duration) ease, border-color var(--theme-duration) ease;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--heading);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.nav-backdrop {
  display: none;
}

.nav-drawer-head {
  display: none;
}

.hero-slider {
  position: relative;
  min-height: min(78vh, 640px);
  overflow: hidden;
  background: var(--green-deep);
}

.hero-slider .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.9s ease, transform 1.2s ease;
  overflow: hidden;
}

.hero-slider .slide.active {
  opacity: 1;
  transform: scale(1);
  position: relative;
}

.slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.slide-bg--desktop { display: block; }
.slide-bg--mobile { display: none; }

.hero-slider .slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(120deg, rgba(4, 40, 34, 0.82) 10%, rgba(4, 40, 34, 0.35) 55%, rgba(197, 160, 89, 0.18) 100%);
}

.slide-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  min-height: min(78vh, 640px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--cream);
  padding: 4rem 0;
  animation: rise 0.9s ease both;
}

.slide-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  margin: 0 0 0.6rem;
  max-width: 14ch;
  line-height: 1.05;
  font-weight: 700;
}

.slide-content p {
  max-width: 38ch;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  margin: 0 0 1.4rem;
  color: rgba(253, 250, 245, 0.9);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--gold);
  color: var(--green-deep);
}

.btn-primary:hover {
  background: var(--gold-soft);
  color: var(--green-deep);
}

.btn-outline {
  background: transparent;
  border-color: rgba(197, 160, 89, 0.7);
  color: var(--cream);
}

.slider-controls {
  position: absolute;
  inset-inline: 0;
  bottom: 1.4rem;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
}

.slider-controls button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(197, 160, 89, 0.7);
  background: rgba(6, 59, 50, 0.45);
  color: var(--cream);
  cursor: pointer;
}

.slider-dots {
  display: flex;
  gap: 0.4rem;
}

.slider-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  background: rgba(253, 250, 245, 0.4);
  padding: 0;
}

.slider-dots button.active { background: var(--gold); }

.section {
  padding: 3.5rem 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  color: var(--heading);
  margin: 0;
  transition: color var(--theme-duration) ease;
}

.section-head p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.category-block + .category-block { margin-top: 2.5rem; }

.category-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.category-title h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--heading);
  transition: color var(--theme-duration) ease;
}

.category-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background var(--theme-duration) ease,
    border-color var(--theme-duration) ease;
  animation: fade-up 0.7s ease both;
}

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

.post-card .thumb {
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(145deg, #063b32 0%, #0a5246 55%, rgba(197, 160, 89, 0.55) 100%);
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--border);
}

.post-card .body {
  padding: 1.1rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.post-card .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 0.75rem;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.post-card .meta .views-badge {
  letter-spacing: 0;
  text-transform: none;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.82rem;
}

.post-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.2;
  color: var(--heading);
  transition: color var(--theme-duration) ease;
}

.post-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  flex: 1;
}

.post-card .more {
  font-weight: 700;
  color: var(--link);
}

.post-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  align-items: center;
  margin-top: 0.15rem;
}

.post-card .download-link {
  color: var(--gold);
}

.page-hero {
  padding: 2.4rem 0 1rem;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--heading);
  margin: 0 0 0.4rem;
  transition: color var(--theme-duration) ease;
}

.page-hero__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.2rem;
  margin-bottom: 0.35rem;
}

.page-hero__title-row h1 {
  margin: 0;
  flex: 1 1 auto;
  min-width: min(100%, 16rem);
}

.view-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.view-meta__sep {
  margin: 0 0.15rem;
  opacity: 0.7;
}

.views-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: inherit;
  white-space: nowrap;
}

.views-badge__icon {
  width: 1em;
  height: 1em;
  opacity: 0.9;
  flex: 0 0 auto;
}

.views-badge__num {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.view-meta .views-badge {
  color: var(--gold-soft);
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.download-btn {
  --dl-pad: 3px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
  padding: var(--dl-pad);
  border-radius: 999px;
  overflow: hidden;
  white-space: nowrap;
  text-decoration: none;
  color: var(--green-deep);
  background: rgba(197, 160, 89, 0.35);
  box-shadow: 0 8px 22px rgba(197, 160, 89, 0.32);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: download-pulse 2.4s ease-in-out infinite;
}

.download-btn__spin {
  position: absolute;
  inset: -55%;
  z-index: 0;
  background: conic-gradient(
    from 0deg,
    #8a6a2a 0%,
    var(--gold) 18%,
    #fff3c4 28%,
    var(--gold-soft) 38%,
    #8a6a2a 55%,
    var(--gold) 72%,
    #fff3c4 82%,
    var(--gold) 100%
  );
  animation: download-spin 1.8s linear infinite;
}

.download-btn__label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.78rem 1.45rem;
  border-radius: inherit;
  background:
    linear-gradient(180deg, #f3e4b8 0%, var(--gold) 45%, #b8923f 100%);
  color: var(--green-deep);
  font-weight: 800;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.download-btn__icon,
.download-link__icon,
.file-icon {
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}

.download-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.download-link__icon {
  width: 1.1rem;
  height: 1.1rem;
}

.download-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 28px rgba(197, 160, 89, 0.4);
  animation-play-state: paused;
}

.download-btn:hover .download-btn__spin {
  animation-duration: 1.1s;
}

.download-btn:active {
  transform: translateY(0) scale(0.98);
}

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

@keyframes download-pulse {
  0%, 100% { box-shadow: 0 8px 22px rgba(197, 160, 89, 0.28); }
  50% { box-shadow: 0 10px 30px rgba(197, 160, 89, 0.48); }
}

@media (prefers-reduced-motion: reduce) {
  .download-btn,
  .download-btn__spin {
    animation: none !important;
  }
}

/* Legacy WP file blocks inside post content */
.content-panel .prose .wp-block-file {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 1.2rem 0;
}

.content-panel .prose .wp-block-file__button,
.content-panel .prose a.wp-block-file__button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1.45rem;
  border-radius: 999px;
  border: 2px solid var(--gold);
  background: linear-gradient(180deg, #f3e4b8 0%, var(--gold) 45%, #b8923f 100%);
  color: var(--green-deep) !important;
  font-weight: 800;
  text-decoration: none !important;
  box-shadow: 0 8px 22px rgba(197, 160, 89, 0.28);
  animation: download-border-run 2.2s linear infinite;
}

@keyframes download-border-run {
  0% { border-color: var(--gold); box-shadow: 0 8px 22px rgba(197, 160, 89, 0.28), 0 0 0 0 rgba(197, 160, 89, 0.35); }
  50% { border-color: #f0e2b0; box-shadow: 0 10px 28px rgba(197, 160, 89, 0.45), 0 0 0 4px rgba(197, 160, 89, 0.12); }
  100% { border-color: var(--gold); box-shadow: 0 8px 22px rgba(197, 160, 89, 0.28), 0 0 0 0 rgba(197, 160, 89, 0.35); }
}

.post-content-image {
  margin: 1.6rem 0 0;
  padding: 0;
}

.post-content-image img {
  display: block;
  width: 100%;
  max-width: 920px;
  height: auto;
  border-radius: 12px;
}

.content-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.2rem, 3vw, 2rem);
  box-shadow: var(--shadow);
  margin-bottom: 2.5rem;
  transition: background var(--theme-duration) ease, border-color var(--theme-duration) ease, box-shadow var(--theme-duration) ease;
}

.content-panel .prose :is(h1,h2,h3,h4) {
  font-family: var(--font-display);
  color: var(--heading);
}

.content-panel .prose img {
  border-radius: 10px;
  margin: 1rem 0;
}

.share-panel {
  margin-top: 1.4rem;
}

.share-panel .share-bar {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.share-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
}

.share-bar > span {
  font-weight: 700;
  color: var(--heading);
  margin-inline-end: 0.15rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--heading);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.share-btn .share-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

.share-btn:hover {
  transform: translateY(-1px);
}

.share-btn--whatsapp {
  border-color: rgba(37, 211, 102, 0.45);
  color: #128c7e;
}

.share-btn--whatsapp:hover {
  background: rgba(37, 211, 102, 0.14);
  border-color: rgba(37, 211, 102, 0.7);
}

.share-btn--facebook {
  border-color: rgba(24, 119, 242, 0.45);
  color: #1877f2;
}

.share-btn--facebook:hover {
  background: rgba(24, 119, 242, 0.12);
  border-color: rgba(24, 119, 242, 0.7);
}

.share-btn--x {
  border-color: rgba(197, 160, 89, 0.45);
  color: var(--heading);
}

.share-btn--x:hover {
  background: rgba(197, 160, 89, 0.14);
  border-color: var(--gold);
  color: var(--gold);
}

html[data-theme="dark"] .share-btn--x {
  color: var(--cream);
}

.audio-hierarchy {
  display: grid;
  gap: 1.4rem;
}

.audio-class {
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.audio-class__title {
  background: linear-gradient(135deg, #063b32 0%, #0a5246 100%);
  color: #fdfaf5;
  padding: 1rem 1.2rem;
}

.audio-class__title h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 700;
}

.audio-class__body {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.audio-period {
  border: 1px solid rgba(6, 59, 50, 0.18);
  border-radius: 14px;
  overflow: hidden;
  background: #c5a059;
}

html[data-theme="dark"] .audio-period {
  background: #a88745;
  border-color: rgba(253, 250, 245, 0.15);
}

.audio-period__title {
  padding: 0.75rem 1rem;
  background: rgba(6, 59, 50, 0.12);
  border-bottom: 1px solid rgba(6, 59, 50, 0.15);
}

.audio-period__title h3 {
  margin: 0;
  color: #042822;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.audio-period__tracks {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
}

.audio-track {
  display: grid;
  gap: 0.45rem;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(6, 59, 50, 0.2);
  background: rgba(253, 250, 245, 0.92);
}

html[data-theme="dark"] .audio-track {
  background: rgba(18, 32, 28, 0.92);
  border-color: rgba(253, 250, 245, 0.12);
}

.audio-track__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.audio-track__meta strong {
  color: var(--heading);
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.audio-track__meta a {
  font-weight: 700;
  color: #063b32;
}

html[data-theme="dark"] .audio-track__meta a {
  color: var(--gold-soft);
}

.audio-track audio {
  width: 100%;
}

.site-footer {
  position: relative;
  margin-top: 3.5rem;
  color: var(--cream);
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 70% at 15% -10%, rgba(14, 70, 58, 0.9), transparent 55%),
    radial-gradient(ellipse 80% 60% at 95% 110%, rgba(2, 22, 18, 0.95), transparent 50%),
    linear-gradient(180deg, #052820 0%, #031c17 48%, #021412 100%);
}

.footer-ornament {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(197, 160, 89, 0.25) 15%,
    var(--gold) 50%,
    rgba(197, 160, 89, 0.25) 85%,
    transparent 100%
  );
}

.footer-ornament::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image:
    linear-gradient(30deg, rgba(253, 250, 245, 0.5) 1px, transparent 1px),
    linear-gradient(-30deg, rgba(253, 250, 245, 0.5) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  height: 180px;
}

.footer-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.1fr;
  gap: clamp(1.5rem, 4vw, 2.75rem);
  padding: clamp(2.4rem, 5vw, 3.4rem) 0 2rem;
}

.footer-brand {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.footer-logo {
  flex: 0 0 auto;
  display: block;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(145deg, var(--gold-soft), var(--gold) 45%, #8a6a2a);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  transition: transform 0.3s ease;
}

.footer-logo:hover {
  transform: translateY(-2px) scale(1.03);
}

.footer-logo img {
  display: block;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--cream);
}

.footer-brand__text strong {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  font-weight: 700;
  line-height: 1.15;
  display: block;
  color: var(--cream);
}

.footer-brand__text p {
  margin: 0.45rem 0 0;
  color: rgba(253, 250, 245, 0.78);
  line-height: 1.45;
  max-width: 28ch;
}

.footer-nav h3,
.footer-contact h3 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold-soft);
  letter-spacing: 0.02em;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.footer-nav a {
  color: rgba(253, 250, 245, 0.88);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-nav a::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(197, 160, 89, 0.55);
  transition: background 0.2s ease, transform 0.2s ease;
}

.footer-nav a:hover {
  color: var(--gold-soft);
  transform: translateX(3px);
}

html[dir="rtl"] .footer-nav a:hover {
  transform: translateX(-3px);
}

.footer-nav a:hover::before {
  background: var(--gold);
  transform: scale(1.25);
}

.footer-mail {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--cream);
  font-weight: 600;
  margin-bottom: 1rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(197, 160, 89, 0.35);
  background: rgba(253, 250, 245, 0.06);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.footer-mail svg {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
  color: var(--gold-soft);
}

.footer-mail:hover {
  border-color: rgba(197, 160, 89, 0.7);
  background: rgba(197, 160, 89, 0.12);
  color: var(--gold-soft);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.social-links a {
  width: 2.45rem;
  height: 2.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  border: 1px solid rgba(197, 160, 89, 0.4);
  border-radius: 50%;
  background: rgba(253, 250, 245, 0.05);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.social-links a svg {
  width: 1.05rem;
  height: 1.05rem;
}

.social-links a:hover {
  transform: translateY(-2px);
  color: var(--green-deep);
  background: linear-gradient(180deg, #f3e4b8, var(--gold));
  border-color: var(--gold);
}

.footer-bottom {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(197, 160, 89, 0.22);
  background: rgba(0, 0, 0, 0.18);
}

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

.copyright,
.footer-note {
  margin: 0;
  color: rgba(253, 250, 245, 0.62);
  font-size: 0.9rem;
}

.footer-note {
  color: rgba(212, 182, 122, 0.75);
}

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

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
    padding-top: 2rem;
  }

  .footer-bottom__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

.empty-state {
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--empty-bg);
  transition: background var(--theme-duration) ease, border-color var(--theme-duration) ease;
}

.content-panel .prose,
.content-panel .prose p,
.content-panel .prose li {
  color: var(--ink);
  transition: color var(--theme-duration) ease;
}

.content-panel .prose a { color: var(--gold); }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1100px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .nav-toggle { display: flex; }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(4, 20, 16, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    backdrop-filter: blur(2px);
  }

  .nav-backdrop.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    width: min(86vw, 340px);
    height: 100dvh;
    z-index: 65;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: 1.15rem 1.2rem 1.6rem;
    background:
      linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
    border: 0;
    border-left: 1px solid var(--border);
    border-radius: 18px 0 0 18px;
    box-shadow: -18px 0 40px rgba(0, 0, 0, 0.22);
    transform: translateX(105%);
    visibility: hidden;
    transition:
      transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0.4s ease,
      background var(--theme-duration) ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .site-nav.open {
    transform: translateX(0);
    visibility: visible;
  }

  .nav-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-drawer-head strong {
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: var(--heading);
  }

  .nav-close {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--heading);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
  }

  .site-nav > a {
    padding: 0.85rem 0.7rem;
    border-radius: 12px;
    font-size: 1.05rem;
  }

  .site-nav > a:hover,
  .site-nav > a:focus-visible {
    background: rgba(197, 160, 89, 0.12);
  }

  .site-nav > a::after { display: none; }

  .lang-switch {
    margin: 0.55rem 0 0;
    width: fit-content;
  }

  .theme-toggle {
    margin-top: 0.75rem;
  }

  body.nav-open {
    overflow: hidden;
  }

  .brand-text small { display: none; }

  .hero-slider,
  .slide-content { min-height: 68vh; }

  .slide-bg--desktop { display: none; }
  .slide-bg--mobile { display: block; }

  /* Keep drawer from the right even in Arabic RTL layout */
  html[dir="rtl"] .site-nav {
    right: 0;
    left: auto;
    border-left: 1px solid var(--border);
    border-right: 0;
    border-radius: 18px 0 0 18px;
  }
}

@media (min-width: 821px) {
  .nav-backdrop,
  .nav-drawer-head {
    display: none !important;
  }

  .site-nav {
    position: static;
    transform: none !important;
    visibility: visible !important;
    height: auto;
    width: auto;
    box-shadow: none;
    border: 0;
    padding: 0;
    overflow: visible;
    background: transparent;
  }
}

@media (max-width: 560px) {
  .posts-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: start; }
}
