/*
Theme Name: 202512
Text Domain: 202512
*/

/* --- ROOT VARIABLES --- */
:root {
  --bg: #f4f4f4;
  --text: #222;
  --site-blue: #35658F;
  --site-red:  #C24B30;
  --site-yellow:#FFCF67;
  --inner-max: 880px;
  --inner-pad: 20px;
}

/* --- BASE LAYOUT & TYPOGRAPHY --- */
html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

/* --- CONTAINER --- */
.inner {
  max-width: var(--inner-max);
  margin: 0 auto;
  padding: var(--inner-pad);
}

/* --- HEADER --- */
header {
  background: #0f2a3a;
  color: #fff;
}

/* --- MAIN AREA --- */
main {
  background: #ffffff;
}

main .inner {
  padding-top: 40px;
  padding-bottom: 40px;
}

/* --- FOOTER --- */
footer {
  background: var(--site-red);
  color: #fff;
}

footer .inner {
  padding-top: 30px;
  padding-bottom: 30px;
  text-align: center;
}

/* Brand / short about line */
.footer-brand {
  margin: 0 0 8px;
  color: var(--site-yellow);
}

.footer-brand p {
  margin: 0;
}

.footer-about {
  font-size: 1.3em;
  font-weight: 600;
}

/* Links */
.footer-links {
  margin: 6px 0 10px;
  font-size: 0.95rem;
  line-height: 2;
  display: inline-block;
  white-space: nowrap;
}

.footer-links a {
  color: #fff;
  text-decoration: none;
  padding: 0 6px;
}

.footer-links a:focus,
.footer-links a:hover {
  color: #000;
}

/* Pipe separators (kept small for compact footer) */
.footer-links .sep {
  color: rgba(255,255,255,0.6);
  padding: 0 4px;
}

/* Copyright */
.footer-copy {
  margin: 8px 0 0;
  font-size: 0.9rem;
  opacity: 0.95;
}

/* --- HEADINGS --- */
h1 {
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  font-size: 2.6rem;
  margin-top: 0;
  margin-bottom: 16px;  /* tighter than 20px */
  line-height: 1.1;     /* reduced from default */
  color: var(--site-blue);
}

h2 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.55rem;
  margin: 24px 0 12px;  /* tighter than 32px/14px */
  line-height: 1.25;    /* reduced from default */
  color: var(--site-blue);
}

h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1.25rem;
  margin: 18px 0 8px;  /* tighter than 24px/10px */
  line-height: 1.3;    /* slightly tighter */
  color: var(--site-red);
}

/* header basics */
.site-header { color: #fff; }
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-left: var(--inner-pad);
  padding-right: var(--inner-pad);
}

/* logo */
.site-logo img { display: block; width: 300px; height: auto; }

/* actions cluster */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

/* button base */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  color: #fff;
}

.btn-patreon {
  background: #fff;
  color: #000;
}

.btn-newsletter {
  background: var(--site-blue);
}

.youtube-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  font-weight: 600;
  border-radius: 999px;
  transition: background .12s;
  background: var(--site-red);
}
.yt-play {
  display: inline-block;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 10px solid rgb(255, 255, 255);
}

/* search form */
.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}
.search-form input[type="search"] {
  width: 120px;                     /* visible default width */
  max-width: 220px;
  padding: 8px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  background: transparent;
  font-size: 0.95rem;
  transition: width .18s ease, background .12s;
  outline: none;
  color: #fff;
}
.search-form input::placeholder { color: rgba(255,255,255,0.75); }
.search-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  padding: 6px;
}
.search-form svg { fill: currentColor; }

/* expand slightly on focus-within for comfort */
.search-form:focus-within input[type="search"] {
  width: 200px;
  background: rgba(255,255,255,0.02);
}

/* accessibility focus */
.header-actions a:focus, .header-actions button:focus, .search-form input:focus {
  outline: 2px solid rgba(255,255,255,0.3);
  outline-offset: 2px;
}

