/* ==========================================================================
   Sajil - blog
   Written to match the current site: 25px card radius, the soft
   0 15px 40px shadow, the -10px hover lift, 76px section padding and the
   pill badge used by the FAQ and app sections.

   Loaded on /blog, /blog/{slug} and on the home page strip. style.css is not
   modified; every selector here is new.
   ========================================================================== */

:root {
  --blog-ink: #082c2b;
  --blog-teal: #4aaaa4;
  --blog-teal-dark: #3a9a94;
  --blog-mint: #00efd2;
  --blog-amber: #f6a623;
  --blog-muted: #6b8582;
  --blog-line: #e9ecef;
  --blog-sand: #f8f5f2;
}

/* ================================================= home page strip + shared */

.blog-section {
  padding: 76px 20px;
  background: #ffffff;
}

.blog-section--sand { background: var(--blog-sand); }

.blog-head {
  max-width: 1200px;
  margin: 0 auto 44px;
  text-align: center;
}

.blog-badge {
  display: inline-block;
  padding: 10px 22px;
  background: #fff;
  border: 1px solid var(--blog-line);
  border-radius: 30px;
  font-weight: 700;
  font-size: 14px;
  color: var(--blog-teal);
  margin-bottom: 18px;
}

.blog-head h2 {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.4;
  color: var(--blog-ink);
  margin: 0 0 14px;
}

.blog-head h2 span { color: var(--blog-teal); }

.blog-head p {
  font-size: 16px;
  line-height: 1.9;
  color: var(--blog-muted);
  margin: 0 auto;
  max-width: 62ch;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ---------------------------------------------------------------- the card */

.blog-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
  transition: 0.35s;
  text-decoration: none;
}

.blog-card:hover {
  transform: translateY(-10px);
  text-decoration: none;
}

.blog-card__media {
  position: relative;
  height: 215px;
  background: var(--blog-sand);
  overflow: hidden;
}

.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.blog-card:hover .blog-card__media img { transform: scale(1.06); }

.blog-card__fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c3d6d3;
  font-size: 38px;
}

.blog-card__date {
  position: absolute;
  bottom: 14px;
  inset-inline-start: 14px;
  padding: 7px 15px;
  border-radius: 30px;
  background: rgba(8, 44, 43, 0.88);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.blog-card__body {
  padding: 28px 30px 30px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card__body h2,
.blog-card__body h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--blog-ink);
  margin: 0 0 12px;
}

.blog-card__body p {
  font-size: 15px;
  line-height: 1.9;
  color: var(--blog-muted);
  margin: 0 0 22px;
}

.blog-card__go {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--blog-teal);
}

.blog-card__go span:first-child { font-size: 17px; }

.blog-more {
  display: block;
  width: fit-content;
  margin: 46px auto 0;
  padding: 15px 38px;
  border-radius: 30px;
  background: var(--blog-ink);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: 0.3s;
}

.blog-more:hover {
  background: var(--blog-teal);
  color: #fff;
  text-decoration: none;
  transform: translateY(-3px);
}

/* ================================================================ blog page */

.blog-hero {
  position: relative;
  padding: 90px 20px 78px;
  background: var(--blog-ink);
  overflow: hidden;
  text-align: center;
}

.blog-hero::before {
  content: "";
  position: absolute;
  inset-inline-end: -180px;
  top: -170px;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, #11534e 0%, transparent 68%);
}

.blog-hero__inner { position: relative; z-index: 1; }

.blog-hero .blog-badge {
  background: rgba(0, 239, 210, 0.12);
  border-color: transparent;
  color: var(--blog-mint);
}

.blog-hero h1 {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.38;
  color: #fff;
  margin: 0 0 16px;
}

.blog-hero p {
  font-size: 17px;
  line-height: 1.9;
  color: #a9cfcb;
  margin: 0 auto;
  max-width: 58ch;
}

.blog-empty {
  padding: 100px 20px;
  text-align: center;
  color: var(--blog-muted);
  font-size: 16px;
}

/* ============================================================= article page */

.article-wrap { max-width: 800px; margin: 0 auto; padding: 60px 20px 76px; }

.article-cover {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  border-radius: 25px;
  display: block;
  margin-bottom: 36px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.article-meta {
  font-size: 13.5px;
  color: var(--blog-muted);
  margin-bottom: 30px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--blog-line);
}

.article-body {
  font-size: 17px;
  line-height: 2.1;
  color: #2c3e50;
  /* keeps the paragraph breaks an admin typed into the textarea */
  white-space: pre-line;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 46px;
  padding: 15px 32px;
  border-radius: 30px;
  background: var(--blog-sand);
  color: var(--blog-ink);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: 0.3s;
}

.article-back:hover {
  background: var(--blog-ink);
  color: #fff;
  text-decoration: none;
}

/* ============================================================== responsive */

@media (max-width: 900px) {
  .blog-section { padding: 54px 18px; }
  .blog-head h2 { font-size: 28px; }
  .blog-hero { padding: 62px 18px 54px; }
  .blog-hero h1 { font-size: 30px; }
  .blog-hero p { font-size: 15.5px; }
  .blog-grid { gap: 22px; }
  .article-wrap { padding: 40px 18px 56px; }
  .article-body { font-size: 16px; line-height: 2; }
}

@media (prefers-reduced-motion: reduce) {
  .blog-card, .blog-card__media img, .blog-more, .article-back {
    transition: none !important;
  }
  .blog-card:hover { transform: none; }
}
