/* page-blog.css - Blog listing + article styles, consistent with the site theme
   (Anton headings, Outfit body, brand palette, 12px rounded cards). */

.blog-wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 56px 20px 72px;
}

/* ---- Listing header ---- */
.blog-header {
  text-align: center;
  margin-bottom: 48px;
}
.blog-header h1 {
  font-family: "Anton", sans-serif;
  font-weight: 500;
  letter-spacing: 0.01em;
  font-size: 40px;
  line-height: 1.2;
  color: var(--brand-primary);
  margin: 0 0 12px;
}
/* Little green accent bar under the heading (brand lime), like the site accents. */
.blog-header__bar {
  width: 64px;
  height: 5px;
  border-radius: 100px;
  background: var(--brand-secondary);
  margin: 0 auto 18px;
}
.blog-header p {
  font-family: "Outfit", sans-serif;
  color: var(--brand-grey-900);
  font-size: var(--e-global-typography-text-font-size, 14px);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ---- Card grid ---- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.blog-card {
  display: flex;
  flex-direction: column;
  background: #f6f7f8;
  border: 1px solid rgba(0, 29, 28, 0.08);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 29, 28, 0.12);
  border-color: rgba(0, 29, 28, 0.18);
}
.blog-card__media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--brand-grey-50);
}
.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.4s ease;
}
.blog-card:hover .blog-card__media img {
  transform: scale(1.05);
}
.blog-card__body {
  padding: 22px 24px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.blog-card__tag {
  font-family: "Outfit", sans-serif;
  font-size: 0.655rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-primary);
  background: var(--brand-secondary);
  border: 1px solid #AFC95A;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 12px;
}
.blog-card__title {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  font-size: 1.4rem;
  line-height: 1.2;
  color: var(--brand-primary);
  margin: 0 0 10px;
}
.blog-card__excerpt {
  font-family: "Outfit", sans-serif;
  color: var(--brand-grey-900);
  font-size: var(--e-global-typography-text-font-size, 14px);
  line-height: 1.55;
  margin: 0 0 10px;
}
.blog-card__more {
  margin-top: auto;
  font-family: "Outfit", sans-serif;
  font-weight: 600;
  color: var(--brand-primary);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: gap 0.2s ease;
}
.blog-card:hover .blog-card__more {
  gap: 12px;
}

/* ---- Article (single post) ---- */
.blog-post {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 20px 72px;
}
.blog-post__back {
  font-family: "Outfit", sans-serif;
  font-weight: 600;
  color: var(--brand-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 24px;
}
/* Lock all link states to brand-primary so the global a:hover blue
   from .elementor-kit-3676 a:hover (in tokens.css) does not leak
   through onto the back-link. !important is required because that
   rule has class+pseudo specificity. */
.blog-post__back:link,
.blog-post__back:visited,
.blog-post__back:hover,
.blog-post__back:focus,
.blog-post__back:active {
  color: var(--brand-primary) !important;
  text-decoration: none !important;
}
.blog-post__tag {
  font-family: "Outfit", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-primary);
  background: var(--brand-secondary);
  border: 1px solid #AFC95A;
  padding: 4px 10px;
  border-radius: 100px;
}
.blog-post__title {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  line-height: 1.1;
  color: var(--brand-primary);
  margin: 16px 0 12px;
  text-transform: uppercase;
}
.blog-post__meta {
  font-family: "Outfit", sans-serif;
  color: var(--brand-grey-900);
  opacity: 0.7;
  font-size: 0.9rem;
  margin-bottom: 24px;
}
.blog-post__hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 32px;
}
.blog-post__body {
  font-family: "Outfit", sans-serif;
  color: var(--brand-grey-900);
  font-size: var(--e-global-typography-text-font-size, 14px);
  line-height: 1.7;
}
.blog-post__body h2 {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  font-size: 1.6rem;
  color: var(--brand-primary);
  margin: 34px 0 12px;
}
.blog-post__body h3 {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--brand-primary);
  margin: 24px 0 8px;
}
.blog-post__body p { margin: 0 0 16px; }
.blog-post__body ul { margin: 0 0 16px; padding-left: 22px; }
.blog-post__body li { margin-bottom: 8px; }
.blog-post__body strong { color: var(--brand-primary); }

