/*
Theme Name: P4Product
Theme URI: https://p4product.com
Author: P4Product
Description: Clean tech reviews, guides and affiliate blog theme converted from the P4Product PHP site. Menus, categories, posts, pages, FAQ, contact form and sidebars are all editable from the WordPress dashboard - no file editing needed.
Version: 2.0.0
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: p4product
Tags: blog, news, two-columns, custom-menu, featured-images, threaded-comments, translation-ready, custom-logo
*/

/* Aliases used by some page content (About / Contact cards) */
:root {
  --color-primary: #2563eb;
  --color-surface: #ffffff;
  --color-muted:   #64748b;
  --color-border:  #e2e8f0;
}


/* ---- CSS Custom Properties ---- */
:root {
  --primary:        #2563eb;
  --primary-dark:   #1d4ed8;
  --primary-light:  #eff6ff;
  --accent:         #f59e0b;
  --accent-dark:    #d97706;
  --success:        #10b981;
  --danger:         #ef4444;

  --text:           #0f172a;
  --text-muted:     #64748b;
  --text-light:     #94a3b8;

  --bg:             #f8fafc;
  --surface:        #ffffff;
  --border:         #e2e8f0;
  --border-light:   #f1f5f9;

  --radius-xs:  4px;
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  18px;
  --radius-xl:  24px;

  --shadow-xs:  0 1px 2px rgba(0,0,0,.05);
  --shadow-sm:  0 1px 4px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.04);
  --shadow-md:  0 4px 16px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);
  --shadow-lg:  0 12px 32px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.08);
  --shadow-xl:  0 24px 56px rgba(0,0,0,.14), 0 8px 20px rgba(0,0,0,.08);

  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Merriweather', Georgia, 'Times New Roman', serif;
  --font-mono:  'Fira Code', 'Cascadia Code', 'Courier New', monospace;

  --ease:       cubic-bezier(.4,0,.2,1);
  --t:          200ms;
  --container:  1180px;
  --gap:        1.5rem;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a  { color: var(--primary); text-decoration: none; transition: color var(--t) var(--ease); }
a:hover { color: var(--primary-dark); }
h1,h2,h3,h4,h5,h6 { line-height: 1.3; font-weight: 700; color: var(--text); }
p { margin-bottom: 1rem; }
ul,ol { padding-left: 1.25rem; }
input,select,textarea,button { font-family: inherit; }

/* ============================================================
   UTILITY
   ============================================================ */
.container  { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }
.text-muted { color: var(--text-muted); font-size: .875rem; }
.sr-only    { position: absolute; width:1px; height:1px; clip:rect(0 0 0 0); overflow:hidden; }

/* ============================================================
   BADGE
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .25rem .65rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .65rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .9rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--t) var(--ease);
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(37,99,235,.35);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37,99,235,.4);
}
.btn-accent {
  background: var(--accent);
  color: #1e293b;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(245,158,11,.35);
}
.btn-accent:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #1e293b;
  transform: translateY(-1px);
}
.btn-outline-white {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.55);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,.15);
  border-color: #fff;
  color: #fff;
}
.btn-ghost {
  background: transparent;
  color: var(--primary);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}
.btn-sm { padding: .4rem 1rem; font-size: .8rem; }
.btn-submit {
  background: var(--primary);
  color: #fff;
  padding: .7rem 2rem;
  border-radius: 999px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: .95rem;
  transition: background var(--t) var(--ease), transform var(--t) var(--ease);
  box-shadow: 0 2px 8px rgba(37,99,235,.3);
}
.btn-submit:hover { background: var(--primary-dark); transform: translateY(-1px); }

/* ============================================================
   AD SLOTS
   ============================================================ */
.ad-slot {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  color: var(--text-muted);
  margin: .75rem auto;
}
.ad-slot--header     { width:100%; min-height: 80px; }
.ad-slot--sidebar    { width:100%; min-height: 250px; }
.ad-slot--in-article { width:100%; min-height: 60px; margin: 2rem 0; }
.ad-slot__label      { font-size: .6rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-light); }
.ad-slot__placeholder{ font-size: .8rem; margin: .2rem 0 0; font-weight: 500; }

