:root {
  --saffron: #e88922;
  --saffron-dark: #b85f12;
  --deep-maroon: #5d2416;
  --bg-soft: #fff8eb;
  --card-bg: #fff4d6;
  --card-border: #e8c889;
  --text-dark: #2d2417;
  --white: #ffffff;
}

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

body {
  font-family: "Noto Sans Devanagari", "Poppins", sans-serif;
  color: var(--text-dark);
  background: var(--bg-soft);
}

.top-header {
  background:
    linear-gradient(90deg, rgb(61 24 8 / 88%), rgb(137 69 17 / 78%)),
    image-set(
      url("data/images/header-900.jpg") 1x,
      url("data/images/header-1600.jpg") 2x
    ) center 45% / cover;
  color: var(--white);
  padding: 13px 28px 11px;
  box-shadow: 0 3px 14px rgb(0 0 0 / 22%);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  width: min(1200px, 100%);
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-heading {
  margin: 0;
  line-height: 1.2;
}

.brand-link {
  color: #fff9df;
  text-decoration: none;
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  font-weight: 900;
  white-space: nowrap;
  text-shadow: 0 2px 6px rgb(0 0 0 / 38%);
}

.header-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.header-links a {
  color: #fff9df;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 800;
  padding: 7px 9px;
  border-radius: 8px;
  text-shadow: 0 1px 4px rgb(0 0 0 / 35%);
}

.header-links a:hover {
  background: rgb(255 249 223 / 18%);
}

.chapter-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  min-height: 37px;
  padding-bottom: 5px;
  scrollbar-width: thin;
  width: min(1200px, 100%);
  margin: 0 auto;
}

.chapter-tabs::-webkit-scrollbar {
  height: 7px;
}

.chapter-tabs::-webkit-scrollbar-thumb {
  background-color: rgb(255 255 255 / 45%);
  border-radius: 999px;
}

.tab {
  text-decoration: none;
  color: #fff9df;
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
  border: 1px solid rgb(255 249 223 / 28%);
  border-radius: 999px;
  padding: 7px 10px;
  transition: background 0.2s ease, opacity 0.2s ease;
  opacity: 0.92;
}

.tab:hover,
.tab.active {
  background: rgb(255 249 223 / 20%);
  opacity: 1;
}

.container {
  width: min(1200px, 92%);
  margin: 28px auto 40px;
}

.chapter-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.chapter-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  min-height: 138px;
  padding: 20px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 8%);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.chapter-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgb(0 0 0 / 12%);
}

.chapter-card h2 {
  font-size: 1.16rem;
  text-align: center;
  line-height: 1.35;
  font-weight: 700;
}

.chapter-logo {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #c65d08;
  box-shadow: 0 4px 10px rgb(74 28 5 / 25%);
}

.meta {
  font-weight: 600;
  opacity: 0.85;
}

.reader {
  display: grid;
  gap: 14px;
}

.chapter-article-head {
  background: #fffdf6;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 18px 18px 16px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 6%);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #17130d;
  font-size: 0.98rem;
  margin-bottom: 12px;
}

.breadcrumb a {
  color: #17130d;
  text-decoration: none;
}

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

.chapter-article-head h1 {
  color: #050505;
  font-size: clamp(1.55rem, 3.5vw, 2.35rem);
  font-weight: 950;
  line-height: 1.25;
  margin-bottom: 8px;
}

.chapter-title-en {
  color: #050505;
  font-family: "Poppins", "Noto Sans Devanagari", sans-serif;
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 950;
  line-height: 1.25;
  margin-bottom: 18px;
}

.published-row {
  color: #5f6980;
  font-size: 1rem;
  font-weight: 650;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(170px, 0.8fr) minmax(220px, 260px) minmax(260px, 1.2fr);
  gap: 12px;
  align-items: end;
  background: #fffdf6;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 5%);
}

