/*
Theme Name: FuturesPosition Blog
Theme URI: https://futuresposition.com/blog
Author: FuturesPosition.com
Author URI: https://futuresposition.com
Description: A modern, SEO-optimized blog theme for FuturesPosition.com matching the brand design system.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: futuresposition-blog
Tags: blog, trading, futures, custom-colors, custom-menu, featured-images, threaded-comments, responsive-layout
*/

/* ============================================================
   DESIGN SYSTEM — mirrors FuturesPosition.com brand tokens
   ============================================================ */
:root {
  --blue-950: #0a1628;
  --blue-900: #0f2040;
  --blue-800: #1e3a8a;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-400: #60a5fa;
  --blue-100: #dbeafe;
  --blue-50:  #eff6ff;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-400: #94a3b8;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50:  #f8fafc;
  --white: #ffffff;
  --green-500: #22c55e;

  --font-head: 'Sora', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.14), 0 4px 12px rgba(0,0,0,.08);
  --shadow-blue: 0 8px 32px rgba(37,99,235,.25);
  --content-width: 760px;
  --sidebar-width: 320px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--slate-700);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--blue-700); }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  line-height: 1.2;
  color: var(--slate-900);
  font-weight: 700;
}
h1 { font-size: clamp(1.875rem, 4vw, 3rem); font-weight: 800; letter-spacing: -.03em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); letter-spacing: -.02em; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: .95rem; font-weight: 600; }
h6 { font-size: .875rem; font-weight: 600; }
p { color: var(--slate-600); line-height: 1.8; margin-bottom: 1.25rem; }
p:last-child { margin-bottom: 0; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
li { color: var(--slate-600); line-height: 1.75; margin-bottom: .35rem; }
blockquote {
  border-left: 4px solid var(--blue-500);
  background: var(--blue-50);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--blue-900);
}
blockquote p { color: var(--blue-900); margin: 0; }
code {
  background: var(--slate-100); color: var(--blue-800);
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: .875em; padding: .15em .4em; border-radius: 4px;
}
pre {
  background: var(--slate-900); color: #e2e8f0;
  border-radius: var(--radius-md); padding: 1.5rem;
  overflow-x: auto; margin: 2rem 0;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: .875rem; line-height: 1.6;
}
pre code { background: none; color: inherit; padding: 0; font-size: inherit; }
hr { border: none; border-top: 1px solid var(--slate-200); margin: 2.5rem 0; }
table { width: 100%; border-collapse: collapse; margin: 2rem 0; }
th { background: var(--blue-50); color: var(--blue-800); font-family: var(--font-head); font-weight: 700; text-align: left; padding: .875rem 1rem; border-bottom: 2px solid var(--blue-100); font-size: .875rem; text-transform: uppercase; letter-spacing: .05em; }
td { padding: .875rem 1rem; border-bottom: 1px solid var(--slate-200); color: var(--slate-700); font-size: .95rem; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--slate-50); }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container--narrow { max-width: 860px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }

/* ============================================================
   COMPONENTS — BADGE, BUTTONS
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--blue-100); color: var(--blue-700);
  font-family: var(--font-head); font-size: .72rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  padding: .3rem .85rem; border-radius: 50px;
  text-decoration: none;
}
.badge:hover { background: var(--blue-100); color: var(--blue-700); }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-head); font-weight: 600; font-size: .9rem;
  padding: .75rem 1.75rem; border-radius: 50px;
  text-decoration: none; border: none; cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
}
.btn-primary { background: var(--blue-600); color: white; box-shadow: var(--shadow-blue); }
.btn-primary:hover { background: var(--blue-700); color: white; transform: translateY(-2px); box-shadow: 0 12px 32px rgba(37,99,235,.35); }
.btn-outline { background: transparent; color: var(--blue-600); border: 1.5px solid var(--blue-300); }
.btn-outline:hover { background: var(--blue-50); color: var(--blue-700); }

/* ============================================================
   READING PROGRESS BAR
   ============================================================ */
#reading-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--blue-500), var(--blue-400));
  z-index: 9999; transition: width .1s linear;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-200);
}

/* Three-column header: logo | [centered menu] | cta
   Menu is pinned dead-centre with position:absolute so it never
   pushes left or right regardless of WordPress wrapper divs */
.nav__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