/* visually-hidden utility */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Make it visible when focused (useful for skip-links) */
.visually-hidden:focus,
.visually-hidden:active {
  position: static !important;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Hero */
.hero { margin: 24px 0 0; }
.hero .top-media-img { width: 100%; height: auto; border-radius: 8px; }
.hero .entry-title { font-size: 2.4rem; margin-top: 12px; }

/* Grid for the feed (uses your .post-list rules; make items look neat) */
.post-list { margin-top: 12px; }
.post-list article.post { background: transparent; padding: 6px 0; }
.post-list .post-title { margin: 6px 0 12px; font-family: Oswald, 'sans-serif'; font-weight: 500; font-size: 1.6rem; }
.post-list .entry-excerpt { font-size: 0.9em; line-height: 1.4; color: rgba(0,0,0,0.7); margin-bottom: 8px; }
.post-list .entry-excerpt a { white-space: nowrap; }

.hero .entry-excerpt { font-size: 1em; line-height: 1.6; }

/* Responsive video container already matches your .video-wrap but we add clickable overlay */
.video-wrap { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; }
.video-wrap iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

.video-text-link {
  text-align: center;
  margin-bottom: 22px;
  line-height: 1.3;
}
.video-text-link a {
  display: inline-block;
  background: #444;
  padding: 8px 14px;
  border-radius: 6px;
  color: var(--site-yellow);
}

/* Make sure linked thumbnails match the style used elsewhere */
/*.top-media-link img.top-media-img { display: block; border-radius: 6px; border: 1px solid rgba(0,0,0,0.06); }*/

/* Slight spacing adjustment for pagination area */
.pagination { margin-top: 34px; text-align: center; }

/* --- POST META --- */
.post-meta-line {
  margin: 10px 0 22px;
  font-family: 'Oswald', sans-serif;
  font-weight: 200;
  font-size: 0.9rem;
  line-height: 1.2;
  letter-spacing: 0.5px;
  display: flex;
  flex-wrap: wrap;
  column-gap: 12px;
  row-gap: 4px;
  align-items: baseline;
}

.post-meta-line b { font-weight: 400; }

.post-geo {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  text-transform: uppercase;
  color: var(--text);
  order: 1;
  width: 100%;
  margin-bottom: 10px;
}

.post-geo .pin-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  fill: var(--site-red);
}

.post-date {
  color: var(--site-blue);
  order: 2;
  font-weight: 400;
}

.single .post-date, .hero .post-date {
  order: 1;
}

.single .post-geo, .hero .post-geo {
  order: 2;
  width: auto;
  margin-bottom: 0;
}

/* --- LINKS & ACCENTS --- */
a {
  color: var(--site-blue);
  text-decoration: none;
}

a:hover {
  opacity: 0.85;
}

.accent {
  background: var(--site-yellow);
  color: #000;
}

.day-count {
  font-weight: bold;
  letter-spacing: 0.5px;
}

/* --- BLOOD GLUCOSE METER --- */
.bgnow {
  display: inline-block;
  font-family: 'Orbitron', monospace;
  font-size: 0.85em;
  color: #e2f5c5;
  background: rgb(87, 71, 64);
  padding: 0 4px;
  border-radius: 4px;
  margin: 0 1px;
}

/* --- TAG LIST --- */
.post-tags {
  margin: 12px 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.post-tags a {
  display: inline-block;
  padding: 3px 8px;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: rgba(0,0,0,0.06);
  color: #444;
  border-radius: 4px;
  white-space: nowrap;
}

.post-tags a:hover {
  background: rgba(0,0,0,0.12);
}

.tag-cloud {
  margin-top: 70px;
  padding-top: 26px;
  border-top: 2px solid #999;
}

/* --- POST IMAGES & CAPTIONS --- */
.wp-caption,
figure.wp-block-image,
figure {
  display: block;
  margin: 0 auto 18px;
  max-width: 100%;
  text-align: center;
  padding: 0;
  background: transparent;
}

.wp-caption img,
figure img,
.wp-block-image img {
  display: inline-block;
  max-width: 100%;
  height: auto;
  margin: 0;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.06);
}

.wp-caption-text,
figure figcaption,
.wp-block-image figcaption {
  display: block;
  margin-top: 6px;
  font-size: 0.92rem;
  line-height: 1.35;
  color: rgba(0,0,0,0.55);
  font-style: normal;
}

/* Make *all* post/content images look like captioned images */
.entry-content img,
.single .entry img,
.post img,
.wp-block-image img,
figure img,
.wp-caption img,
.top-media-img,
img.alignnone,
img.aligncenter {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto 18px;            /* center non-caption images */
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}

/* Keep legacy float classes working and neat */
img.alignleft {
  float: left !important;
  margin: 0 18px 18px 0;
  display: block;
}
img.alignright {
  float: right !important;
  margin: 0 0 18px 18px;
  display: block;
}

