/* blog.css — styles for home.php, single.php, category.php, tag.php
   Depends on package-type.css being loaded first (hero, .bw, .sb, .mn,
   .pag, .pb3, .sec, .gcards, .inq are all defined there).
   ---------------------------------------------------------------- */

/* ── Blog card grid ──────────────────────────────────────── */
.blg-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.blg-card {
  background: #fff;
  border: 1px solid #DDD8CE;
  border-radius: 11px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.blg-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.09); }

/* Card image */
.blg-img {
  height: 170px;
  position: relative;
  overflow: hidden;
  background: #EAE6DC;
  flex-shrink: 0;
}
.blg-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.blg-card:hover .blg-img img { transform: scale(1.04); }
.blg-img svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Card body */
.blg-body { padding: 13px 14px; display: flex; flex-direction: column; flex: 1; }

.blg-cat {
  font-size: 9.5px; font-weight: 700;
  color: #D4A017; text-transform: uppercase; letter-spacing: .07em;
  margin-bottom: 5px; display: block;
}

.blg-title {
  font-family: 'Cinzel', serif;
  font-size: 12px; font-weight: 600;
  color: #1B2A4A; line-height: 1.48;
  margin-bottom: 7px; letter-spacing: .01em;
}
.blg-title:hover { color: #D4A017; }

.blg-excerpt {
  font-size: 11px; color: #9A9486;
  line-height: 1.72; margin-bottom: 10px; flex: 1;
}

/* Card footer */
.blg-foot {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid #EDE9E0; padding-top: 9px; margin-top: auto;
}
.blg-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.blg-m { font-size: 10px; font-weight: 500; color: #9A9486; display: flex; align-items: center; gap: 3px; }
.blg-m i { font-size: 11px; color: #D4A017; }
.blg-read {
  font-size: 10.5px; font-weight: 600; color: #1B2A4A;
  display: flex; align-items: center; gap: 4px; flex-shrink: 0;
  white-space: nowrap;
}
.blg-read i { font-size: 12px; color: #D4A017; }
.blg-read:hover { color: #D4A017; }

/* ── Blog sidebar widgets ──────────────────────────────────── */
.blg-sb { display: flex; flex-direction: column; gap: 0; }

.blg-sw { margin-bottom: 18px; }
.blg-sw:last-child { margin-bottom: 0; }

.blg-wt {
  font-family: 'Cinzel', serif;
  font-size: 11px; font-weight: 600;
  color: #1B2A4A; letter-spacing: .04em;
  margin-bottom: 10px; padding-bottom: 7px;
  border-bottom: 2px solid #D4A017;
}

/* Search widget */
.blg-search {
  display: flex;
  border: 1px solid #DDD8CE; border-radius: 6px;
  overflow: hidden;
}
.blg-search input {
  flex: 1; border: none; min-width: 0;
  padding: 8px 10px; font-size: 11px;
  font-family: 'Montserrat', sans-serif;
  color: #444; background: #fff; outline: none;
}
.blg-search input::placeholder { color: #bbb; }
.blg-search button {
  background: #1B2A4A; border: none;
  padding: 8px 11px; cursor: pointer; flex-shrink: 0;
}
.blg-search button i { font-size: 13px; color: #fff; display: block; }

/* Category list */
.blg-cats { padding: 0; margin: 0; }
.blg-cats li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 0; border-bottom: 1px solid #F4F1EB;
}
.blg-cats li:last-child { border-bottom: none; }
.blg-cats a { font-size: 11px; font-weight: 500; color: #444; }
.blg-cats a:hover { color: #D4A017; }
.blg-cnt {
  font-size: 10px; font-weight: 600; color: #9A9486;
  background: #F4F1EB; padding: 2px 7px; border-radius: 10px;
  flex-shrink: 0; margin-left: 4px;
}

/* Tags cloud */
.blg-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.blg-tag {
  font-size: 10px; font-weight: 500;
  background: #F4F1EB; border: 1px solid #DDD8CE;
  color: #555; padding: 4px 9px; border-radius: 4px;
}
.blg-tag:hover { background: #FDF5E0; border-color: #D4A017; color: #633806; }

/* Recent posts */
.blg-rp { display: flex; flex-direction: column; gap: 10px; }
.blg-rpi {
  display: flex; gap: 9px; align-items: flex-start;
  text-decoration: none;
}
.blg-rpi img {
  width: 46px; height: 46px; border-radius: 6px;
  object-fit: cover; flex-shrink: 0;
}
.blg-rp-no-img {
  width: 46px; height: 46px; border-radius: 6px;
  background: #F4F1EB; border: 1px solid #DDD8CE;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
}
.blg-rp-no-img i { font-size: 17px; color: #D4A017; }
.blg-rpi-t {
  font-family: 'Cinzel', serif;
  font-size: 10.5px; font-weight: 600;
  color: #1B2A4A; line-height: 1.4; margin-bottom: 3px;
}
.blg-rpi:hover .blg-rpi-t { color: #D4A017; }
.blg-rpi-d { font-size: 10px; color: #9A9486; }

/* ── Single blog post layout ─────────────────────────────── */
.post-wrap {
  display: flex;
  background: #F4F1EB;
  min-height: 60vh;
}

.post-main {
  flex: 1;
  padding: 22px 24px;
  min-width: 0;
}

.post-sidebar {
  width: 248px; flex-shrink: 0;
  background: #fff;
  border-left: 1px solid #DDD8CE;
  padding: 20px 16px;
}

/* Article content box */
.post-body {
  background: #fff;
  border: 1px solid #DDD8CE;
  border-radius: 11px;
  padding: 26px 28px;
  line-height: 1.82;
}

.post-body h1, .post-body h2, .post-body h3,
.post-body h4, .post-body h5 {
  font-family: 'Cinzel', serif;
  color: #1B2A4A;
  line-height: 1.38;
  margin-top: 22px;
  margin-bottom: 10px;
  letter-spacing: .02em;
}
.post-body h1 { font-size: 20px; }
.post-body h2 { font-size: 17px; }
.post-body h3 { font-size: 14px; }
.post-body h4 { font-size: 13px; }
.post-body p  { font-size: 13px; color: #444; line-height: 1.82; margin-bottom: 14px; }
.post-body ul, .post-body ol { margin: 0 0 14px 20px; }
.post-body li { font-size: 13px; color: #444; line-height: 1.72; margin-bottom: 5px; }
.post-body a { color: #D4A017; }
.post-body a:hover { text-decoration: underline; }
.post-body img { border-radius: 8px; margin: 16px 0; max-width: 100%; }
.post-body figure { margin: 16px 0; }
.post-body figcaption { font-size: 11px; color: #9A9486; text-align: center; margin-top: 5px; }
.post-body blockquote {
  border-left: 3px solid #D4A017;
  background: #FDF5E0;
  padding: 14px 16px;
  border-radius: 0 6px 6px 0;
  margin: 16px 0;
  font-size: 13px; color: #444;
  font-style: italic; line-height: 1.72;
}
.post-body blockquote p { margin-bottom: 0; }
.post-body table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 12px; }
.post-body th { background: #1B2A4A; color: #fff; padding: 8px 10px; text-align: left; }
.post-body td { padding: 7px 10px; border-bottom: 1px solid #EDE9E0; color: #444; }
.post-body tr:last-child td { border-bottom: none; }
.post-body hr { border: none; border-top: 1px solid #EDE9E0; margin: 20px 0; }
.post-body pre {
  background: #F4F1EB; border: 1px solid #DDD8CE;
  border-radius: 6px; padding: 14px 16px;
  overflow-x: auto; font-size: 12px; margin: 14px 0;
}
.post-body code { font-size: 12px; background: #F4F1EB; padding: 2px 5px; border-radius: 3px; }
.post-body pre code { background: none; padding: 0; }

/* Post tag strip */
.post-tag-wrap {
  margin-top: 18px; display: flex;
  gap: 6px; flex-wrap: wrap; align-items: center;
  padding-top: 16px; border-top: 1px solid #EDE9E0;
}
.post-tag-lbl {
  font-size: 10px; font-weight: 700;
  color: #9A9486; text-transform: uppercase; letter-spacing: .06em;
}
.post-tag-lnk {
  font-size: 10.5px; font-weight: 500;
  background: #F4F1EB; border: 1px solid #DDD8CE;
  color: #555; padding: 4px 10px; border-radius: 4px;
}
.post-tag-lnk:hover { background: #FDF5E0; border-color: #D4A017; color: #633806; }

/* Author box (inside post-body, below content) */
.post-author-box {
  background: #F4F1EB; border: 1px solid #DDD8CE;
  border-radius: 10px; padding: 16px;
  display: flex; gap: 12px; align-items: flex-start;
  margin-top: 22px;
}
.post-author-av {
  width: 50px; height: 50px; border-radius: 50%;
  background: #1B2A4A;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.post-author-av img { width: 100%; height: 100%; object-fit: cover; }
.post-author-av i { font-size: 24px; color: rgba(255,255,255,.4); }
.post-author-lbl {
  font-size: 9.5px; font-weight: 700;
  color: #9A9486; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 2px;
}
.post-author-name {
  font-family: 'Cinzel', serif;
  font-size: 12px; font-weight: 600; color: #1B2A4A; margin-bottom: 5px;
}
.post-author-bio { font-size: 11px; color: #9A9486; line-height: 1.65; }

/* ── Related posts section ───────────────────────────────── */
.related-posts {
  background: #fff;
  padding: 28px 24px;
  border-top: 1px solid #DDD8CE;
}
.related-posts .blg-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .blg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-sidebar { display: none; }
  .related-posts .blg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .blg-grid { grid-template-columns: 1fr; }
  .post-wrap { flex-direction: column; }
  .post-main { padding: 16px; }
  .post-body { padding: 18px 16px; }
  .related-posts { padding: 22px 16px; }
  .related-posts .blg-grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .post-main { padding: 12px; }
}
