/* ═══════════════════════════════════════════════════════════════
   Prabhupada Vision — Stylesheet
   Clean, devotional, accessible. Serif body, readable type scale,
   good contrast, max-width reader, responsive.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --color-bg: #faf9f6;
  --color-text: #1a1a1a;
  --color-muted: #555;
  --color-link: #8b4513;
  --color-link-hover: #a0522d;
  --color-border: #ddd;
  --color-header-bg: #1a1a2e;
  --color-header-text: #f0e6d2;
  --color-nav-bg: #16213e;
  --color-nav-text: #ccc;
  --color-nav-hover: #f0e6d2;
  --color-card-bg: #fff;
  --color-footer-bg: #1a1a2e;
  --color-footer-text: #aaa;
  --max-width: 760px;
  --max-width-wide: 1100px;
  --font-body: Georgia, "Times New Roman", "Noto Serif", serif;
  --font-heading: Georgia, "Times New Roman", "Noto Serif", serif;
  --font-size-base: 18px;
  --line-height: 1.7;
}

/* ─── Reset & base ─────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  line-height: var(--line-height);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Layout ───────────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.site-main {
  padding: 2rem 0 4rem;
  min-height: 60vh;
}

/* ─── Header ───────────────────────────────────────────────────── */
.site-header {
  background: var(--color-header-bg);
  color: var(--color-header-text);
  padding: 1.5rem 0 0;
  text-align: center;
}

.site-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--color-header-text);
  text-decoration: none;
  font-weight: normal;
  letter-spacing: 0.02em;
}

.site-tagline {
  font-size: 0.9rem;
  color: var(--color-nav-text);
  margin-top: 0.25rem;
  font-style: italic;
}

/* ─── Navigation ───────────────────────────────────────────────── */
.site-nav {
  background: var(--color-nav-bg);
  margin-top: 1rem;
}

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
}

.site-nav li {
  margin: 0;
}

.site-nav a {
  display: block;
  padding: 0.6rem 1rem;
  color: var(--color-nav-text);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s, background 0.2s;
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--color-nav-hover);
  background: rgba(255,255,255,0.08);
}

/* ─── Links ────────────────────────────────────────────────────── */
a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover,
a:focus {
  color: var(--color-link-hover);
}

/* ─── Post / Article ───────────────────────────────────────────── */
.post,
.page {
  max-width: var(--max-width);
  margin: 0 auto;
}

.post-header,
.page-header {
  margin-bottom: 2rem;
  text-align: center;
}

.post-title,
.page-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: normal;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.post-meta,
.page-date {
  font-size: 0.85rem;
  color: var(--color-muted);
}

.post-byline {
  color: var(--color-muted);
}

.post-categories {
  margin-top: 0.5rem;
  font-size: 0.8rem;
}

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

.post-categories a:hover {
  text-decoration: underline;
}

/* ─── Featured image ───────────────────────────────────────────── */
.post-featured-image {
  margin: 0 auto 2rem;
  text-align: center;
}

.post-featured-image img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

/* ─── Post content ─────────────────────────────────────────────── */
.post-content {
  font-size: 1.05rem;
  line-height: var(--line-height);
}

.post-content p {
  margin-bottom: 1.25rem;
}

