@font-face {
  font-family: 'Faruma';
  src: url('../fonts/Faruma.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'EasaFalaGalan';
  src: url('../fonts/EasaFalaGalan.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --white: #ffffff;
  --off-white: #fafafa;
  --gray-50: #f5f5f5;
  --gray-100: #eeeeee;
  --gray-200: #e0e0e0;
  --gray-300: #bdbdbd;
  --gray-500: #757575;
  --gray-700: #424242;
  --gray-900: #1a1a1a;
  --accent: #1a1a1a;
  --title: #1a56c4;
  --title-soft: #2f6fd9;
  --max-width: 1180px;
  --header-top-height: 72px;
  --header-nav-height: auto;
  --header-nav-pad-top: 5px;
  --header-nav-pad-bottom: 8px;
  --header-page-gap: 35px;
  --header-height: calc(var(--header-page-gap) + var(--header-top-height) + 2.8em + var(--header-nav-pad-top) + var(--header-nav-pad-bottom));
  --header-bar: #000000;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --transition: 0.2s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Faruma', 'MV Elaaf Normal', 'MV Boli', sans-serif;
  direction: rtl;
  text-align: right;
  background: var(--white);
  color: var(--gray-900);
  line-height: 2.1;
  font-size: 20px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.footer-name,
.album-book-title {
  font-family: 'EasaFalaGalan', 'Faruma', 'MV Elaaf Normal', 'MV Boli', sans-serif;
  line-height: 1.35;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--gray-500);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 64px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
}

.header-page-strip {
  background: #fff;
  height: var(--header-page-gap);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.header-page-strip .container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-copy,
.footer-copy {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: #9a9a9a;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-align: center;
  font-style: normal;
  font-weight: normal;
  opacity: 0.9;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.header-copy .copy-mark,
.footer-copy .copy-mark {
  font-family: Arial, Helvetica, sans-serif;
  font-style: normal;
  font-weight: normal;
  font-synthesis: none;
  display: inline-block;
  transform: none;
  color: #9a9a9a;
}

.header-top {
  background: var(--header-bar);
}

.header-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-top-height);
  padding-top: 12px;
  padding-bottom: 12px;
}

.header-nav-bar {
  background: var(--header-bar);
  padding-top: var(--header-nav-pad-top);
  padding-bottom: var(--header-nav-pad-bottom);
}

.header-nav-inner {
  display: flex;
  align-items: center;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'EasaFalaGalan', 'Faruma', sans-serif;
  font-size: 20px;
  font-weight: normal;
  white-space: nowrap;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  color: #c8c8c8;
  line-height: 1.3;
}

.site-logo:hover {
  color: #d8d8d8;
}

.site-logo-text {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.site-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.header-search {
  position: relative;
  flex: 1;
  max-width: 420px;
  margin-inline-start: auto;
  overflow: visible;
}

.header-search-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  right: auto;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.7);
  pointer-events: none;
  z-index: 1;
}

.header-search input {
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.4;
  direction: rtl;
  text-align: right;
  border: none;
  border-radius: 0;
  padding: 4px 28px 4px 46px;
  min-height: 34px;
  height: 34px;
  background: #404040;
  color: #fff;
  outline: none;
  transition: background var(--transition);
  overflow: visible;
  -webkit-appearance: none;
  appearance: none;
  text-indent: 0.6em;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.65);
  opacity: 1;
  line-height: 1.4;
  font-family: inherit;
  text-overflow: clip;
  text-indent: 0.6em;
}

.header-search input:focus {
  background: #4a4a4a;
  outline: none;
  box-shadow: none;
}

.header-search .search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: 0;
  box-shadow: var(--shadow-md);
  max-height: min(50vh, 360px);
  overflow-y: auto;
  z-index: 120;
  padding: 8px 0;
}

.header-search .search-results[hidden] {
  display: none;
}

.header-search .search-results a {
  display: block;
  padding: 10px 18px;
  border-bottom: none;
  font-size: 15px;
  line-height: 1.7;
}

.header-search .search-results a:hover {
  background: var(--gray-50);
  color: var(--title);
}

.header-search .search-results .meta {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}

.header-search .search-results .search-empty {
  color: var(--gray-500);
  padding: 12px 18px;
  margin: 0;
  font-size: 15px;
}

.main-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  width: 100%;
  border-top: 1px solid #666;
  border-bottom: 1px solid #666;
  box-sizing: border-box;
  line-height: 1.45;
}

.nav-item {
  position: relative;
}