/* Logo — hard left */
.site-branding { flex-shrink: 0; z-index: 2; }
.site-branding a {
  font-family: var(--font-head); font-weight: 800; font-size: 1.25rem;
  color: var(--blue-800); text-decoration: none; letter-spacing: -.02em;
  display: flex; align-items: center; gap: .5rem;
}
.site-branding a:hover { color: var(--blue-800); }
.site-branding__icon {
  width: 32px; height: 32px; background: var(--blue-700);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}

/* Menu — pinned to the absolute centre of the header bar */
.main-navigation {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}
/* Strip any WordPress-added container div */
.main-navigation > div { display: contents; }
.main-navigation ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: .25rem;
  margin: 0; padding: 0;
}
.main-navigation ul li a {
  color: var(--slate-600); font-weight: 500; font-size: .9rem;
  padding: .5rem .75rem; border-radius: var(--radius-sm);
  display: block; text-decoration: none;
  transition: color .2s, background .2s;
  white-space: nowrap;
}
.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item > a { color: var(--blue-700); background: var(--blue-50); }
.main-navigation ul li.current-menu-item > a { font-weight: 600; }

/* Dropdown */
.main-navigation ul li { position: relative; }
.main-navigation ul ul {
  position: absolute; top: 100%; left: 0;
  background: white; border: 1px solid var(--slate-200); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); min-width: 200px; padding: .5rem;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s;
  z-index: 200; display: flex; flex-direction: column;
}
.main-navigation ul li:hover > ul { opacity: 1; visibility: visible; transform: translateY(0); }
.main-navigation ul ul li a { font-size: .875rem; }

/* CTA — hard right */
.nav__cta {
  flex-shrink: 0; z-index: 2;
  background: var(--blue-700); color: white; padding: .5rem 1.25rem;
  border-radius: 50px; font-family: var(--font-head); font-weight: 600;
  font-size: .875rem; text-decoration: none; white-space: nowrap;
  transition: background .2s, transform .15s;
}
.nav__cta:hover { background: var(--blue-800); color: white; transform: translateY(-1px); }

/* Hamburger */
.menu-toggle {
  display: none; background: none; border: none; cursor: pointer; padding: .5rem; z-index: 2;
}
.menu-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--slate-700); margin: 5px 0; border-radius: 2px;
  transition: .3s;
}
.menu-toggle.is-active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.menu-toggle.is-active span:nth-child(2) { opacity: 0; }
.menu-toggle.is-active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

@media (max-width: 768px) {
  .main-navigation { display: none; }
  .nav__cta { display: none; }
  .main-navigation.is-open {
    display: block;
    position: absolute;
    top: 64px; left: 0; right: 0;
    transform: none;
    background: white; border-bottom: 1px solid var(--slate-200);
    padding: 1rem 1.5rem;
  }
  .main-navigation.is-open ul { flex-direction: column; gap: .25rem; width: 100%; }
  .main-navigation ul ul {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none;
    border-left: 2px solid var(--blue-100); border-radius: 0; padding-left: 1rem;
  }
  .menu-toggle { display: block; }
}

/* ============================================================
   BLOG HERO (compact)
   ============================================================ */
.blog-hero {
  background: linear-gradient(160deg, var(--blue-950) 0%, var(--blue-900) 45%, var(--blue-800) 100%);
  padding: 4rem 0 3.5rem;
  position: relative; overflow: hidden; text-align: center;
}
.blog-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 100% at 50% 100%, rgba(37,99,235,.3) 0%, transparent 70%);
}
.blog-hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 60px 60px;
}
.blog-hero__content { position: relative; z-index: 2; max-width: 680px; margin: 0 auto; }
.blog-hero h1 { color: white; font-size: clamp(1.75rem, 4vw, 2.75rem); margin-bottom: .875rem; }
.blog-hero p { color: rgba(255,255,255,.68); font-size: 1.1rem; margin: 0; }
.blog-hero__search { margin-top: 1.75rem; }
.blog-hero__search form {
  display: flex; gap: .5rem; max-width: 460px; margin: 0 auto;
}
.blog-hero__search input[type="search"] {
  flex: 1; padding: .75rem 1.25rem; border-radius: 50px;
  border: 1.5px solid rgba(255,255,255,.2); background: rgba(255,255,255,.1);
  color: white; font-family: var(--font-body); font-size: .95rem; outline: none;
  transition: border-color .2s, background .2s;
}
.blog-hero__search input[type="search"]::placeholder { color: rgba(255,255,255,.45); }
.blog-hero__search input[type="search"]:focus { border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.15); }
.blog-hero__search button {
  background: white; color: var(--blue-800);
  font-family: var(--font-head); font-weight: 700; font-size: .875rem;
  padding: .75rem 1.5rem; border-radius: 50px; border: none; cursor: pointer;
  white-space: nowrap; transition: transform .15s, box-shadow .15s;
}
.blog-hero__search button:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.2); }

