/*
Theme Name: Inclusive Bytes
Theme URI: https://start.inclusivebytes.org/
Author: Inclusive Bytes
Author URI: https://start.inclusivebytes.org/
Description: A responsive, accessibility-first WordPress theme built to the Inclusive Bytes brand guidelines — JunkDog display headings, Inter body text, the eight-colour palette, and the six-colour brand stripe. Ships three page layouts: Home, Page, and Blog (posts grid). Digital for all.
Version: 1.7.3
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: inclusive-bytes
Tags: blog, one-column, two-columns, right-sidebar, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready, accessibility-ready, block-styles, wide-blocks
*/

/* =========================================================================
   1. Brand tokens
   ========================================================================= */
:root {
  --ib-charcoal:   #333333;
  --ib-light-grey: #DDDDDD;
  --ib-yellow:     #F9C80E;
  --ib-green:      #51CB20;
  --ib-magenta:    #C52184;
  --ib-purple:     #670FFF;
  --ib-cyan:       #0EE5F9;
  --ib-coral:      #F94144;
  --ib-white:      #FFFFFF;
  --ib-black:      #000000;
  --ib-paper:      #F5F5F2;

  --ib-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --ib-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --ib-display: 'JunkDog', 'Arial Black', 'Inter', sans-serif;

  --ib-content-width: 760px;
  --ib-wide-width: 1100px;
  --ib-gutter: 32px;

  --ib-radius: 0px;          /* brand is hard-edged; keep corners square */
  --ib-border: 2px solid var(--ib-charcoal);
  --ib-hairline: 1px solid var(--ib-light-grey);
}

/* =========================================================================
   2. Local brand display font (JunkDog). Inter loads via Google Fonts.
   ========================================================================= */
