/* ============================================
   BLOG & YAZI (Article) — Page-Specific Styles
   Karbeyaz — Navy Blue Palette
   ============================================ */

/* Override body line-height for article pages */
body.page-yazi { line-height: 1.7; font-size: 17px; }

/* Article wrap (narrower max-width for readability) */
.article-wrap { max-width: 780px; margin-inline: auto; padding-inline: var(--gutter); }

/* --- Hero Header (blog list) --- */
.page-hero {
  padding: 140px 0 64px;
  text-align: center;
  background: linear-gradient(160deg, var(--primary-deep) 0%, var(--primary) 60%, var(--primary-light) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 30%, rgba(37,99,235,0.1) 0%, transparent 50%);
  pointer-events: none;
}

.page-hero .tag {
  display: inline-block;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: #fff;
  padding: 6px 14px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  margin-bottom: 20px;
}

.page-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 700;
  margin-bottom: 14px;
  color: #fff;
}

.page-hero p { color: rgba(255,255,255,0.7); max-width: 620px; margin: 0 auto; font-size: 1.05rem; }

.breadcrumb {
  font-size: 0.82rem; color: var(--muted);
  margin-bottom: 18px;
}
.breadcrumb a { color: var(--accent); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { margin: 0 8px; opacity: 0.5; }

/* --- Categories --- */
.cat-bar {
  padding: 28px 0;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
}
.cat-list {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
}
.cat-list a {
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  border: 1px solid var(--line);
  transition: all .25s var(--ease);
  color: var(--ink-soft);
  text-decoration: none;
}
.cat-list a:hover { border-color: var(--accent); color: var(--accent); }
.cat-list a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* --- Posts Grid --- */
.posts-section { padding: 72px 0 96px; }
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
}
.post-card {
  background: var(--surface);
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: all .4s var(--ease);
  display: flex; flex-direction: column;
}
.post-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}
.post-img {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--line-soft);
}
.post-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease);
}
.post-card:hover .post-img img { transform: scale(1.08); }
.post-body {
  padding: 24px;
  flex: 1;
  display: flex; flex-direction: column;
}
.post-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 0.78rem; color: var(--muted);
  margin-bottom: 12px;
}
.post-category {
  background: var(--accent-pale, #DBEAFE);
  color: var(--accent, #2563EB);
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.post-card h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
  line-height: 1.3;
}
.post-card h3 a { transition: color .2s; }
.post-card:hover h3 a { color: var(--accent); }
.post-excerpt {
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.65;
  margin-bottom: 18px;
  flex: 1;
}
.post-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 0.82rem;
}
.read-more {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent);
  font-weight: 600;
  transition: gap .3s var(--ease);
  text-decoration: none;
}
.read-more:hover { gap: 10px; }
.reading-time { color: var(--muted); }

/* Featured post (first) */
.post-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 0;
}
@media (max-width: 800px) {
  .post-card.featured { grid-template-columns: 1fr; }
}
.post-card.featured .post-img { aspect-ratio: 16/10; }
.post-card.featured .post-body { padding: 44px; justify-content: center; }
.post-card.featured h3 { font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.2; }
.post-card.featured .post-excerpt { font-size: 1.05rem; margin-bottom: 24px; }
.featured-tag {
  display: inline-block;
  background: var(--primary); color: var(--primary-pale);
  padding: 4px 12px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase;
  margin-bottom: 14px;
}

/* --- Empty --- */
.empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--muted);
}
.empty h3 { font-size: 1.4rem; margin-bottom: 10px; color: var(--ink); }

/* --- Pagination --- */
.pagination {
  margin-top: 56px;
  display: flex; justify-content: center; gap: 8px;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--line);
  background: var(--surface);
  min-width: 44px; text-align: center;
  transition: all .2s;
  text-decoration: none;
  color: var(--ink-soft);
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.pagination .disabled { opacity: 0.4; pointer-events: none; }

