/* =========================================================
   AL SAFA – blog styles (added for the admin panel).
   Uses the colours and fonts defined in style.css.
   ========================================================= */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(11, 22, 40, 0.1);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(7, 14, 26, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.blog-card-media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--navy);
}
.blog-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.blog-card:hover .blog-card-media img { transform: scale(1.04); }
.blog-card-placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 34px;
  letter-spacing: 0.12em;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
}

.blog-card-body { display: flex; flex-direction: column; flex: 1; padding: 22px 22px 24px; }
.blog-card-body time {
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.blog-card-body h3 {
  margin: 8px 0 10px;
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.1;
  color: var(--navy);
}
.blog-card-body h3 a { color: inherit; text-decoration: none; }
.blog-card-body h3 a:hover { color: var(--gold-dark); }
.blog-card-body p { flex: 1; margin: 0 0 18px; color: var(--muted); }
.blog-card-more {
  align-self: flex-start;
  color: var(--navy);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 2px;
}
.blog-card-more:hover { color: var(--gold-dark); }

.blog-empty { max-width: 640px; margin: 0 auto; text-align: center; }
.blog-empty .btn-row { justify-content: center; }

.blog-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 36px;
  color: var(--muted);
}

/* Article */
.blog-article { max-width: 820px; }
.blog-cover { margin: 0 0 32px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.blog-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }

.blog-prose { font-size: 18px; line-height: 1.8; color: var(--ink); }
.blog-prose > *:first-child { margin-top: 0; }
.blog-prose h2 {
  margin: 1.8em 0 0.5em;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.2vw, 36px);
  line-height: 1.1;
  color: var(--navy);
}
.blog-prose h3, .blog-prose h4 {
  margin: 1.5em 0 0.4em;
  font-family: var(--font-display);
  font-size: 25px;
  color: var(--navy);
}
.blog-prose p { margin: 0 0 1.15em; }
.blog-prose ul, .blog-prose ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.blog-prose ul { list-style: disc; }
.blog-prose ol { list-style: decimal; }
.blog-prose li { margin-bottom: 0.45em; }
.blog-prose li::marker { color: var(--gold-dark); font-weight: 600; }
.blog-prose a { color: var(--navy); font-weight: 600; text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.blog-prose a:hover { color: var(--gold-dark); }
.blog-prose img { max-width: 100%; height: auto; border-radius: var(--radius); margin: 1.2em 0; }
.blog-prose blockquote {
  margin: 1.5em 0;
  padding: 18px 24px;
  background: var(--paper);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 19px;
}
.blog-prose blockquote p:last-child { margin-bottom: 0; }
.blog-prose hr { border: 0; height: 3px; width: 56px; background: var(--gold); margin: 2em 0; }

.blog-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 44px;
  padding: 26px 28px;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  border-left: 5px solid var(--gold);
}
.blog-cta strong { font-family: var(--font-display); font-size: 26px; letter-spacing: 0.02em; }
.blog-cta p { margin: 4px 0 0; color: rgba(255, 255, 255, 0.75); }

.blog-preview-flag {
  margin: 0 auto 28px;
  max-width: 820px;
  padding: 12px 18px;
  background: #fff4d6;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  color: var(--navy);
  font-weight: 600;
}

@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-prose { font-size: 17px; }
  .blog-cta { padding: 22px; }
}
