/* =====================
   قهوه‌نامه — Blog CSS
   ===================== */

:root {
  --font-main: 'Vazirmatn', Tahoma, sans-serif;
  --color-dark: #1a1007;
  --color-mid: #3d2314;
  --color-accent: #2c2320;
  --color-bg: #faf9f7;
  --color-card: #ffffff;
  --color-border: #ede9e4;
  --color-muted: #6b6560;
  --color-footer: #111;
  --radius-card: 14px;
  --shadow-card: 0 2px 16px rgba(0,0,0,.06);
  --shadow-hover: 0 8px 28px rgba(0,0,0,.12);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-dark);
  line-height: 1.75;
}

/* Navbar */
.bg-blog-dark { background: var(--color-dark) !important; }
.navbar-brand { font-size: 1.3rem; font-weight: 700; letter-spacing: -.3px; }
.navbar-nav .nav-link { font-size: .9rem; padding: .5rem .8rem !important; opacity: .8; transition: opacity .2s; }
.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active { opacity: 1; }
.search-input { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; font-family: var(--font-main); font-size: .85rem; border-radius: 0 20px 20px 0 !important; }
.search-input::placeholder { color: rgba(255,255,255,.5); }
.search-input:focus { background: rgba(255,255,255,.15); box-shadow: none; border-color: rgba(255,255,255,.4); color: #fff; }
.search-btn { border-radius: 20px 0 0 20px !important; }

/* Post Card */
.post-card { border-radius: var(--radius-card) !important; transition: transform .22s, box-shadow .22s; overflow: hidden; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover) !important; }
.post-img-wrap { display: block; overflow: hidden; aspect-ratio: 16/9; }
.post-card-img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .post-card-img { transform: scale(1.05); }
.post-img-placeholder { aspect-ratio: 16/9; background: var(--color-border); text-decoration: none; }
.post-cat-badge { display: inline-block; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--color-mid); background: #f0ebe4; padding: .2rem .7rem; border-radius: 20px; text-decoration: none; transition: background .15s; }
.post-cat-badge:hover { background: #e5ddd4; color: var(--color-mid); }
.post-title { font-size: 1rem; font-weight: 600; line-height: 1.5; }
.post-title a:hover { color: var(--color-mid) !important; }
.post-excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.6; }
.post-meta { font-size: .78rem; color: var(--color-muted); }

/* Hero */
.hero-title { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; }
.hero-sub { font-size: 1.1rem; max-width: 500px; margin: 0 auto; }
.letter-spacing-1 { letter-spacing: 1px; }
.text-accent { color: var(--color-mid); }

/* Single Post */
.post-hero { height: clamp(220px, 40vw, 420px); background-size: cover; background-position: center; position: relative; }
.post-hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 40%, rgba(26,16,7,.5)); }
.post-single-title { font-size: clamp(1.5rem, 3.5vw, 2.2rem); font-weight: 800; line-height: 1.4; }
.post-content { font-size: 1.05rem; line-height: 1.95; color: #2d2520; }
.post-content h2 { font-size: 1.5rem; font-weight: 700; margin: 2rem 0 .8rem; border-bottom: 2px solid var(--color-border); padding-bottom: .5rem; }
.post-content h3 { font-size: 1.2rem; font-weight: 700; margin: 1.5rem 0 .6rem; }
.post-content p { margin-bottom: 1.2rem; }
.post-content img { max-width: 100%; border-radius: 10px; margin: 1rem 0; box-shadow: var(--shadow-card); }
.post-content a { color: var(--color-mid); font-weight: 500; }
.post-content blockquote { border-right: 4px solid var(--color-mid); padding: .8rem 1.2rem; margin: 1.5rem 0; background: #f7f3ef; border-radius: 0 8px 8px 0; color: var(--color-muted); font-style: italic; }
.post-content pre { background: #1e1812; color: #f0e8dc; padding: 1.2rem; border-radius: 10px; overflow-x: auto; direction: ltr; margin: 1rem 0; }
.post-content code { background: #f0ebe4; padding: .15rem .45rem; border-radius: 4px; font-size: .88em; direction: ltr; display: inline-block; }
.post-content ul, .post-content ol { padding-right: 1.5rem; margin-bottom: 1.2rem; }
.post-content li { margin-bottom: .4rem; }

/* Pagination */
.pagination .page-link { color: var(--color-dark); border-color: var(--color-border); font-family: var(--font-main); border-radius: 8px; margin: 0 2px; }
.pagination .page-link:hover { background: var(--color-dark); color: #fff; border-color: var(--color-dark); }
.pagination .page-item.active .page-link { background: var(--color-dark); border-color: var(--color-dark); }

/* Newsletter Section */
.newsletter-section { background: var(--color-dark) !important; }
.ltr-input { direction: ltr !important; text-align: center !important; }
.newsletter-input { direction: ltr !important; text-align: center !important; background: rgba(255,255,255,.12) !important; border-color: rgba(255,255,255,.25) !important; color: #fff !important; font-size: 1rem !important; }
.newsletter-input::placeholder { color: rgba(255,255,255,.45) !important; }
.newsletter-input:focus { background: rgba(255,255,255,.18) !important; border-color: rgba(255,255,255,.5) !important; box-shadow: 0 0 0 3px rgba(255,255,255,.12) !important; color: #fff !important; }
.text-success-light { color: #86efac; }
.text-danger-light { color: #fca5a5; }

/* Footer */
.bg-footer { background: #0a0805 !important; }
.site-footer { border-top: 1px solid rgba(255,255,255,.06); }

/* Breadcrumb */
.breadcrumb-item + .breadcrumb-item::before { color: #aaa; }

/* Utilities */
@media (max-width: 768px) {
  .post-single-title { font-size: 1.5rem; }
  .post-content { font-size: 1rem; }
  .navbar-nav { padding: .5rem 0; }
}

/* Like Button */
.btn-like {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: none;
  border: 1.5px solid #e8d5d5;
  border-radius: 20px;
  padding: .28rem .85rem;
  font-family: var(--font-main);
  font-size: .82rem;
  color: #b8a8a8;
  cursor: pointer;
  transition: all .2s ease;
  line-height: 1;
  user-select: none;
}
.btn-like:hover { border-color: #e8a8a8; color: #c97777; background: #fff5f5; }
.btn-like.liked { background: #fdf0f0; border-color: #e8a8a8; color: #d46060; }
.btn-like.liked .bi::before { font-variation-settings: normal; }
.btn-like-count { font-size: .8rem; min-width: 1.2ch; }

/* Post Card Image — fill frame, no letterbox */
.post-img-wrap { background: #f0ebe4; }
.post-card-img { object-fit: cover; object-position: center; }

/* Ad Banners */
.banner-ad-card { display:block; border-radius:12px; overflow:hidden; box-shadow:0 2px 14px rgba(0,0,0,.08); transition:opacity .2s,transform .2s; }
.banner-ad-card:hover { opacity:.92; transform:translateY(-2px); }
.banner-ad-card img { width:100%; display:block; object-fit:cover; }
.banners-section { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border); }
