/*
Theme Name: Vitalheros Child
Theme URI: https://vitalheros.com
Description: Modern, minimalist child theme for Vitalheros built on Kadence. Refined typography, card UI, rounded corners, soft shadows, generous spacing, fully responsive, and ad-ready.
Author: Vitalheros
Template: kadence
Version: 1.0.0
*/

/* ============================================================
   Design tokens
   ============================================================ */
:root {
  --vh-primary: #0e9488;        /* teal */
  --vh-primary-dark: #0b7468;
  --vh-ink: #11332e;            /* near-black green */
  --vh-text: #1f2a37;
  --vh-muted: #6b7280;
  --vh-bg: #ffffff;
  --vh-bg-soft: #f5faf9;
  --vh-border: #e6ecea;
  --vh-radius: 16px;
  --vh-radius-sm: 10px;
  --vh-shadow: 0 1px 2px rgba(16,40,36,.04), 0 8px 24px rgba(16,40,36,.07);
  --vh-shadow-hover: 0 6px 14px rgba(16,40,36,.08), 0 18px 40px rgba(16,40,36,.12);
}

/* ============================================================
   Base typography & rhythm
   ============================================================ */
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--vh-text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  background: var(--vh-bg);
}
h1, h2, h3, h4, h5, h6 { color: var(--vh-ink); font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
p, li { font-size: 1.05rem; }
a { color: var(--vh-primary); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--vh-primary-dark); }

/* Comfortable single-article measure */
.single .entry-content { font-size: 1.08rem; }
.single .entry-content > p { margin-bottom: 1.35em; }
.entry-content h2 { margin-top: 1.8em; }

/* ============================================================
   Buttons — rounded, soft shadow, hover lift
   ============================================================ */
.wp-block-button__link,
.button, button, input[type="submit"], .kt-btn,
.wp-block-search__button {
  border-radius: 999px !important;
  font-weight: 700;
  padding: .7em 1.5em;
  box-shadow: 0 6px 16px rgba(14,148,136,.18);
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.wp-block-button__link:hover, .button:hover, button:hover, input[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(14,148,136,.28);
}
.wp-block-button.is-style-outline .wp-block-button__link { box-shadow: none; }

/* ============================================================
   Post cards (core Latest Posts grid + Kadence loop)
   ============================================================ */
.wp-block-latest-posts.is-grid { gap: 1.75rem; }
.wp-block-latest-posts.is-grid li,
.loop-entry.entry {
  background: var(--vh-bg);
  border: 1px solid var(--vh-border);
  border-radius: var(--vh-radius);
  box-shadow: var(--vh-shadow);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex;
  flex-direction: column;
}
.wp-block-latest-posts.is-grid li:hover,
.loop-entry.entry:hover {
  transform: translateY(-4px);
  box-shadow: var(--vh-shadow-hover);
}
.wp-block-latest-posts__featured-image { margin: 0; }
.wp-block-latest-posts__featured-image img,
.loop-entry .post-thumbnail img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}
.wp-block-latest-posts__list li > a:first-child { font-weight: 800; font-size: 1.2rem; color: var(--vh-ink); }
.wp-block-latest-posts__post-excerpt,
.wp-block-latest-posts__post-date { padding-left: 1.1rem; padding-right: 1.1rem; }
.wp-block-latest-posts__list li > a { display: block; padding: 1rem 1.1rem 0; }
.wp-block-latest-posts__post-date { color: var(--vh-muted); font-size: .85rem; }
.wp-block-latest-posts__post-excerpt { color: var(--vh-text); padding-bottom: 1.2rem; }

/* Kadence archive cards padding */
.loop-entry .entry-content-wrap { padding: 1.3rem 1.4rem 1.6rem; }
.loop-entry .entry-title a { color: var(--vh-ink); }

/* Category pills */
.entry-taxonomies .category-style-pill a,
.loop-entry .entry-taxonomies a {
  background: var(--vh-bg-soft);
  color: var(--vh-primary-dark);
  border-radius: 999px;
  padding: .2em .7em;
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .03em;
  text-transform: uppercase;
}

/* ============================================================
   Browse-by-topic (categories block)
   ============================================================ */
.wp-block-categories { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; padding: 0; max-width: 900px; margin-inline: auto; }
.wp-block-categories li { margin: 0; }
.wp-block-categories a {
  display: inline-block;
  background: var(--vh-bg-soft);
  border: 1px solid var(--vh-border);
  border-radius: 999px;
  padding: .5em 1.1em;
  font-weight: 700;
  text-decoration: none;
  transition: all .15s ease;
}
.wp-block-categories a:hover { background: var(--vh-primary); color: #fff; border-color: var(--vh-primary); }

/* ============================================================
   Single article hero figure (from the bot)
   ============================================================ */
figure.vh-hero { margin: 0 0 1.8rem; }
figure.vh-hero img { width: 100%; border-radius: var(--vh-radius); box-shadow: var(--vh-shadow); aspect-ratio: 16/9; object-fit: cover; }
figure.vh-hero figcaption { display: none; }
.vh-affiliate-disclosure { background: var(--vh-bg-soft); border-left: 3px solid var(--vh-primary); padding: .8em 1.1em; border-radius: var(--vh-radius-sm); color: var(--vh-muted); font-size: .92rem; }
.entry-content blockquote { border-left: 4px solid var(--vh-primary); background: var(--vh-bg-soft); border-radius: 0 var(--vh-radius-sm) var(--vh-radius-sm) 0; padding: 1em 1.3em; }

/* ============================================================
   Ad zones — invisible until filled, clearly separated when filled
   ============================================================ */
.vh-ad { margin: 2rem auto; text-align: center; clear: both; }
.vh-ad:empty { display: none; }
.vh-ad--in-article { padding: .5rem 0; }
.vh-ad .vh-ad-label { display: block; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--vh-muted); margin-bottom: .35rem; }
/* When no real ad/widget is inside, hide the bare label so readers don't see empty boxes */
.vh-ad--in-article:not(:has(iframe)):not(:has(ins)) .vh-ad-label { display: none; }

