/*
Theme Name: FaithfulBiz
Theme URI: https://faithfulbiz.com.ng
Author: FaithfulBiz
Author URI: https://faithfulbiz.com.ng
Description: A premium, ultra-fast, SEO-optimized WordPress blogging theme for AI, Tech, Business & Online Income content. Designed for Google Discover, high CTR, Core Web Vitals, and AdSense revenue.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: faithfulbiz
Tags: blog, news, fast, seo, adsense, google-discover, mobile-first, responsive
*/

/* ==========================================================================
   CSS VARIABLES
   ========================================================================== */

:root {
  --color-primary:       #1a7a2e;
  --color-primary-dark:  color-mix(in srgb, var(--color-primary) 78%, #000);
  --color-primary-light: color-mix(in srgb, var(--color-primary) 10%, #fff);
  --color-accent:        var(--color-primary);
  --color-dark:          #111827;
  --color-text:          #1f2937;
  --color-text-muted:    #6b7280;
  --color-border:        #e5e7eb;
  --color-bg:            #ffffff;
  --color-bg-soft:       #f9fafb;
  --color-header-bg:     #111827;
  --color-footer-bg:     #0f172a;
  --color-badge:         var(--color-primary);
  --color-trending:      #e53e3e;
  --color-category:      var(--color-primary);

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Serif 4', 'Georgia', serif;
  --font-ui:      'DM Sans', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.10), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.06);

  --transition: 0.2s ease;

  /* Layout dimensions */
  --container-width: 1200px;
  --content-width:   760px;
  --sidebar-width:   300px;
  --layout-gap:      32px;

  color-scheme: light;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video, iframe, table, pre {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--color-primary-dark); }

ul, ol { list-style: none; }

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-ui);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.site-main {
  padding: 32px 0 64px;
}

/*
 * TWO-COLUMN CONTENT + SIDEBAR GRID
 *
 * CRITICAL RULES — do not change without understanding why:
 *
 * 1. align-items: start on the grid container is MANDATORY for sticky sidebar.
 *    If omitted, the grid stretches rows to full height and the sidebar column
 *    becomes as tall as the content column — sticky has nothing to scroll
 *    against, so the sidebar drifts off-screen on long posts leaving a void.
 *
 * 2. minmax(0, 1fr) on the content column is MANDATORY to prevent overflow.
 *    Plain "1fr" can exceed its column when children (images, pre blocks) are
 *    wider than available space. minmax(0, 1fr) caps it at the grid boundary.
 *
 * 3. The sidebar uses align-self: start as a belt-and-braces guard on the
 *    element itself (in case the grid container rule is ever overridden).
 */
.content-sidebar-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
  gap: var(--layout-gap);
  align-items: start;
}

.main-content-area {
  min-width: 0;
  width: 100%;
}

/* Sidebar hides below 1080px; content then fills full width */
@media (max-width: 1080px) {
  .content-sidebar-wrap {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none;
  }
}

@media (max-width: 768px) {
  .container { padding: 0 16px; }
}
@media (max-width: 480px) {
  .container { padding: 0 14px; }
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */

.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-width: 0;
}

.alignleft  { float: left;  margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { margin: 0 auto 16px; display: block; }
.alignwide  { margin-left: -40px; margin-right: -40px; }
.alignfull  { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }

/* ==========================================================================
   ACCESSIBILITY — REDUCED MOTION
   ========================================================================== */

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

/* ==========================================================================
   PRINT
   ========================================================================== */

@media print {
  #masthead, .sidebar, #back-to-top, .share-buttons,
  .ad-slot, #cookie-banner { display: none !important; }
  body { font-size: 12pt; }
  .entry-content { max-width: 100%; }
}