@font-face {
  font-family: 'JunkDog';
  src: url('assets/fonts/JunkDog-Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* =========================================================================
   3. Reset & base
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--ib-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ib-charcoal);
  background: var(--ib-paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video, embed, iframe, object { max-width: 100%; height: auto; }
img { display: block; }

a {
  color: var(--ib-purple);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
a:hover, a:focus { text-decoration-thickness: 2px; }

hr {
  border: none;
  border-top: var(--ib-hairline);
  margin: 40px 0;
}

/* Consistent, visible focus outline everywhere — accessibility-first brand */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--ib-purple);
  outline-offset: 2px;
}

/* =========================================================================
   4. Typography
   ========================================================================= */
h1, h2, h3, h4, h5, h6 {
  color: var(--ib-charcoal);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}

/* JunkDog is a display face — big titles only (H1, H2). It degrades under
   ~30px, so H3 and below stay on Inter, per the brand guidelines. */
h1, h2 {
  font-family: var(--ib-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.05;
  font-weight: normal;
}
h1 { font-size: clamp(2.4rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.9rem, 4.5vw, 2.4rem); }
h3 { font-family: var(--ib-sans); font-size: 1.35rem; font-weight: 600; }
h4 { font-family: var(--ib-sans); font-size: 1.1rem; font-weight: 600; }
h5 { font-family: var(--ib-sans); font-size: 1rem; font-weight: 600; letter-spacing: 0.02em; }
h6 {
  font-family: var(--ib-sans);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.7;
}

p { margin: 0 0 1.2em; }
strong, b { font-weight: 600; }

blockquote {
  margin: 32px 0;
  padding: 20px 28px;
  background: var(--ib-charcoal);
  color: var(--ib-white);
  border-left: 6px solid var(--ib-yellow);
}
blockquote p:last-child { margin-bottom: 0; }
blockquote cite { display: block; margin-top: 8px; font-size: 0.85rem; opacity: 0.75; font-style: normal; }

code, kbd, pre, samp { font-family: var(--ib-mono); font-size: 0.9em; }
code {
  background: var(--ib-light-grey);
  padding: 0.15em 0.4em;
  color: var(--ib-charcoal);
}
pre {
  background: var(--ib-charcoal);
  color: var(--ib-white);
  padding: 20px 24px;
  overflow-x: auto;
  border-left: 6px solid var(--ib-cyan);
}
pre code { background: none; color: inherit; padding: 0; }

ul, ol { margin: 0 0 1.2em; padding-left: 1.4em; }
li { margin-bottom: 0.4em; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  background: var(--ib-white);
  border: var(--ib-border);
}
th, td { text-align: left; padding: 14px 18px; border-bottom: var(--ib-hairline); vertical-align: top; }
tr:last-child td { border-bottom: none; }
th {
  background: var(--ib-charcoal);
  color: var(--ib-white);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
}

/* =========================================================================
   5. Layout
   ========================================================================= */
.container {
  width: 100%;
  max-width: var(--ib-wide-width);
  margin-inline: auto;
  padding-inline: var(--ib-gutter);
}

.site { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1 0 auto; padding: 56px 0; }

/* Full container width, left-aligned — page/post content spans the same width
   as the header and the footer CTA band. */
.content-area { max-width: none; margin-inline: 0; }

/* Two-column when a sidebar is active */
.has-sidebar .site-main .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 56px;
  align-items: start;
  max-width: var(--ib-wide-width);
}
.has-sidebar .content-area { max-width: none; margin: 0; }
@media (max-width: 880px) {
  .has-sidebar .site-main .container { grid-template-columns: 1fr; gap: 40px; }
}

/* WordPress alignment classes */
.aligncenter { margin-inline: auto; }
.alignleft   { float: left; margin: 0.4em 1.6em 1em 0; }
.alignright  { float: right; margin: 0.4em 0 1em 1.6em; }
.alignwide {
  width: 100%;
  max-width: var(--ib-wide-width);
  margin-inline: calc(50% - 50vw);
  margin-inline: auto;
}
@media (min-width: 1160px) {
  .alignwide { width: var(--ib-wide-width); max-width: none; margin-inline: calc((var(--ib-content-width) - var(--ib-wide-width)) / 2); }
}
.alignfull { max-width: 100vw; width: 100vw; margin-inline: calc(50% - 50vw); }

/* =========================================================================
   6. Brand stripe
   ========================================================================= */
.ib-stripe { display: flex; height: 8px; width: 100%; }
.ib-stripe span { flex: 1; }
.ib-stripe span:nth-child(1) { background: var(--ib-yellow); }
.ib-stripe span:nth-child(2) { background: var(--ib-green); }
.ib-stripe span:nth-child(3) { background: var(--ib-cyan); }
.ib-stripe span:nth-child(4) { background: var(--ib-purple); }
.ib-stripe span:nth-child(5) { background: var(--ib-magenta); }
.ib-stripe span:nth-child(6) { background: var(--ib-coral); }

/* =========================================================================
   7. Site header + navigation
   ========================================================================= */
.site-header {
  background: var(--ib-charcoal);
  color: var(--ib-white);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding-block: 12px;
}
.site-branding { display: flex; align-items: center; gap: 14px; min-width: 0; }
.site-branding a { text-decoration: none; color: inherit; display: inline-flex; align-items: center; }
.custom-logo, .site-logo-img { height: 40px; width: auto; }
.site-title {
  font-family: var(--ib-display);
  text-transform: uppercase;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  margin: 0;
  line-height: 1;
}
.site-title a { color: var(--ib-white); text-decoration: none; }
.site-description { font-size: 0.8rem; opacity: 0.7; margin: 2px 0 0; }

/* Primary nav */
.main-navigation { display: flex; align-items: center; }
.main-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-navigation li { margin: 0; position: relative; }
.main-navigation a {
  display: block;
  color: var(--ib-white);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 10px 14px;
  border-bottom: 3px solid transparent;
}
.main-navigation a:hover,
.main-navigation a:focus,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
  border-bottom-color: var(--ib-yellow);
}
/* Sub-menus */
.main-navigation ul ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  flex-direction: column;
  background: var(--ib-charcoal);
  border-top: 3px solid var(--ib-yellow);
  box-shadow: 0 12px 24px rgba(0,0,0,0.25);
  z-index: 200;
}
.main-navigation li:hover > ul,
.main-navigation li:focus-within > ul { display: flex; }
.main-navigation ul ul a { padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.main-navigation ul ul a:hover { border-bottom-color: rgba(255,255,255,0.08); background: rgba(255,255,255,0.06); }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--ib-white);
  border: 2px solid var(--ib-white);
  font-family: var(--ib-sans);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 14px;
  cursor: pointer;
}
.menu-toggle .bars { display: inline-flex; flex-direction: column; gap: 3px; }
.menu-toggle .bars span { display: block; width: 18px; height: 2px; background: currentColor; }