/* --- Article (yazi.php) --- */
.article-header {
  padding: 56px 0 48px;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.article-category {
  display: inline-block;
  background: var(--primary-pale);
  color: var(--primary);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.article-title {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 700;
  margin-bottom: 22px;
  line-height: 1.15;
}
.article-meta {
  display: flex; justify-content: center; gap: 20px; flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 8px;
}
.article-meta .dot { opacity: 0.4; }

.article-featured {
  max-width: 1100px;
  margin: 0 auto 56px;
  aspect-ratio: 16/9;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.article-featured img { width: 100%; height: 100%; object-fit: cover; }

/* --- Content --- */
.article-body {
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--ink-soft);
}
.article-body > * + * { margin-top: 1.2em; }
.article-body h2 {
  font-size: clamp(1.55rem, 3vw, 2rem);
  margin-top: 2em; margin-bottom: 0.6em;
  color: var(--ink); font-weight: 700;
}
.article-body h3 {
  font-size: clamp(1.25rem, 2.3vw, 1.55rem);
  margin-top: 1.8em; margin-bottom: 0.5em;
  color: var(--ink); font-weight: 600;
}
.article-body p { margin-bottom: 1.1em; }
.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--primary-pale);
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
  transition: all .2s;
}
.article-body a:hover { color: var(--primary-deep); text-decoration-color: var(--accent); }
.article-body ul, .article-body ol {
  padding-left: 1.6em;
  margin-bottom: 1.1em;
}
.article-body li { margin-bottom: 0.4em; }
.article-body ul li::marker { color: var(--accent); }
.article-body blockquote {
  margin: 1.8em 0;
  padding: 20px 28px;
  border-left: 3px solid var(--accent);
  background: var(--primary-wash);
  border-radius: 0 10px 10px 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink);
}
.article-body img {
  border-radius: 10px;
  margin: 1.5em auto;
  box-shadow: var(--shadow-sm);
}
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body code {
  background: var(--line-soft); padding: 2px 6px; border-radius: 4px;
  font-size: 0.9em;
  font-family: ui-monospace, monospace;
}
.article-body hr {
  margin: 2em 0; border: 0;
  border-top: 1px solid var(--line);
}

/* --- Tags --- */
.article-tags {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.article-tags strong {
  font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
  margin-right: 8px;
}
.article-tags a {
  padding: 5px 14px;
  background: var(--line-soft);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  transition: all .2s;
  text-decoration: none;
}
.article-tags a:hover { background: var(--primary-pale); color: var(--accent); }

/* --- Share --- */
.share-row {
  margin-top: 32px;
  display: flex; gap: 10px; align-items: center;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
}
.share-row strong {
  font-size: 0.85rem; color: var(--ink-soft); margin-right: 4px;
}
.share-row a {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--line-soft);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .2s;
  text-decoration: none;
  color: var(--ink-soft);
}
.share-row a:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }
.share-row svg { width: 18px; height: 18px; }

/* --- CTA Box --- */
.cta-box {
  margin-top: 56px;
  padding: 40px;
  background: linear-gradient(135deg, var(--primary-wash), var(--primary-pale));
  border-radius: 14px;
  text-align: center;
  border: 1px solid var(--primary-pale);
}
.cta-box h3 {
  font-size: 1.6rem;
  margin-bottom: 10px;
  color: var(--ink);
}
.cta-box p { color: var(--ink-soft); margin-bottom: 22px; font-size: 1rem; }

/* --- Related --- */
.related-section {
  margin-top: 80px;
  padding: 72px 0 96px;
  background: var(--surface);
  border-top: 1px solid var(--line-soft);
}
.related-section h2 {
  text-align: center;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  margin-bottom: 40px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.related-card {
  background: var(--bg);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  text-decoration: none;
  color: var(--ink);
}
.related-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.related-card .img { aspect-ratio: 16/10; overflow: hidden; }
.related-card .img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.related-card:hover .img img { transform: scale(1.08); }
.related-card .body { padding: 20px; }
.related-card h4 {
  font-size: 1.08rem; margin-bottom: 8px;
  line-height: 1.35;
}
.related-card .date { font-size: 0.82rem; color: var(--muted); }

/* --- 404 --- */
.not-found {
  padding: 120px 24px;
  text-align: center;
  min-height: 60vh;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
}
.not-found .code {
  font-family: var(--font-display);
  font-size: 8rem;
  color: var(--accent);
  line-height: 1;
  font-weight: 700;
  opacity: 0.4;
}
.not-found h1 { font-size: 2rem; margin: 20px 0 12px; }
.not-found p { color: var(--muted); margin-bottom: 28px; }
.not-found a {
  display: inline-block;
  padding: 14px 28px;
  background: var(--primary); color: #fff;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}
.not-found a:hover { background: var(--accent); }

/* --- Responsive --- */
@media (max-width: 560px) {
  .posts-section { padding: 48px 0 72px; }
  .post-card.featured .post-body { padding: 28px; }
  .article-header { padding: 36px 0 32px; }
  .cta-box { padding: 28px 20px; }
  .page-hero { padding: 100px 0 48px; }
}
