/*
Theme Name: نودهشتیا ساده
Description: پوسته سبک و مدرن برای سایت رمان. هدر، فهرست نوشته‌ها، نویسنده‌ها، صفحه نوشته و فوتر.
Version: 1.6.0
Text Domain: nodeheshtia-simple
*/

:root {
  --bg: #f4eef9;
  --paper: #fffbfd;
  --ink: #24182f;
  --muted: #6d627a;
  --line: #e8dcef;
  --accent: #7b4ea3;
  --accent-2: #9a6bc0;
  --accent-soft: #f3e8fa;
  --btn: #6b3f91;
  --btn-text: #fffafd;
  --shadow: 0 12px 30px rgba(80, 40, 110, 0.08);
  --radius: 18px;
  --max: 1080px;
  --read: 760px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(900px 420px at 100% -10%, rgba(154, 107, 192, 0.16), transparent 55%),
    radial-gradient(700px 360px at 0% 0%, rgba(123, 78, 163, 0.08), transparent 50%),
    var(--bg);
  color: var(--ink);
  font-family: "Vazirmatn", Tahoma, sans-serif;
  font-size: clamp(15px, 3.8vw, 16px);
  line-height: 1.9;
  min-height: 100vh;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.site-wrap { min-height: 100vh; display: flex; flex-direction: column; }

.site-header {
  background: rgba(255, 251, 253, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header-inner,
.site-main,
.site-footer-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.single .site-main {
  width: min(var(--read), calc(100% - 32px));
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.site-title {
  margin: 0;
  font-size: clamp(1.15rem, 4.5vw, 1.4rem);
  font-weight: 800;
}

.site-title a { color: var(--accent); }
.site-description { margin: 2px 0 0; color: var(--muted); font-size: 0.85rem; }

.site-main { flex: 1; padding: 28px 0 48px; }

.home-intro {
  margin-bottom: 28px;
  padding: 28px 26px;
  background: linear-gradient(135deg, #7b4ea3 0%, #9a6bc0 100%);
  color: #fff;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.home-intro h2 {
  margin: 0 0 8px;
  font-size: clamp(1.25rem, 4.6vw, 1.7rem);
}

.home-intro p {
  margin: 0;
  max-width: 42ch;
  color: rgba(255, 255, 255, 0.88);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 16px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--ink);
}

.authors {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 30px;
}

.author-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.author-card img,
.author-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--accent-soft);
  flex: 0 0 auto;
}

.author-card strong { display: block; font-size: 0.95rem; }
.author-card span { display: block; color: var(--muted); font-size: 0.8rem; }

.posts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 100%;
}

.post-card-thumb {
  height: 210px;
  background: var(--accent-soft);
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 16px 18px;
  min-width: 0;
}

.post-card h2 {
  margin: 0;
  font-size: clamp(1.02rem, 3.4vw, 1.2rem);
  line-height: 1.7;
}

.post-card h2 a:hover { color: var(--accent); }
.post-card p { margin: 0; color: var(--muted); font-size: 0.94rem; }

.post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  color: var(--muted);
  font-size: 0.8rem;
}

.post-meta img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
}

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 700;
}

.single-article {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.single-hero {
  position: relative;
  min-height: 320px;
  background:
    linear-gradient(160deg, #5b2f80 0%, #9a6bc0 100%);
}

.single-hero img {
  width: 100%;
  height: 380px;
  object-fit: cover;
}

.single-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(36, 24, 47, 0.15) 0%, rgba(36, 24, 47, 0.72) 100%);
}

.single-hero-content {
  position: absolute;
  right: 0;
  left: 0;
  bottom: 0;
  z-index: 1;
  padding: 28px 28px 32px;
  color: #fff;
}

.single-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.single-cats a,
.single-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 0.78rem;
}

.single-title {
  margin: 0 0 14px;
  font-size: clamp(1.4rem, 5.2vw, 2.1rem);
  line-height: 1.55;
  color: #fff;
}

.single-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.88rem;
}

.single-meta img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
}