.toolbar-left {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.btn {
  appearance: none;
  border: 1px solid #f1c47f;
  background: #ffe4b4;
  color: #5a3c07;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.listen-btn {
  margin-top: 14px;
  background: #fff3bf;
  border-color: #c28d29;
  color: #5a3c07;
  font-size: 0.97rem;
}

.listen-btn-en {
  background: #e8f4fd;
  border-color: #7ab8e8;
  color: #1a4a7a;
}

.listen-btn-combo {
  background: #fff3bf;
  border-color: #c28d29;
  color: #5a3c07;
}

.listen-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.home-hero {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  align-items: start;
}

.home-intro {
  display: block;
  line-height: 1.65;
  background: #fffdf6;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 6%);
}

.home-copy {
  display: grid;
  gap: 5px;
}

.home-intro h2 {
  color: var(--deep-maroon);
  font-size: clamp(1.25rem, 2.4vw, 1.9rem);
  line-height: 1.25;
}

.home-intro p {
  font-weight: 700;
  opacity: 0.88;
}

.shlok-picker {
  display: grid;
  gap: 6px;
  align-self: stretch;
}

.shlok-picker label {
  color: var(--deep-maroon);
  font-size: 0.84rem;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1.2;
}

.select-shell {
  position: relative;
}

.select-shell::after {
  content: "⌄";
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-56%);
  color: var(--deep-maroon);
  font-size: 1.1rem;
  font-weight: 950;
  pointer-events: none;
}

.select {
  appearance: none;
  width: 100%;
  min-height: 46px;
  padding: 11px 40px 11px 14px;
  border-radius: 12px;
  border: 1px solid #d9aa54;
  background: linear-gradient(180deg, #fffdf7, #fff0c9);
  color: var(--deep-maroon);
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 80%), 0 2px 8px rgb(93 36 22 / 8%);
}

.select:focus {
  outline: 3px solid rgb(232 137 34 / 24%);
  border-color: var(--saffron-dark);
}

.search {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid #d9aa54;
  background: linear-gradient(180deg, #fffdf7, #fff0c9);
  color: var(--deep-maroon);
  font-weight: 750;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 80%), 0 2px 8px rgb(93 36 22 / 8%);
}

.search:focus {
  outline: 3px solid rgb(232 137 34 / 24%);
  border-color: var(--saffron-dark);
}

.verse-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 16px 16px 18px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 8%);
}

.verse-num {
  font-weight: 900;
  letter-spacing: 0.2px;
  margin-bottom: 10px;
}

.verse-sanskrit {
  white-space: pre-wrap;
  font-size: 1.18rem;
  line-height: 1.5;
  font-weight: 800;
}

.verse-translit {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgb(0 0 0 / 18%);
  opacity: 0.9;
  font-weight: 600;
  line-height: 1.45;
}

.verse-english {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgb(0 0 0 / 18%);
  font-weight: 650;
  line-height: 1.55;
}

.verse-hindi {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgb(0 0 0 / 18%);
  font-weight: 600;
  line-height: 1.65;
  color: #5a3c07;
}

.search-results {
  background: #fffdf6;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 6%);
}

.results-title {
  font-weight: 900;
  margin-bottom: 8px;
}

.results-list {
  display: grid;
  gap: 8px;
}

.result-item {
  display: grid;
  gap: 2px;
  text-decoration: none;
  color: inherit;
  padding: 10px;
  border-radius: 10px;
  background: #fff7e3;
  border: 1px solid #efd6a8;
}

.result-item:hover {
  filter: brightness(0.985);
}

.result-id {
  font-weight: 900;
}

.result-snippet {
  opacity: 0.9;
  font-weight: 650;
}

.empty {
  font-weight: 700;
  opacity: 0.85;
}

.error {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #881337;
  padding: 12px;
  border-radius: 12px;
  font-weight: 800;
}

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

.site-footer {
  margin-top: 30px;
  padding: 16px 16px;
  background: #fffdf6;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.footer-inner {
  width: min(1200px, 92%);
  margin: 0 auto;
  display: grid;
  gap: 10px;
  text-align: center;
}