@media (max-width: 820px) {
  .menu-toggle { display: inline-flex; }
  .main-navigation {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ib-charcoal);
    border-top: var(--ib-hairline);
    display: none;
  }
  .main-navigation.is-open { display: block; }
  .main-navigation ul { flex-direction: column; gap: 0; padding: 8px 0; }
  .main-navigation .container { display: block; }
  .main-navigation > div > ul { padding: 0; }
  .main-navigation a { padding: 14px var(--ib-gutter); border-bottom: 1px solid rgba(255,255,255,0.08); }
  .main-navigation a:hover,
  .main-navigation .current-menu-item > a { border-bottom-color: rgba(255,255,255,0.08); border-left: 4px solid var(--ib-yellow); }
  .main-navigation ul ul { position: static; box-shadow: none; border-top: none; padding-left: 16px; }
}

/* =========================================================================
   8. Hero (front page / page banners)
   ========================================================================= */
.ib-hero {
  background: var(--ib-charcoal);
  color: var(--ib-white);
  padding: 88px 0 72px;
  position: relative;
  overflow: hidden;
}
.ib-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -80px;
  width: 320px;
  height: 320px;
  background: var(--ib-yellow);
  border-radius: 50%;
  opacity: 0.08;
  pointer-events: none;
}
.ib-hero .container { position: relative; z-index: 1; }
.ib-hero .eyebrow {
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ib-yellow);
  margin-bottom: 16px;
}
.ib-hero h1 { color: var(--ib-white); font-size: clamp(3.2rem, 11vw, 7.5rem); margin-bottom: 20px; }
.ib-hero .hero-line { display: block; }
.ib-hero .lede { max-width: 620px; font-size: 1.2rem; line-height: 1.55; color: rgba(255,255,255,0.85); }
.ib-hero .hero-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 16px; }

/* =========================================================================
   9. Buttons
   ========================================================================= */
.button,
.wp-block-button__link,
input[type="submit"],
button[type="submit"],
.ib-btn {
  display: inline-block;
  font-family: var(--ib-sans);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
  padding: 14px 26px;
  border: 2px solid var(--ib-charcoal);
  background: var(--ib-yellow);
  color: var(--ib-charcoal);
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--ib-radius);
  transition: transform 0.05s ease, background 0.15s ease, color 0.15s ease;
}
.button:hover, .wp-block-button__link:hover,
input[type="submit"]:hover, button[type="submit"]:hover, .ib-btn:hover {
  background: var(--ib-charcoal);
  color: var(--ib-white);
  text-decoration: none;
}
.button:active, .ib-btn:active { transform: translateY(1px); }

.ib-btn--ghost {
  background: transparent;
  color: var(--ib-white);
  border-color: var(--ib-white);
}
.ib-btn--ghost:hover { background: var(--ib-white); color: var(--ib-charcoal); }

/* =========================================================================
   10. Forms
   ========================================================================= */
label { font-weight: 500; display: inline-block; margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="url"], input[type="password"],
input[type="search"], input[type="number"], input[type="tel"], input[type="date"],
textarea, select {
  width: 100%;
  max-width: 100%;
  font-family: var(--ib-sans);
  font-size: 1rem;
  color: var(--ib-charcoal);
  background: var(--ib-white);
  border: 2px solid var(--ib-charcoal);
  padding: 12px 14px;
  border-radius: var(--ib-radius);
}
textarea { min-height: 140px; }
::placeholder { color: rgba(51,51,51,0.5); }

