/* ------------------ The Tank Guide — Blogs (renamed from Blurbs) ------------------ */
:root{
  --tg-text:#f4f9fc;
  --tg-dim:#b9d4e5;
  --tg-soft:rgba(255,255,255,0.15);
  --tg-line:rgba(255,255,255,0.25);
  --tg-accent:#9ce0ff;
  --tg-max:1120px;
}

/* Page backdrop to match Media page look */
body{
  margin:0;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  background:linear-gradient(180deg,#0a6fb4 0%,#1e90c2 35%,#2ca0ce 100%);
  color:#f8fcff;
  min-height:100vh;
}

/* Base responsiveness so images never overflow in cards or articles */
.blogs-panel img,
.blog-open img {
  max-width:100%;
  height:auto;
}

body.blog-open-page{
  background-color:#444444 !important;
  background-image:none !important;
  color:#f5f5f5;
}

/* Main panel */
main.blogs-panel{
  background:rgba(255,255,255,0.12);
  backdrop-filter:blur(6px);
  border-radius:16px;
  max-width:var(--tg-max);
  margin:2rem auto;
  padding:2rem 1rem 3rem;
  box-shadow:0 0 32px rgba(0,0,0,0.25);
}

/* List page */
.blogs-wrap .hero h1{font-size:clamp(2rem,3.2vw,3rem);margin:0 0 .35rem;}
.blogs-wrap .hero p{color:var(--tg-dim);margin:0 0 1.25rem;}
.blog-list{border-top:1px solid var(--tg-line);}
.blog-item{display:grid;grid-template-columns:260px 1fr;gap:1.25rem;padding:1.25rem 0;border-bottom:1px solid var(--tg-line);}
@media (max-width:800px){.blog-item{grid-template-columns:1fr;}}
.blog-thumb{width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:14px;background:var(--tg-soft);border:1px solid var(--tg-line);filter:brightness(.95);}
.blog-kicker{font-size:.9rem;color:var(--tg-dim);margin:.25rem 0 .5rem;}
.blog-item h2{margin:0;font-size:clamp(1.1rem,2.2vw,1.5rem);color:#fff;}
.blog-item a{color:inherit;text-decoration:none;}
.blog-item a:hover,.blog-item a:focus{text-decoration:underline;}
.blog-more,.blog-read{display:inline-flex;align-items:center;gap:.4rem;margin-top:.65rem;font-weight:600;color:var(--tg-accent);}
.blog-more:hover,.blog-more:focus,.blog-read:hover,.blog-read:focus{text-decoration:underline;}

/* Article / detail pages */
.article{max-width:800px;margin:0 auto;padding:2rem 1rem 3rem;color:var(--tg-text);}
.article h1{margin:0 0 .35rem;font-size:clamp(1.6rem,3vw,2.2rem);color:#fff;}
.article .subhed{color:var(--tg-dim);margin:0 0 1.25rem;}
.back{display:inline-block;margin:0 0 1rem;color:var(--tg-accent);text-decoration:none;}
.back:hover,.back:focus{text-decoration:underline;}
.figure{margin:1rem 0 1.25rem;}
.figure{position:relative;}
.figure img{
  width:100%;
  aspect-ratio:16/9;
  object-fit:cover;
  background:var(--tg-soft);
  border:1px solid var(--tg-line);
  border-radius:14px;
  filter:brightness(.95);
  display:block;
}
.tip{background:var(--tg-soft);border-left:4px solid #cfe3ff;padding:.9rem 1rem;border-radius:10px;margin:1rem 0 1.25rem;}
.muted{color:var(--tg-dim);font-size:.95rem;}
.btn{display:inline-block;padding:.8rem 1.2rem;background:var(--tg-accent);color:#00354a;border-radius:999px;text-decoration:none;font-weight:700;}

@media (prefers-color-scheme:dark){
  :root{--tg-text:#eaf1f6;--tg-dim:#aebbc6;--tg-soft:#0e171d;--tg-line:#20303c;}
  .blog-item,.blog-list,.figure img{border-color:var(--tg-line);}
}
.blog-item > a:first-child:empty{display:none;}
.blog-item > a:first-child:empty + div{grid-column:1/-1;}

/* Text-only blog cards: collapse the thumbnail column */
.blog-item > a:first-child:empty {
  display: none;              /* hide empty anchor if no image inside */
}
.blog-item:has(> a:first-child:empty) {
  grid-template-columns: 1fr; /* single-column layout when no image */
}

/* Optional polish: keep card spacing consistent */
.blog-item { align-items: start; }

.blog-title-link{
  text-decoration:underline;
}
.blog-title-link:hover,
.blog-title-link:focus{
  text-decoration-thickness:from-font;
}
.blog-article {
  background-color: #444444; /* dark gray interior */
  border: 4px solid transparent;
  border-radius: 10px;
  background-image: linear-gradient(#444444, #444444),
                    linear-gradient(145deg, #555555, #222222); /* metallic gradient edge */
  background-origin: border-box;
  background-clip: content-box, border-box;
  padding: 2rem;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.35);
  color: #f5f5f5;
}

.blog-article,
.blog-open,
main.blog-open {
  background-color: #444444 !important;
  color: #f5f5f5;
}

.blog-article a {
  color: #80bfff;
}

.blog-article a:hover {
  color: #aad4ff;
}

.blog-article h1,
.blog-article h2,
.blog-article h3 {
  color: #ffffff;
}

main .blog-article,
.content .blog-article {
  background-color: #444444 !important;
}

.blog-open .card,
.blog-open .paper,
.blog-open .surface,
.blog-open .prose,
.blog-open .content,
.blog-open .blog-article {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.blog-open {
  color: #f5f5f5;
}

.blog-open article {
  color: inherit;
  max-width: 72ch;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 28px);
}

.blog-open article img,
.blog-open article video {
  max-width: 100%;
  height: auto;
}

.blog-open article iframe {
  max-width: 100%;
  width: 100%;
}

.blog-open a {
  color: #80bfff;
}

.blog-open a:hover {
  color: #aad4ff;
}

.blog-open h1,
.blog-open h2,
.blog-open h3 {
  color: #ffffff;
}

.blog-open .subhed {
  color: rgba(233, 238, 242, 0.8);
}

.blog-open .content {
  padding-inline: clamp(16px, 4vw, 28px);
}

.blog-open figure,
.blog-open img {
  border-radius: 12px;
  overflow: hidden;
}

.blog-open figure img {
  border: none !important;
  filter: none !important;
  background: rgba(255, 255, 255, 0.04) !important;
}

.blog-hero {
  margin: clamp(12px, 3vw, 28px) auto 0;
  max-width: min(960px, 100%);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.blog-hero img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.blog-hero figcaption {
  margin: 0;
  padding: 12px 16px;
  font-size: 0.95rem;
  color: rgba(229, 235, 240, 0.85);
  background: linear-gradient(180deg, rgba(8, 12, 18, 0.65), rgba(8, 12, 18, 0.85));
}

/* Shared inner article wrapper */
.blog-body {
  position: relative;
  background: rgba(25, 25, 25, 0.35);
  border-radius: 14px;
  padding: clamp(22px, 4vw, 28px) clamp(18px, 4vw, 26px);
  margin: clamp(20px, 4vw, 32px) auto;
  max-width: min(900px, 100%);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow: hidden;
}

.blog-body::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  background: linear-gradient(
    to bottom,
    rgba(25, 25, 25, 0.3) 0%,
    rgba(25, 25, 25, 0.15) 40%,
    rgba(25, 25, 25, 0.0) 100%
  );
  pointer-events: none;
  z-index: 0;
}

.blog-body > * {
  position: relative;
  z-index: 1;
}

.blog-body p,
.blog-body li {
  line-height: 1.7;
  color: #d8d8d8;
}

.blog-body h2,
.blog-body h3 {
  margin-top: clamp(2rem, 5vw, 3rem);
  color: #ffffff;
}

.blog-body figure {
  margin: 28px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-body figure img,
.blog-body figure video {
  display: block;
  width: 100%;
  height: auto;
}

.blog-body a {
  color: var(--blog-accent, #80bfff);
}

.blog-body ul,
.blog-body ol {
  margin: clamp(1.1rem, 2.8vw, 1.6rem) 0;
  padding-left: 1.25rem;
}

.blog-body ul li,
.blog-body ol li {
  margin: 0.6rem 0;
}

.section-split {
  height: 8px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  margin: 24px auto 16px;
  max-width: min(900px, 100%);
}

@media (max-width: 640px) {
  .blog-body {
    padding: 20px 16px;
    border-radius: 12px;
  }
}

@media (min-width: 1024px) {
  .blog-post,
  .blog-container,
  .content-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
  }

  main.article.blog-open,
  .blog-open .content {
    max-width: 1100px;
    margin-inline: auto;
    padding-inline: 2rem;
  }

  .blog-open article {
    max-width: none;
    padding-inline: 0;
  }

  .blog-open article p,
  .blog-content p {
    max-width: 70ch;
  }

  .blog-open article :is(h1, h2, h3, blockquote),
  .blog-content :is(h1, h2, h3, blockquote) {
    max-width: 90ch;
  }

  .blog-open article figure,
  .blog-open article .post-image,
  .blog-open article img,
  .blog-content figure,
  .blog-content .post-image,
  .blog-content img,
  .blog-hero,
  .post-header .hero-media {
    display: block;
    max-width: 100%;
    width: 100%;
    height: auto;
    margin-left: auto;
    margin-right: auto;
  }

  .blog-hero,
  .post-header .hero-media {
    max-width: 1200px;
  }

  .blog-open article iframe,
  .blog-open article video,
  .blog-content iframe,
  .blog-content video {
    max-width: 100%;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .blog-open article h1,
  .blog-content h1 {
    line-height: 1.1;
  }

  .blog-open article h2,
  .blog-content h2 {
    line-height: 1.15;
  }

  .blog-open article h3,
  .blog-content h3 {
    line-height: 1.2;
  }

  .blog-open article p,
  .blog-content p {
    line-height: 1.6;
  }

  .blog-layout--with-sidebar .blog-main {
    max-width: 1100px;
  }
}

.blog-content img {
  height: auto !important;
}

@media (min-width: 1280px) {
  .blog-content,
  .blog-open article {
    font-size: 1.0625rem;
  }
}

/* Canonical footer support (shared across the site) */
.site-footer {
  background: #111;
  color: #fff;
  font-size: .9rem;
  padding: 20px;
  text-align: center;
}

.site-footer .community-links,
.site-footer .social-strip {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  margin: 0 0 16px;
  text-align: center;
}

.site-footer .community-links a,
.site-footer .social-strip a {
  align-items: center;
  color: #fff;
  display: inline-flex;
  height: 48px;
  justify-content: center;
  text-decoration: none;
  transition: color .25s ease, transform .15s ease;
  width: 48px;
}

.site-footer .community-links a:hover,
.site-footer .social-strip a:hover {
  color: #1e90ff;
  transform: translateY(-1px);
}

.site-footer .community-links a:focus-visible,
.site-footer .social-strip a:focus-visible {
  border-radius: 8px;
  outline: 2px solid #1e90ff;
  outline-offset: 2px;
}

.site-footer .community-links svg,
.site-footer .social-strip svg {
  display: block;
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.site-footer .social-strip .x-icon {
  color: #fff;
  width: 28px;
  height: 28px;
  transition: color .3s ease, transform .15s ease;
}

.site-footer .social-strip .x-icon:hover,
.site-footer .social-strip .x-icon:focus-visible {
  color: #1da1f2;
}

.site-footer .social-strip .x-icon svg {
  width: 100%;
  height: 100%;
}

@media (max-width: 480px) {
  .site-footer .community-links,
  .site-footer .social-strip {
    gap: 16px;
  }

  .site-footer .community-links svg,
  .site-footer .social-strip svg {
    width: 28px;
    height: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-footer .community-links a,
  .site-footer .social-strip a {
    transition: none;
  }

  .site-footer .community-links a:hover,
  .site-footer .social-strip a:hover {
    transform: none;
  }
}

.footer-links {
  margin: 4px 0 12px 0;
  font-size: .95rem;
}

.footer-links a {
  color: #fff;
  text-decoration: none;
}

.footer-links a:hover {
  color: #1e90ff;
  text-decoration: underline;
}

.footer-links .dot {
  opacity: .6;
  margin: 0 .5ch;
}

.footer-note {
  margin: 0;
  line-height: 1.6;
}

.site-footer .affiliate-note {
  margin: .4rem 0 0;
  font-size: .95rem;
  text-align: center;
  opacity: .9;
  color: inherit;
}

.site-footer .affiliate-note a {
  color: inherit;
  text-decoration: underline;
}


.site-footer .under-social {
  margin: 12px 0 8px;
  text-align: center;
  font-size: .95rem;
}

.site-footer .under-social a {
  color: #1e90ff;
  text-decoration: none;
  font-weight: 500;
}

.site-footer .under-social a:hover {
  text-decoration: underline;
}

.footer-attribution {
  margin: 14px 0 0;
  font-size: .78rem;
  color: rgba(255, 255, 255, .65);
}

.footer-attribution a {
  color: inherit;
  text-decoration: none;
}

.footer-attribution a:hover {
  color: #1e90ff;
  text-decoration: underline;
}

.blog-open .intro-divider {
  height: 1px;
  background: linear-gradient(90deg, #0000, #ffffff22, #0000);
  margin: 16px 0 24px;
}

.blog-open .tip {
  background: rgba(255, 255, 255, 0.1) !important;
  border-left-color: rgba(156, 224, 255, 0.85) !important;
}

.blog-open .ad-cards {
  display: grid;
  gap: clamp(12px, 3vw, 18px);
  margin-top: 0.5rem;
}

.blog-open .ad-card {
  background: rgba(10, 18, 26, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 14px;
  padding: clamp(16px, 3vw, 20px) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.blog-open .ad-card:hover,
.blog-open .ad-card:focus-within {
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
}

.blog-open .ad-card img {
  width: clamp(56px, 12vw, 72px) !important;
  border-radius: 10px !important;
}

.blog-open .ad-card .txt {
  font-size: 0.95rem;
  line-height: 1.45;
}

.blog-open .ad-card a {
  color: var(--heading-on-dark, #ffffff) !important;
  text-decoration: none;
}

.blog-open .ad-card a:hover,
.blog-open .ad-card a:focus {
  text-decoration: underline;
}

.blog-open hr {
  border: 0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.18) !important;
  margin: 1.75rem 0 !important;
}

.blog-open .muted {
  color: rgba(233, 238, 242, 0.75) !important;
}

.blog-open .back {
  color: var(--tg-accent, #9ce0ff) !important;
}

.blog-open .back:hover,
.blog-open .back:focus {
  color: #b8e9ff !important;
}

@media (min-width: 680px) {
  .blog-open .ad-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* ---- Black Beard Algae (magazine layout helpers) ---- */
.blog-open,
.blog-article {
  background-color: #444444;  /* reuse dark gray standard */
  color: #f5f5f5;
}

.blog-image {
  margin: 2rem 0;
  text-align: center;
}
.blog-image.right { float: right; width: 45%; margin-left: 2rem; }
.blog-image.left  { float: left;  width: 45%; margin-right: 2rem; }

.blog-image img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  display: block;
}
.blog-image figcaption {
  font-size: 0.9rem;
  color: #cccccc;
  margin-top: 0.5rem;
}

.divider { 
  border: 0; 
  height: 1px; 
  background: linear-gradient(90deg, #0000, #ffffff22, #0000); 
  margin: 2rem 0; 
}

.gear-links h3 { color: #ffffff; margin-bottom: 1rem; }
.gear-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.gear-grid figure { text-align: center; }
.gear-grid img {
  width: 100%;
  max-width: 220px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  margin-inline: auto;
}
.gear-grid figcaption { margin-top: 0.5rem; color: #e3edf9; }

@media (max-width: 900px) {
  .blog-image.right, .blog-image.left { float: none; width: 100%; margin: 1rem 0; }
  .gear-grid { grid-template-columns: 1fr; }
}

/* Keep headings readable on dark background */
.blog-article h1, .blog-article h2, .blog-article h3 { color: #ffffff; }
.blog-article a { color: #80bfff; }
.blog-article a:hover { color: #aad4ff; }

/* ===== Spotlight Blogs: Featured + Past ===== */
.blogs-featured {
  margin-bottom: 2.5rem;
}
.blog-item-large {
  display: grid;
  grid-template-columns: minmax(280px, 560px) 1fr;
  gap: 1.5rem;
  align-items: start;
}
.blog-item-large .blog-title-link { text-decoration: underline; }

.blogs-past-title {
  margin: 0 0 .75rem 0;
  font-size: 1.1rem;
  opacity: .9;
}
.blogs-past-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.blog-item-small {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}
.blog-thumb-mini {
  width: 84px;
  height: 56px;           /* ~16:9 */
  border-radius: 8px;
  object-fit: cover;
  display: block;
  border: 1px solid rgba(255,255,255,0.12);
  background: #0f0f0f;
}
.blog-abstract-mini {
  margin: 2px 0 0 0;
  font-size: .95rem;
  opacity: .92;
}

/* Responsive */
@media (max-width: 900px){
  .blog-item-large{ grid-template-columns: 1fr; }
  .blog-thumb-hero{ aspect-ratio: 16/9; }
}
/* --- Fix: constrain blog images on Spotlight Blogs --- */
.blogs-featured,
.blogs-past { max-width: 1100px; margin-inline: auto; }

/* Ensure all imgs inside blog cards never exceed their boxes */
.blogs-featured img,
.blogs-past img,
.blog-item img {
  max-width: 100%;
  height: auto;
}

/* Featured hero container: fixed aspect + hard cap heights */
.blog-thumb-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  max-height: 420px;          /* desktop cap */
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--tg-line, #2a2a2a);
  background: var(--tg-soft, #111);
}

/* Spotlight Blogs index page styles (moved from inline <style>) */
body {
  background-color: #2d2d2d;
  background-image: none;
  color: #f4f9fc;
  --brand: #00c3b6;
  --accent: #00c3b6;
  --radius: 16px;
}

main.blogs-panel {
  background: rgba(52, 53, 65, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32);
}

.blog-card .card-thumb-link { display:block; }
.blog-card .card-media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg, 16px);
  aspect-ratio: 16 / 9;
  background: #1b1c21;
}

.blog-card .card-media::before {
  content: none;
}

.blog-card .card-media img.blog-card-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 0.25s ease;
}

.blog-card:hover .card-media img.blog-card-image {
  transform: scale(1.02);
}

.card-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-img {
  object-fit: cover;
}

/* Focal helpers (opt-in) */
.blog-card .card-media img.blog-card-image.pos-center { object-position: 50% 50% !important; }
.blog-card .card-media img.blog-card-image.pos-top { object-position: 50% 10% !important; }
.blog-card .card-media img.blog-card-image.pos-bottom { object-position: 50% 90% !important; }
.blog-card .card-media img.blog-card-image.pos-left { object-position: 10% 50% !important; }
.blog-card .card-media img.blog-card-image.pos-right { object-position: 90% 50% !important; }
.blog-card .card-media img.blog-card-image.pos-betta-head { object-position: 38% 62% !important; }

.topics-nav{
  display:flex; flex-wrap:wrap; gap:.5rem .75rem;
  padding: 10px 0 6px;
  margin: 8px 0 18px;
}
.topics-nav a{
  display:inline-flex; align-items:center;
  padding:.28rem .7rem; border-radius:999px;
  background: rgba(255,255,255,.10);
  color: var(--text, #f4f9fc); text-decoration:none; font-weight:600; font-size:.9rem;
  border:1px solid rgba(255,255,255,.16);
}
.topics-nav a:hover{
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.28);
}

.topics-nav a.topic-core,
.topics-nav a.topic-algae,
.topics-nav a.topic-product,
.topics-nav a.topic-chem,
.topics-nav a.topic-gear{
  color: color-mix(in srgb, var(--accent) 88%, white 18%);
  border-color: color-mix(in srgb, var(--accent) 46%, transparent);
}
.topics-nav a.topic-core:hover,
.topics-nav a.topic-algae:hover,
.topics-nav a.topic-product:hover,
.topics-nav a.topic-chem:hover,
.topics-nav a.topic-gear:hover{
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 36%, transparent);
}

.topic-section{
  background: linear-gradient(180deg, rgba(0,0,0,.06), rgba(0,0,0,.02));
  border-radius: var(--radius, 18px);
  padding: clamp(14px,2.8vw,22px);
  margin: 18px 0 24px;
  box-shadow: 0 4px 18px rgba(0,0,0,.18);
}
.topic-head{
  display:flex; align-items:baseline; justify-content:space-between; gap:12px;
  margin: 4px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.topic-head h2{
  margin:0; color: var(--text, #f4f9fc); letter-spacing:.3px;
}
.topic-sub{
  margin:0; color: var(--muted, rgba(255,255,255,0.72)); font-size:.95rem; opacity:.9;
}

.blogs-grid{
  display:grid;
  gap: clamp(16px, 3vw, 26px);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* Maintain the magazine borders from earlier */
.blog-card{
  position: relative;
  background: #343541;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.05),
    0 14px 30px rgba(0,0,0,0.32);
  overflow: hidden;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
  display:flex;
  flex-direction:column;
  height:100%;
}
.blog-card:hover{
  transform: translateY(-4px);
  background: rgba(52,53,65,0.95);
  border-color: rgba(255,255,255,0.18);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.08),
    0 18px 36px rgba(0,0,0,0.38);
}
/* Headline bar on each card title */
.blog-card .card-title{ position:relative; padding-top:10px; margin-top:8px; }
.blog-card .card-title::before{
  content:""; position:absolute; top:0; left:0; width:48px; height:2px;
  background: linear-gradient(to right, var(--brand, #00c3b6), rgba(255,255,255,0));
  border-radius:2px; opacity:.9; transition: width .3s ease, opacity .3s ease;
}
.blog-card:hover .card-title::before{ width:72px; opacity:1; }

.blog-card .card-content{
  display:flex;
  flex-direction:column;
  gap:.65rem;
  padding: clamp(20px, 3vw, 24px);
}
.blog-card .card-kicker{
  margin:0;
  font-size:.9rem;
  color: var(--muted, rgba(255,255,255,0.72));
  letter-spacing:.2px;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:.35rem;
}
.blog-card .card-kicker .meta-sep{
  color: rgba(255,255,255,0.38);
}
.blog-card .card-title{
  font-size:clamp(1.15rem, 2.6vw, 1.55rem);
  margin:0;
}
.blog-card .card-title a{
  color:inherit;
  text-decoration:none;
}
.blog-card .card-title a:hover,
.blog-card .card-title a:focus{
  text-decoration:underline;
}
.blog-card .card-excerpt{
  margin:0;
  color: var(--text-secondary, rgba(255,255,255,0.82));
  font-size:clamp(.95rem, 2vw, 1.05rem);
  line-height:1.45;
  flex-grow:1;
}
.blog-card .card-read{
  margin-top:auto;
  font-weight:600;
  color: var(--brand, #00c3b6);
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:.4rem;
}
.blog-card .card-read:hover,
.blog-card .card-read:focus{
  text-decoration:underline;
}

.blog-card .card-thumb-link{
  display:block;
}

/* === Topic Accent System (Magazine) === */
:root{
  --accent:#8fe3ff; /* fallback */
}
.topic-core{ --accent:#3CAEA3; }
.topic-algae{ --accent:#C94C4C; }
.topic-product{ --accent:#FF8C42; }
.topic-chem{ --accent:#5D8AA8; }
.topic-gear{ --accent:#1F7A8C; }

/* apply accent to card frame and headline bar */
.topic-section .blog-card{ border-top:4px solid var(--accent); }
.topic-section .blog-card .card-title::before{
  background: linear-gradient(to right, var(--accent), rgba(255,255,255,0));
}

/* hero/button/link accents can read var(--accent) if desired */
.topic-section .card-cta,
.topic-section .blogs-grid a:hover{ color: var(--accent); }

/* Individual article header/banner accents */
.article-accent{
  --accent: var(--accent);
  border-top: 6px solid var(--accent);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.article-accent .eyebrow,
.article-accent .meta a,
.article-accent a:hover{ color: var(--accent); }

/* Optional subtle gradient underline for article H1 */
.article-accent h1{
  position:relative; padding-top:14px;
}
.article-accent h1::before{
  content:""; position:absolute; top:0; left:0; width:70px; height:3px;
  background: linear-gradient(to right, var(--accent), rgba(255,255,255,0));
  border-radius:2px; opacity:.95;
}
.blogs-ad-slot{
  margin: 22px 0 24px;
}
.blogs-ad-frame{
  border-radius: 16px;
  padding: 12px 10px;
  background: radial-gradient(circle at top, rgba(255,255,255,0.06), rgba(0,0,0,0.38));
  box-shadow:
    0 10px 26px rgba(0,0,0,0.45),
    inset 0 0 0 1px rgba(255,255,255,0.06);
  min-height: 260px; /* helps reduce CLS while the responsive unit loads */
}
.blogs-ad-frame ins.adsbygoogle{
  display:block !important;
}

/* Make the hero image fill the box without overflowing */
.blog-thumb-hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(.98);
}

@supports not (aspect-ratio: 1 / 1) {
  .blog-thumb-hero {
    height: 0;
    padding-top: 56.25%;
    max-height: 420px;
  }

  .blog-thumb-hero > img {
    position: absolute;
    inset: 0;
  }
}

/* Blog hero (detail page) */
.blog-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 60vh;
  overflow: hidden;
  border-radius: 14px;
  background: var(--tg-soft, rgba(0, 0, 0, 0.35));
}

.blog-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@supports not (aspect-ratio: 1 / 1) {
  .blog-hero {
    height: 0;
    padding-top: 56.25%;
    max-height: 60vh;
  }

  .blog-hero img {
    position: absolute;
    inset: 0;
  }
}

/* Layout of the large card */
.blog-item-large {
  display: grid;
  grid-template-columns: minmax(280px, 560px) 1fr;
  gap: 1.25rem;
  align-items: start;
}

/* Small card thumb sizing stays modest */
.blog-thumb-mini {
  width: 96px;
  height: 60px;  /* ~16:10 for a bit more height */
  object-fit: cover;
}

/* Guard against any accidental absolute/fixed positioning */
.blog-item img { position: static !important; }

/* Mobile adjustments */
@media (max-width: 900px) {
  .blog-item-large { grid-template-columns: 1fr; }
  .blog-thumb-hero { max-height: 260px; }  /* mobile cap */
}

/* Extra safety: no image should exceed its container vertically */
.blog-item img { max-height: 100%; }

/* --- end fix --- */