/* If a linked image (a > img) is styled by something else, ensure it still fits */
.entry-content a img,
.post a img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.06);
}

/* --- TOP MEDIA --- */
.top-media {
  max-width: 880px;
  margin: 0 auto;
}

.image-wrap img.top-media-img {
  width: 100%;
  height: auto;
  display: block;
}

.top-media-caption {
  font-size: 13px;
  margin-top: 6px;
}

.top-media-caption a {
  text-decoration: none;
  font-weight: 600;
}

/* --- POST NAVIGATION --- */
.post-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 50px;
  padding-top: 20px;
  border-top: 1px solid rgba(0,0,0,0.1);
}

.nav-previous,
.nav-next {
  max-width: 45%;
  display: flex;
  align-items: flex-start; /* arrow aligns with top of first line */
}

.nav-next {
  text-align: right;
}

.nav-link {
  display: flex;
  align-items: flex-start;
  font-weight: bold;
  color: var(--site-blue);
  text-decoration: none;
  line-height: 1.3;
}

/* previous arrow */
.nav-link.prev::before {
  content: '';
  flex-shrink: 0;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-right: 10px solid var(--site-blue);
  margin-right: 8px; /* spacing between arrow and text */
  margin-top: 2px;   /* align arrow with first line */
}

/* next arrow */
.nav-link.next::after {
  content: '';
  flex-shrink: 0;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 10px solid var(--site-blue);
  margin-left: 8px;  /* spacing between text and arrow */
  margin-top: 2px;   /* align arrow with first line */
}

/* allow multi-line text to wrap under first line of text, not under arrow */
.nav-link span {
  display: inline;
}

/* tag archive two-column layout */
.post-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;                /* spacing between items (matches your article margin) */
  align-items: start;
}

/* each article should fill its grid cell */
.post-list article.post {
  width: 100%;
  box-sizing: border-box;
  margin: 0;                /* remove per-article bottom margin handled by grid gap */
}

/* make featured image constrained and responsive */
/*.top-media-link,
.top-media-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 0 12px;
  border-radius: 6px;
  overflow: hidden;
}*/

.top-media-link {
  display: block;
  width: 100%;
  margin: 0 0 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.top-media-link img.top-media-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;        /* crop to fill the 16:9 box */
  object-position: center;
}

/* ensure titles/meta/excerpt wrap nicely inside the cell */
.post-list h2 { margin: 0 0 8px; }

/* Pagination — styled, blocky, yellow */
.pagination .page-numbers {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  list-style: none;
}

/* list items (WP outputs <ul class="page-numbers"><li>... ) */
.pagination .page-numbers li {
  display: inline-block;
  margin: 0;
}

/* links and page numbers */
.pagination .page-numbers a,
.pagination .page-numbers span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;            /* blocky buttons */
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  background: var(--site-yellow);
  color: #000;
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
  transition: transform .08s ease, opacity .08s ease;
  line-height: 1;
}

/* current page */
.pagination .page-numbers .current,
.pagination .page-numbers .current:hover {
  background: var(--site-blue);
  color: #fff;
  cursor: default;
  transform: none;
}

/* hover state for links */
.pagination .page-numbers a:hover {
  opacity: 0.76;
}

/* prev/next arrow decoration (uses pseudo-elements so text remains accessible) */
.pagination .page-numbers a.prev::before {
  content: '◀';
  display: inline-block;
  margin-right: 8px;
  font-size: 0.95em;
  line-height: 1;
}
.pagination .page-numbers a.next::after {
  content: '▶';
  display: inline-block;
  margin-left: 8px;
  font-size: 0.95em;
  line-height: 1;
}

/* Tighter spacing for small pagination blocks */
.pagination .page-numbers li:first-child { margin-left: 0; }
.pagination .page-numbers li:last-child { margin-right: 0; }

/* Box shortcode — simple, full-width pull-quote / content block */
.boxincontent {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 28px 0;
  padding: 18px 20px;
  border-radius: 10px;
  background: rgba(53,101,143,0.06); /* subtle blue wash */
  border-left: 6px solid var(--site-yellow); /* accent */
  box-shadow: 0 6px 18px rgba(22,28,33,0.03);
  color: inherit;
  line-height: 1.45;
  overflow: hidden; /* contains floats/children */
}

.boxincontent h2, .boxincontent h3 {
  margin-top: 0;
}

/* Title inside box (many boxes use h3) */
.boxincontent h3 {
  margin: 0 0 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.1;
  color: var(--site-blue);
  letter-spacing: 0.3px;
}