.nav-item.nav-pin-left {
  margin-inline-start: auto;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 14px;
  line-height: 1.45;
  border-radius: 0;
  color: #8e8e8e;
  transition: background var(--transition), opacity var(--transition), color var(--transition);
}

.nav-link:hover,
.nav-link.is-active,
.nav-item.is-active > .nav-link {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #e8e8e8 !important;
}

.nav-item.has-dropdown .nav-link::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 4px solid #8e8e8e;
  border-bottom: 0;
  margin-top: 1px;
  opacity: 0.75;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.nav-item.has-dropdown:hover .nav-link::after {
  transform: rotate(180deg);
}

.nav-item:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 0;
  width: max-content;
  max-width: 160px;
  background: #404040;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  box-shadow: var(--shadow-md);
  padding: 4px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition);
  z-index: 50;
}

.dropdown a {
  display: block;
  padding: 6px 14px;
  font-size: 14px;
  color: #e4e6ea;
  border-radius: 0;
  white-space: nowrap;
}

.dropdown a:hover,
.dropdown a.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.menu-toggle {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 0;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background var(--transition);
  flex-shrink: 0;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  position: relative;
}

.menu-toggle span::before,
.menu-toggle span::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 2px;
  background: #fff;
  right: 0;
}

.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }

/* Hero */
.hero {
  padding: 80px 0 64px;
  background: #f4f7fa;
  border-bottom: 1px solid #e8eef4;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 48px;
  align-items: start;
}

.hero h1 {
  font-size: 36px;
  font-weight: normal;
  margin-bottom: 20px;
  line-height: 1.5;
  color: var(--title);
}

.hero p {
  color: var(--gray-700);
  font-size: 20px;
  max-width: 720px;
  text-align: justify;
  line-height: 2.15;
  margin-bottom: 16px;
}

.hero p:last-of-type {
  margin-bottom: 24px;
}

.hero p a {
  color: var(--title);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero p a:hover {
  color: var(--title-soft);
}

.hero-image {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--white);
  box-shadow: var(--shadow-md);
  margin-top: 56px;
}

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
  border-radius: 50%;
  transition: all var(--transition);
}

.social-icon:hover {
  background: var(--gray-900);
  color: var(--white);
  border-color: var(--gray-900);
}

/* Section */
.section {
  padding: 64px 0;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 36px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-100);
}

.section-header h2 {
  font-size: 24px;
  font-weight: normal;
  color: var(--title);
}

.section-header a {
  font-size: 14px;
  color: var(--gray-500);
}

.section-header a:hover {
  color: var(--gray-900);
}

/* Post grid */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.post-card {
  border: 1px solid #404040;
  border-radius: 0;
  overflow: hidden;
  transition: box-shadow var(--transition);
  background: #404040;
}

.post-card:hover {
  box-shadow: var(--shadow-md);
}

.post-card-body {
  padding: 24px;
}

.post-category {
  font-size: 14px;
  color: #c8c8c8;
  margin-bottom: 8px;
  text-transform: none;
}

.post-card h3 {
  font-size: 20px;
  font-weight: normal;
  line-height: 1.6;
  margin-bottom: 12px;
}

.post-card h3 a {
  color: #f0f0f0;
  transition: color var(--transition);
}

.post-card h3 a:hover {
  color: #ffffff;
}

.post-meta {
  font-size: 13px;
  color: #b0b0b0;
}

/* Video grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.video-card {
  border: 1px solid #404040;
  border-radius: 0;
  overflow: hidden;
  transition: box-shadow var(--transition);
  background: #404040;
}

.video-card:hover {
  box-shadow: var(--shadow-md);
}

.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #333;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-thumb .play-icon {
  width: 48px;
  height: 48px;
  border: 2px solid #c8c8c8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f0f0f0;
  font-size: 18px;
}

.video-card-body {
  padding: 16px 20px;
}

.video-card h4 {
  font-size: 20px;
  font-weight: normal;
  line-height: 1.6;
  margin-bottom: 6px;
  color: #f0f0f0;
}

.video-duration {
  font-size: 13px;
  color: #b0b0b0;
}

/* About */
.about {
  background: var(--off-white);
  border-top: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
}

.about-content {
  max-width: 900px;
  text-align: justify;
  line-height: 2.15;
}

.about-content p {
  margin-bottom: 20px;
  color: var(--gray-700);
  text-align: justify;
  line-height: 2.15;
}

.about-content p:last-child {
  margin-bottom: 0;
}