/* =========================================================================
   10b. Gravity Forms (Orbital theme) — brand overrides
   The compound selector beats Gravity Forms' single-class variable defaults
   regardless of stylesheet load order.
   ========================================================================= */
.gform_wrapper.gform-theme--framework {
  --gf-color-primary: var(--ib-purple);
  --gf-color-primary-rgb: 103, 15, 255;
  --gf-color-primary-contrast: var(--ib-white);
  --gf-color-primary-darker: var(--ib-charcoal);
  --gf-color-danger: var(--ib-coral);
  --gf-ctrl-border-color: var(--ib-charcoal);
  --gf-ctrl-border-color-hover: var(--ib-charcoal);
  --gf-ctrl-border-color-focus: var(--ib-purple);
  --gf-ctrl-border-width: 2px;
  --gf-ctrl-radius: 0px;
  --gf-ctrl-color: var(--ib-charcoal);
  --gf-ctrl-bg-color: var(--ib-white);
  --gf-ctrl-label-color-primary: var(--ib-charcoal);
  --gf-ctrl-label-color-secondary: var(--ib-charcoal);
}
.gform_wrapper .gfield_label { font-weight: 600; }

/* Submit / next / previous buttons = the theme's .ib-btn (yellow → charcoal). */
.gform_wrapper .gform_footer input[type="submit"],
.gform_wrapper .gform_footer button,
.gform_wrapper .gform_page_footer input[type="submit"],
.gform_wrapper .gform_page_footer button,
.gform_wrapper input.gform_button,
.gform_wrapper .gform_button.button {
  background: var(--ib-yellow) !important;
  color: var(--ib-charcoal) !important;
  border: 2px solid var(--ib-charcoal) !important;
  border-radius: 0 !important;
  font-family: var(--ib-sans);
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 14px 28px;
  height: auto;
  width: auto;
  text-transform: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.gform_wrapper .gform_footer input[type="submit"]:hover,
.gform_wrapper .gform_footer button:hover,
.gform_wrapper .gform_page_footer input[type="submit"]:hover,
.gform_wrapper input.gform_button:hover,
.gform_wrapper .gform_button.button:hover {
  background: var(--ib-charcoal) !important;
  color: var(--ib-white) !important;
  border-color: var(--ib-charcoal) !important;
}

/* =========================================================================
   11. Posts & entries
   ========================================================================= */
.entry { margin-bottom: 64px; }
.entry-header { margin-bottom: 24px; }
.entry-title { margin-bottom: 12px; }
.entry-title a { color: var(--ib-charcoal); text-decoration: none; }
.entry-title a:hover { color: var(--ib-purple); }

.entry-meta {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ib-charcoal);
  opacity: 0.6;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 4px;
}
.entry-meta a { color: inherit; }
.entry-meta .sep { opacity: 0.4; }

.post-thumbnail { margin-bottom: 24px; border: var(--ib-border); }
.post-thumbnail img { width: 100%; }

.entry-content > *:first-child { margin-top: 0; }
.entry-content img { border: var(--ib-border); }
.entry-content h2 { margin-top: 1.4em; }
.entry-content h3 { margin-top: 1.4em; }

.entry-footer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: var(--ib-hairline);
  font-size: 0.85rem;
}
.tags-links a, .cat-links a {
  display: inline-block;
  margin: 0 6px 6px 0;
  padding: 4px 12px;
  background: var(--ib-light-grey);
  color: var(--ib-charcoal);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}
.tags-links a:hover, .cat-links a:hover { background: var(--ib-cyan); }

.read-more { margin-top: 8px; }

.sticky-badge {
  display: inline-block;
  background: var(--ib-magenta);
  color: var(--ib-white);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 3px 10px;
  margin-bottom: 12px;
}

/* Archive header */
.page-header { margin-bottom: 48px; padding-bottom: 24px; border-bottom: var(--ib-border); }
.page-title { margin-bottom: 8px; }
.archive-description { opacity: 0.75; max-width: 620px; }