/* Body text and lists */
.boxincontent p,
.boxincontent ul,
.boxincontent ol {
  margin: 0 0 0.65rem;
  color: inherit;
  font-size: 0.98rem;
}

/* Images and media inside the box */
.boxincontent img,
.boxincontent .top-media-img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 12px 0;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.05);
}

/* Ensure floated alignment inside the box doesn't break layout —
   convert legacy .alignleft / .alignright to simple blocks inside box */
.boxincontent .alignleft,
.boxincontent .alignright {
  float: none !important;
  display: block;
  margin: 0 auto 12px;
}

/* Tighter spacing when box appears near post navigation or headings */
.post + .boxincontent,
.boxincontent + .post {
  margin-top: 22px;
}

.cta-wrap { margin-top: 40px; margin-bottom: 40px; }
.cta-row { display: flex; gap: 12px; line-height: 1.3; text-align: center; align-items: center; justify-content: center; flex-wrap: wrap; }
.cta-btn { padding: 12px 18px; border-radius: 8px; text-decoration: none; font-weight: 600; font-family: 'Inter', sans-serif; box-shadow: none; border: 0; transition: opacity .12s ease; }
.cta-btn:hover { opacity: 0.9; }
.cta-btn.youtube { background: #f00; color: #fff; }
.cta-btn.patreon { background: var(--site-red); color: #fff; }

.author-box {
  margin-top: 40px;
  padding: 26px;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 10px;
  background: #ddd;

  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.author-photo {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.08);
}

.author-name {
  font-family: 'Oswald', sans-serif;
  font-size: 1.35rem;
  font-weight: 500;
  margin: 0 0 6px;
  color: var(--site-blue);
}

.author-bio {
  margin: 0 0 10px;
  font-size: 0.95rem;
  line-height: 1.45;
  color: rgba(0,0,0,0.78);
}

.author-links {
  margin-bottom: 0;
  display: inline-flex;
  gap: 28px;
  width: 100%;
}

.author-links a {
  color: var(--site-red);
  font-weight: 500;
}





/* --- DARK MODE --- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #181818;
    --text: #e7e7e7;
    --lt-blue: #9fc9e6;
  }

  body {
    background: var(--bg);
    color: var(--text);
  }

  header {
    background: #0f2a3a;
    color: #f6f6f6;
  }

  /* hero wrapper */
  .hero {
    color: #fff;
  }

  .hero h1.entry-title a {
    color: var(--site-yellow);
  }

  .hero .post-date {
    color: var(--lt-blue);
  }

  .hero .entry-content {
    color: rgba(255,255,255,0.88);
  }

  /* if hero uses a text excerpt */
  .hero .entry-content p {
    color: rgba(255,255,255,0.88);
  }

  /* post titles in the feed */
  .post-list .post-title a {
    color: var(--site-yellow);
  }

  /* date line */
  .post-date {
    color: var(--lt-blue);
  }

  /* excerpt text */
  .post-list .entry-excerpt,
  .post-list .entry-excerpt p {
    color: rgba(255,255,255,0.85);
  }
  
  main {
    background: #202020;
  }

  footer {
    background: #2f1a16;
    color: #f0e7e4;
  }

  .footer-links a:focus,
  .footer-links a:hover {
    color: var(--site-yellow);
  }

  h1 {
    color: var(--site-yellow);
  }

  h2 {
    color: #9fc9e6;
  }

  a {
    color: var(--site-yellow);
  }

  .post-meta-line {
    color: #9fc9e6;
  }

  .post-geo .pin-icon {
    fill: var(--site-red);
  }

  .post-geo .geo-text {
    color: var(--text);
  }

  .entry-content img,
  .single .entry img,
  .post img {
    border: 1px solid rgba(255,255,255,0.06);
  }

  .wp-caption-text,
  figure figcaption,
  .wp-block-image figcaption {
    color: rgba(255,255,255,0.65);
  }

  .entry-content img,
  .single .entry img,
  .post img,
  .wp-block-image img,
  figure img,
  .wp-caption img,
  .top-media-img,
  img.alignnone,
  img.aligncenter,
  .entry-content a img,
  .post a img {
    border: 1px solid rgba(255,255,255,0.04);
    box-shadow: 0 1px 0 rgba(0,0,0,0.45);
  }

  .post-tags a {
    background: rgba(255,255,255,0.18);
    color: #f3f3f3;
  }

  .post-tags a:hover {
    background: rgba(255,255,255,0.28);
  }

  .post-navigation {
    border-top: 1px solid rgba(255,255,255,0.12);
  }

  .nav-link {
    color: var(--site-yellow);
  }

  .nav-link.prev::before {
    border-right-color: var(--site-yellow);
  }

  .nav-link.next::after {
    border-left-color: var(--site-yellow);
  }

  .boxincontent {
    background: rgba(255, 223, 130, 0.06);
    border-left-color: var(--site-blue);
    box-shadow: 0 6px 18px rgba(0,0,0,0.45);
  }

  .boxincontent h3 {
    color: var(--site-yellow);
  }

  .boxincontent img {
    border: 1px solid rgba(255,255,255,0.04);
  }
}






/* ---------- Narrow / mobile tweaks (one breakpoint) ---------- */
/* Adjust max-width if you prefer slightly larger/smaller switch point */
@media (max-width: 760px) {

  /* slightly reduce inner padding on small screens */
  .inner {
    padding-left: 14px;
    padding-right: 14px;
  }

  /* Header: stack logo + controls vertically */
  .site-header .inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-left: 14px;
    padding-right: 14px;
  }

  /* Make logo smaller and centered */
  .site-logo {
    display: flex;
    justify-content: center;
  }
  .site-logo img {
    width: 200px;
    max-width: 80%;
    height: auto;
    display: block;
  }

  /* Header actions become full-width, wrap, and tighten spacing */
  .header-actions {
    order: 2;
    width: 100%;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-left: 0;
  }

  /* Make action buttons compact and flexible */
  .header-actions .btn,
  .header-actions .youtube-link,
  .header-actions a,
  .header-actions button {
    flex: 0 1 auto;
    min-width: 0;
    height: 36px;
    padding: 0 6px;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1;
  }

  /* Search: expand to available width and stack nicely */
  .search-form {
    order: 3;
    width: 100%;
    justify-content: flex-end;
  }
  .search-form input[type="search"] {
    width: 100%;
    max-width: none;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    transition: none;
  }
  .search-form:focus-within input[type="search"] {
    width: 100%;
  }

  /* Hero and headings: slightly smaller for narrow screens */
  h1 { font-size: 1.9rem; line-height: 1.4; }
  .hero .entry-title { font-size: 1.6rem; }

  /* Two-column feed -> single column */
  .post-list {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  /* Post navigation: allow full width, stack if needed */
  .post-navigation {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
  .nav-previous,
  .nav-next {
    max-width: 100%;
    width: 100%;
  }

  /* Post meta: stack small bits vertically for readability */
  .post-meta-line {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    row-gap: 6px;
  }
  .post-geo { width: 100%; margin-bottom: 6px; line-height: 1.2; }
  .hero .post-geo { order: 1; }
  .hero .post-date { order: 2; }

  /* Author box -> vertical layout */
  .author-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    padding: 18px;
  }

  /* Tighten some larger paddings used on desktop */
  main .inner { padding-top: 28px; padding-bottom: 28px; }
  footer .inner { padding-top: 20px; padding-bottom: 20px; }

  /* Make pagination buttons slightly smaller on phones */
  .pagination .page-numbers a,
  .pagination .page-numbers span {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 0.95rem;
  }

  /* Boxes and CTA: make full-width and stack controls */
  .boxincontent { padding: 14px 16px; margin: 20px 0; }
  .cta-row { flex-direction: column; gap: 10px; }

  /* Avoid floated images causing cramped text on narrow screens */
  img.alignleft, img.alignright {
    float: none !important;
    display: block;
    margin: 0 auto 12px;
  }

  /* Reduce spacing around large hero/top-media images */
  .hero { margin: 18px 0 22px; }
  .top-media { margin-bottom: 14px; }

  /* Keep video proportion and full-width */
  .video-wrap { margin-bottom: 12px; }

  /* Optional: reduce heavy box-shadows that look large on small screens */
  .boxincontent,
  .author-box {
    box-shadow: 0 4px 12px rgba(22,28,33,0.04);
  }

  .author-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
  }
  .author-links a {
    width: 100%;
  }
}