.post-content h2,
.post-content h3,
.post-content h4 {
  font-family: var(--font-heading);
  font-weight: normal;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.post-content h2 { font-size: 1.4rem; }
.post-content h3 { font-size: 1.2rem; }
.post-content h4 { font-size: 1.05rem; }

.post-content blockquote {
  margin: 1.5rem 0;
  padding: 0.5rem 1.5rem;
  border-left: 3px solid var(--color-border);
  color: var(--color-muted);
  font-style: italic;
}

.post-content blockquote p {
  margin-bottom: 0.5rem;
}

.post-content img {
  max-width: 100%;
  height: auto;
  margin: 1.5rem auto;
  display: block;
  border-radius: 4px;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

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

.post-content th {
  background: #f5f5f0;
  font-weight: bold;
}

.post-content ul,
.post-content ol {
  margin: 1rem 0 1.25rem 2rem;
}

.post-content li {
  margin-bottom: 0.4rem;
}

.post-content a {
  color: var(--color-link);
}

.post-content iframe {
  max-width: 100%;
  margin: 1.5rem auto;
  display: block;
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2rem 0;
}

/* ─── Related posts ────────────────────────────────────────────── */
.related-posts {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.related-posts h2 {
  font-size: 1.1rem;
  font-weight: normal;
  margin-bottom: 0.75rem;
}

.related-posts ul {
  list-style: none;
  margin: 0;
}

.related-posts li {
  margin-bottom: 0.4rem;
}

/* ─── Homepage ─────────────────────────────────────────────────── */
.homepage {
  max-width: var(--max-width-wide);
  margin: 0 auto;
}

.featured-section {
  margin-bottom: 3rem;
}

.featured-section h2,
.recent-posts h2,
.categories-section h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: normal;
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

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

.post-card {
  background: var(--color-card-bg);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.post-card-image img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.post-card-body {
  padding: 0.75rem 1rem 1rem;
}

.post-card-body h3 {
  font-size: 1rem;
  font-weight: normal;
  margin-bottom: 0.25rem;
}

.post-card-body h3 a {
  text-decoration: none;
}

.post-card-body h3 a:hover {
  text-decoration: underline;
}

.post-card-body time {
  font-size: 0.8rem;
  color: var(--color-muted);
}

/* ─── Post list ────────────────────────────────────────────────── */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-list-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border);
}

.post-list-item:last-child {
  border-bottom: none;
}

.post-list-content h3 {
  font-size: 1.15rem;
  font-weight: normal;
  margin-bottom: 0.3rem;
}

.post-list-content h3 a {
  text-decoration: none;
}

.post-list-content h3 a:hover {
  text-decoration: underline;
}

.post-list-meta {
  font-size: 0.82rem;
  color: var(--color-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.post-list-cats a {
  color: var(--color-muted);
  text-decoration: none;
}

.post-list-cats a:hover {
  text-decoration: underline;
}

.post-list-byline {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-top: 0.2rem;
  font-style: italic;
}

/* ─── Pagination ───────────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.pagination a {
  text-decoration: none;
}

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

.page-info {
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* ─── Category page ────────────────────────────────────────────── */
.category-page {
  max-width: var(--max-width);
  margin: 0 auto;
}

.category-header {
  text-align: center;
  margin-bottom: 2rem;
}

.category-header h1 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: normal;
}

.category-header p {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.back-home {
  margin-top: 2rem;
  text-align: center;
}

/* ─── Category grid ────────────────────────────────────────────── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1rem;
  background: var(--color-card-bg);
  border-radius: 6px;
  text-decoration: none;
  color: var(--color-text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s, transform 0.2s;
}

.category-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.category-name {
  font-size: 1rem;
  font-family: var(--font-heading);
}

.category-count {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-top: 0.25rem;
}

/* ─── Footer ───────────────────────────────────────────────────── */
.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.85rem;
}

.site-footer p {
  margin-bottom: 0.5rem;
}

.footer-categories a {
  color: var(--color-footer-text);
  text-decoration: none;
}

.footer-categories a:hover {
  color: var(--color-header-text);
  text-decoration: underline;
}

/* ─── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --font-size-base: 17px;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav a {
    text-align: center;
    padding: 0.5rem;
  }

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

  .post-title,
  .page-title {
    font-size: 1.4rem;
  }

  .pagination {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  :root {
    --font-size-base: 16px;
  }

  .site-title {
    font-size: 1.5rem;
  }

  .container {
    padding: 0 0.75rem;
  }
}

/* ─── Print ────────────────────────────────────────────────────── */
@media print {
  .site-header,
  .site-nav,
  .site-footer,
  .related-posts,
  .pagination {
    display: none;
  }

  body {
    background: white;
    color: black;
    font-size: 12pt;
  }
}