/* Archive / category hero (smaller) */
.archive-hero {
  background: linear-gradient(160deg, var(--blue-950) 0%, var(--blue-900) 45%, var(--blue-800) 100%);
  padding: 3rem 0 2.5rem; position: relative; overflow: hidden; text-align: center;
}
.archive-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 100% at 50% 100%, rgba(37,99,235,.25) 0%, transparent 70%);
}
.archive-hero__content { position: relative; z-index: 2; }
.archive-hero h1 { color: white; font-size: clamp(1.5rem, 3vw, 2.25rem); margin-bottom: .5rem; }
.archive-hero p { color: rgba(255,255,255,.65); margin: 0; font-size: .95rem; }

/* ============================================================
   CATEGORY FILTER TABS
   ============================================================ */
.category-filter {
  background: white; border-bottom: 1px solid var(--slate-200); padding: 0;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.category-filter__inner {
  display: flex; gap: 0; padding: 0 1.5rem;
  max-width: 1200px; margin: 0 auto;
  white-space: nowrap;
}
.category-filter__link {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: 1rem 1.25rem; color: var(--slate-500); font-weight: 500; font-size: .875rem;
  text-decoration: none; border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
  white-space: nowrap;
}
.category-filter__link:hover { color: var(--blue-700); }
.category-filter__link.active { color: var(--blue-700); border-bottom-color: var(--blue-600); font-weight: 600; }

/* ============================================================
   FEATURED POST
   ============================================================ */
/* ── Featured Post ─────────────────────────────────────────────────── */
.featured-post-section { padding: 3rem 0 0; background: white; }

.featured-post {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1.5px solid var(--slate-200);
  box-shadow: var(--shadow-md);
  background: white;
  transition: box-shadow .3s, transform .3s;
}
.featured-post:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

/* Left column: image */
.featured-post__image {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  background: linear-gradient(135deg, var(--blue-800), var(--blue-900));
}
.featured-post__image img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.featured-post:hover .featured-post__image img { transform: scale(1.04); }
.featured-post__image-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem;
}
.featured-post__label {
  position: absolute; top: 1.25rem; left: 1.25rem; z-index: 2;
  background: var(--blue-600); color: white;
  font-family: var(--font-head); font-size: .7rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  padding: .3rem .85rem; border-radius: 50px;
}

/* Right column: body */
.featured-post__body {
  padding: 2.5rem;
  display: flex; flex-direction: column; justify-content: center;
  background: white;
}
.featured-post__cat { margin-bottom: 1rem; }
.featured-post__title-link {
  display: block;
  text-decoration: none;
  margin-bottom: 1rem;
}
.featured-post__title {
  font-family: var(--font-head); font-weight: 800;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  color: var(--slate-900); line-height: 1.25;
  letter-spacing: -.02em;
  transition: color .2s;
}
.featured-post__title-link:hover .featured-post__title { color: var(--blue-700); }
.featured-post__excerpt {
  color: var(--slate-600); font-size: .95rem; line-height: 1.7;
  margin-bottom: 1.5rem;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.post-meta {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  font-size: .8rem; color: var(--slate-400);
}
.post-meta__item { display: flex; align-items: center; gap: .35rem; }
.post-meta__avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--blue-100); object-fit: cover; flex-shrink: 0;
}
.post-meta__author { color: var(--blue-600); font-weight: 600; }
.featured-post__cta {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--blue-600); font-family: var(--font-head); font-weight: 700; font-size: .875rem;
  margin-top: 1.5rem; text-decoration: none;
  transition: gap .2s;
}
.featured-post__cta:hover { gap: .75rem; }

@media (max-width: 768px) {
  .featured-post { grid-template-columns: 1fr; }
  .featured-post__image { min-height: 220px; }
  .featured-post__body { padding: 1.75rem; }
}

