/* Connecting H2O — Blog section styles.
   Reuses existing design tokens (tokens.css) and the site's established
   component conventions (.ch2o-sec / .ch2o-wrap / .ch2o-sh / button styles)
   so the blog reads as a natural extension of the rest of the site, not a
   bolted-on template. Enqueued only on the Blog page and single posts. */

/* ---------------------------------------------------------------------- */
/* Shared                                                                  */
/* ---------------------------------------------------------------------- */
.ch2o-blog-wrap {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}
@media (max-width: 639px) {
  .ch2o-blog-wrap { padding: 0 1.25rem; }
}

/* ---------------------------------------------------------------------- */
/* Hero                                                                    */
/* ---------------------------------------------------------------------- */
.ch2o-blog-hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 0 4rem;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.72) 0%, rgba(255,255,255,0.55) 45%, rgba(255,255,255,0.8) 100%),
    url('https://connectingh2o.com/wp-content/uploads/2026/11/serene-water-droplet-health-banner.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  text-align: center;
}
.ch2o-blog-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 1.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  background: color-mix(in oklab, var(--primary) 10%, white);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
}
.ch2o-blog-hero__title {
  margin: 0;
  font-size: clamp(2rem, 1.3rem + 2.8vw, 3.25rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--foreground);
}
.ch2o-blog-hero__sub {
  margin: 1.25rem auto 0;
  max-width: 42rem;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}
@media (min-width: 640px) {
  .ch2o-blog-hero__sub { font-size: 1.125rem; }
}
.ch2o-blog-hero__wave {
  position: absolute;
  inset: auto 0 -1px 0;
  line-height: 0;
  pointer-events: none;
}
.ch2o-blog-hero__wave svg { display: block; width: 100%; height: 56px; }
@media (min-width: 900px) { .ch2o-blog-hero__wave svg { height: 84px; } }

/* ---------------------------------------------------------------------- */
/* Controls: search + category filters                                    */
/* ---------------------------------------------------------------------- */
.ch2o-blog-controls {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 2.5rem 0 1rem;
}
@media (min-width: 900px) {
  .ch2o-blog-controls {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
  }
}
.ch2o-blog-search {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: var(--background);
  padding: 0.65rem 1.1rem;
  max-width: 24rem;
}
.ch2o-blog-search svg { flex-shrink: 0; color: var(--muted-foreground); }
.ch2o-blog-search input {
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--foreground);
  width: 100%;
}
.ch2o-blog-search button {
  flex-shrink: 0;
  border: 0;
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: 9999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}
.ch2o-blog-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.ch2o-blog-cats a {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--secondary-foreground);
  background: var(--secondary);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.ch2o-blog-cats a:hover { background: color-mix(in oklab, var(--primary) 12%, var(--secondary)); }
.ch2o-blog-cats a.is-active {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

/* ---------------------------------------------------------------------- */
/* Featured article                                                        */
/* ---------------------------------------------------------------------- */
.ch2o-blog-featured {
  padding: 1.5rem 0 3rem;
}
.ch2o-blog-featured__card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  background: var(--card);
  border-radius: var(--radius-3xl);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
@media (min-width: 900px) {
  .ch2o-blog-featured__card { grid-template-columns: 0.8fr 1fr; align-items: stretch; gap: 0; }
}
.ch2o-blog-featured__media { position: relative; }
.ch2o-blog-featured__media img {
  width: 100%;
  height: 11rem;
  object-fit: cover;
  display: block;
}
@media (min-width: 900px) {
  .ch2o-blog-featured__media img { height: 100%; min-height: 14rem; max-height: 18rem; }
}
.ch2o-blog-featured__body {
  padding: 1.75rem 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.9rem;
}
@media (min-width: 640px) {
  .ch2o-blog-featured__body { padding: 2.5rem; }
}
.ch2o-blog-featured__flag {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-foreground);
  background: var(--accent);
  display: inline-flex;
  align-self: flex-start;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
}
.ch2o-blog-cat-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
}
.ch2o-blog-featured__title {
  margin: 0;
  font-size: clamp(1.375rem, 1rem + 1.6vw, 1.875rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--foreground);
}
.ch2o-blog-featured__title a { color: inherit; text-decoration: none; }
.ch2o-blog-featured__title a:hover { color: var(--primary); }
.ch2o-blog-featured__excerpt {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}
.ch2o-blog-featured__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
  margin-top: 0.25rem;
  padding: 0.8rem 1.4rem;
  border-radius: 9999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.ch2o-blog-featured__btn:hover { box-shadow: var(--shadow-lift); transform: translateY(-1px); }