.footer-copy {
  font-weight: 700;
  opacity: 0.9;
  font-size: 0.95rem;
}

.visitor-count {
  color: var(--deep-maroon);
  font-weight: 950;
}

.footer-links {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-links a {
  text-decoration: none;
  color: #5a3c07;
  font-weight: 800;
  opacity: 0.9;
}

.footer-links a:hover {
  opacity: 1;
  text-decoration: underline;
}

.page-content {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 8%);
  line-height: 1.7;
}

.page-title {
  font-size: 1.25rem;
  font-weight: 950;
  margin-bottom: 10px;
}

.page-body {
  display: grid;
  gap: 12px;
}

.page-body p {
  margin: 0;
}

.share-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.share-btn {
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 900;
  cursor: pointer;
  color: #fff;
  text-decoration: none;
}

.share-btn.facebook {
  background: #1877f2;
}

.share-btn.whatsapp {
  background: #25d366;
}

.share-btn.telegram {
  background: #229ed9;
}

.share-btn.twitter {
  background: #1da1f2;
}

.share-btn:hover {
  filter: brightness(0.98);
}

.verse-meaning {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgb(0 0 0 / 18%);
}

.meaning-title {
  font-weight: 950;
  margin-bottom: 6px;
}

.meaning-body {
  font-weight: 650;
  line-height: 1.6;
  white-space: pre-wrap;
}

.verse-tatparya {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgb(0 0 0 / 18%);
}

.tatparya-title {
  font-weight: 950;
  margin-bottom: 6px;
}

.tatparya-body {
  font-weight: 650;
  line-height: 1.6;
  white-space: pre-wrap;
}

.tag-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgb(0 0 0 / 18%);
}

.tag-title {
  font-weight: 950;
  opacity: 0.9;
  margin-bottom: 8px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-block;
  font-weight: 800;
  opacity: 0.95;
  background: #fff7e3;
  border: 1px solid #efd6a8;
  padding: 6px 10px;
  border-radius: 999px;
}

.share-section {
  background: #fffdf6;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 6%);
}

.share-label {
  font-weight: 950;
  opacity: 0.9;
  margin-bottom: 10px;
}

.chapter-seo {
  display: grid;
  gap: 14px;
  margin-top: 4px;
}

.seo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.seo-block {
  background: #fffdf6;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 5%);
  line-height: 1.65;
}

.seo-block h2,
.seo-block h3 {
  color: var(--deep-maroon);
  margin-bottom: 8px;
  line-height: 1.25;
}

.seo-block h2 {
  font-size: 1.22rem;
}

.seo-block h3 {
  font-size: 1.05rem;
}

.seo-block ul {
  display: grid;
  gap: 7px;
  padding-left: 20px;
}

.popular-list {
  display: grid;
  gap: 8px;
}

.popular-shlok {
  display: grid;
  gap: 3px;
  color: inherit;
  text-decoration: none;
  background: #fff4dc;
  border: 1px solid #ead19c;
  border-radius: 10px;
  padding: 9px 10px;
}

.popular-shlok:hover {
  border-color: #d49b42;
}

.popular-shlok span {
  color: var(--deep-maroon);
  font-weight: 950;
}

.popular-shlok small {
  font-weight: 650;
  line-height: 1.45;
  opacity: 0.86;
}

.faq-list {
  display: grid;
  gap: 8px;
}

.faq-list details {
  background: #fff4dc;
  border: 1px solid #ead19c;
  border-radius: 10px;
  padding: 10px 12px;
}

.faq-list summary {
  color: var(--deep-maroon);
  cursor: pointer;
  font-weight: 950;
}

.faq-list p {
  margin-top: 8px;
  font-weight: 650;
}

@media (max-width: 700px) {
  .top-header {
    padding-inline: 14px;
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-links {
    justify-content: flex-start;
    gap: 6px;
  }

  .header-links a {
    padding-inline: 7px;
  }

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

  .chapter-card {
    min-height: 120px;
  }

  .toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .toolbar-left {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

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