/* ============================================================
   POST GRID
   ============================================================ */
.posts-section { padding: 3rem 0 5rem; background: white; }
.posts-section__header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 2rem;
}
.posts-section__title {
  font-family: var(--font-head); font-weight: 700; font-size: 1rem;
  text-transform: uppercase; letter-spacing: .08em; color: var(--slate-500);
}
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }

/* Post Card */
.post-card {
  background: white; border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
  display: flex; flex-direction: column;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--blue-200); }
.post-card__thumbnail {
  position: relative; overflow: hidden; aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--blue-100), var(--blue-50));
}
.post-card__thumbnail img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.post-card:hover .post-card__thumbnail img { transform: scale(1.05); }
.post-card__thumbnail-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--blue-100), var(--blue-50));
  font-size: 2.5rem;
}
.post-card__body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.post-card__cat { margin-bottom: .875rem; }
.post-card__title {
  font-family: var(--font-head); font-weight: 700; font-size: 1.05rem;
  color: var(--slate-900); line-height: 1.3; letter-spacing: -.015em;
  margin-bottom: .75rem; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  text-decoration: none; transition: color .2s;
}
.post-card:hover .post-card__title { color: var(--blue-700); }
.post-card__excerpt {
  color: var(--slate-500); font-size: .875rem; line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 1.25rem; flex: 1;
}
.post-card__footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 1rem; border-top: 1px solid var(--slate-100);
  margin-top: auto;
}
.post-card__meta { font-size: .775rem; color: var(--slate-400); }
.post-card__read-more {
  font-family: var(--font-head); font-weight: 700; font-size: .8rem;
  color: var(--blue-600); text-decoration: none;
  display: flex; align-items: center; gap: .3rem;
  transition: gap .2s, color .2s;
}
.post-card:hover .post-card__read-more { gap: .5rem; }

/* Read time pill */
.read-time {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .72rem; font-weight: 600; color: var(--slate-400);
}

@media (max-width: 900px) { .posts-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 580px) { .posts-grid { grid-template-columns: 1fr; } }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: .5rem; padding: 3rem 0 5rem;
}
.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  font-family: var(--font-head); font-weight: 600; font-size: .875rem;
  color: var(--slate-600); text-decoration: none;
  border: 1.5px solid var(--slate-200); background: white;
  transition: all .2s;
}
.pagination .page-numbers:hover { border-color: var(--blue-400); color: var(--blue-700); background: var(--blue-50); }
.pagination .page-numbers.current { background: var(--blue-700); color: white; border-color: var(--blue-700); }
.pagination .page-numbers.dots { border: none; background: none; color: var(--slate-400); width: auto; }
.pagination .prev, .pagination .next { width: auto; padding: 0 1.25rem; gap: .4rem; }

/* ============================================================
   SINGLE POST LAYOUT
   ============================================================ */
.single-layout {
  max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
  display: grid; grid-template-columns: 1fr var(--sidebar-width);
  gap: 4rem; align-items: start; padding-top: 3.5rem; padding-bottom: 5rem;
}

/* Post Header */
.post-header { margin-bottom: 2.5rem; }
.post-header__cats { margin-bottom: 1.25rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.post-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 800;
  letter-spacing: -.03em; line-height: 1.15; margin-bottom: 1.25rem;
  color: var(--slate-900);
}
.post-header__excerpt {
  font-size: 1.15rem; color: var(--slate-500); line-height: 1.7;
  margin-bottom: 1.5rem; max-width: 680px;
}
.post-header__meta {
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  padding: 1.25rem 0; border-top: 1px solid var(--slate-200); border-bottom: 1px solid var(--slate-200);
  margin-bottom: 2rem;
}
.post-header__author { display: flex; align-items: center; gap: .75rem; }
.post-header__author-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  object-fit: cover; background: var(--blue-100); flex-shrink: 0;
}
.post-header__author-name { font-family: var(--font-head); font-weight: 600; font-size: .9rem; color: var(--slate-900); }
.post-header__author-role { font-size: .78rem; color: var(--slate-400); }
.post-header__stats { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.post-header__stat { display: flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--slate-400); }

/* Featured Image */
.post-featured-image {
  border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 2.5rem;
  aspect-ratio: 16/8; background: linear-gradient(135deg, var(--blue-800), var(--blue-900));
}
.post-featured-image img { width: 100%; height: 100%; object-fit: cover; }
.post-featured-image-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--blue-800), var(--blue-900));
  font-size: 5rem; min-height: 320px;
}