/* ---------------------------------------------------------------------- */
/* Section head (used above the grid, product-card-reference style)        */
/* ---------------------------------------------------------------------- */
.ch2o-blog-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.75rem;
}
.ch2o-blog-section-head__eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--primary);
}
.ch2o-blog-section-head__title {
  margin: 0;
  font-size: clamp(1.375rem, 1.05rem + 1.3vw, 1.875rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--foreground);
}

/* Category pill badge overlapping the card/featured image corner */
.ch2o-blog-badge {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-foreground);
  background: var(--primary);
  padding: 0.35rem 0.8rem;
  border-radius: 9999px;
  box-shadow: 0 4px 12px -3px rgba(11, 30, 51, 0.35);
}

/* ---------------------------------------------------------------------- */
/* Grid + cards                                                            */
/* ---------------------------------------------------------------------- */
.ch2o-blog-grid-section { padding: 1rem 0 4rem; }
.ch2o-blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}
@media (min-width: 640px) {
  .ch2o-blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .ch2o-blog-grid { grid-template-columns: repeat(3, 1fr); }
}
.ch2o-blog-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.ch2o-blog-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-3px); }
.ch2o-blog-card__media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--muted); }
.ch2o-blog-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s ease; }
.ch2o-blog-card:hover .ch2o-blog-card__media img { transform: scale(1.04); }
.ch2o-blog-card__body { padding: 1.25rem 1.375rem 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.ch2o-blog-card__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--foreground);
}
.ch2o-blog-card__title a { color: inherit; text-decoration: none; }
.ch2o-blog-card__title a:hover { color: var(--primary); }
.ch2o-blog-card__excerpt { margin: 0; font-size: 0.9375rem; line-height: 1.6; color: var(--muted-foreground); flex: 1; }
.ch2o-blog-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}
.ch2o-blog-card__meta a { font-weight: 700; color: var(--primary); text-decoration: none; }
.ch2o-blog-card__meta a:hover { text-decoration: underline; }

/* Empty state */
.ch2o-blog-empty {
  text-align: center;
  padding: 4rem 1.5rem;
  color: var(--muted-foreground);
}
.ch2o-blog-empty svg { color: var(--primary-light); margin-bottom: 1rem; }
.ch2o-blog-empty h3 { margin: 0 0 0.5rem; font-size: 1.25rem; font-weight: 700; color: var(--foreground); }
.ch2o-blog-empty a { color: var(--primary); font-weight: 700; text-decoration: none; }
.ch2o-blog-empty a:hover { text-decoration: underline; }

/* Pagination */
.ch2o-blog-pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}
.ch2o-blog-pagination a,
.ch2o-blog-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--foreground);
  text-decoration: none;
}
.ch2o-blog-pagination a:hover { background: var(--secondary); }
.ch2o-blog-pagination .current { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }

/* ---------------------------------------------------------------------- */
/* Single article                                                          */
/* ---------------------------------------------------------------------- */
.ch2o-article-hero {
  position: relative;
  padding: 2.5rem 0 0;
  overflow: hidden;
  background-color: var(--tint);
  background-image:
    radial-gradient(ellipse 60% 55% at 92% 8%, color-mix(in oklab, var(--primary-light) 20%, transparent), transparent 70%),
    radial-gradient(ellipse 50% 45% at 6% 95%, color-mix(in oklab, var(--primary) 16%, transparent), transparent 70%),
    linear-gradient(180deg, var(--tint) 0%, var(--background) 100%);
}
.ch2o-article-hero::before,
.ch2o-article-hero::after {
  content: '';
  position: absolute;
  border-radius: 9999px;
  background: color-mix(in oklab, white 55%, transparent);
  pointer-events: none;
  z-index: 0;
}
.ch2o-article-hero::before { width: 22rem; height: 22rem; top: -9rem; right: -7rem; }
.ch2o-article-hero::after { width: 14rem; height: 14rem; bottom: -6rem; left: -5rem; background: color-mix(in oklab, var(--primary-light) 18%, white); }
.ch2o-article-hero__grid { position: relative; z-index: 1; }
.ch2o-article-hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  padding-bottom: 2.5rem;
}
@media (min-width: 900px) {
  .ch2o-article-hero__grid { grid-template-columns: 1.2fr 1fr; gap: 3rem; }
}
.ch2o-article-hero__media {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border-radius: var(--radius-3xl);
  box-shadow: var(--shadow-lift);
  padding: 1.25rem;
  max-width: 24rem;
  margin: 0 auto;
}
@media (min-width: 900px) {
  .ch2o-article-hero__media { max-width: none; margin: 0; }
}
.ch2o-article-hero__media img {
  width: 100%;
  height: auto;
  max-height: 18rem;
  object-fit: contain;
  display: block;
  border-radius: var(--radius-xl);
}
.ch2o-article-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  margin-bottom: 1.25rem;
}
.ch2o-article-breadcrumb a { color: var(--muted-foreground); text-decoration: none; }
.ch2o-article-breadcrumb a:hover { color: var(--primary); }
.ch2o-article-breadcrumb [aria-current] { color: var(--foreground); font-weight: 600; }
.ch2o-article-cat {
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 0.75rem;
}
.ch2o-article-cat--pill {
  align-items: center;
  background: color-mix(in oklab, var(--primary) 10%, white);
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  letter-spacing: 0.06em;
}
.ch2o-article-title {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--foreground);
}
.ch2o-article-intro {
  margin: 0 0 1.5rem;
  padding-left: 1rem;
  border-left: 3px solid var(--primary);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--muted-foreground);
  max-width: 34rem;
}
.ch2o-article-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: var(--muted-foreground);
}
.ch2o-article-meta img { width: 2.25rem; height: 2.25rem; border-radius: 9999px; object-fit: cover; }
.ch2o-article-meta strong { color: var(--foreground); font-weight: 700; }
.ch2o-article-media { padding: 0 0 2rem; }
.ch2o-article-media img {
  width: 100%;
  max-height: 28rem;
  object-fit: cover;
  border-radius: var(--radius-2xl);
  display: block;
}
.ch2o-article-body {
  position: relative;
  overflow: hidden;
  padding: 0 0 3rem;
  background-image: radial-gradient(ellipse 45% 35% at 100% 15%, color-mix(in oklab, var(--primary-light) 8%, transparent), transparent 70%);
}
.ch2o-article-content {
  max-width: 44rem;
  margin: 0 auto;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--foreground);
}
.ch2o-article-content h2 { font-size: 1.5rem; font-weight: 800; margin: 2.25rem 0 1rem; letter-spacing: -0.01em; }
.ch2o-article-content h3 { font-size: 1.25rem; font-weight: 700; margin: 1.75rem 0 0.75rem; }
.ch2o-article-content p { margin: 0 0 1.25rem; }
.ch2o-article-content ul, .ch2o-article-content ol { margin: 0 0 1.25rem; padding-left: 1.5rem; }
.ch2o-article-content li { margin-bottom: 0.5rem; }
.ch2o-article-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.ch2o-article-content img { max-width: 100%; height: auto; border-radius: var(--radius-xl); margin: 1.5rem 0; }
.ch2o-article-content blockquote {
  margin: 1.75rem 0;
  padding: 1rem 1.5rem;
  border-left: 3px solid var(--primary);
  background: var(--tint);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--foreground);
}

.ch2o-article-share {
  max-width: 44rem;
  margin: 2.5rem auto 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.ch2o-article-share__label { font-size: 0.875rem; font-weight: 700; color: var(--foreground); margin-right: 0.25rem; }
.ch2o-article-share a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: var(--secondary);
  color: var(--secondary-foreground);
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.ch2o-article-share a:hover { background: var(--primary); color: var(--primary-foreground); }

.ch2o-article-cta {
  margin: 3rem 0;
  padding: 2.25rem 1.75rem;
  border-radius: var(--radius-3xl);
  background: var(--primary);
  background-image: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--primary-foreground);
  text-align: center;
}
@media (min-width: 640px) {
  .ch2o-article-cta { padding: 2.75rem; }
}
.ch2o-article-cta h3 { margin: 0 0 0.6rem; font-size: 1.375rem; font-weight: 800; }
.ch2o-article-cta p { margin: 0 0 1.25rem; opacity: 0.92; font-size: 1rem; }
.ch2o-article-cta .ch2o-article-cta__btns { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.ch2o-article-cta a.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.8rem 1.5rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
}
.ch2o-article-cta a.btn--primary { background: var(--accent); color: var(--accent-foreground); }
.ch2o-article-cta a.btn--ghost { background: color-mix(in oklab, white 18%, transparent); color: var(--primary-foreground); border: 1.5px solid color-mix(in oklab, white 55%, transparent); }

.ch2o-article-related {
  padding: 3rem 0 4rem;
  background: linear-gradient(180deg, var(--background) 0%, var(--tint) 100%);
}
.ch2o-article-related h2 {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 2rem;
  color: var(--foreground);
}


/* Featured-article image: "Recording the TDS Reading" (proof-testing-4)
   is a tall portrait photo with the person's face in the upper third —
   centered object-fit:cover was cropping the face out. Bias this specific
   image toward the top instead of changing the default for every future
   featured image. */
.ch2o-blog-featured__media img[src*="proof-testing-4"] {
  object-position: top center;
}
