/*
Theme Name: Vancouver Island Buzz Newsroom
Theme URI: https://vancouverislandbuzz.com
Author: Vancouver Island Buzz
Description: A fast, responsive Island-wide newsroom theme with native Events, Games, Obituaries and managed advertising placements.
Version: 0.4.7
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: vib-newsroom
*/

:root {
  --vib-ink: #101916;
  --vib-pine: #173f35;
  --vib-green: #2f6958;
  --vib-sun: #9fc4b7;
  --vib-paper: #f3f2ee;
  --vib-white: #ffffff;
  --vib-muted: #69736f;
  --vib-line: #dfe5e1;
  --vib-radius: 16px;
  --vib-shadow: 0 18px 45px rgba(16, 25, 22, .10);
  --vib-serif: Georgia, 'Times New Roman', serif;
  --vib-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--vib-paper); color: var(--vib-ink); font-family: var(--vib-sans); font-size: 16px; line-height: 1.6; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.vib-container { width: min(100% - 40px, 1280px); margin-inline: auto; }
.vib-main { min-height: 55vh; }

.vib-site-header { position: sticky; top: 0; z-index: 100; background: rgba(16,25,22,.98); color: var(--vib-white); box-shadow: 0 1px rgba(255,255,255,.08); }
.admin-bar .vib-site-header { top: 32px; }
.vib-header-main { display: grid; grid-template-columns: 220px minmax(0,1fr) auto; align-items: center; gap: 30px; min-height: 76px; }
.vib-header-brand { min-width: 0; }
.vib-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; width: fit-content; }
.vib-brand-mark { width: 43px; height: 43px; border-radius: 11px; display: grid; place-items: center; background: var(--vib-sun); color: var(--vib-ink); font: 800 15px/1 var(--vib-serif); }
.vib-brand-copy { display: grid; line-height: 1; }
.vib-brand-copy small { color: #b8c9c2; font-size: 9px; font-weight: 850; letter-spacing: .11em; }
.vib-brand-copy strong { margin-top: 5px; font-size: 22px; letter-spacing: .01em; }
.vib-brand-copy em { color: var(--vib-sun); font-style: normal; }
.custom-logo-link img { display: block; width: auto; max-width: 210px; max-height: 50px; }
.vib-primary-nav ul { display: flex; align-items: center; gap: clamp(17px,1.7vw,28px); list-style: none; margin: 0; padding: 0; }
.vib-primary-nav li { white-space: nowrap; }
.vib-primary-nav a { position: relative; display: inline-flex; align-items: center; min-height: 76px; color: #e5ece9; text-decoration: none; font-size: 14px; font-weight: 800; }
.vib-primary-nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--vib-sun); transform: scaleX(0); transform-origin: center; transition: transform .2s ease; }
.vib-primary-nav a:hover, .vib-primary-nav .current-menu-item > a { color: #fff; }
.vib-primary-nav a:hover::after, .vib-primary-nav .current-menu-item > a::after { transform: scaleX(1); }
.vib-header-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.vib-advertise-link { color: #d3ded9; font-size: 12px; font-weight: 850; text-decoration: none; }
.vib-advertise-link:hover { color: #fff; }
.vib-icon-button, .vib-menu-toggle { width: 42px; height: 42px; border: 1px solid #45514d; border-radius: 50%; display: grid; place-items: center; background: transparent; color: #fff; cursor: pointer; }
.vib-icon-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.vib-menu-toggle { display: none; }
.vib-menu-toggle span { display: block; width: 17px; height: 2px; margin: 2px auto; border-radius: 2px; background: currentColor; }
.vib-subscribe { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 0 19px; border-radius: 999px; background: var(--vib-sun); color: var(--vib-ink); box-shadow: 0 6px 20px rgba(159,196,183,.12); font-size: 12px; font-weight: 900; text-decoration: none; white-space: nowrap; }
.vib-subscribe:hover { background: #b8d4ca; transform: translateY(-1px); }
.vib-subscribe-short { display: none; }
.vib-secondary-nav { background: #17221e; border-top: 1px solid rgba(255,255,255,.055); }
.vib-secondary-inner { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 30px; min-height: 36px; }
.vib-category-rail { display: flex; align-items: center; gap: 22px; overflow-x: auto; scrollbar-width: none; }
.vib-category-rail::-webkit-scrollbar { display: none; }
.vib-region-menu, .vib-topic-menu { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.vib-category-rail nav + nav { position: relative; padding-left: 22px; }
.vib-category-rail nav + nav::before { content: ''; position: absolute; left: 0; top: 50%; width: 1px; height: 14px; background: #4a5752; transform: translateY(-50%); }
.vib-secondary-nav a { color: #d3ded9; font-size: 12px; font-weight: 750; text-decoration: none; }
.vib-secondary-nav a:hover, .vib-secondary-nav .current-menu-item > a { color: var(--vib-sun); }
.vib-mobile-drawer { display: none; }

.vib-ad-deck { width: 941px; max-width: calc(100% - 40px); margin-left: auto; margin-right: auto; display: grid; grid-template-columns: 600px 321px; gap: 20px; align-items: start; padding-block: 24px; }
.vib-ad-deck--900x300 { width: 1241px; max-width: calc(100% - 32px); grid-template-columns: 900px 321px; }
.vib-global-ad-deck { border-bottom: 1px solid var(--vib-line); }
.vib-ad-stack { display: block; width: 321px; padding-left: 20px; border-left: 1px solid #cfd8d3; }
.vib-ad-slot { overflow: hidden; border-radius: var(--vib-radius); background: #e8ece9; position: relative; }
.vib-ad-slot img { width: 100%; height: 100%; display: block; object-fit: cover; }
.vib-ad-slot a { display: block; width: 100%; height: 100%; }
.vib-ad-slot iframe { max-width: 100%; }
.vib-ad-slot .advads-placement, .vib-ad-slot .advads-ad { width: 100%; height: 100%; }
.vib-ad-slot .advads-placement img, .vib-ad-slot .advads-ad img { width: 100%; height: 100%; object-fit: contain; }
.vib-ad-placeholder { min-height: inherit; height: 100%; display: flex; align-items: flex-end; padding: 20px; background: linear-gradient(135deg, var(--vib-pine), #235e50); color: #fff; }
.vib-ad-placeholder small { font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; opacity: .75; }
.vib-ad-slot--600x300 { width: min(600px, 100%); min-height: 0; aspect-ratio: 2 / 1; }
.vib-ad-slot--900x300 { width: min(900px, 100%); min-height: 0; aspect-ratio: 3 / 1; }
.vib-ad-slot--300x100 { width: min(300px, 100%); min-height: 0; aspect-ratio: 3 / 1; }
.vib-ad-slot--625x104 { width: min(625px, 100%); min-height: 0; aspect-ratio: 625 / 104; }
.vib-ad-slot--300x250 { width: min(300px, 100%); min-height: 0; aspect-ratio: 6 / 5; margin-inline: auto; }
.vib-ad-slot--marquee-group { display: grid; width: 300px; max-width: 100%; gap: 10px; overflow: visible; border-radius: 0; background: transparent; }
.vib-ad-slot--marquee-group > .advads-placement,
.vib-ad-slot--marquee-group > .advads-group { display: grid; gap: 10px; width: 100%; height: auto; }
.vib-ad-slot--marquee-group .advads-ad { width: 300px; max-width: 100%; height: auto; aspect-ratio: 3 / 1; overflow: hidden; border-radius: var(--vib-radius); background: #e8ece9; }
.vib-ad-slot--marquee-group .advads-ad img { width: 100%; height: 100%; object-fit: cover; }
.vib-mobile-ad,.vib-mobile-article-ad { display: none; }
.vib-search-panel { padding: 18px 0; background: #fff; box-shadow: var(--vib-shadow); }
.vib-search-panel form { display: flex; gap: 8px; }
.vib-search-panel input[type='search'] { width: 100%; min-height: 48px; border: 1px solid var(--vib-line); border-radius: 10px; padding: 0 14px; font: inherit; }
.vib-search-panel input[type='submit'] { border: 0; border-radius: 10px; padding: 0 20px; background: var(--vib-sun); font-weight: 900; }

.vib-section { padding-block: 34px 56px; }
.vib-section--white { background: var(--vib-white); }
.vib-section--dark { background: var(--vib-ink); color: #fff; }
.vib-section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.vib-kicker { display: block; margin-bottom: 5px; color: var(--vib-green); font-size: 10px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.vib-section--dark .vib-kicker { color: var(--vib-sun); }
.vib-section-title { margin: 0; font: 800 clamp(34px, 4vw, 52px)/1.02 var(--vib-serif); letter-spacing: -.035em; }
.vib-view-all { color: var(--vib-green); border-bottom: 3px solid var(--vib-sun); font-size: 12px; font-weight: 900; text-decoration: none; white-space: nowrap; }
.vib-section--dark .vib-view-all { color: #fff; }

.vib-top-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, .9fr); grid-template-rows: repeat(2, minmax(210px, 1fr)); gap: 18px; }
.vib-story-card { position: relative; min-height: 280px; overflow: hidden; border-radius: var(--vib-radius); background: #26332e; color: #fff; }
.vib-top-grid .vib-story-card:first-child { grid-row: 1 / 3; min-height: 470px; }
.vib-story-card > a { position: absolute; inset: 0; z-index: 1; }
.vib-story-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.vib-story-card:hover img { transform: scale(1.025); }
.vib-story-card::after { content: ''; position: absolute; inset: 20% 0 0; background: linear-gradient(transparent, rgba(4,10,8,.88)); pointer-events: none; }
.vib-story-copy { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 26px; pointer-events: none; }
.vib-story-category { color: var(--vib-sun); font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.vib-story-title { margin: 8px 0 0; font: 800 clamp(23px, 3vw, 42px)/1.06 var(--vib-serif); letter-spacing: -.025em; }
.vib-top-grid .vib-story-card:not(:first-child) .vib-story-title { font-size: clamp(20px, 2vw, 27px); }
.vib-story-meta { margin-top: 12px; color: #d8e0dd; font-size: 11px; }

.vib-card-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 20px; }
.vib-post-card { background: #fff; border: 1px solid var(--vib-line); border-radius: var(--vib-radius); overflow: hidden; }
.vib-post-card-media { display: block; aspect-ratio: 16/10; background: #dfe5e1; overflow: hidden; }
.vib-post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.vib-post-card:hover img { transform: scale(1.025); }
.vib-post-card-body { padding: 17px; }
.vib-post-card h3 { margin: 6px 0 10px; font: 800 22px/1.12 var(--vib-serif); letter-spacing: -.02em; }
.vib-post-card h3 a { text-decoration: none; }
.vib-post-card p { margin: 0; color: var(--vib-muted); font-size: 13px; line-height: 1.5; }

.vib-feature-band { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(280px,.7fr); gap: 30px; align-items: center; }
.vib-games-preview { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 15px; }
.vib-game-tile { min-height: 180px; padding: 21px; border: 1px solid rgba(255,255,255,.15); border-radius: var(--vib-radius); background: #16231f; text-decoration: none; transition: .2s ease; }
.vib-game-tile:hover { border-color: var(--vib-sun); transform: translateY(-2px); }
.vib-game-tile b { display: block; color: var(--vib-sun); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.vib-game-tile strong { display: block; margin-top: 28px; font: 800 24px/1.05 var(--vib-serif); }
.vib-game-tile span { display: block; margin-top: 10px; color: #afbeb8; font-size: 12px; }
.vib-feature-copy h2 { margin: 0; font: 800 clamp(37px,5vw,64px)/.98 var(--vib-serif); letter-spacing: -.04em; }
.vib-feature-copy p { color: #bac7c2; }
.vib-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--vib-sun); color: var(--vib-ink); font: 900 13px/1 var(--vib-sans); text-decoration: none; cursor: pointer; }

.vib-obit-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.vib-obit { padding: 20px; border: 1px solid var(--vib-line); border-radius: var(--vib-radius); background: #fff; text-decoration: none; }
.vib-obit time { color: var(--vib-muted); font-size: 11px; }
.vib-obit strong { display: block; margin-top: 8px; font: 800 20px/1.15 var(--vib-serif); }

.vib-content-shell { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; padding-block: 45px 70px; }
.vib-content-shell--no-sidebar { display: block; max-width: 980px; }
.vib-content-shell--no-sidebar.vib-page-width--wide { max-width: 1280px; }
.vib-content-shell--no-sidebar.vib-page-width--wide .vib-article-header,
.vib-content-shell--no-sidebar.vib-page-width--wide .vib-article-body { max-width: none; }
.vib-content-shell--no-sidebar.vib-page-width--full { width: 100%; max-width: none; padding-inline: clamp(20px,3vw,56px); }
.vib-content-shell--no-sidebar.vib-page-width--full .vib-article-header,
.vib-content-shell--no-sidebar.vib-page-width--full .vib-article-body { max-width: none; }
.vib-app-page.vib-page-width--wide { width: min(100% - 40px,1280px); margin-inline: auto; }
.vib-app-page.vib-page-width--full { width: 100%; max-width: none; }
.vib-app-page--obituaries { min-width: 0; padding-bottom: 56px; color: var(--vib-ink); font-family: var(--vib-sans); }
.vib-app-page { padding-block: 22px 0; }
.vib-article-header { max-width: 900px; margin-bottom: 24px; }
.vib-article-header h1 { margin: 9px 0 16px; font: 800 clamp(40px,5vw,64px)/1 var(--vib-serif); letter-spacing: -.04em; }
.vib-article-dek { color: var(--vib-muted); font-size: 20px; }
.vib-byline { font-size: 12px; font-weight: 750; }
.vib-featured-image { width: 100%; max-height: 690px; object-fit: cover; border-radius: var(--vib-radius); }
.vib-article-body { max-width: 760px; font: 400 19px/1.78 var(--vib-serif); }
.vib-article-body h2, .vib-article-body h3 { line-height: 1.16; }
.vib-article-body a { color: #1c5e4e; text-decoration-thickness: 2px; }
.vib-article-body .vib-inline-ad { margin: 34px 0; }
.vib-sidebar { display: flex; flex-direction: column; gap: 14px; }
.vib-sidebar-label { color: var(--vib-muted); font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.vib-article-ad-sidebar { position: sticky; top: 118px; align-self: start; }
.vib-archive-header { padding: 50px 0 22px; }
.vib-archive-header h1 { margin: 0; font: 800 clamp(44px,6vw,70px)/1 var(--vib-serif); }
.vib-pagination { margin-top: 30px; }

.vib-newsletter { padding: 50px 0; background: var(--vib-pine); color: #fff; }
.vib-newsletter-inner { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; }
.vib-newsletter h2 { margin: 0; font: 800 38px/1.05 var(--vib-serif); }
.vib-newsletter p { margin: 7px 0 0; color: #bed0c9; }
.vib-site-footer { padding: 48px 0 26px; background: var(--vib-ink); color: #dbe5e1; }
.vib-footer-grid { display: grid; grid-template-columns: 1.2fr 2fr; gap: 70px; }
.vib-footer-nav ul { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px 25px; list-style: none; margin: 0; padding: 0; }
.vib-footer-nav a { color: #dbe5e1; font-size: 13px; font-weight: 700; text-decoration: none; }
.vib-copyright { margin-top: 35px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); color: #8fa19a; font-size: 11px; }
.vib-floating-ad { position: fixed; z-index: 120; left: 50%; bottom: 14px; width: min(625px, calc(100% - 28px)); transform: translateX(-50%); filter: drop-shadow(0 13px 26px rgba(0,0,0,.28)); }
.vib-floating-ad > button { position: absolute; z-index: 3; right: -7px; top: -10px; width: 27px; height: 27px; border: 0; border-radius: 50%; background: var(--vib-ink); color: #fff; cursor: pointer; }
.vib-floating-ad .vib-ad-slot { margin-inline: auto; }
.vib-floating-ad--mobile { display: none; width: min(300px, calc(100% - 28px)); }

@media (max-width: 1180px) {
  .vib-primary-nav { display: none; }
  .vib-menu-toggle { display: grid; }
  .vib-header-main { grid-template-columns: 1fr auto; }
  .vib-header-actions { grid-column: 2; }
  .vib-secondary-nav { display: none; }
  body.vib-menu-open .vib-mobile-drawer { display: block; position: absolute; left: 0; right: 0; top: 76px; max-height: calc(100vh - 76px); overflow-y: auto; padding: 22px 0 26px; border-top: 1px solid rgba(255,255,255,.08); background: var(--vib-ink); box-shadow: 0 22px 35px rgba(0,0,0,.24); }
  .vib-mobile-drawer ul { list-style: none; margin: 0; padding: 0; }
  .vib-mobile-primary ul { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 28px; }
  .vib-mobile-primary a { display: block; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,.09); color: #fff; font-size: 17px; font-weight: 850; text-decoration: none; }
  .vib-mobile-topics { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 18px 0; }
  .vib-mobile-topics nav, .vib-mobile-topics ul { display: contents; }
  .vib-mobile-topics a { color: #c4d2cd; font-size: 13px; font-weight: 750; text-decoration: none; }
  .vib-mobile-actions { display: flex; align-items: center; gap: 18px; }
  .vib-mobile-actions > a:first-child { color: #fff; font-size: 13px; font-weight: 800; }
  .vib-mobile-actions .vib-subscribe { display: inline-flex; }
  .vib-card-grid, .vib-obit-grid { grid-template-columns: repeat(2,1fr); }
  .vib-content-shell { grid-template-columns: 1fr; }
  .vib-sidebar { display: grid; grid-template-columns: repeat(2,1fr); }
  .vib-article-ad-sidebar { display: none; }
  .vib-ad-deck { display: none; }
  .vib-mobile-ad { display: block; padding-block: 18px; }
}

@media (min-width: 1051px) and (max-width: 1275px) {
  .vib-ad-deck--900x300 { display: none; }
  body:has(.vib-ad-deck--900x300) .vib-mobile-ad { display: block; padding-block: 18px; }
}

@media (max-width: 720px) {
  .admin-bar .vib-site-header { top: 46px; }
  .vib-container { width: min(100% - 24px, 1280px); }
  .vib-header-main { min-height: 70px; }
  .vib-brand-mark { width: 38px; height: 38px; }
  .vib-brand-copy strong { font-size: 19px; }
  .vib-advertise-link { display: none; }
  .vib-header-actions { gap: 7px; }
  .vib-header-actions .vib-subscribe { min-height: 38px; padding: 0 15px; }
  .vib-subscribe-full { display: none; }
  .vib-subscribe-short { display: inline; }
  body.vib-menu-open .vib-mobile-drawer { top: 70px; max-height: calc(100vh - 70px); }
  .vib-mobile-actions .vib-subscribe-full { display: inline; }
  .vib-ad-deck { display: none; }
  .vib-ad-stack { display: none; }
  .vib-mobile-ad { display: block; padding-block: 18px; }
  .vib-mobile-article-ad { display: block; margin-bottom: 18px; }
  .vib-floating-ad--desktop { display: none; }
  .vib-floating-ad--mobile { display: block; }
  .vib-section { padding-block: 27px 42px; }
  .vib-section-head { align-items: center; }
  .vib-top-grid { display: grid; grid-template-columns: 1fr; grid-template-rows: auto; }
  .vib-top-grid .vib-story-card:first-child { grid-row: auto; min-height: 420px; }
  .vib-top-grid .vib-story-card:not(:first-child) { min-height: 245px; }
  .vib-story-copy { padding: 20px; }
  .vib-card-grid, .vib-obit-grid, .vib-games-preview, .vib-footer-nav ul, .vib-sidebar { grid-template-columns: 1fr; }
  .vib-feature-band { grid-template-columns: 1fr; }
  .vib-newsletter-inner { grid-template-columns: 1fr; }
  .vib-footer-grid { grid-template-columns: 1fr; gap: 35px; }
  .vib-content-shell { padding-block: 27px 50px; }
  .vib-content-shell--no-sidebar.vib-page-width--full { padding-inline: 12px; }
  .vib-app-page.vib-page-width--wide { width: min(100% - 24px,1280px); }
  .vib-app-page { padding-top: 8px; }
  .vib-article-header h1 { font-size: 40px; }
  .vib-article-body { font-size: 18px; }
}

@media (max-width: 430px) {
  .custom-logo-link img { max-width: 155px; max-height: 43px; }
  .vib-icon-button, .vib-menu-toggle { width: 38px; height: 38px; }
  .vib-header-actions .vib-subscribe { padding-inline: 13px; }
}