/* Article Content */
.post-content { max-width: var(--content-width); }
.post-content h2 { margin: 2.5rem 0 1rem; font-size: 1.65rem; }
.post-content h3 { margin: 2rem 0 .875rem; font-size: 1.25rem; color: var(--blue-800); }
.post-content h4 { margin: 1.75rem 0 .75rem; }
.post-content p { margin-bottom: 1.5rem; font-size: 1.05rem; line-height: 1.85; }
.post-content ul, .post-content ol { margin: 1rem 0 1.5rem; }
.post-content li { margin-bottom: .6rem; font-size: 1.05rem; }
.post-content a { color: var(--blue-600); font-weight: 500; text-decoration: underline; text-decoration-color: var(--blue-200); text-underline-offset: 3px; transition: color .2s, text-decoration-color .2s; }
.post-content a:hover { color: var(--blue-800); text-decoration-color: var(--blue-400); }
.post-content img { border-radius: var(--radius-md); margin: 2rem 0; }
.post-content .wp-caption { margin: 2rem 0; }
.post-content .wp-caption img { border-radius: var(--radius-md); margin: 0; }
.post-content .wp-caption-text { font-size: .8rem; color: var(--slate-400); margin-top: .5rem; text-align: center; font-style: italic; }

/* Intro callout */
.post-intro-callout {
  background: var(--blue-50); border-left: 4px solid var(--blue-500);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.25rem 1.5rem; margin-bottom: 2.5rem;
  font-size: 1.05rem; color: var(--blue-900); line-height: 1.7;
}
.post-intro-callout p { color: var(--blue-900); margin: 0; font-size: 1.05rem; }

/* Post Tags */
.post-tags { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--slate-200); }
.post-tags__label { font-family: var(--font-head); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--slate-400); margin-bottom: .875rem; }
.post-tags__list { display: flex; flex-wrap: wrap; gap: .5rem; }
.post-tags__list a {
  background: var(--slate-100); color: var(--slate-600);
  font-size: .8rem; font-weight: 500; padding: .35rem .875rem;
  border-radius: 50px; text-decoration: none; transition: background .2s, color .2s;
}
.post-tags__list a:hover { background: var(--blue-100); color: var(--blue-700); }

/* Post Share */
.post-share { margin-top: 2.5rem; padding: 1.5rem; background: var(--slate-50); border-radius: var(--radius-lg); }
.post-share__label { font-family: var(--font-head); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--slate-500); margin-bottom: 1rem; }
.post-share__buttons { display: flex; gap: .75rem; flex-wrap: wrap; }
.share-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-head); font-weight: 600; font-size: .8rem;
  padding: .55rem 1.1rem; border-radius: 50px; text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
.share-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.share-btn--twitter { background: #000; color: white; }
.share-btn--linkedin { background: #0a66c2; color: white; }
.share-btn--copy { background: var(--slate-200); color: var(--slate-700); cursor: pointer; border: none; }
.share-btn--copy:hover { background: var(--slate-300); }

/* Author Box */
.author-box {
  background: var(--blue-50); border: 1.5px solid var(--blue-100);
  border-radius: var(--radius-xl); padding: 2rem; margin-top: 3rem;
  display: flex; gap: 1.5rem; align-items: flex-start;
}
.author-box__avatar {
  width: 72px; height: 72px; border-radius: 50%;
  object-fit: cover; background: var(--blue-100); flex-shrink: 0;
}
.author-box__avatar-placeholder {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--blue-700); display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem; flex-shrink: 0; color: white;
}
.author-box__name { font-family: var(--font-head); font-weight: 700; font-size: 1rem; color: var(--slate-900); margin-bottom: .25rem; }
.author-box__bio { font-size: .9rem; color: var(--slate-600); line-height: 1.65; margin: 0; }

@media (max-width: 768px) {
  .author-box { flex-direction: column; }
}

/* Related Posts */
.related-posts { margin-top: 4rem; padding-top: 3rem; border-top: 1px solid var(--slate-200); }
.related-posts__title { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; text-transform: uppercase; letter-spacing: .08em; color: var(--slate-500); margin-bottom: 1.75rem; }
.related-posts__grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; }
/* Also animate related post cards on single pages */
.related-posts__grid .post-card { animation: card-enter .4s ease both; }
.related-posts__grid .post-card:nth-child(1) { animation-delay: .05s }
.related-posts__grid .post-card:nth-child(2) { animation-delay: .12s }
.related-posts__grid .post-card:nth-child(3) { animation-delay: .19s }