.audio-player {
  margin: 32px 0;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
}

.audio-player p {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 12px;
}

.audio-player audio {
  width: 100%;
}

/* Books */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
}

.book-card {
  text-align: center;
  padding: 24px;
  border: 1px solid #404040;
  border-radius: 0;
  transition: box-shadow var(--transition);
  background: #404040;
}

.book-card:hover {
  box-shadow: var(--shadow-md);
}

.book-card img {
  width: 120px;
  height: auto;
  margin: 0 auto 16px;
  border-radius: 0;
}

.book-card h4 {
  font-size: 20px;
  font-weight: normal;
  line-height: 1.6;
  color: #f0f0f0;
}

/* Album */
.page-album {
  background:
    radial-gradient(ellipse at top, #f7f3ec 0%, transparent 55%),
    linear-gradient(180deg, #faf8f4 0%, var(--white) 40%);
}

.album-section {
  padding-top: 40px;
}

.album-header h1 {
  letter-spacing: 0.02em;
  color: var(--title);
  font-weight: normal;
}

.album-books {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.album-book {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.album-book-toggle {
  appearance: none;
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  cursor: pointer;
  text-align: right;
  font: inherit;
  color: inherit;
}

.album-book-toggle:hover {
  background: rgba(0, 0, 0, 0.02);
}

.album-book-cover {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--gray-100);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: rotate(-2deg);
}

.album-book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.album-book-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.album-book-title {
  font-size: 1.1rem;
  font-weight: normal;
  color: var(--title);
}

.album-book-chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--gray-500);
  border-bottom: 2px solid var(--gray-500);
  transform: rotate(45deg);
  transition: transform 0.25s ease;
  margin-left: 4px;
}

.album-book.is-open .album-book-chevron {
  transform: rotate(225deg);
}

.album-book-panel {
  padding: 0 14px 8px;
  border-top: 1px solid var(--gray-100);
}

.album-book-panel[hidden] {
  display: none !important;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 14px;
  padding: 16px 0 12px;
}

.album-thumb {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-align: center;
  animation: albumFadeIn 0.55s ease both;
}

.album-thumb:nth-child(3n) { animation-delay: 0.05s; }
.album-thumb:nth-child(3n+1) { animation-delay: 0.1s; }
.album-thumb:nth-child(3n+2) { animation-delay: 0.15s; }

.album-thumb-frame {
  display: block;
  background: var(--white);
  padding: 6px 6px 18px;
  border-radius: 2px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.06),
    0 8px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  transform: rotate(var(--tilt, 0deg));
}

.album-thumb:nth-child(4n+1) { --tilt: -1.6deg; }
.album-thumb:nth-child(4n+2) { --tilt: 1.2deg; }
.album-thumb:nth-child(4n+3) { --tilt: -0.8deg; }
.album-thumb:nth-child(4n) { --tilt: 1.8deg; }

.album-thumb:hover .album-thumb-frame,
.album-thumb:focus-visible .album-thumb-frame {
  transform: rotate(0deg) translateY(-6px) scale(1.04);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.08),
    0 16px 32px rgba(0, 0, 0, 0.14);
  outline: none;
}

.album-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--gray-100);
  filter: contrast(1.02) saturate(0.96);
  transition: filter 0.28s ease;
}

.album-thumb:hover img {
  filter: contrast(1.05) saturate(1.05);
}

@keyframes albumFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Album lightbox */
.album-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 16, 14, 0.88);
  backdrop-filter: blur(6px);
  padding: 48px 56px 64px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.album-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.album-lb-stage {
  max-width: min(920px, 100%);
  max-height: 100%;
  background: var(--white);
  padding: 12px 12px 28px;
  border-radius: 3px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  transform: scale(0.92) translateY(12px);
  transition: transform 0.3s ease;
}

.album-lightbox.is-open .album-lb-stage {
  transform: scale(1) translateY(0);
}

.album-lb-stage img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 160px);
  width: auto;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

.album-lb-close,
.album-lb-nav {
  appearance: none;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.album-lb-close:hover,
.album-lb-nav:hover {
  background: rgba(255, 255, 255, 0.22);
}

.album-lb-close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

.album-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.album-lb-prev { right: 16px; }
.album-lb-next { left: 16px; }

.album-lb-nav:hover {
  transform: translateY(-50%) scale(1.06);
}

.album-lb-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  letter-spacing: 0.04em;
}