/* =========================================================================
   11b. Posts grid (blog index, Blog template, Home latest, archives, search)
   ========================================================================= */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
  margin-top: 8px;
}

.card-post {
  display: flex;
  flex-direction: column;
  background: var(--ib-white);
  border: var(--ib-border);
  height: 100%;
}
.card-post__media { display: block; overflow: hidden; border-bottom: var(--ib-border); }
.card-post__media img { width: 100%; height: 200px; object-fit: cover; transition: transform 0.3s ease; }
.card-post:hover .card-post__media img { transform: scale(1.04); }

.card-post__placeholder { display: block; height: 160px; }
.card-post__placeholder--cyan    { background: var(--ib-cyan); }
.card-post__placeholder--magenta { background: var(--ib-magenta); }
.card-post__placeholder--green   { background: var(--ib-green); }
.card-post__placeholder--yellow  { background: var(--ib-yellow); }
.card-post__placeholder--purple  { background: var(--ib-purple); }
.card-post__placeholder--coral   { background: var(--ib-coral); }

.card-post__body { display: flex; flex-direction: column; flex: 1 0 auto; padding: 22px 24px 24px; }
.card-post__body .entry-meta { margin-bottom: 8px; }

.card-post__title { font-family: var(--ib-sans); font-size: 1.25rem; font-weight: 600; line-height: 1.25; margin: 0 0 10px; text-transform: none; letter-spacing: 0; }
.card-post__title a { color: var(--ib-charcoal); text-decoration: none; }
.card-post__title a:hover { color: var(--ib-purple); }

.card-post__excerpt { font-size: 0.95rem; }
.card-post__excerpt p:last-child { margin-bottom: 0; }

.card-post__more {
  margin-top: auto;
  padding-top: 16px;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--ib-purple);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card-post__more:hover { gap: 10px; }