@media (max-width: 900px) {
  .single-layout { grid-template-columns: 1fr; }
  .related-posts__grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 580px) {
  .related-posts__grid { grid-template-columns: 1fr; }
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2rem; }
.widget {
  background: white; border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-lg); padding: 1.5rem; overflow: hidden;
}
.widget:first-child { border-color: var(--blue-200); background: var(--blue-50); }
.widget-title {
  font-family: var(--font-head); font-weight: 700; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .08em; color: var(--slate-500);
  margin-bottom: 1.25rem; padding-bottom: .75rem;
  border-bottom: 1px solid var(--slate-200);
}
.widget:first-child .widget-title { border-color: var(--blue-100); }

/* CTA Widget */
.widget-cta h3 { font-size: 1.1rem; margin-bottom: .6rem; }
.widget-cta p { font-size: .875rem; margin-bottom: 1.25rem; }
.widget-cta .btn { width: 100%; justify-content: center; }

/* Recent Posts Widget */
.widget ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .875rem; }
.widget ul li { padding-bottom: .875rem; border-bottom: 1px solid var(--slate-100); }
.widget ul li:last-child { border-bottom: none; padding-bottom: 0; }
.widget ul li a { color: var(--slate-800); font-weight: 600; font-size: .875rem; line-height: 1.4; text-decoration: none; display: block; margin-bottom: .2rem; transition: color .2s; }
.widget ul li a:hover { color: var(--blue-600); }
.widget ul li .post-date { font-size: .75rem; color: var(--slate-400); }

/* Categories Widget */
.widget .cat-item { padding: 0; border: none; margin: 0; }
.widget .cat-item a {
  display: flex; align-items: center; justify-content: space-between;
  color: var(--slate-600); font-size: .875rem; font-weight: 500;
  padding: .5rem 0; border-bottom: 1px solid var(--slate-100);
  text-decoration: none; transition: color .2s;
}
.widget .cat-item:last-child a { border-bottom: none; }
.widget .cat-item a:hover { color: var(--blue-700); }
.widget .cat-item a .cat-count {
  background: var(--slate-100); color: var(--slate-500);
  font-size: .7rem; font-weight: 700; padding: .15rem .5rem;
  border-radius: 50px;
}

/* Tag Cloud Widget */
.widget .tagcloud { display: flex; flex-wrap: wrap; gap: .5rem; }
.widget .tagcloud a {
  background: var(--slate-100); color: var(--slate-600);
  font-size: .78rem !important; font-weight: 500; padding: .3rem .75rem;
  border-radius: 50px; text-decoration: none; transition: background .2s, color .2s;
}
.widget .tagcloud a:hover { background: var(--blue-100); color: var(--blue-700); }

/* Search Widget */
.widget .search-form { display: flex; gap: .5rem; }
.widget .search-field {
  flex: 1; padding: .625rem .875rem; border-radius: var(--radius-sm);
  border: 1.5px solid var(--slate-200); font-family: var(--font-body);
  font-size: .875rem; outline: none; transition: border-color .2s;
}
.widget .search-field:focus { border-color: var(--blue-400); }
.widget .search-submit {
  background: var(--blue-700); color: white; border: none;
  padding: .625rem 1rem; border-radius: var(--radius-sm); cursor: pointer;
  font-family: var(--font-head); font-weight: 600; font-size: .8rem;
  transition: background .2s;
}
.widget .search-submit:hover { background: var(--blue-800); }

/* ============================================================
   COMMENTS
   ============================================================ */