/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-logo {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--text);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -.02em;
  text-decoration: none;
  transition: color var(--t) var(--ease);
}
.site-logo:hover { color: var(--primary); }
.site-logo__icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 2px 8px rgba(37,99,235,.3);
  flex-shrink: 0;
}
.site-header__tagline {
  color: var(--text-muted);
  font-size: .82rem;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  background: linear-gradient(90deg, #1e3a8a 0%, #1d4ed8 50%, #2563eb 100%);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 12px rgba(30,58,138,.25);
}
.navbar__inner {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-height: 52px;
  position: relative;
}
.navbar__menu {
  display: flex;               /* ← horizontal flex row */
  flex-direction: row;         /* ← explicit: horizontal */
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  align-items: center;
  height: 52px;
}
.navbar__menu::-webkit-scrollbar { display: none; }
.navbar__menu li { display: flex; align-items: center; }
.navbar__menu li a {
  display: inline-flex;
  align-items: center;
  color: rgba(255,255,255,.82);
  padding: .4rem .75rem;
  border-radius: var(--radius-xs);
  font-size: .84rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
  height: 34px;
}
.navbar__menu li a:hover,
.navbar__menu li.active a {
  background: rgba(255,255,255,.18);
  color: #fff;
}
.navbar__menu li.active a {
  background: rgba(255,255,255,.22);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 rgba(255,255,255,.5);
}

/* Search bar */
.navbar__search {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  padding: .25rem .5rem .25rem .85rem;
  gap: .4rem;
  flex-shrink: 0;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease);
}
.navbar__search:focus-within {
  background: rgba(255,255,255,.22);
  border-color: rgba(255,255,255,.45);
}
.navbar__search input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: .84rem;
  width: 130px;
}
.navbar__search input::placeholder { color: rgba(255,255,255,.55); }
.navbar__search button {
  background: none; border: none;
  cursor: pointer; font-size: 1rem;
  padding: 0; line-height: 1; opacity: .8;
}
.navbar__search button:hover { opacity: 1; }

/* Hamburger — hidden on desktop */
.navbar__toggle { display: none; }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: .55rem 0;
}
.breadcrumb ol {
  display: flex;
  list-style: none;
  gap: 0;
  padding: 0;
  flex-wrap: wrap;
  align-items: center;
  font-size: .78rem;
  color: var(--text-muted);
}
.breadcrumb li {
  display: flex;
  align-items: center;
}
.breadcrumb li + li::before {
  content: '/';
  color: var(--border);
  margin: 0 .4rem;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text); font-weight: 500; }

/* ============================================================
   LAYOUT GRIDS
   ============================================================ */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}
.layout-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}

/* ============================================================
   ARTICLE CARD
   ============================================================ */
.article-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.article-card__img-wrap {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--border-light);
}
.article-card__img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s var(--ease);
}
.article-card:hover .article-card__img-wrap img { transform: scale(1.05); }
.article-card__img-wrap .badge {
  position: absolute; top: .7rem; left: .7rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.article-card__body {
  padding: 1.1rem 1.25rem 1.25rem;
  flex: 1; display: flex; flex-direction: column;
}
.article-card__body h3 {
  font-size: .97rem;
  font-weight: 700;
  margin-bottom: .5rem;
  line-height: 1.45;
}
.article-card__body h3 a {
  color: var(--text);
  text-decoration: none;
}
.article-card__body h3 a:hover { color: var(--primary); }
.article-card__desc {
  color: var(--text-muted);
  font-size: .83rem;
  line-height: 1.6;
  flex: 1;
  margin-bottom: .85rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card__meta {
  display: flex;
  gap: .75rem;
  font-size: .73rem;
  color: var(--text-light);
  flex-wrap: wrap;
  padding-top: .7rem;
  border-top: 1px solid var(--border-light);
}

/* Horizontal card */
.article-card--horizontal { flex-direction: row; }
.article-card--horizontal .article-card__img-wrap { width: 200px; flex-shrink: 0; aspect-ratio: auto; }
.article-card--horizontal .article-card__img-wrap img { height: 100%; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar__widget {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border);
}
.sidebar__widget h3 {
  font-size: .92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--primary);
}
.sidebar__list { list-style: none; padding: 0; margin: 0; }
.sidebar__list li {
  padding: .55rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: .855rem;
  line-height: 1.45;
}
.sidebar__list li:last-child { border: none; }
.sidebar__list a { color: var(--text); font-weight: 500; }
.sidebar__list a:hover { color: var(--primary); }

/* Category list in sidebar */
.cat-list { list-style: none; padding: 0; margin: 0; }
.cat-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .55rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: .865rem;
  gap: .5rem;
}
.cat-list li:last-child { border: none; }
.cat-list a { color: var(--text); font-weight: 500; }
.cat-list a:hover { color: var(--primary); }