/* ----------------------
   Mobile hamburger + off-canvas menu
   Paste after existing mobile rules
   ---------------------- */

.hamburger-toggle {
  display: none; /* desktop hidden; shown in media query */
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 6px;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.hamburger-box { display:inline-flex; flex-direction:column; gap:4px; align-items:center; justify-content:center; }
.hamburger-bar {
  width:20px;
  height:2px;
  background:#fff;
  display:block;
  border-radius:2px;
  transition: transform .18s ease, opacity .18s ease;
}

/* overlay for dimming page; hidden by default */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
  z-index: 9997;
}

/* off-canvas panel */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 300px;
  max-width: 85%;
  background: #0f2a3a;
  color: #fff;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.2,.9,.2,1);
  z-index: 9998;
  display: flex;
  flex-direction: column;
  padding: 28px 18px;
  box-shadow: -8px 0 24px rgba(0,0,0,0.3);
}

/* mobile menu list */
.mobile-menu-list {
  list-style: none;
  padding: 0;
  margin: 0 0 auto;
}

.mobile-menu-list li {
  margin-bottom: 12px;
}

.mobile-menu-list a {
  display: block;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  padding: 10px 12px;
  border-radius: 8px;
  color: #fff;
}

.mobile-menu-list a:focus,
.mobile-menu-list a:hover {
  background: rgba(255,255,255,0.04);
  outline: none;
}