.comments-area {
  max-width: var(--content-width); margin-top: 4rem;
  padding-top: 3rem; border-top: 1px solid var(--slate-200);
}
.comments-title { font-size: 1.2rem; margin-bottom: 2rem; }
.comment-list { list-style: none; padding: 0; }
.comment { margin-bottom: 2rem; }
.comment .children { list-style: none; padding-left: 2rem; margin-top: 1.5rem; border-left: 2px solid var(--slate-200); }
.comment-body {
  background: var(--slate-50); border: 1px solid var(--slate-200);
  border-radius: var(--radius-md); padding: 1.25rem 1.5rem;
}
.comment-author .fn { font-family: var(--font-head); font-weight: 700; font-size: .9rem; color: var(--slate-900); }
.comment-author .fn a { text-decoration: none; color: var(--slate-900); }
.comment-meta { font-size: .78rem; color: var(--slate-400); margin-bottom: .875rem; }
.comment-content p { font-size: .95rem; margin-bottom: .5rem; }
.reply { margin-top: .75rem; }
.reply .comment-reply-link {
  font-family: var(--font-head); font-weight: 600; font-size: .78rem;
  color: var(--blue-600); text-decoration: none;
}
.comment-respond { margin-top: 3rem; }
.comment-respond h3 { font-size: 1.1rem; margin-bottom: 1.5rem; }
.comment-form { display: flex; flex-direction: column; gap: 1.25rem; }
.comment-form label { font-family: var(--font-head); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--slate-500); display: block; margin-bottom: .4rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%; padding: .875rem 1rem; border-radius: var(--radius-sm);
  border: 1.5px solid var(--slate-200); font-family: var(--font-body);
  font-size: .95rem; color: var(--slate-900); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--blue-400); box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
.comment-form textarea { resize: vertical; min-height: 120px; }
.comment-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.comment-form .submit { background: var(--blue-700); color: white; font-family: var(--font-head); font-weight: 700; font-size: .9rem; padding: .875rem 2rem; border-radius: 50px; border: none; cursor: pointer; transition: background .2s, transform .15s; align-self: flex-start; }
.comment-form .submit:hover { background: var(--blue-800); transform: translateY(-1px); }
@media (max-width: 580px) { .comment-form .form-row { grid-template-columns: 1fr; } }

/* ============================================================
   PAGE TEMPLATE
   ============================================================ */
.page-hero-section {
  background: linear-gradient(160deg, var(--blue-950) 0%, var(--blue-900) 45%, var(--blue-800) 100%);
  padding: 4rem 0 3.5rem; position: relative; overflow: hidden; text-align: center;
}
.page-hero-section::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 100% at 50% 100%, rgba(37,99,235,.3) 0%, transparent 70%);
}
.page-hero-section__grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 60px 60px;
}
.page-hero-section__content { position: relative; z-index: 2; max-width: 680px; margin: 0 auto; }
.page-hero-section h1 { color: white; margin-bottom: .875rem; }
.breadcrumb-nav { font-size: .8rem; color: rgba(255,255,255,.45); margin-bottom: 1rem; display: flex; align-items: center; justify-content: center; gap: .4rem; flex-wrap: wrap; }
.breadcrumb-nav a { color: rgba(255,255,255,.55); text-decoration: none; transition: color .2s; }
.breadcrumb-nav a:hover { color: rgba(255,255,255,.85); }
.breadcrumb-nav span { color: rgba(255,255,255,.3); }

.page-content-section { padding: 4rem 0 6rem; }
.page-content { max-width: var(--content-width); margin: 0 auto; }
.page-content h2 { margin: 2.5rem 0 1rem; }
.page-content h3 { margin: 2rem 0 .875rem; color: var(--blue-800); }
.page-content p { font-size: 1.05rem; line-height: 1.85; margin-bottom: 1.5rem; }
.page-content ul, .page-content ol { margin: 1rem 0 1.5rem; }
.page-content li { font-size: 1.05rem; }
.page-content a { color: var(--blue-600); text-decoration: underline; text-decoration-color: var(--blue-200); text-underline-offset: 3px; }
.page-content a:hover { color: var(--blue-800); text-decoration-color: var(--blue-500); }
.page-content img { border-radius: var(--radius-md); margin: 2rem 0; }

/* ============================================================
   SEARCH RESULTS
   ============================================================ */
.search-header { padding: 3rem 0 2rem; }
.search-header__query { font-size: 1rem; color: var(--slate-500); margin-top: .5rem; }
.search-header__query strong { color: var(--blue-700); }
.no-results { text-align: center; padding: 5rem 1.5rem; }
.no-results__icon { font-size: 4rem; margin-bottom: 1.5rem; }
.no-results h2 { margin-bottom: .75rem; }
.no-results p { max-width: 440px; margin: 0 auto 2rem; }

/* ============================================================
   404 PAGE
   ============================================================ */