/* Tag cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag-cloud a {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .22rem .65rem;
  font-size: .72rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--t) var(--ease);
}
.tag-cloud a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ============================================================
   HERO — HOMEPAGE
   ============================================================ */
.hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 55%, #3b82f6 100%);
  color: #fff;
  padding: 5rem 0 4.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero__content { position: relative; }
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  padding: .3rem .9rem;
  font-size: .78rem;
  font-weight: 600;
  color: rgba(255,255,255,.9);
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #fff;
}
.hero h1 span { color: #fbbf24; }
.hero p {
  font-size: clamp(.95rem, 2vw, 1.15rem);
  opacity: .88;
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}
.hero__actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.hero__stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.15);
  position: relative;
}
.hero__stat { text-align: center; }
.hero__stat strong { display: block; font-size: 1.75rem; font-weight: 800; color: #fff; }
.hero__stat span   { font-size: .8rem; color: rgba(255,255,255,.65); }

/* ============================================================
   CATEGORY PILLS
   ============================================================ */
.category-pills {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.category-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1rem;
  border-radius: 999px;
  font-size: .83rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.category-pill:hover {
  color: #fff;
  opacity: .9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
}

/* ============================================================
   SECTION HEADER
   ============================================================ */
.section { padding: 3rem 0; }
.section__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: .75rem;
}
.section__title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.section__title span { color: var(--primary); }
.section__link {
  font-size: .84rem;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}
.section__link:hover { color: var(--primary-dark); }

/* ============================================================
   FEATURED ARTICLE
   ============================================================ */
.featured-article {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  transition: box-shadow var(--t) var(--ease);
}
.featured-article:hover { box-shadow: var(--shadow-xl); }
.featured-article__img {
  overflow: hidden;
  background: var(--border-light);
}
.featured-article__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}
.featured-article:hover .featured-article__img img { transform: scale(1.04); }
.featured-article__body {
  padding: 2.5rem 2rem;
  display: flex; flex-direction: column; justify-content: center;
}
.featured-article__label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  margin-bottom: .5rem;
}
.featured-article__body h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2.5vw, 1.65rem);
  line-height: 1.3;
  margin: .6rem 0 1rem;
}
.featured-article__body h2 a { color: var(--text); }
.featured-article__body h2 a:hover { color: var(--primary); }
.featured-article__meta {
  display: flex; gap: .75rem;
  font-size: .78rem; color: var(--text-muted);
  flex-wrap: wrap; margin-bottom: .9rem;
}
.featured-article__body > p {
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

/* ============================================================
   PAGE HERO (inner pages)
   ============================================================ */
.page-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0;
}
.page-hero h1 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.02em; }
.page-hero p  { color: var(--text-muted); font-size: .95rem; margin: .4rem 0 0; }

/* ============================================================
   ARTICLE SINGLE PAGE
   ============================================================ */
.article-single { max-width: 760px; }
.article-single__header { margin-bottom: 1.75rem; }
.article-single__title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  line-height: 1.25;
  margin: .75rem 0 1rem;
  letter-spacing: -.01em;
}
.article-single__meta {
  display: flex; gap: 1rem;
  color: var(--text-muted); font-size: .83rem;
  flex-wrap: wrap; align-items: center;
  padding: .85rem 1rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.article-single__cover {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}
.article-single__cover img { width: 100%; max-height: 440px; object-fit: cover; }

/* Article body typography */
.article-body { font-size: 1.02rem; line-height: 1.82; color: #1e293b; }
.article-body > * + * { margin-top: 1rem; }
.article-body h2 {
  font-size: 1.4rem; font-weight: 800;
  margin: 2.25rem 0 .75rem;
  color: var(--text);
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--border-light);
  letter-spacing: -.01em;
}
.article-body h3 {
  font-size: 1.12rem; font-weight: 700;
  margin: 1.75rem 0 .5rem; color: var(--text);
}
.article-body ul, .article-body ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.article-body li { margin-bottom: .4rem; }
.article-body blockquote {
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem;
  background: var(--primary-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.75rem 0;
  font-style: italic;
  color: #1e40af;
}
.article-body code {
  background: #f1f5f9;
  color: #be185d;
  padding: .12em .4em;
  border-radius: var(--radius-xs);
  font-size: .88em;
  font-family: var(--font-mono);
  border: 1px solid var(--border);
}
.article-body pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 1.75rem 0;
  box-shadow: var(--shadow-md);
}
.article-body pre code {
  background: none; padding: 0;
  color: inherit; font-size: .88rem;
  border: none;
}

/* Tags */
.article-tags { display: flex; gap: .45rem; flex-wrap: wrap; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); align-items: center; }
.article-tags strong { font-size: .82rem; color: var(--text-muted); }
.article-tags a {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .22rem .7rem;
  font-size: .77rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--t) var(--ease);
}
.article-tags a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ============================================================
   STATIC CONTENT PAGES
   ============================================================ */