/* close in-menu control */
.mobile-menu-footer {
  margin-top: auto;
}

/* noscript fallback (visible only when JS disabled) */
.mobile-menu-noscript {
  display: none;
  background: #0f2a3a;
  padding: 12px;
  color: #fff;
}
.mobile-menu-noscript ul { list-style:none; margin:0; padding:0; }
.mobile-menu-noscript a { color:#fff; display:block; padding:8px 0; }

/* state when open — toggle with JS by adding .menu-open to <body> */
body.menu-open .mobile-menu {
  transform: translateX(0);
}
body.menu-open .mobile-menu-overlay {
  opacity: 1;
  visibility: visible;
}

/* animate hamburger into an "X" when open */
body.menu-open .hamburger-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.menu-open .hamburger-bar:nth-child(2) { opacity: 0; transform: scaleX(.1); }
body.menu-open .hamburger-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Focus styles */
.hamburger-toggle:focus,
.mobile-menu-close:focus,
.mobile-menu-list a:focus {
  outline: 2px solid rgba(255,255,255,0.3);
  outline-offset: 2px;
}

/* Mobile header: top row with hamburger, centered logo, search on right.
   Replace previous mobile stacking rules with this block. */

@media (max-width:760px) {
  .site-header .inner {
    flex-direction: row;         /* single top row */
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-left: 14px;
    padding-right: 14px;
  }

  /* hamburger: left */
  .hamburger-toggle {
    display: inline-flex;
    order: 1;
    margin-right: 6px;
    background: transparent;
  }

  /* logo: centered visually — allow it to grow and center */
  .site-logo {
    order: 2;
    display: flex;
    justify-content: center;
    flex: 1 1 auto;              /* take remaining space so logo stays centered */
  }
  .site-logo img {
    width: 200px;
    max-width: 70%;
    height: auto;
  }

  /* hide search in top header */
  .search-form {
    display: none;
  }

  /* let logo actually be the visual focus */
  .site-logo {
    flex: 1 1 auto;
  }

  .site-logo img {
    width: 240px;      /* bump back up */
    max-width: 85%;
  }

.mobile-menu-search {
  margin-bottom: 16px;
}

.mobile-menu-search input[type="search"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-size: 1rem;
}

.mobile-menu-search input::placeholder {
  color: rgba(255,255,255,0.7);
}

/* Hide only the CTA buttons (YouTube/Newsletter/Patreon), keep search visible */
  .header-actions {
    /* keep as a container for search if you prefer — hide CTA buttons inside it */
    display: flex;
    gap: 8px;
    align-items: center;
  }
  .header-actions .youtube-link,
  .header-actions .btn-newsletter,
  .header-actions .btn-patreon {
    display: none !important;   /* hide CTAs on top bar; they'll be in the off-canvas menu */
  }

  /* mobile-menu-noscript shown only when JS is disabled — keep it but hidden by JS on load */
  .mobile-menu-noscript { display: block; }

  /* ensure overlay/menu states still work as before */
  body.menu-open .mobile-menu { transform: translateX(0); }
  body.menu-open .mobile-menu-overlay { opacity: 1; visibility: visible; }

  .header-actions {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* ensure logo won't shrink and stays centered */
  .site-logo {
    flex: 1 0 auto;
    justify-content: center;
  }
}