@media (max-width: 600px) {
  .album-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 10px;
  }

  .album-thumb-frame {
    padding: 4px 4px 14px;
  }

  .album-lightbox {
    padding: 56px 12px 72px;
  }

  .album-lb-prev { right: 8px; }
  .album-lb-next { left: 8px; }
}

/* Footer */
.site-footer {
  padding: 36px 0 28px;
  margin-top: 16px;
  background: #f4f7fa;
  border-top: 10px solid #404040;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-top {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  direction: ltr;
  width: 100%;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  direction: rtl;
  text-align: center;
  max-width: 360px;
}

.footer-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  opacity: 0.9;
}

.footer-name {
  font-size: 18px;
  color: var(--title);
  line-height: 1.5;
}

.footer-tagline {
  font-size: 14px;
  color: var(--gray-500);
  line-height: 1.7;
}

.footer-nav {
  direction: rtl;
  text-align: right;
  flex-shrink: 0;
}

.footer-nav > ul {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 28px;
  row-gap: 2px;
  align-items: start;
  justify-items: stretch;
  padding: 0;
  margin: 0;
  text-align: right;
}

.footer-nav-item {
  list-style: none;
  text-align: right;
  width: 100%;
}

.footer-nav-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: 100%;
  padding: 1px 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: right;
}

.footer-nav-link {
  display: block;
  font-size: 15px;
  color: #404040;
  line-height: 1.35;
  transition: color var(--transition);
  text-align: right;
}

.footer-nav-toggle:hover .footer-nav-link {
  color: #2a2a2a;
}

.footer-nav-item:not(.has-dropdown) .footer-nav-toggle {
  cursor: pointer;
}

.footer-nav-chevron {
  width: 0;
  height: 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 4px solid #404040;
  border-bottom: 0;
  opacity: 0.75;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.footer-nav-item.is-open .footer-nav-chevron {
  transform: rotate(180deg);
}

.footer-subnav {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: 0 0 4px;
  margin: 0;
  text-align: right;
  width: 100%;
}

.footer-subnav[hidden] {
  display: none !important;
}

.footer-subnav a {
  display: block;
  font-size: 13px;
  color: #404040;
  padding: 0;
  line-height: 1.3;
  transition: color var(--transition);
  text-align: right;
  width: 100%;
}

.footer-subnav a:hover {
  color: #2a2a2a;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid #e8eef4;
  text-align: center;
}

.footer-social {
  display: flex;
  gap: 12px;
  align-items: center;
}

.footer-social .social-icon {
  width: 40px;
  height: 40px;
}

@media (max-width: 700px) {
  .footer-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-brand {
    align-items: center;
    text-align: center;
  }

  .footer-nav > ul {
    justify-items: stretch;
  }

  .footer-nav-toggle,
  .footer-subnav,
  .footer-subnav a {
    text-align: center;
    justify-content: center;
    align-items: center;
  }
}

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-height);
  right: 0;
  left: 0;
  bottom: 0;
  background: var(--white);
  z-index: 90;
  overflow-y: auto;
  padding: 24px;
  border-top: 1px solid var(--gray-100);
}

.mobile-nav.active {
  display: block;
}

.mobile-nav-group {
  margin-bottom: 24px;
}

.mobile-nav-group > a,
.mobile-nav-group > span {
  display: block;
  font-size: 17px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}

.mobile-nav-group ul {
  padding: 8px 16px 0 0;
}

.mobile-nav-group ul a {
  display: block;
  padding: 6px 0;
  font-size: 15px;
  color: var(--gray-500);
  border-radius: 0;
}

.mobile-nav a.is-active {
  color: var(--title);
  background: var(--gray-50);
}

/* Responsive */
@media (max-width: 900px) {
  .main-nav,
  .header-nav-bar {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  :root {
    --header-height: calc(var(--header-page-gap) + var(--header-top-height));
  }

  .header-search {
    max-width: none;
  }

  .container {
    padding-left: 40px;
    padding-right: 40px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero p {
    max-width: none;
  }

  .hero-image {
    margin: 0 auto;
    margin-top: 0;
    order: -1;
    width: 160px;
    height: 160px;
  }

  .social-links {
    justify-content: center;
  }

  .post-grid,
  .video-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 48px 0 40px;
  }

  .container {
    padding-left: 28px;
    padding-right: 28px;
  }


  .hero h1 {
    font-size: 28px;
  }

  .section {
    padding: 48px 0;
  }

  .site-logo {
    font-size: 16px;
  }

  .site-logo-text {
    max-width: 9.5em;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .site-logo-img {
    width: 28px;
    height: 28px;
  }

  .header-top-inner {
    gap: 12px;
  }

  .header-search input {
    font-size: 14px;
    padding: 4px 18px 4px 42px;
    min-height: 32px;
    height: 32px;
  }
}

/* Article & category pages */
.page-article .article-section {
  padding-top: 40px;
  padding-bottom: 48px;
}

.page-header-section {
  padding-top: 24px;
}

.article-banner {
  margin: 0 0 24px;
}

.article-banner img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
}

.page-header {
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-100);
}