.static-content { max-width: 760px; }
.static-content h2 {
  font-size: 1.2rem; font-weight: 800;
  color: var(--primary);
  margin: 2rem 0 .6rem;
  padding-bottom: .4rem;
}
.static-content h3 {
  font-size: 1rem; font-weight: 700;
  margin: 1.25rem 0 .4rem;
}
.static-content p, .static-content li { color: #374151; font-size: .95rem; }
.static-content ul, .static-content ol { margin-bottom: 1rem; }
.static-content li { margin-bottom: .35rem; }

/* ============================================================
   CONTACT FORM
   ============================================================ */
.contact-form {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.form-group { margin-bottom: 1.15rem; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: .88rem;
  margin-bottom: .4rem;
  color: var(--text);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: .65rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .92rem;
  background: var(--bg);
  color: var(--text);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
  background: var(--surface);
}
.form-group textarea { min-height: 140px; resize: vertical; }

/* ============================================================
   FAQ
   ============================================================ */
.faq-item {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  margin-bottom: .5rem;
  overflow: hidden;
}
.faq-question {
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  user-select: none;
  transition: background var(--t) var(--ease);
}
.faq-question:hover { background: var(--bg); }
.faq-icon {
  width: 24px; height: 24px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: transform var(--t) var(--ease), background var(--t) var(--ease);
  line-height: 1;
}
.faq-item.open .faq-icon {
  transform: rotate(45deg);
  background: var(--primary);
  color: #fff;
}
.faq-answer {
  display: none;
  padding: 0 1.25rem 1.1rem;
  color: var(--text-muted);
  font-size: .92rem;
  line-height: 1.7;
}
.faq-item.open .faq-answer { display: block; }

/* ============================================================
   NEWSLETTER BOX
   ============================================================ */
.newsletter-box {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  text-align: center;
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
}
.newsletter-box::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 50%, rgba(255,255,255,.06) 0%, transparent 60%);
  pointer-events: none;
}
.newsletter-box h2 { font-size: 1.6rem; margin-bottom: .5rem; font-weight: 800; position: relative; }
.newsletter-box p  { opacity: .88; margin-bottom: 1.5rem; position: relative; }
.newsletter-form {
  display: flex; gap: .5rem;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}