.single-meta a { color: #fff; font-weight: 700; }

.single-body {
  padding: 32px 28px 36px;
}

.entry-content {
  color: var(--ink);
  font-size: clamp(16px, 2.8vw, 18px);
  line-height: 2;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.entry-content > *:first-child { margin-top: 0; }
.entry-content > *:last-child { margin-bottom: 0; }

.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content blockquote,
.entry-content pre,
.entry-content table,
.entry-content figure {
  margin: 0 0 1.15em;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin: 1.6em 0 0.6em;
  color: var(--accent);
  line-height: 1.6;
}

.entry-content h2 { font-size: 1.3rem; }
.entry-content h3 { font-size: 1.12rem; }
.entry-content a { color: var(--accent); text-decoration: underline; }

.entry-content img,
.entry-content figure img,
.entry-content .wp-block-image img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  margin: 8px 0 16px;
}

.entry-content ul,
.entry-content ol {
  padding-right: 1.3em;
  padding-left: 0;
}

.entry-content blockquote {
  padding: 16px 18px;
  border-right: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 14px;
  color: var(--muted);
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.entry-content th,
.entry-content td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: right;
}

.entry-content th {
  background: var(--accent-soft);
  color: var(--accent);
}

.single-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.single-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
}

.author-box {
  display: flex;
  gap: 16px;
  margin-top: 28px;
  padding: 18px;
  background: linear-gradient(135deg, #f3e8fa 0%, #fffbfd 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.author-box img {
  width: 68px;
  height: 68px;
  border-radius: 50%;
}

.author-box h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.author-box p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.author-box a {
  color: var(--accent);
  font-weight: 700;
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.post-nav a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 88px;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.post-nav span {
  color: var(--muted);
  font-size: 0.78rem;
}

.post-nav strong {
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.6;
}

.post-nav a:hover strong { color: var(--accent); }

.pagination {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
}

.pagination a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--accent);
  font-weight: 700;
}

.download-box {
  margin: 28px 0 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--accent-soft);
}

.download-box h3 { margin: 0 0 12px; font-size: 1rem; color: var(--accent); }

.download-box a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 10px;
  background: var(--btn);
  color: var(--btn-text);
  font-weight: 700;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.site-footer-inner {
  padding: 18px 0;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

@media (max-width: 800px) {
  .posts { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .site-header-inner,
  .site-main,
  .site-footer-inner,
  .single .site-main {
    width: min(var(--max), calc(100% - 24px));
  }

  .home-intro { padding: 22px 18px; }
  .authors { grid-template-columns: 1fr; }
  .post-card-thumb { height: 190px; }

  .single-hero { min-height: 260px; }
  .single-hero img { height: 260px; }
  .single-hero-content { padding: 18px 16px 20px; }
  .single-body { padding: 20px 16px 24px; }
  .author-box { align-items: flex-start; }
  .post-nav { grid-template-columns: 1fr; }
  .download-box a { width: 100%; }
}

@media (max-width: 400px) {
  .post-card-thumb { height: 160px; }
  .single-hero img { height: 220px; }
}
.site-auth {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.site-auth a {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
}

.site-auth-btn {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--btn);
  color: var(--btn-text) !important;
}

.auth-card {
  max-width: 460px;
  margin: 0 auto;
  padding: 28px 24px 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.auth-card-wide { max-width: 640px; }

.auth-card h1 {
  margin: 0 0 8px;
  font-size: clamp(1.3rem, 4.6vw, 1.7rem);
}

.auth-lead {
  margin: 0 0 18px;
  color: var(--muted);
}

.auth-field { margin: 0 0 14px; }

.auth-field label,
.auth-check label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

.auth-field label span {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.82rem;
}

.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="password"] {
  width: 100%;
  min-height: 46px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(123, 78, 163, 0.15);
}

.auth-check {
  margin: 0 0 16px;
  color: var(--muted);
}

.auth-check label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  background: var(--btn);
  color: var(--btn-text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.auth-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 16px 0 0;
  color: var(--muted);
}

.auth-switch a { color: var(--accent); font-weight: 700; }

.auth-msg {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.92rem;
}

.auth-msg-err {
  background: #fde8ef;
  color: #8a2048;
}

.auth-msg-ok {
  background: var(--accent-soft);
  color: var(--accent);
}

.auth-honey {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

.account-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.account-head img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
}

.account-head p {
  margin: 0;
  color: var(--muted);
}

.account-posts {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.account-posts h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.account-posts ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.account-posts a { color: var(--accent); font-weight: 700; }

@media (max-width: 640px) {
  .auth-card { padding: 22px 16px 18px; }
  .site-auth a { font-size: 0.84rem; }
}
.genres {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 30px;
}

.genre-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 88px;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.genre-card strong {
  color: var(--accent);
  font-size: 0.98rem;
}

.genre-card span {
  color: var(--muted);
  font-size: 0.8rem;
}

.genre-card:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

@media (max-width: 640px) {
  .genres {
    grid-template-columns: repeat(2, 1fr);
  }
}
