/* =============================================
   BLOGS  (listing + single article)
   Load order: base.css → nav.css → blogs.css
   ============================================= */


/* ---------- Listing: category filter pills ---------- */
/* reuses .cf-tabs / .cf-tab from nav.css — pills act as category filters */

/* ---------- Listing: card grid ---------- */
.blog-grid {
  display: grid;
      min-height: 515px;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: clamp(32px, 3.4vw, 56px) var(--pad) clamp(40px, 4vw, 60px);
}

.blog-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: var(--black);
}
.blog-card__media {
  width: 100%;
  aspect-ratio: 419 / 331;   /* Figma card image proportion */
  overflow: hidden;
  background: var(--gray-bg);
}
.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.blog-card:hover .blog-card__media img { transform: scale(1.03); }

.blog-card__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.blog-card__date {
  font-size: 18px;        /* Figma */
  line-height: 24px;
}
.blog-card__title {
  font-size: 24px;        /* Figma */
  line-height: 42px;
  font-weight: 400;
}

/* empty state (returned by GetNews.aspx when a category has no matches) */
.blog-empty {
  grid-column: 1 / -1;
  font-size: var(--fs-normal);
  color: var(--black);
  padding: 8px 0;
}

/* ---------- Listing: load more ---------- */
.blog-loadmore {
  display: flex;
  justify-content: center;
  padding: 0 var(--pad) clamp(48px, 5vw, 72px);
}
.blog-loadmore__btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 16px;        /* Figma */
  line-height: 24px;
  color: var(--black);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* =============================================
   SINGLE ARTICLE (blog-details)
   ============================================= */

/* header extras: back link + share, sit inside .cf-header */
.blog-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: clamp(48px, 7vw, 100px);
  font-size: 15px;        /* Figma */
  line-height: 15px;
  color: var(--black);
  text-decoration: none;
}
.blog-back svg { display: block; }
.blog-back:hover { color: var(--blue-1); }

.blog-detail__titlerow {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 26px;
}
/* title matches the site page-title token, no top margin here (handled above) */
.blog-detail__titlerow .cf-header__title {
  margin: 0;
  max-width: 620px;
}
.blog-share-wrap { position: relative; flex-shrink: 0; }
.blog-share {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 20px;        /* Figma */
  line-height: 30px;
  color: var(--black);
  text-decoration: none;
}
.blog-share svg { display: block; }
.blog-share:hover { color: var(--blue-1); }

/* Share popup — Facebook / Twitter / WhatsApp / LinkedIn / Email */
.share-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
}
.share-menu[hidden] { display: none; }
.share-opt {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.share-opt:hover { transform: translateY(-2px); }
.share-opt svg { width: 34px; height: 34px; fill: #fff; display: block; }
.share-opt--fb { background: #3b5998; }
.share-opt--tw { background: #1da1f2; }
.share-opt--wa { background: #4dc247; }
.share-opt--in { background: #0077b5; }
.share-opt--em { background: #848484; }
.share-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #111;
  flex-shrink: 0;
}

/* article body — centered 868px column (Figma) */
.blog-article {
  max-width: calc(868px + 2 * var(--pad));
  margin-inline: auto;
  padding: clamp(40px, 5vw, 72px) var(--pad) clamp(56px, 6vw, 90px);
}
.blog-article__hero {
  width: 100%;
  aspect-ratio: 868 / 500;   /* Figma hero proportion */
  overflow: hidden;
  background: var(--gray-bg);
  margin-bottom: clamp(30px, 4vw, 56px);
}
.blog-article__hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blog-article__body p {
  font-size: var(--fs-normal);   /* 20px @1512 — Figma */
  line-height: 30px;
  margin-bottom: 30px;
}
.blog-article__body p:last-child { margin-bottom: 0; }

/* ---------- Other blogs ---------- */
.blog-other {
  background: var(--gray-bg);
  padding: clamp(48px, 5.5vw, 80px) var(--pad);
}
.blog-other__inner {
  max-width: 1321px;         /* Figma */
  margin-inline: auto;
}
.blog-other__title {
  font-size: var(--fs-header);   /* 53.33 / 42 / 32 */
  line-height: 1.24;
  font-weight: 400;
  color: var(--black);
  margin-bottom: 40px;
}
.blog-other__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .blog-grid,
  .blog-other__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 870px) {
  .blog-detail__titlerow { flex-direction: column; align-items: flex-start; gap: 18px; }
  .blog-detail__titlerow .cf-header__title { max-width: none; }
  .blog-back { margin-top: 40px; }
  .share-menu { right: auto; left: 0; }
}
@media (max-width: 680px) {
  .blog-grid,
  .blog-other__grid { grid-template-columns: 1fr; }
  .blog-card__title { font-size: 22px; line-height: 32px; }
}