.newsletter-form input {
  flex: 1; min-width: 210px;
  padding: .75rem 1.25rem;
  border-radius: 999px;
  border: none;
  font-size: .92rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.newsletter-form button {
  background: var(--accent);
  color: #1e293b;
  padding: .75rem 1.75rem;
  border-radius: 999px;
  border: none;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  transition: background var(--t) var(--ease), transform var(--t) var(--ease);
  box-shadow: 0 2px 8px rgba(245,158,11,.35);
}
.newsletter-form button:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination { margin: 2.5rem 0; display: flex; justify-content: center; }
.pagination ul { list-style: none; display: flex; gap: .35rem; padding: 0; }
.pagination li a {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-size: .875rem;
  font-weight: 600;
  transition: all var(--t) var(--ease);
}
.pagination li a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.pagination li.active a {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(37,99,235,.35);
}

/* ============================================================
   404 PAGE
   ============================================================ */
.not-found { text-align: center; padding: 5rem 1rem; }
.not-found h1 {
  font-size: 7rem;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #0a0f1e;
  color: #94a3b8;
  padding: 3.5rem 0 1.5rem;
  margin-top: 4rem;
}
.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.site-footer__brand .site-logo { color: #fff; margin-bottom: .85rem; }
.site-footer__brand .site-logo:hover { color: var(--accent); }
.site-footer__brand p { font-size: .855rem; line-height: 1.65; max-width: 260px; }
.site-footer__copy { font-size: .78rem; margin-top: 1rem; opacity: .5; }
.site-footer__links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.site-footer__col h4 {
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: .9rem;
}
.site-footer__col ul { list-style: none; padding: 0; margin: 0; }
.site-footer__col li { margin-bottom: .5rem; }
.site-footer__col a {
  color: #94a3b8;
  font-size: .855rem;
  transition: color var(--t) var(--ease);
}
.site-footer__col a:hover { color: var(--accent); }
.site-footer__bottom {
  padding-top: 1.5rem;
  text-align: center;
  font-size: .78rem;
  color: #475569;
}

/* ============================================================
   RESPONSIVE — Tablets (≤ 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .grid-3         { grid-template-columns: repeat(2, 1fr); }
  .featured-article { grid-template-columns: 1fr; }
  .featured-article__img { aspect-ratio: 16/9; max-height: 320px; }
  .layout-with-sidebar { grid-template-columns: 1fr; }
  .site-footer__links { grid-template-columns: repeat(2, 1fr); }
  .hero__stats { gap: 2rem; }
}

/* ============================================================
   RESPONSIVE — Mobile (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
  :root { --gap: 1.1rem; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }

  /* Mobile navbar */
  .navbar__toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none; border: none;
    cursor: pointer; padding: .4rem;
    order: -1;
  }
  .navbar__toggle span {
    display: block; width: 22px; height: 2px;
    background: #fff; border-radius: 2px;
    transition: all var(--t) var(--ease);
  }
  .navbar__toggle[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .navbar__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .navbar__toggle[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

  /* Collapsed mobile menu */
  .navbar__menu {
    display: none;
    flex-direction: column;         /* ← vertical on mobile only */
    background: #1e3a8a;
    position: absolute;
    top: 52px; left: 0; right: 0;
    padding: .5rem .75rem .75rem;
    gap: .1rem;
    z-index: 300;
    height: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
  }
  .navbar__menu.open { display: flex; }
  .navbar__menu li a { height: 38px; font-size: .88rem; padding: .4rem .85rem; }
  .navbar__search input { width: 100px; }

  /* Article card horizontal → vertical on mobile */
  .article-card--horizontal { flex-direction: column; }
  .article-card--horizontal .article-card__img-wrap { width: 100%; aspect-ratio: 16/9; }

  /* Hero */
  .hero { padding: 3rem 0; }
  .hero__stats { display: none; }
  .hero__actions { gap: .5rem; }

  /* Footer */
  .site-footer__inner { grid-template-columns: 1fr; gap: 1.75rem; }
  .site-footer__links { grid-template-columns: repeat(2, 1fr); }

  /* Article */
  .article-single__title { font-size: 1.5rem; }
  .article-body { font-size: .97rem; }
}

/* ============================================================
   RESPONSIVE — Small mobile (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .site-footer__links { grid-template-columns: 1fr; }
  .navbar__search input { width: 80px; font-size: .78rem; }
  .category-pills { gap: .4rem; }
  .category-pill { font-size: .78rem; padding: .4rem .8rem; }
}


/* Menu: WordPress class names */
.navbar__menu li.current-menu-item > a,
.navbar__menu li.current-menu-ancestor > a,
.navbar__menu li.current_page_item > a,
.navbar__menu li.current-post-ancestor > a,
.navbar__menu li.current-category-ancestor > a {
  background: rgba(255,255,255,.22);
  color: #fff;
  font-weight: 700;
  box-shadow: inset 0 -2px 0 rgba(255,255,255,.5);
}

/* Dropdown (sub-menu) support */
.navbar__menu { overflow: visible; }
.navbar__menu li { position: relative; }
.navbar__menu .sub-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 200px;
  background: #1e3a8a; list-style: none; padding: .4rem; margin: 0;
  border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(0,0,0,.25); z-index: 400;
}
.navbar__menu li:hover > .sub-menu,
.navbar__menu li:focus-within > .sub-menu { display: block; }
.navbar__menu .sub-menu li { display: block; }
.navbar__menu .sub-menu a { display: flex; width: 100%; }

/* Logo image (Appearance > Customize > Site Identity) */
.site-logo img.custom-logo { max-height: 44px; width: auto; }
.site-logo__img-link { display: inline-flex; align-items: center; }

/* Footer menus */
.site-footer__col ul.menu { list-style: none; padding: 0; margin: 0; }
.site-footer__col ul.menu li { margin-bottom: .5rem; }
.site-footer__bottom a { color: #94a3b8; }

/* Article body: tables, images, blocks */
.article-body table {
  width: 100%; border-collapse: collapse; margin: 1.5rem 0;
  font-size: .95rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden;
  display: block; overflow-x: auto;
}
.article-body th, .article-body td { padding: .7rem 1rem; border-bottom: 1px solid var(--border); text-align: left; }
.article-body th { background: var(--bg); font-weight: 700; width: 28%; }
.article-body a { text-decoration: underline; text-underline-offset: 2px; }
.article-body img, .article-body figure { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.article-body figure { margin: 1.5rem 0; }
.article-body figcaption, .wp-caption-text { font-size: .8rem; color: var(--text-muted); text-align: center; margin-top: .4rem; }
.article-body .alignleft  { float: left;  margin: .3rem 1.25rem 1rem 0; }
.article-body .alignright { float: right; margin: .3rem 0 1rem 1.25rem; }
.article-body .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.article-body::after { content: ""; display: block; clear: both; }
.article-body .wp-block-button__link { background: var(--primary); color: #fff; border-radius: 999px; padding: .65rem 1.5rem; text-decoration: none; font-weight: 600; }
.article-body hr { border: 0; border-top: 2px solid var(--border-light); margin: 2rem 0; }
.alignwide { max-width: 100%; }
.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; margin: -1px;
  overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus {
  background: #fff; clip: auto !important; clip-path: none; color: #111; display: block;
  height: auto; left: 5px; padding: 12px 20px; top: 5px; width: auto; z-index: 100000;
}
.skip-link:focus { z-index: 100001; }

/* Sticky navbar + WP admin bar */
.admin-bar .navbar { top: 32px; }
@media (max-width: 782px) { .admin-bar .navbar { top: 46px; } }

/* Single post nav (prev/next) */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2.5rem; }
.post-nav a {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1rem 1.25rem; font-size: .88rem; font-weight: 600; color: var(--text);
  transition: all var(--t) var(--ease);
}
.post-nav a:hover { border-color: var(--primary); color: var(--primary); }
.post-nav small { display: block; color: var(--text-muted); font-weight: 500; margin-bottom: .2rem; }
.post-nav__next { text-align: right; }

/* Pagination from paginate_links() */
.pagination li a, .pagination li span {
  display: flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 .6rem;
  border-radius: var(--radius-sm); border: 1.5px solid var(--border); color: var(--text); font-size: .875rem; font-weight: 600;
}
.pagination li span.current { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 2px 8px rgba(37,99,235,.35); }
.pagination li span.dots { border-color: transparent; }

/* Search form (in navbar uses .navbar__search; this is the generic one) */
.search-form-page { display: flex; gap: .5rem; max-width: 520px; margin-top: 1.25rem; }
.search-form-page input[type=search] { flex: 1; padding: .65rem 1rem; border: 1.5px solid var(--border); border-radius: 999px; font-size: .92rem; }
.search-form-page button { background: var(--primary); color: #fff; border: 0; border-radius: 999px; padding: .65rem 1.4rem; font-weight: 600; cursor: pointer; }

/* Sidebar widgets (WordPress default widget markup) */
.sidebar__widget ul { list-style: none; padding: 0; margin: 0; }
.sidebar__widget ul li { padding: .5rem 0; border-bottom: 1px solid var(--border-light); font-size: .86rem; }
.sidebar__widget ul li:last-child { border: 0; }
.sidebar__widget a { color: var(--text); font-weight: 500; }
.sidebar__widget a:hover { color: var(--primary); }
.sidebar__widget .tagcloud { display: flex; flex-wrap: wrap; gap: .4rem; }
.sidebar__widget .tagcloud a {
  font-size: .72rem !important; background: var(--bg); border: 1px solid var(--border);
  border-radius: 999px; padding: .22rem .65rem; color: var(--text-muted);
}
.sidebar__widget .tagcloud a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.sidebar__widget .search-form { display: flex; gap: .4rem; }
.sidebar__widget .search-field { flex: 1; padding: .5rem .8rem; border: 1.5px solid var(--border); border-radius: 999px; }
.sidebar__widget .search-submit { background: var(--primary); color: #fff; border: 0; border-radius: 999px; padding: .5rem 1rem; cursor: pointer; }


/* Comments */
.comments-area { margin-top: 3rem; }
.comments-area h2, .comments-area .comment-reply-title { font-size: 1.2rem; margin-bottom: 1rem; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment-body { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1rem 1.25rem; margin-bottom: 1rem; }
.comment-list .children { list-style: none; padding-left: 1.5rem; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url], .comment-form textarea {
  width: 100%; padding: .65rem 1rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: .8rem;
}
.comment-form .submit { background: var(--primary); color: #fff; border: 0; border-radius: 999px; padding: .7rem 2rem; font-weight: 600; cursor: pointer; }

/* Form notices (contact/newsletter) */
.p4-notice { padding: .85rem 1.1rem; border-radius: var(--radius-sm); margin-bottom: 1.25rem; font-size: .92rem; font-weight: 500; }
.p4-notice--ok  { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.p4-notice--err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.p4-hp { position: absolute; left: -9999px; }
.newsletter-box .p4-notice { max-width: 500px; margin: 0 auto 1rem; position: relative; }

/* Page content (About, Contact, etc.) */
.static-content img { border-radius: var(--radius-sm); }
.static-content a { text-decoration: underline; text-underline-offset: 2px; }
.page-content-wide { max-width: 760px; }

/* Featured article image fallback */
.featured-article__img a { display: block; height: 100%; }

/* ============================================================
   NEW IN 2.0 – blocks used by pages & templates
   ============================================================ */
/* Filter bar (blog / search / category pages) */
.filter-bar { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.filter-bar input[type=search] { flex: 1; min-width: 180px; padding: .55rem .9rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .9rem; background: var(--surface); }
.filter-bar select { padding: .55rem .9rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .9rem; background: var(--surface); }
.filter-bar .btn-submit { text-decoration: none; display: inline-flex; align-items: center; }
.empty-note { text-align: center; padding: 3rem; color: var(--text-muted); }

/* Category hero */
.page-hero--cat .page-hero__icon { font-size: 2.5rem; line-height: 1.2; display: block; }

/* Contact page cards */
.contact-cards { margin-bottom: 2rem; }
.contact-card { background: var(--surface); padding: 1.25rem; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); display: flex; gap: 1rem; align-items: flex-start; }
.contact-card__icon { font-size: 2rem; line-height: 1; }
.contact-card h3 { font-size: 1rem; margin-bottom: .3rem; }
.contact-card a { color: var(--text-muted); font-size: .875rem; word-break: break-word; }
.contact-card a:hover { color: var(--primary); }
.contact-form h2 { margin-bottom: 1.25rem; }
.contact-note { font-size: .8rem; color: var(--text-muted); margin-top: .75rem; }

/* About page team cards */
.team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); margin: 1.5rem 0; }
.team-card { background: var(--surface); padding: 1.25rem; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.team-card__avatar { width: 52px; height: 52px; background: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.3rem; font-weight: 700; margin-bottom: .75rem; }
.team-card h3 { font-size: 1rem; margin: 0 0 .2rem; }
.team-card__role { color: var(--primary); font-size: .8rem; font-weight: 600; margin-bottom: .5rem; }
.team-card p { font-size: .875rem; color: var(--text-muted); margin: 0; }
@media (max-width: 768px) { .team-grid { grid-template-columns: 1fr; } }

/* FAQ page */
.faq-help { background: var(--surface); padding: 1.5rem; border-radius: var(--radius-md); border-left: 4px solid var(--primary); margin-top: 2rem; }
.faq-help h3 { margin-bottom: .5rem; }
.faq-group { margin-bottom: 1.5rem; }
.faq-answer p { margin-bottom: .6rem; color: inherit; font-size: inherit; }

/* 404 page */
.not-found { padding: 5rem 1rem; text-align: center; }
.not-found h1 { font-size: 6rem; color: var(--primary); line-height: 1; }
.not-found h2 { font-size: 1.75rem; margin-bottom: 1rem; }
.not-found__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.not-found__popular { margin-top: 3rem; }
.not-found__popular h3 { font-size: 1rem; margin-bottom: 1rem; color: var(--text-muted); }
.not-found__popular .grid-3 { max-width: 900px; margin: 0 auto; text-align: left; }
.btn-muted { background: var(--text-muted); color: #fff; }
.btn-muted:hover { background: var(--text); color: #fff; }

/* Related articles under a post */
.related-section { padding-top: 2.5rem; }
.sidebar__widget .cat-list li .badge { margin-left: .5rem; }