.error-404 { text-align: center; padding: 7rem 1.5rem; }
.error-404__code {
  font-family: var(--font-head); font-size: clamp(6rem, 20vw, 12rem);
  font-weight: 800; letter-spacing: -.06em; color: var(--blue-100);
  line-height: 1; margin-bottom: 1rem;
}
.error-404 h2 { margin-bottom: .75rem; }
.error-404 p { max-width: 440px; margin: 0 auto 2.5rem; }
.error-404__links { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
  background: linear-gradient(135deg, var(--blue-700) 0%, var(--blue-800) 100%);
  text-align: center;
  padding: 5rem 0;
}
.cta-section .container {
  display: flex; flex-direction: column; align-items: center;
}
.cta-section h2 { color: white; margin-bottom: .75rem; }
.cta-section p { color: rgba(255,255,255,.7); max-width: 540px; margin: 0 auto 2rem; }
.cta-section .btn-white,
.cta-section a.btn-white {
  display: inline-flex; align-items: center; gap: .5rem;
  background: white; color: var(--blue-800);
  font-family: var(--font-head); font-weight: 700; font-size: 1.05rem;
  padding: 1rem 2.5rem; border-radius: 50px; text-decoration: none;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 8px 28px rgba(0,0,0,.2);
}
.cta-section .btn-white:hover,
.cta-section a.btn-white:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(0,0,0,.28);
  color: var(--blue-800);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--slate-900); color: var(--slate-400); padding: 3.5rem 0 2rem; }
.site-footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 3rem; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 2rem; }
.footer-brand__logo { font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; color: white; text-decoration: none; display: flex; align-items: center; gap: .5rem; margin-bottom: .875rem; }
.footer-brand__logo:hover { color: white; }
.footer-brand__logo-icon { width: 30px; height: 30px; background: var(--blue-700); border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: .9rem; flex-shrink: 0; }
.footer-brand p { font-size: .875rem; line-height: 1.65; max-width: 260px; color: var(--slate-400); }
.footer-col h5 { font-family: var(--font-head); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: white; margin-bottom: 1rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.footer-col ul a { color: var(--slate-400); text-decoration: none; font-size: .875rem; transition: color .2s; }
.footer-col ul a:hover { color: var(--blue-400); }
.site-footer__bottom { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 1rem; }
.site-footer__bottom p { font-size: .8rem; }
.footer-disclaimer { font-size: .75rem; max-width: 540px; line-height: 1.6; }

@media (max-width: 900px) { .site-footer__inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 580px) { .site-footer__inner { grid-template-columns: 1fr; } }

/* ============================================================
   WORDPRESS CORE — Alignments, Captions, Gallery
   ============================================================ */
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin: 0 auto 1.5rem; }
.alignwide { margin-left: -3rem; margin-right: -3rem; width: calc(100% + 6rem); max-width: none; }
@media (max-width: 900px) { .alignwide { margin-left: 0; margin-right: 0; width: 100%; } }
.wp-block-image.alignfull { margin-left: calc(-50vw + 50%); width: 100vw; max-width: 100vw; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: .8rem; color: var(--slate-400); text-align: center; margin-top: .5rem; font-style: italic; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .75rem; margin: 2rem 0; }
.gallery-item img { border-radius: var(--radius-sm); width: 100%; }
.screen-reader-text { position: absolute; left: -9999em; }

/* ============================================================
   SCROLL ANIMATIONS — kept minimal to avoid visibility bugs
   ============================================================ */

/* fade-up: used only on single elements (not post grids) */
.fade-up { opacity: 0; transform: translateY(20px); transition: opacity .5s ease, transform .5s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* Posts grid: NEVER hidden — always fully visible.
   Cards get a subtle entrance via CSS animation on load only. */
.posts-grid .post-card {
  animation: card-enter .4s ease both;
}
.posts-grid .post-card:nth-child(1) { animation-delay: .05s }
.posts-grid .post-card:nth-child(2) { animation-delay: .10s }
.posts-grid .post-card:nth-child(3) { animation-delay: .15s }
.posts-grid .post-card:nth-child(4) { animation-delay: .20s }
.posts-grid .post-card:nth-child(5) { animation-delay: .25s }
.posts-grid .post-card:nth-child(6) { animation-delay: .30s }
/* all further cards appear instantly */

@keyframes card-enter {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