.page-header h1 {
  font-size: 28px;
  font-weight: normal;
  line-height: 1.3;
  color: var(--title);
}

.page-count {
  font-size: 14px;
  color: var(--gray-500);
  margin-top: 4px;
}

.empty-state {
  color: var(--gray-500);
  padding: 24px 0;
}

.article-container {
  max-width: 900px;
}

.article-top {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gray-100);
}

.article-top.has-featured {
  display: flex;
  align-items: flex-start;
  gap: 28px;
}

.article-header {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.article-categories {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 4px;
  line-height: 1.4;
}

.article-categories a:hover {
  color: var(--gray-900);
}

.article-header h1 {
  font-size: 28px;
  font-weight: normal;
  line-height: 1.3;
  margin: 0 0 4px;
  color: var(--title);
}

.article-title-image {
  margin: 0 0 8px;
  max-width: 420px;
}

.article-title-image img {
  display: block;
  width: 100%;
  height: auto;
}

.article-top.has-title-image:not(.has-featured) .article-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.article-meta {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.4;
  margin: 0;
}

.article-body {
  overflow: visible;
}

.article-featured-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 0 0 300px;
  width: 300px;
  max-width: 48%;
  align-self: flex-start;
}

.article-featured-group .article-featured {
  flex: none;
  width: 100%;
  max-width: 100%;
}

.article-featured {
  flex: 0 0 300px;
  width: 300px;
  max-width: 48%;
  margin: 0;
  align-self: flex-start;
}

.article-featured img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
}

@media (max-width: 600px) {
  .article-top.has-featured {
    flex-direction: column;
  }

  .article-featured-group,
  .article-featured {
    flex-basis: auto;
    width: 100%;
    max-width: 100%;
    order: 1;
  }

  .article-top.has-featured .article-header {
    order: 0;
  }
}

.article-content {
  color: var(--gray-700);
  line-height: 1.75;
  text-align: start;
  overflow: visible;
}

.article-content p {
  margin: 0 0 1em;
  text-align: start;
  line-height: 1.85;
}

.article-content p:last-child {
  margin-bottom: 0;
}

.article-content table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 1.25em 0;
  table-layout: fixed;
}

.article-content td,
.article-content th {
  vertical-align: top;
  padding: 10px 16px;
  border-inline-start: 1px solid #b0b0b0;
  border-bottom: 1px solid #e8e8e8;
  overflow: visible;
}

.article-content tr > *:first-child {
  border-inline-start: none;
  padding-inline-start: 4px;
}

.article-content tr:last-child > * {
  border-bottom: none;
}

.article-content h2,
.article-content h3,
.article-content h4 {
  font-weight: normal;
  margin: 0.85em 0 0.35em;
  color: var(--title);
  line-height: 1.3;
}

.article-content img {
  margin: 16px auto;
  border-radius: 0;
}

.article-content img.content-float-img {
  float: left;
  width: 160px;
  max-width: 40%;
  height: auto;
  margin: 4px 0 10px 14px;
}

.article-content video,
.article-content audio {
  width: 100%;
  margin: 16px 0;
  border-radius: 0;
}

.article-content blockquote {
  border-right: 3px solid var(--gray-200);
  padding: 8px 16px 8px 0;
  margin: 16px 0;
  color: var(--gray-500);
}

.article-content ul,
.article-content ol {
  margin: 1em 0;
  padding-right: 24px;
}

.article-content li {
  margin-bottom: 0.5em;
}

.book-feature {
  text-align: center;
  padding: 32px;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  margin-top: 24px;
}

.book-feature img {
  max-width: 200px;
  margin: 0 auto 24px;
  border-radius: 4px;
}

.btn-download {
  display: inline-block;
  padding: 12px 28px;
  background: var(--gray-900);
  color: var(--white) !important;
  border-radius: var(--radius);
  font-size: 16px;
}

.btn-download:hover {
  background: var(--gray-700);
  color: var(--white) !important;
}
