/* ==========================================================================
   QUBIT.MK — custom.css
   ========================================================================== */

/* ==========================================================================
   1) TOKENS
   ========================================================================== */
:root{
  /* Qubit palette */
  --qubit-1: #004D81; /* blue */
  --qubit-2: #047101; /* green */
  --qubit-3: #B51700; /* red */
  --qubit-4: #FF9400; /* yellow */

  --brand-black: #000;

  /* Layout */
  --header-h: 80px;
  --header-border: 2px;
  --header-offset: calc(var(--header-h) + var(--header-border));

  --container-max: 1240px;
  --narrow-max: 800px;

  /* Hero image sizing (used by template-home_page) */
  --hero-img-h: 351px;
  --hero-img-w: 849px;

  /* Corner cuts */
  --cut: 18px;
}

/* ==========================================================================
   2) BASE / DOCUMENT
   ========================================================================== */
html, body{
  height: 100%;
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
}

body{
  font-family: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  background: #fff;
  color: #000;

  /* sticky footer */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Layout wrappers */
#page-wrapper,
#page.site{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#content.site-content{ flex: 1 0 auto; }

.site-main,
main.site-main{
  flex: 1 0 auto;
  padding-top: var(--header-offset);
  padding-bottom: 2rem;
}

.site-footer,
footer.site-footer{
  margin-top: auto;
}

/* Global links */
a{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: none; }

/* Prevent scroll when overlays are open */
body.menu-open,
body.search-open{
  overflow: hidden;
}

/* Your JS uses menu-open to lock body (keep it, but avoid weird width jumps) */
body.menu-open{
  position: fixed !important;
  width: 100%;
}

/* Bootstrap containers: cap at 1240 on large screens */
@media (min-width: 1200px){
  .container,
  .container-lg,
  .container-xl,
  .container-xxl{
    max-width: var(--container-max) !important;
  }
}

.skip-link.screen-reader-text{
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link.screen-reader-text:focus{
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  overflow: visible;
  z-index: 9999;
  padding: 0.75rem 1rem;
  background: #000;
  color: #fff;
  text-decoration: none;
  border: 2px solid #fff;
}

/* ==========================================================================
   3) UTILITY — ANGLED CORNERS (top-left + bottom-right)
   Uses inset shadow for a consistent “stroke”
   ========================================================================== */
.hp-card,
.hp-pill,
.hp-details{
  --stroke: 1px;
  --hp-border: #000;

  position: relative;
  border: 0;
  box-shadow: inset 0 0 0 var(--stroke) var(--hp-border);
  overflow: hidden;

  clip-path: polygon(
    var(--cut) 0,
    100% 0,
    100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%,
    0 100%,
    0 var(--cut)
  );
}

/* Smaller cuts for pills */
.hp-pill{ --cut: 12px; }

/* Top-left wedge */
.hp-card::before,
.hp-pill::before,
.hp-details::before{
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: var(--cut);
  height: var(--cut);
  background: var(--hp-border);
  clip-path: polygon(0 0, 100% 0, 0 100%);
  pointer-events: none;
}

/* Bottom-right wedge */
.hp-card::after,
.hp-pill::after,
.hp-details::after{
  content: "";
  position: absolute;
  right: 0; bottom: 0;
  width: var(--cut);
  height: var(--cut);
  background: var(--hp-border);
  clip-path: polygon(100% 100%, 0 100%, 100% 0);
  pointer-events: none;
}

/* ==========================================================================
   4) HEADER (fixed + translucent)
   ========================================================================== */
.site-header{
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 1030;

  background: rgba(255,255,255,.85) !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.site-header .navbar{
  background: transparent !important;
  border-bottom: var(--header-border) solid #000;
  padding: 0;
}

.header-inner{
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 10px;
  min-height: var(--header-h);
  position: relative;
}

/* Brand / Logo */
.navbar-brand{
  display: flex;
  align-items: center;
  padding: 0;
  margin: 0;
}

.custom-logo{
  display: block;
  width: auto;
  height: auto;
  max-height: 70px !important;
  transition: max-height .3s;
}
.site-header.shrink .custom-logo{ max-height: 38px; }

/* Desktop menu wrapper */
@media (min-width: 992px){
  .main-menu{
    margin-left: auto;
    margin-right: 40px;
  }
}

/* Menu list + links (DESKTOP) */
.site-header .navbar-nav{
  display: flex;
  gap: 2.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-header .navbar-nav > li > a,
.site-header .navbar-nav > li > a:visited{
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .45rem .65rem;

  font-size: 1rem;
  font-weight: 400;
  color: var(--brand-black) !important;
  transition: background .18s ease, color .18s ease;
}

/* Hover + active + focus */
.site-header .navbar-nav > li:hover > a,
.site-header .navbar-nav > li.current-menu-item > a,
.site-header .navbar-nav > li.current-menu-ancestor > a,
.site-header .navbar-nav > li:hover > a:visited{
  background: #000;
  color: #fff !important;
}

.site-header .navbar-nav > li.current-menu-item > a,
.site-header .navbar-nav > li.current-menu-ancestor > a{
  font-weight: 700;
}

.site-header .navbar-nav > li > a:focus-visible{
  outline: 2px solid #000;
  outline-offset: 3px;
  background: #000;
  color: #fff !important;
}

/* Random qubit icon next to menu label */
.qubit-menu-icon i{
  font-size: 1.05em;
  line-height: 1;
}
.qubit-menu-label{ display: inline-block; }

/* Header actions */
.header-actions{
  display: flex;
  align-items: center;
  margin-left: auto;
}

.search-toggle{
  display: flex;
  align-items: center;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--brand-black);
  font-size: 1.5rem;
}

/* ==========================================================================
   5) SEARCH OVERLAY (full screen)
   ========================================================================== */
.search-overlay{
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;

  background: rgba(255,255,255,.98);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;

  padding: 24px;
}

.search-overlay .search-form{
  width: min(720px, 92vw);
}

.search-overlay .search-form input{
  width: 100%;
  border: 0;
  border-bottom: 2px solid #222;
  font-size: clamp(1.6rem, 4vw, 3rem);
  outline: none;
  background: transparent;
  color: #000;
  text-align: center;
  padding: 12px 8px;
}

.search-close{
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: 0;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
}

/* ==========================================================================
   6) OFFCANVAS (mobile menu)
   ========================================================================== */
.main-offcanvas{
  --bs-offcanvas-width: min(420px, 100vw);
  --bs-offcanvas-bg: #fff;
  --bs-offcanvas-transition: transform .45s cubic-bezier(.22,.61,.36,1);

  box-shadow: -16px 0 40px rgba(0,0,0,.12);
  border-left: 0;
  will-change: transform;
}

/* Slide-in animation */
.main-offcanvas.offcanvas-end{
  right: 0;
  left: auto;
  transform: translateX(100%);
  transition: transform .45s cubic-bezier(.22,.61,.36,1);
}
.main-offcanvas.offcanvas-end.show{ transform: translateX(0); }

/* Backdrop animation */
.offcanvas-backdrop.fade{ transition: opacity .45s cubic-bezier(.22,.61,.36,1); }
.offcanvas-backdrop.show{ opacity: .25; }

/* Offcanvas header branding */
.main-offcanvas .offcanvas-header{ padding: 18px 20px; }
.main-offcanvas .offcanvas-brand{
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.main-offcanvas .qubit-offcanvas-logo{
  max-height: 44px;
  width: auto;
  height: auto;
  display: block;
}
.main-offcanvas .qubit-offcanvas-logo-text{
  font-weight: 700;
  letter-spacing: .02em;
}

/* Mobile menu structure */
.main-offcanvas .mobile-main-menu .navbar-nav{
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-offcanvas .mobile-main-menu a,
.main-offcanvas .mobile-main-menu a:visited{
  color: #111 !important;
  font-family: inherit;
}

/* Top-level links */
.main-offcanvas .mobile-main-menu .navbar-nav > li > a{
  display: block;
  text-align: left;
  padding: 1rem 1.25rem 1rem 1.5rem;

  font-size: 1.08rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;

  border-bottom: 1px solid rgba(0,0,0,.08);
}

/* Active state (no purple visited) */
.main-offcanvas .mobile-main-menu .navbar-nav > li.current-menu-item > a,
.main-offcanvas .mobile-main-menu .navbar-nav > li.current-menu-ancestor > a{
  color: #000 !important;
}

/* Submenu */
.main-offcanvas .mobile-main-menu .navbar-nav .sub-menu{
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-offcanvas .mobile-main-menu .navbar-nav .sub-menu > li > a{
  display: block;
  text-align: left;
  padding: .8rem 1.25rem .8rem 2.35rem;

  font-size: .98rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;

  color: #111 !important;
  border-bottom: 1px solid #f0f0f0;
}

/* Items with children indicator */
.main-offcanvas .mobile-main-menu .navbar-nav > li.menu-item-has-children > a{
  position: relative;
  padding-right: 3rem;
}
.main-offcanvas .mobile-main-menu .navbar-nav > li.menu-item-has-children > a::after{
  content: "▾";
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: .85rem;
  color: #999;
}

/* ==========================================================================
   7) HOME PAGE — HERO
   ========================================================================== */
.home-hero-static{
  height: var(--hero-img-h);
  background-color: #B1D7FE;

  background-image: var(--hero-img);
  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: var(--hero-img-w) var(--hero-img-h);

  position: relative;
  margin-top: 0 !important;
}

.home-hero-static .home-hero-inner{
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 20rem;
  padding-right: 16px;
}

.home-hero-static .home-hero-meta{
  max-width: 400px;
  text-align: left;
}

/* Home: if no hero, push first section down a bit */
.page-template-template-home_page .site-main.no-hero .home-post-section:first-of-type{
  padding-top: 28px;
}

@media (max-width: 1200px){
  .home-hero-static{ background-size: 820px auto; }
}
@media (max-width: 992px){
  .home-hero-static{ background-size: 680px auto; min-height: 520px; }
}
@media (max-width: 768px){
  .home-hero-static{
    background-size: 520px auto;
    min-height: 420px;
    background-position: right bottom;
  }
}
@media (max-width: 767.98px){
  .home-hero-static .home-hero-inner{
    padding-left: 16px;
    padding-top: 18px;
  }
}

/* Max width 1240px for homepage content (if used by template) */
.page-template-template-home_page .container-1440{
  max-width: var(--container-max);
}

/* ==========================================================================
   8) HOME PAGE — GRID (Option B: CSS Grid, NO gaps)
   ========================================================================== */
.page-template-template-home_page .home-post-section .row{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0; /* kill Bootstrap negative margins */
}

/* Remove Bootstrap col padding so items touch */
.page-template-template-home_page .home-post-section .row > [class*="col"]{
  padding: 0 !important;
  margin: 0 !important;
  width: auto !important;
  max-width: none !important;
  flex: none !important;
}

/* Card shell */
.home-post-card{ position: relative; }

/* Click area */
.home-thumb-link{ display: block; text-decoration: none; }

/* Square cover */
.home-thumb{
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #eaeaea;
}

/* Cover image */
.home-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform .25s ease;
}
.home-thumb-link:hover .home-thumb img{ transform: scale(1.03); }

/* Overlay (bubble only behind text) */
.home-thumb-overlay{
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;

  display: flex;
  justify-content: flex-start;
  align-items: flex-end;

  opacity: 0;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none; /* keep whole tile clickable */
}

.home-thumb-overlay-inner{
  display: inline-block;
  max-width: 100%;
  background: rgba(255,255,255,.85);
  padding: 10px 12px;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.home-thumb-link:hover .home-thumb-overlay,
.home-thumb-link:focus-visible .home-thumb-overlay{
  opacity: 1;
  transform: translateY(0);
}

.home-thumb-title{
  font-weight: 700;
  color: #000;
  font-size: 1.2rem;
  line-height: 1.2;
  margin-bottom: 6px;

  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-thumb-meta{
  font-size: .9rem;
  line-height: 1.2;
  color: #000;
  opacity: .85;

  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.home-thumb-sep{ opacity: .6; }

/* Responsive: 2 per row tablet, 1 per row mobile */
@media (max-width: 991.98px){
  .page-template-template-home_page .home-post-section .row{
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 575.98px){
  .page-template-template-home_page .home-post-section .row{
    grid-template-columns: 1fr;
  }
}

/* Section title underline colors */
.page-template-template-home_page .section-title{
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}
.page-template-template-home_page .section-title::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  width: 110%;
  background: var(--section-accent, var(--qubit-1));
}

/* cycle per section */
.page-template-template-home_page .home-post-section:nth-of-type(1) .section-title{ --section-accent: var(--qubit-1); }
.page-template-template-home_page .home-post-section:nth-of-type(2) .section-title{ --section-accent: var(--qubit-2); }
.page-template-template-home_page .home-post-section:nth-of-type(3) .section-title{ --section-accent: var(--qubit-3); }
.page-template-template-home_page .home-post-section:nth-of-type(4) .section-title{ --section-accent: var(--qubit-4); }
.page-template-template-home_page .home-post-section:nth-of-type(5) .section-title{ --section-accent: var(--qubit-1); }
.page-template-template-home_page .home-post-section:nth-of-type(6) .section-title{ --section-accent: var(--qubit-2); }

/* HOME: "More" button should be black text */
.section-more,
.section-more:visited,
.section-more:hover,
.section-more:active,
.section-more:focus{
  color: #000 !important;
}
.section-more i{
  color: #000 !important;
  --fa-primary-color: #000 !important;
  --fa-secondary-color: #000 !important;
}

/* ==========================================================================
   HOME PAGE — SECTION HEADER / MORE BUTTON
   ========================================================================== */

.page-template-template-home_page .section-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.page-template-template-home_page .section-title{
  margin: 0;
}

.page-template-template-home_page .section-more,
.page-template-template-home_page .section-more.section-more--btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  flex-shrink: 0;
  text-decoration: none;
  white-space: nowrap;
}

.page-template-template-home_page .section-more i,
.page-template-template-home_page .section-more.section-more--btn i{
  line-height: 1;
}

/* Mobile: show only arrow icon, keep text in HTML for SEO/accessibility */
@media (max-width: 767.98px){
  .page-template-template-home_page .section-head{
    align-items: center;
  }

  .page-template-template-home_page .section-title{
    margin-right: auto;
  }

  .page-template-template-home_page .section-more,
  .page-template-template-home_page .section-more.section-more--btn{
    min-width: 44px;
    min-height: 44px;
    padding: 0 !important;
    gap: 0 !important;
  }

  .page-template-template-home_page .section-more-text{
    display: none !important;
  }

  .page-template-template-home_page .section-more i,
  .page-template-template-home_page .section-more.section-more--btn i{
    display: inline-block !important;
    font-size: 1.25rem;
    line-height: 1;
    margin: 0 !important;
  }
}

/* ==========================================================================
   HOME — PHRASES
   ========================================================================== */
.page-template-template-home_page .home-phrase-wrap{
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 22px 0;
}

.page-template-template-home_page .home-phrase{
  width: 100%;
  background: var(--phrase-bg, #000);
  color: var(--phrase-fg, #fff);

  text-align: center;
  font-weight: 700;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  line-height: 1.3;

  padding: 18px 20px;
}

/* ==========================================================================
   9) CATEGORY + TAG ARCHIVE — same grid as Home
   ========================================================================== */
.category .home-post-section .row,
.tag .home-post-section .row{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0;
}

.category .home-post-section .row > [class*="col"],
.tag .home-post-section .row > [class*="col"]{
  padding: 0 !important;
  margin: 0 !important;
  width: auto !important;
  max-width: none !important;
  flex: none !important;
}

@media (max-width: 991.98px){
  .category .home-post-section .row,
  .tag .home-post-section .row{
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 575.98px){
  .category .home-post-section .row,
  .tag .home-post-section .row{
    grid-template-columns: 1fr;
  }
}

.archive-header{ padding-top: 8px; }
.category-author-filter-wrap{ padding-bottom: 1.5rem; }

/* Title underline like Home */
.category .section-title,
.tag .section-title{
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}

.category .section-title::after,
.tag .section-title::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  width: 110%;
  background: var(--section-accent, var(--qubit-1));
}

/* Same top spacing for both */
.category .category-title-head,
.tag .category-title-head{
  margin-top: 2rem;
}

/* ==========================================================================
   CATEGORY — Filter by Author buttons (menu-button feel)
   ========================================================================== */
.filter-by-author-label{
  font-size: 0.95rem;
  opacity: .85;
}

.author-filter-btn,
.author-filter-btn:visited{
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .8rem;
  text-decoration: none;
  color: #111;
  background: #fff;
  transition: background .16s ease, color .16s ease;
  line-height: 1.1;
}

.author-filter-btn:hover,
.author-filter-btn.is-active{
  background: #111;
  color: #fff;
}

/* Ensure visited never overrides active/hover */
.author-filter-btn:hover:visited,
.author-filter-btn.is-active:visited{
  color: #fff;
}

.qubit-badge{
  display:inline-flex;
  align-items:center;
  transform: translateY(-1px);
}

.author-filter-btn .author-filter-text{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

/* ==========================================================================
   10) SINGLE POST
   ========================================================================== */
.post-body{
  max-width: 850px;
  margin-left: auto;
  margin-right: auto;
  overflow-wrap: anywhere;
}

/* Typography */
.single-post .post-content{
  font-size: 1.2rem !important;
  line-height: 1.7;
}
.single-post .post-content p,
.single-post .post-content li,
.single-post .post-content blockquote,
.single-post .post-content a,
.single-post .post-content figcaption{
  font-size: 1.2rem !important;
}

/* Media containment */
.single-post .post-body img,
.single-post .post-body video,
.single-post .post-body iframe,
.single-post .post-body embed,
.single-post .post-body object{
  max-width: 100% !important;
  height: auto;
  display: block;
}

/* Gutenberg wide/full should stay inside column */
.single-post .post-body .alignwide,
.single-post .post-body .alignfull{
  width: 100% !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Responsive embeds */
.single-post .post-body .wp-block-embed,
.single-post .post-body figure.wp-block-embed{
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.single-post .post-body .wp-block-embed__wrapper{
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.single-post .post-body .wp-block-embed__wrapper iframe,
.single-post .post-body iframe{
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
  display: block;
}

/* Tables & code */
.single-post .post-body table{
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  word-break: break-word;
}
.single-post .post-body .wp-block-table,
.single-post .post-body table.wp-block-table{
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.single-post .post-body pre{ overflow-x: auto; }

/* Lists inside post body */
.single-post .post-body ul,
.single-post .post-body ol{ padding-left: 1.2em; }

/* Prevent long strings from blowing layout */
.single-post .post-body blockquote,
.single-post .post-body p,
.single-post .post-body li,
.single-post .post-body h1,
.single-post .post-body h2,
.single-post .post-body h3,
.single-post .post-body h4,
.single-post .post-body h5,
.single-post .post-body h6,
.single-post .post-body a{
  overflow-wrap: anywhere;
  word-break: break-word;
}

.single-post .post-meta{
  font-size: 1rem;
  line-height: 1.4;
  opacity: 0.85;
}

/* Author link: clean by default, underline on hover only */
.single-post .post-meta a.post-author,
.single-post .post-meta a.post-author:visited{
  color: #000;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
.single-post .post-meta a.post-author:hover{ opacity: 0.9; }

/* Latest posts grid (single post) */
.latest-grid img{ width: 100%; height: auto; display: block; }
.latest-thumb{ position: relative; overflow: hidden; }
.latest-thumb img{
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.latest-title{ font-size: 1.2rem; line-height: 1.4; }
.latest-title a{ color: inherit; text-decoration: none; }

/* Share icons: never underlined */
.single-post .post-share a,
.single-post .post-share a:hover,
.single-post .post-share a:focus,
.single-post .post-share a:focus-visible{
  text-decoration: none !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  background-image: none !important;
}

/* ==========================================================================
   11) AUTHOR ARCHIVE
   ========================================================================== */
.author-archive .author-container{
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 12px;
}

.author-archive .author-bio{
  max-width: 60ch;
  opacity: 0.9;
}

.author-cat-count{
  font-weight: 400;
  opacity: 0.65;
  margin-left: .25rem;
}

/* Category titles: underline + cycling colors */
.author-archive .section-title{
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}
.author-archive .section-title::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  width: 110%;
  background: var(--section-accent, var(--qubit-1));
}
.author-archive .section-title a{ color: inherit; text-decoration: none; }

.author-archive .home-post-section:nth-of-type(1) .section-title{ --section-accent: var(--qubit-1); }
.author-archive .home-post-section:nth-of-type(2) .section-title{ --section-accent: var(--qubit-2); }
.author-archive .home-post-section:nth-of-type(3) .section-title{ --section-accent: var(--qubit-3); }
.author-archive .home-post-section:nth-of-type(4) .section-title{ --section-accent: var(--qubit-4); }
.author-archive .home-post-section:nth-of-type(5) .section-title{ --section-accent: var(--qubit-1); }
.author-archive .home-post-section:nth-of-type(6) .section-title{ --section-accent: var(--qubit-2); }

.author-archive .home-post-section .row{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0;
}
.author-archive .home-post-section .row > [class*="col"]{
  padding: 0 !important;
  margin: 0 !important;
  width: auto !important;
  max-width: none !important;
  flex: none !important;
}
@media (max-width: 991.98px){
  .author-archive .home-post-section .row{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575.98px){
  .author-archive .home-post-section .row{ grid-template-columns: 1fr; }
}

.author-archive .section-title-link,
.author-archive .section-title-link:hover{
  color: inherit;
  text-decoration: none;
}

.author-archive .author-filter-subtitle{
  font-size: 1.1rem;
  opacity: .9;
}
.author-archive .author-filter-subtitle a{
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
.author-archive .author-filter-subtitle a:hover{ opacity: 1; }

/* ==========================================================================
   12) PAGES (default content width + rich text)
   ========================================================================== */
.page-narrow{
  max-width: var(--narrow-max);
  margin-left: auto;
  margin-right: auto;
}

.page-title{
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* Rich text scope */
.page-narrow,
.post-body,
.wp-block-post-content,
.entry-content{
  line-height: 1.75;
}

/* Lists: restore bullets & numbering */
.page-narrow ul,
.post-body ul,
.wp-block-post-content ul,
.entry-content ul{
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0 0 1rem 0;
}

.page-narrow ol,
.post-body ol,
.wp-block-post-content ol,
.entry-content ol{
  list-style: decimal;
  padding-left: 1.25rem;
  margin: 0 0 1rem 0;
}

.page-narrow li,
.post-body li,
.wp-block-post-content li,
.entry-content li{
  list-style: inherit;
  margin: 0.25rem 0;
}

.page-narrow ul ul,
.page-narrow ol ol,
.post-body ul ul,
.post-body ol ol,
.entry-content ul ul,
.entry-content ol ol{
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Links in content */
.page-narrow a,
.post-body a,
.wp-block-post-content a,
.entry-content a{
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

.page-narrow a:hover,
.post-body a:hover,
.wp-block-post-content a:hover,
.entry-content a:hover{
  background: #000;
  color: #fff !important;
  text-decoration: none;
  padding: 0 2px;
}

/* Paragraph spacing */
.page-narrow p,
.post-body p,
.entry-content p{
  margin: 0 0 1rem 0;
}

.page-content-typography{
  font-size: 1.2rem !important;
  line-height: 1.7;
}

/* ==========================================================================
   ARCHIVE / EXPLORE PAGE (Categories / Tags / Authors)
   ========================================================================== */

.archive-index-page .page-title{
  margin-bottom: 1.2rem;
}

/* 3 blocks grid (Categories / Tags / Authors) */
.archive-index-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

@media (min-width: 992px){
  .archive-index-grid{
    grid-template-columns: repeat(3, 1fr);
    gap: 2.2rem;
  }
}

.archive-index-block{
  border-top: 1px solid #ccc;
  padding-top: 1.2rem;
}

.archive-index-title{
  font-size: 1.1rem;
  margin: 0 0 1rem 0;
}

/* Links inside each block: wrap based on available space (chip layout) */
.archive-index-links{
  display: flex;
  flex-wrap: wrap;
  gap: .6rem .8rem; /* row gap | column gap */
  width: 100%;
  align-items: center;
}

/* Explore “chip” buttons: width depends on text */
.archive-index-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;                 /* <- important */
  max-width: 100%;
  padding: .35rem .7rem;
  text-decoration: none;
  color: #000 !important;
  border: 1px solid #000;
  background: transparent;
  transition: background .18s ease, color .18s ease;
  white-space: nowrap;         /* keep chip on one line */
}

/* If you have very long tag/category names, allow breaking instead:
.archive-index-link{ white-space: normal; }
*/

.archive-index-link:visited{
  color: #000 !important;
}

.archive-index-link:hover,
.archive-index-link:focus{
  background: #000;
  color: #fff !important;
}

.archive-index-empty{
  margin: 0;
  opacity: .75;
}

/* Categories block spans full width so the card grid has room */
.archive-index-block--categories{
  grid-column: 1 / -1;
}

/* Tags block spans full width — 6-col card grid */
.archive-index-block--tags{
  grid-column: 1 / -1;
}

/* Authors block spans full width — chip list */
.archive-index-block--authors{
  grid-column: 1 / -1;
}

/* ---- Explore: Category Cards ---- */
.explore-cat-card{
  display: block;
  text-decoration: none;
  color: #000;
}

.explore-cat-card:hover,
.explore-cat-card:focus{
  color: #000;
  text-decoration: none;
}

.explore-cat-thumb{
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f0f0f0;
}

.explore-cat-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}

.explore-cat-card:hover .explore-cat-thumb img,
.explore-cat-card:focus .explore-cat-thumb img{
  transform: scale(1.04);
}

.explore-cat-label{
  margin-top: .6rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
}

/* ==========================================================================
   TAG/CATEGORY HEADER: title (left) + back link (right)
   ========================================================================== */

.archive-title-row{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap; /* narrow screens: link drops below */
}

.archive-title-row .section-title{
  margin: 0;
}

/* Tag/Category back link (different class than Explore chips) */
.tag-back-link{
  display: inline-block;
  padding: 0;
  white-space: nowrap;
  text-decoration: none;
  color: #000 !important;
  background: transparent !important;
  border: 0 !important;
}

.tag-back-link:visited{
  color: #000 !important;
}

.tag-back-link:hover,
.tag-back-link:focus{
  color: #000 !important;
  background: transparent !important;
  border: 0 !important;
}

/* ==========================================================================
   13) FOOTER
   ========================================================================== */
.site-footer,
.frontpage-footer{
  font-size: 1.2em;
  background: #fff;
  color: #000;
  border-top: 1px solid #ccc;
  padding: 1rem 0;
  width: 100%;
}

/* FULL WIDTH like navbar (no max-width cap) */
.footer-inner{
  width: 100%;
  margin: 0;
  padding: 0 1.5rem; /* match navbar side padding */
}

/* ONE ROW (desktop): left (footer page content) | right (footer menu links) */
.footer-row{
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
}

.footer-left{
  justify-self: start;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.footer-right{
  justify-self: end;
  display: flex;
  justify-content: flex-end;
}

/* Footer editor content */
.footer-text > *:last-child{ margin-bottom: 0; }

/* Footer Menu (Disclaimer / Privacy Policy) */
.footer-menu{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: .75rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer-menu a,
.footer-menu a:visited{
  display: inline-block;
  padding: .35rem .85rem;
  text-decoration: none;
  background: transparent;
  color: #000 !important;
  line-height: 1.2;
}

.footer-menu a:hover,
.footer-menu a:focus,
.footer-menu a:hover:visited,
.footer-menu a:focus:visited{
  background: #000;
  color: #fff !important;
}

.footer-menu .current-menu-item > a,
.footer-menu .current_page_item > a,
.footer-menu .current-menu-item > a:visited,
.footer-menu .current_page_item > a:visited{
  background: #000;
  color: #fff !important;
}

/* Socials */
.footer-social{
  display: flex;
  gap: 14px;
  align-items: center;
}

.footer-social-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #000 !important;
  text-decoration: none;
}

.footer-social-link i{
  font-size: 1.5rem;
  line-height: 1;
}

/* Mobile: two rows, centered */
@media (max-width: 576px){
  .footer-row{
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .footer-left,
  .footer-right{
    justify-self: center;
  }

  .footer-right{
    justify-content: center;
    margin-top: .5rem;
  }

  .footer-menu{ justify-content: center; }
}

/* ==========================================================================
   14) PAGINATION
   ========================================================================== */
nav.pagination{
  text-align: center;
  margin: 2rem 0;
}

nav.pagination ul.pagination{
  margin: 0;
  padding: 0;
  list-style: none;
  display: inline-flex;
  gap: .5rem;
}

nav.pagination ul.pagination .page-item{ margin: 0; }

nav.pagination ul.pagination .page-link{
  display: inline-block;
  padding: .5rem .75rem;
  border: 2px solid #000;
  background: transparent;
  color: #000;
  text-decoration: none;
  font-weight: 400;
  line-height: 1;
  border-radius: 0;
}

nav.pagination ul.pagination .page-link:hover{
  background: #000;
  color: #fff;
}

nav.pagination ul.pagination .page-link.current,
nav.pagination ul.pagination .page-link.current:hover{
  background: #000;
  color: #fff;
  font-weight: 600;
  cursor: default;
}

nav.pagination ul.pagination .page-link:focus{
  box-shadow: none;
  outline: none;
}