/* ============================================================
   Footer polish
   ============================================================ */
.site-footer, .site-footer-row { background: var(--vh-ink); }
.site-footer a, .site-footer { color: #d7e7e3; }
.site-footer a:hover { color: #fff; }

/* ============================================================
   Static front page: hide the redundant "Home" page title bar
   ============================================================ */
.home .entry-hero,
.home .entry-hero-container,
.page-template-default.home header.entry-header { display: none; }

/* Make Latest Posts featured images load eagerly so they always render */
.wp-block-latest-posts__featured-image img { background: var(--vh-bg-soft); }

/* ============================================================
   Single article — readability & polish
   ============================================================ */
.single .entry-content { max-width: 760px; margin-inline: auto; }
.single .entry-content > p:first-of-type { font-size: 1.2rem; line-height: 1.65; color: #243340; }
.single .entry-content h2 { margin-top: 2.1em; }
.single .entry-content h3 { margin-top: 1.6em; }
.single .entry-content ul, .single .entry-content ol { padding-left: 1.35em; }
.single .entry-content li { margin-bottom: .5em; }
.single .entry-content img { border-radius: var(--vh-radius); }
.single .entry-content a { font-weight: 600; }
.single .entry-content hr { border: 0; border-top: 1px solid var(--vh-border); margin: 2.5em 0 1.5em; }

/* E-E-A-T byline / trust box under the title */
.vh-byline {
  max-width: 760px; margin: 0 auto 1.6rem; display: flex; gap: .8rem; align-items: center;
  padding: .85rem 1.1rem; background: var(--vh-bg-soft);
  border: 1px solid var(--vh-border); border-radius: var(--vh-radius-sm);
  font-size: .93rem; color: var(--vh-muted);
}
.vh-byline strong { color: var(--vh-ink); }
.vh-byline .vh-badge {
  display: inline-flex; width: 40px; height: 40px; border-radius: 50%;
  background: var(--vh-primary); color: #fff; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.05rem; flex: 0 0 auto;
}

/* ============================================================
   Table of Contents
   ============================================================ */
html { scroll-behavior: smooth; }
.entry-content h2 { scroll-margin-top: 90px; }
.vh-toc { max-width: 760px; margin: 0 auto 1.8rem; background: var(--vh-bg-soft); border: 1px solid var(--vh-border); border-radius: var(--vh-radius-sm); padding: 1rem 1.3rem; }
.vh-toc-title { font-weight: 800; color: var(--vh-ink); margin: 0 0 .4rem; }
.vh-toc ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.vh-toc li { margin-bottom: .3rem; }
.vh-toc a { font-weight: 600; }

/* ============================================================
   Breadcrumb
   ============================================================ */
.vh-breadcrumb { max-width: 760px; margin: 0 auto 1.1rem; font-size: .85rem; color: var(--vh-muted); }
.vh-breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; padding: 0; margin: 0; }
.vh-breadcrumb li { display: flex; align-items: center; gap: .45rem; }
.vh-breadcrumb li:not(:last-child)::after { content: "\203A"; color: #b9c6c2; }
.vh-breadcrumb a { color: var(--vh-primary); font-weight: 600; text-decoration: none; }
.vh-breadcrumb a:hover { text-decoration: underline; }

/* ============================================================
   Related posts
   ============================================================ */
.vh-related { margin: 3rem auto 1rem; }
.vh-related > h2 { text-align: center; margin-bottom: 1.5rem; }
.vh-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.vh-related-card {
  background: #fff; border: 1px solid var(--vh-border); border-radius: var(--vh-radius);
  overflow: hidden; box-shadow: var(--vh-shadow); transition: transform .18s ease, box-shadow .18s ease;
}
.vh-related-card:hover { transform: translateY(-4px); box-shadow: var(--vh-shadow-hover); }
.vh-related-thumb img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.vh-related-title { font-size: 1.02rem; line-height: 1.35; margin: 0; padding: .9rem 1rem 1.1rem; }
.vh-related-title a { color: var(--vh-ink); text-decoration: none; }
.vh-related-title a:hover { color: var(--vh-primary); }
@media (max-width: 768px) { .vh-related-grid { grid-template-columns: 1fr; } }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .wp-block-latest-posts.is-grid { gap: 1.25rem; }
}
@media (max-width: 768px) {
  body { line-height: 1.7; }
  .wp-block-latest-posts.columns-3 li,
  .wp-block-latest-posts.columns-2 li { width: 100%; }
  h1 { font-size: 1.9rem; }
}