@media (max-width: 480px) {
  .posts-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* One-row variant (home "Latest news"): exactly 3 across on desktop. */
.posts-grid--row { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) {
  .posts-grid--row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .posts-grid--row { grid-template-columns: 1fr; }
}

/* =========================================================================
   11c. Our Supporters carousel
   ========================================================================= */
.ib-supporters { padding: 64px 0; border-top: var(--ib-hairline); }
.ib-supporters__title {
  font-family: var(--ib-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: clamp(1.9rem, 4.5vw, 2.4rem);
  margin-bottom: 28px;
}

.supporters-carousel { position: relative; display: flex; align-items: center; gap: 8px; }

.supporters-track {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 4px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  flex: 1 1 auto;
  scrollbar-width: none;            /* Firefox */
}
.supporters-track::-webkit-scrollbar { display: none; } /* WebKit */

.supporter {
  flex: 0 0 auto;
  width: clamp(150px, 22%, 220px);
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--ib-white);
  border: 2px solid var(--ib-light-grey);
  min-height: 120px;
}
.supporter__link { display: flex; align-items: center; justify-content: center; width: 100%; }
.supporter__logo,
.supporter img {
  max-width: 100%;
  max-height: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.carousel-btn {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 2px solid var(--ib-charcoal);
  background: var(--ib-white);
  color: var(--ib-charcoal);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--ib-radius);
}
.carousel-btn:hover:not(:disabled) { background: var(--ib-yellow); }
.carousel-btn:disabled { opacity: 0.3; cursor: default; }
/* When everything fits, hide the arrows. */
.supporters-carousel:not(.has-overflow) .carousel-btn { display: none; }

/* Text block under the logos — full container width. */
.ib-supporters__text { margin-top: 28px; max-width: none; font-size: 1.05rem; }
.ib-supporters__text > *:last-child { margin-bottom: 0; }

@media (max-width: 560px) {
  .ib-supporters { padding: 44px 0; }
  .supporter { width: 60%; }
}

/* =========================================================================
   12. Pagination
   ========================================================================= */
.pagination, .posts-navigation, .post-navigation { margin-top: 48px; padding-top: 24px; border-top: var(--ib-hairline); }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers {
  display: inline-block;
  padding: 10px 16px;
  border: 2px solid var(--ib-charcoal);
  color: var(--ib-charcoal);
  text-decoration: none;
  font-weight: 500;
}
.pagination .page-numbers.current { background: var(--ib-charcoal); color: var(--ib-white); }
.pagination .page-numbers:hover:not(.current) { background: var(--ib-yellow); }
.post-navigation .nav-links { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.post-navigation .nav-subtitle { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.15em; opacity: 0.6; }
.post-navigation a { text-decoration: none; font-weight: 600; }

/* =========================================================================
   13. Comments
   ========================================================================= */
.comments-area { margin-top: 64px; padding-top: 40px; border-top: var(--ib-border); }
.comments-title, .comment-reply-title { margin-bottom: 24px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list ol { list-style: none; padding-left: 28px; }
.comment-body { padding: 20px; background: var(--ib-white); border: var(--ib-border); margin-bottom: 20px; }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.comment-author .avatar { border-radius: 50%; }
.comment-metadata { font-size: 0.78rem; opacity: 0.6; margin: 4px 0 12px; }
.comment-metadata a { color: inherit; }
.reply a {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}
.comment-respond { margin-top: 32px; }
.comment-form label { display: block; }
.comment-form p { margin-bottom: 16px; }

/* =========================================================================
   14. Widgets / sidebar
   ========================================================================= */
.widget { margin-bottom: 40px; }
.widget-title {
  font-family: var(--ib-sans);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--ib-yellow);
}
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li { padding: 8px 0; border-bottom: var(--ib-hairline); }
.widget ul li:last-child { border-bottom: none; }
.widget a { text-decoration: none; color: var(--ib-charcoal); }
.widget a:hover { color: var(--ib-purple); }

/* Case study sidebar */
.cs-sidebar { font-size: 0.95rem; }

/* "At a glance" key facts */
.cs-facts { margin: 0; }
.cs-fact {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0;
  border-bottom: var(--ib-hairline);
}
.cs-fact:last-child { border-bottom: none; }
.cs-fact__label {
  font-family: var(--ib-sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--ib-purple);
}
.cs-fact__value { margin: 0; font-weight: 500; }

/* Partner logos */
.cs-partners {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.cs-partners--single { grid-template-columns: 1fr; }
.cs-partners--single .cs-partner { min-height: 180px; padding: 32px; }
.cs-partners--single .cs-partner__logo { max-height: 120px; }
.cs-partners li { padding: 0; border-bottom: none; }
.cs-partner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: var(--ib-white);
  border: var(--ib-hairline);
  min-height: 84px;
}
.cs-partner__link { display: block; width: 100%; }
.cs-partner__logo {
  display: block;
  width: 100%;
  height: auto;
  max-height: 56px;
  object-fit: contain;
}

/* Website button */
.cs-website-button { display: block; text-align: center; }

/* =========================================================================
   14b. Footer call-to-action band
   ========================================================================= */
.ib-cta { padding: 56px 0; }
.ib-cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.ib-cta__text { flex: 1 1 460px; }
.ib-cta__title { margin: 0 0 8px; }
.ib-cta__content { font-size: 1.1rem; max-width: 640px; }
.ib-cta__content p:last-child { margin-bottom: 0; }

/* Text tone: charcoal on the lighter brights, white on the deeper ones. */
.ib-cta--text-dark, .ib-cta--text-dark .ib-cta__title { color: var(--ib-charcoal); }
.ib-cta--text-light, .ib-cta--text-light .ib-cta__title { color: var(--ib-white); }

/* Backgrounds — the six brand top-bar colours. */
.ib-cta--yellow  { background: var(--ib-yellow); }
.ib-cta--green   { background: var(--ib-green); }
.ib-cta--cyan    { background: var(--ib-cyan); }
.ib-cta--purple  { background: var(--ib-purple); }
.ib-cta--magenta { background: var(--ib-magenta); }
.ib-cta--coral   { background: var(--ib-coral); }

/* Button reads on all six: charcoal by default, inverts on hover. */
.ib-cta__btn {
  display: inline-block;
  flex: 0 0 auto;
  font-family: var(--ib-sans);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.02em;
  padding: 16px 30px;
  background: var(--ib-charcoal);
  color: var(--ib-white);
  border: 2px solid var(--ib-charcoal);
  text-decoration: none;
  white-space: nowrap;
}
.ib-cta__btn:hover, .ib-cta__btn:focus {
  background: var(--ib-white);
  color: var(--ib-charcoal);
  text-decoration: none;
}
.ib-cta--text-light .ib-cta__btn { border-color: var(--ib-white); }

@media (max-width: 640px) {
  .ib-cta { padding: 40px 0; }
  .ib-cta__btn { width: 100%; text-align: center; }
}

/* Front-page intro: full container width and left-aligned, matching the hero
   and the "Latest news" section (no centred narrow column). */
.front-page-intro { margin-bottom: 8px; }
.front-page-intro .entry-content { font-size: 1.15rem; max-width: none; }

/* =========================================================================
   15. Footer
   ========================================================================= */
.site-footer { background: var(--ib-charcoal); color: var(--ib-white); margin-top: auto; }
.site-footer .footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  padding: 56px 0;
}
.site-footer .footer-widgets .widget-title { color: var(--ib-white); border-bottom-color: var(--ib-yellow); }
.site-footer .footer-widgets a { color: rgba(255,255,255,0.85); }
.site-footer .footer-widgets a:hover { color: var(--ib-yellow); }
.site-footer .footer-widgets ul li { border-bottom-color: rgba(255,255,255,0.12); }
.site-footer .footer-widgets .widget { color: rgba(255,255,255,0.85); }

.site-info {
  padding: 28px 0;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.85rem;
}
.site-info .footer-tag {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  color: var(--ib-yellow);
}

/* Footer social icons */
.social-icons {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.social-icons li { margin: 0; }
.social-icons__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 2px solid currentColor;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
/* Each icon takes its own brand colour, cycling through the top-bar stripe. */
.site-info .social-icons__link { color: var(--icon, var(--ib-white)); }
.site-info .social-icons__link:hover,
.site-info .social-icons__link:focus {
  color: var(--ib-charcoal);
  background: var(--icon, var(--ib-yellow));
  border-color: var(--icon, var(--ib-yellow));
}
.social-icons li:nth-child(6n+1) .social-icons__link { --icon: var(--ib-yellow); }
.social-icons li:nth-child(6n+2) .social-icons__link { --icon: var(--ib-green); }
.social-icons li:nth-child(6n+3) .social-icons__link { --icon: var(--ib-cyan); }
.social-icons li:nth-child(6n+4) .social-icons__link { --icon: var(--ib-purple); }
.social-icons li:nth-child(6n+5) .social-icons__link { --icon: var(--ib-magenta); }
.social-icons li:nth-child(6n+6) .social-icons__link { --icon: var(--ib-coral); }
.social-icons .social-icon { width: 20px; height: 20px; display: block; }
.site-info p { margin: 0; opacity: 0.75; }
.site-info a { color: var(--ib-yellow); }

/* =========================================================================
   16. Accessibility helpers
   ========================================================================= */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px; width: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  position: absolute !important;
  word-wrap: normal !important;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--ib-yellow);
  color: var(--ib-charcoal);
  padding: 12px 20px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { left: 8px; top: 8px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* =========================================================================
   17. No-results / search
   ========================================================================= */
.no-results { padding: 40px; border: var(--ib-border); background: var(--ib-white); }
.search-form { display: flex; gap: 0; max-width: 480px; }
.search-form .search-field { border-right: none; }
.search-form .search-submit { white-space: nowrap; }

/* =========================================================================
   18. Small screens
   ========================================================================= */
@media (max-width: 640px) {
  :root { --ib-gutter: 20px; }
  body { font-size: 16px; }
  .site-main { padding: 40px 0; }
  .ib-hero { padding: 56px 0 48px; }
  .site-info { flex-direction: column; align-items: flex-start; }
}
