/* ==========================================================
   SIDEKOM | Blog
   Category filter, article cards (blog page and home page) and the article page.
   ========================================================== */

/* ---------- Category filter ---------- */

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: clamp(32px, 4vw, 48px);
}
.blog-filter {
  padding: 10px 18px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--navy-700);
  font: 700 0.88rem/1.2 var(--font-body);
  cursor: pointer;
  transition: background-color 0.18s, border-color 0.18s, color 0.18s;
}
.blog-filter:hover { border-color: var(--navy-200); background: var(--navy-50); }
.blog-filter[aria-pressed="true"] { background: var(--navy-700); border-color: var(--navy-700); color: var(--white); }

.blog-empty {
  max-width: 560px;
  margin: 0 auto;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

/* ---------- Article cards ---------- */

.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 1000px) {
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .post-grid { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin-inline: auto; }
}

.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.post-card:hover { transform: translateY(-6px); border-color: var(--gold-300); box-shadow: var(--shadow); }

.post-card__visual { display: block; overflow: hidden; aspect-ratio: 16 / 9; background: var(--navy-50); }
.post-card__visual img { width: 100%; height: 100%; object-fit: cover; }
/* No picture: navy band with the category icon */
.post-card__placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--gold-500);
  background:
    radial-gradient(240px 160px at 85% 0%, rgba(242, 174, 5, 0.35), transparent 70%),
    linear-gradient(160deg, var(--navy-700), var(--navy-950));
}
.post-card__placeholder .icon { width: 2.6rem; height: 2.6rem; }

.post-card__body { display: flex; flex: 1; flex-direction: column; gap: 12px; padding: 24px 26px 26px; }
.post-card__title { font-size: 1.2rem; line-height: 1.3; }
.post-card__title a:hover { color: var(--navy-600); }
.post-card__excerpt { color: var(--muted); font-size: 0.95rem; }

/* Category and date */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
.post-meta__category {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--gold-100);
  color: var(--navy-800);
  font-weight: 700;
}

/* "This article is available in French" */
.post-note {
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--navy-50);
  color: var(--navy-700);
  font-size: 0.82rem;
  font-weight: 600;
}

/* Home page: "Latest articles" */
.latest-posts__more { display: flex; justify-content: center; margin-top: 40px; }

/* ---------- Article page ---------- */

.article__inner { max-width: 760px; }
.article .page-header h1 { margin-block: 14px 0; font-size: clamp(1.9rem, 4.2vw, 3rem); }
.article .post-note { margin-top: 18px; }
.article__back { margin-bottom: 22px; padding-top: 0; }
.article__section { padding-top: clamp(36px, 5vw, 64px); }

.article__image { overflow: hidden; margin-bottom: 36px; border-radius: var(--radius); }
.article__image img { width: 100%; }

.article__content { font-size: 1.05rem; color: var(--text); }
.article__content > * + * { margin-top: 1.1em; }
.article__content h2 { margin-top: 1.8em; font-size: clamp(1.3rem, 2.4vw, 1.6rem); }
.article__content h3 { margin-top: 1.5em; font-size: clamp(1.12rem, 2vw, 1.3rem); }
.article__content a { color: var(--navy-600); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.article__content a:hover { color: var(--navy-800); }
.article__content ul,
.article__content ol { display: grid; gap: 10px; }
.article__content li { position: relative; padding-inline-start: 26px; }
/* Numbered lists: gold numbers instead of dots */
.article__content ol { counter-reset: step; }
.article__content ol > li { counter-increment: step; padding-inline-start: 32px; }
.article__content ol > li::before {
  content: counter(step) ".";
  position: absolute;
  inset-inline-start: 0;
  color: var(--gold-600, var(--gold-500));
  font-weight: 800;
}
.article__content blockquote {
  padding: 18px 22px;
  border-inline-start: 4px solid var(--gold-500);
  border-radius: var(--radius-sm);
  background: var(--navy-50);
  color: var(--navy-800);
  font-size: 1.1rem;
  font-style: italic;
}
.article__figure img { width: 100%; height: auto; border-radius: var(--radius); background: var(--navy-50); }
.article__content ul > li::before {
  content: "";
  position: absolute;
  inset-inline-start: 4px;
  top: 0.65em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold-500);
}

/* Call to action at the end of an article */
.article-cta {
  margin-top: clamp(40px, 6vw, 64px);
  padding: clamp(26px, 4vw, 40px);
  border-radius: var(--radius-lg);
  color: var(--navy-200);
  background: linear-gradient(135deg, var(--navy-700), var(--navy-950));
  box-shadow: var(--shadow-lg);
}
.article-cta h2 { margin-bottom: 10px; color: var(--white); font-size: clamp(1.4rem, 2.6vw, 1.8rem); }
.article-cta .button-row { margin-top: 24px; }

/* ---------- From the admin panel: testimonials (home) and events (events page) ---------- */

.quote-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  margin: 0;
  padding: 28px 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}
.quote-card__text { position: relative; margin: 0; padding-top: 26px; color: var(--text); font-size: 1rem; }
.quote-card__text::before {
  content: "\201C";
  position: absolute;
  top: -14px;
  inset-inline-start: 0;
  color: var(--gold-500);
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1;
}
.quote-card__author { display: flex; align-items: center; gap: 14px; color: var(--navy-800); }
.quote-card__author strong { display: block; }
.quote-card__detail { display: block; color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.quote-card__photo { flex: none; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.quote-card__photo--empty { display: grid; place-items: center; background: var(--navy-700); color: var(--gold-500); font-size: 1.3rem; font-weight: 800; }

.event-card__place { display: flex; align-items: center; gap: 8px; color: var(--navy-700); font-size: 0.9rem; font-weight: 600; }
.event-card__place .icon { flex: none; color: var(--gold-500); }
.post-meta__category.event-card__past { background: var(--navy-50); color: var(--muted); }