.blog-post__cta {
  margin-top: 40px;
  padding: 24px 28px;
  background: #F6F7F8;
  border: 1px solid #001D1C;
  border-radius: 12px;
  /* Heading + button share one line; the button wraps to its own line only
     when there isn't room. Box height follows the content automatically. */
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 28px;
}
.blog-post__cta h3 {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  color: var(--brand-primary);
  font-size: 1.5rem;
  margin: 0;
  flex: 1 1 16rem;
}
.blog-post__cta a {
  display: inline-block;
  flex: 0 0 auto;
  white-space: nowrap;
  font-family: "Outfit", sans-serif;
  font-weight: 600;
  background: var(--brand-primary);
  color: var(--brand-secondary);
  padding: 8px 18px;
  font-size: 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.blog-post__cta a,
.blog-post__cta a:link,
.blog-post__cta a:visited { color: var(--brand-secondary); }
.blog-post__cta a:hover,
.blog-post__cta a:focus,
.blog-post__cta a:active { color: #FFFFFF !important; }
.blog-post__cta a:hover { transform: translateY(-2px); }

@media (max-width: 600px) {
  .blog-wrap { padding: 36px 16px 56px; }
  /* On small screens drop the button onto its own line under the heading. */
  .blog-post__cta { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 16px; }
  .blog-post__cta h3 { flex: 0 0 auto; }
}
/* Responsive blog grid: 4 per row on desktop, scaling down gracefully. */
@media (max-width: 1100px) {
  .blog-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 820px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .blog-grid { grid-template-columns: 1fr; }
}

/* Blinking status dot beside the Blogs heading - matches the site-wide
   .blinking-dot pattern (defined on index/browse/contact). Re-declared here
   because page-blog.css loads independently of those stylesheets. */
.blog-header h1 .blinking-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
  position: relative;
  animation: blink-shortcode 1s infinite;
}
.blog-header h1 .blinking-dot.dot-black { background-color: black; }
.blog-header h1 .blinking-dot.dot-white { background-color: white; }
@keyframes blink-shortcode {
  0%   { opacity: 1; }
  50%  { opacity: 0; }
  100% { opacity: 1; }
}

/* ============================================================
   Blog page hero: subtle 25x25px grid background covering the
   full width, an off-white background color so the hero reads
   as a distinct band, and a 1px dark teal divider at the
   bottom that separates the hero from the card grid below.

   .grid-bg lives in the per-page bundles (page-contact.css,
   page-index.css, page-browse.css) which are not loaded on the
   blog page, so the rule is re-declared here.
   ============================================================ */
.grid-bg {
  background-color: transparent;
  background-image:
    linear-gradient(rgba(163, 158, 158, 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(163, 158, 158, 0.10) 1px, transparent 1px);
  background-size: 25px 25px;
}
.blog-hero {
  width: 100%;
  padding: 50px 20px;
  background-color: var(--e-global-color-e7ef6e7, #F7F7F7);
  border-bottom: 1px solid var(--brand-primary, #001D1C);
  display: flex;
  justify-content: center;
}
.blog-hero__inner {
  width: 100%;
  max-width: 760px;
  text-align: center;
}
.blog-hero .blog-header {
  margin: 0;
}
@media (max-width: 767px) {
  .blog-hero { padding: 40px 16px; }
}

/* Pull the .blog-wrap padding-top in a bit since the hero now lives outside
   it and adds its own breathing room. */
.blog-wrap { padding-top: 40px; }

/* Lock all blog body links to brand-primary so the global
   .elementor-kit-3676 a:hover blue from tokens.css cannot leak in
   on any content link inside an article or the blog grid. Excludes
   the CTA button (it has its own pill styling). */
.blog-post__body a:not(.blog-post__cta a):not([class*="cta"]),
.blog-post__body a:link:not(.blog-post__cta a):not([class*="cta"]),
.blog-post__body a:visited:not(.blog-post__cta a):not([class*="cta"]) { color: var(--brand-primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.blog-post__body a:hover,
.blog-post__body a:focus,
.blog-post__body a:active { color: var(--brand-primary) !important; }
.blog-post__cta a,
.blog-post__cta a:link,
.blog-post__cta a:visited {
  text-decoration: none !important;
  color: var(--brand-secondary) !important;
}
.blog-post__cta a:hover,
.blog-post__cta a:focus,
.blog-post__cta a:active {
  text-decoration: none !important;
  color: #FFFFFF !important;
}

/* Blog card grid: keep the wrapper anchor's text colour the same on hover
   (the card has its own hover effect via transform + shadow). */
.blog-card,
.blog-card:link,
.blog-card:visited,
.blog-card:hover,
.blog-card:focus,
.blog-card:active { color: inherit !important; text-decoration: none !important; }

/* Hero title — uppercase to match catalogue/contact hero style. */
.blog-hero h1 {
  text-transform: uppercase;
}
