/*
Theme Name: Timely India
Theme URI: https://timelyindia.com
Author: Timely India
Author URI: https://timelyindia.com
Description: Educational news portal for Indian students — exams, results, admit cards, admissions, scholarships, government jobs, daily current affairs, student guides, and government registrations. Optimized for Core Web Vitals, E-E-A-T and semantic HTML5.
Version: 1.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: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: timely-india
Tags: education, news, custom-post-types, responsive-layout, accessibility-ready, right-sidebar
*/

/* ============================================================
   1. CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  --color-primary:       #1a3a7c;
  --color-primary-dark:  #0f2550;
  --color-primary-light: #2a5298;
  --color-accent:        #e87d0d;
  --color-accent-dark:   #c96b08;
  --color-accent-light:  #f59332;
  --color-bg:            #f4f6f9;
  --color-surface:       #ffffff;
  --color-text:          #1a1a2e;
  --color-text-muted:    #6b7280;
  --color-border:        #e5e7eb;
  --color-border-light:  #f3f4f6;
  --color-success:       #16a34a;
  --color-warning:       #d97706;
  --color-danger:        #dc2626;
  --color-info:          #2563eb;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  --font-mono: 'Courier New', Courier, monospace;
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 12px rgba(0,0,0,.10), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg:  0 10px 30px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.06);
  --transition: 0.2s ease;
  --container-max: 1200px;
  --sidebar-width: 300px;
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

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

img, video, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-accent); }
a:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.375rem, 3vw, 1.875rem); }
h3 { font-size: clamp(1.125rem, 2.5vw, 1.375rem); }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* Screen-reader only utility */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   3. LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1rem;
}

.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-content {
  flex: 1;
  padding-block: 2rem;
}

.content-area {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: 2rem;
  align-items: start;
}

.content-area.no-sidebar { grid-template-columns: 1fr; }

@media (max-width: 900px) {
  .content-area { grid-template-columns: 1fr; }
}

/* ============================================================
   4. LIVE TICKER
   ============================================================ */
.live-ticker {
  background: var(--color-primary);
  color: #fff;
  padding: 0.5rem 0;
  overflow: hidden;
  position: relative;
}

.live-ticker__inner {
  display: flex;
  align-items: center;
  gap: 0;
}

.live-ticker__label {
  background: var(--color-accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  white-space: nowrap;
  flex-shrink: 0;
  z-index: 1;
}

.live-ticker__track {
  overflow: hidden;
  flex: 1;
}

.live-ticker__content {
  display: flex;
  white-space: nowrap;
  animation: ticker-scroll 40s linear infinite;
  width: max-content;
}

.live-ticker__content:hover { animation-play-state: paused; }

.live-ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding-inline: 2rem;
  font-size: 0.875rem;
}

.live-ticker__item::before {
  content: '●';
  color: var(--color-accent);
  font-size: 0.5rem;
  flex-shrink: 0;
}

.live-ticker__item a { color: #fff; }
.live-ticker__item a:hover { color: var(--color-accent-light); }

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================
   5. SITE HEADER & NAVIGATION
   ============================================================ */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.875rem;
  gap: 1rem;
}

.site-branding { display: flex; align-items: center; gap: 0.75rem; }

.site-branding__icon {
  width: 42px; height: 42px;
  background: var(--color-primary);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.375rem;
  flex-shrink: 0;
}

.site-title {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
}

.site-title a { color: inherit; }
.site-title a:hover { color: var(--color-accent); }

.site-description {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  line-height: 1;
  margin-top: 2px;
}

/* Primary nav */
.primary-navigation { display: flex; align-items: center; }

.primary-navigation ul {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.primary-navigation ul li a {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}

.primary-navigation ul li a:hover,
.primary-navigation ul li.current-menu-item > a,
.primary-navigation ul li.current-menu-ancestor > a {
  background: var(--color-primary);
  color: #fff;
}

/* Dropdown */
.primary-navigation ul li { position: relative; }

.primary-navigation ul li ul {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  min-width: 200px;
  flex-direction: column;
  z-index: 200;
  gap: 0;
}

.primary-navigation ul li ul li a {
  padding: 0.5rem 1rem;
  border-radius: 0;
}

.primary-navigation ul li:hover > ul { display: flex; }

/* Mobile menu button */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: #fff;
  flex-shrink: 0;
}

.menu-toggle svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; }

/* Header search */
.header-search { display: flex; align-items: center; gap: 0.5rem; }

.header-search form { display: flex; align-items: center; }

.header-search input[type="search"] {
  width: 180px;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--transition);
}

.header-search input[type="search"]:focus { border-color: var(--color-primary); }

.header-search button[type="submit"] {
  padding: 0.4rem 0.75rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background var(--transition);
}

.header-search button[type="submit"]:hover { background: var(--color-primary-dark); }

@media (max-width: 1024px) {
  .header-search { display: none; }
}

/* ============================================================
   6. BREADCRUMB
   ============================================================ */
.breadcrumb {
  padding-block: 0.75rem;
  border-bottom: 1px solid var(--color-border-light);
  background: var(--color-surface);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.breadcrumb ol li::after { content: '/'; margin-left: 0.25rem; }
.breadcrumb ol li:last-child::after { content: ''; }
.breadcrumb ol li:last-child { color: var(--color-text); font-weight: 500; }
.breadcrumb ol li a { color: var(--color-primary); }
.breadcrumb ol li a:hover { color: var(--color-accent); }

/* ============================================================
   7. HERO SECTION
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 60%, #2a5298 100%);
  color: #fff;
  padding-block: 3.5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  right: -5%;
  top: -10%;
  width: 50%;
  height: 120%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='40' fill='none' stroke='rgba(255,255,255,.06)' stroke-width='25'/%3E%3C/svg%3E") no-repeat center/contain;
}

.hero__content { position: relative; z-index: 1; max-width: 640px; }

.hero__eyebrow {
  display: inline-block;
  background: rgba(255,255,255,.15);
  color: var(--color-accent-light);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.875rem;
  border-radius: 100px;
  margin-bottom: 1rem;
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 1rem;
}

.hero__title span { color: var(--color-accent-light); }

.hero__description {
  font-size: 1.0625rem;
  opacity: 0.9;
  margin-bottom: 1.75rem;
  line-height: 1.65;
}

.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ============================================================
   8. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.375rem;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1;
  transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}
.btn-primary:hover { background: var(--color-accent-dark); border-color: var(--color-accent-dark); color: #fff; }

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.6);
}
.btn-outline:hover { background: rgba(255,255,255,.12); color: #fff; border-color: #fff; }

.btn-sm { padding: 0.4rem 0.875rem; font-size: 0.8125rem; }

.btn-apply {
  background: var(--color-success);
  color: #fff;
  border-color: var(--color-success);
}
.btn-apply:hover { background: #15803d; border-color: #15803d; color: #fff; }

/* ============================================================
   9. STAT CARDS
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  padding-block: 2rem;
}

.stat-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  transition: box-shadow var(--transition), transform var(--transition);
}

.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.stat-card__icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  display: block;
}

.stat-card__number {
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-card__label {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* ============================================================
   10. SECTION HEADER
   ============================================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--color-border-light);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-primary);
}

.section-title .icon {
  font-size: 1.375rem;
}

.section-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary);
  white-space: nowrap;
}

.section-link:hover { color: var(--color-accent); }

/* ============================================================
   11. CARDS — BASE
   ============================================================ */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.card__body { padding: 1.25rem; }

.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.625rem;
}

.card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.card__title a { color: inherit; }
.card__title a:hover { color: var(--color-primary); }

.card__excerpt {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border-light);
  margin-top: 0.75rem;
}

/* Card with left border accent */
.card--exam    { border-left: 4px solid var(--color-primary); }
.card--job     { border-left: 4px solid var(--color-info); }
.card--result  { border-left: 4px solid var(--color-success); }
.card--admit   { border-left: 4px solid var(--color-warning); }
.card--scholar { border-left: 4px solid var(--color-accent); }
.card--affair  { border-left: 4px solid #7c3aed; }
.card--guide   { border-left: 4px solid #0891b2; }

/* ============================================================
   12. BADGES / LABELS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.625rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge-open      { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.badge-closed    { background: #fee2e2; color: #dc2626; border-color: #fecaca; }
.badge-upcoming  { background: #dbeafe; color: #1d4ed8; border-color: #bfdbfe; }
.badge-declared  { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.badge-active    { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.badge-new       { background: #fef9c3; color: #854d0e; border-color: #fef08a; }

.badge-primary   { background: #dbeafe; color: var(--color-primary); border-color: #bfdbfe; }
.badge-secondary { background: var(--color-border-light); color: var(--color-text-muted); border-color: var(--color-border); }

/* ============================================================
   13. META INFO (date, salary, vacancies)
   ============================================================ */
.meta-info {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.meta-info__item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.meta-info__item--deadline { color: var(--color-danger); font-weight: 600; }
.meta-info__item--salary   { color: var(--color-success); font-weight: 600; }
.meta-info__item--posts    { color: var(--color-primary); font-weight: 600; }
.meta-info__item--amount   { color: var(--color-accent-dark); font-weight: 600; }

/* ============================================================
   14. CARDS GRID LAYOUTS
   ============================================================ */
.cards-grid {
  display: grid;
  gap: 1rem;
}

.cards-grid--1 { grid-template-columns: 1fr; }
.cards-grid--2 { grid-template-columns: repeat(2, 1fr); }
.cards-grid--3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 768px) {
  .cards-grid--2,
  .cards-grid--3 { grid-template-columns: 1fr; }
}

.cards-list { display: flex; flex-direction: column; gap: 1rem; }

/* ============================================================
   15. CURRENT AFFAIRS
   ============================================================ */
.date-group { margin-bottom: 2rem; }

.date-group__header {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1rem;
}

.date-group__date {
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-primary);
}

.date-group__line { flex: 1; height: 1px; background: var(--color-border); }

.affair-card {
  display: flex;
  gap: 0.875rem;
  padding: 1rem 1.25rem;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
}

.affair-card:hover { box-shadow: var(--shadow-sm); }

.affair-card__dot {
  width: 8px; height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}

.affair-card__content { flex: 1; }

.affair-card__topic {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  display: inline-block;
  margin-bottom: 0.375rem;
}

.affair-card__title {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--color-text);
}

.affair-card__summary { font-size: 0.8125rem; color: var(--color-text-muted); }

/* Topic color variations */
.topic-defence      { background: #fee2e2; color: #991b1b; }
.topic-economy      { background: #dcfce7; color: #166534; }
.topic-science      { background: #dbeafe; color: #1e40af; }
.topic-politics     { background: #f3e8ff; color: #6b21a8; }
.topic-sports       { background: #ffedd5; color: #9a3412; }
.topic-international{ background: #cffafe; color: #155e75; }
.topic-agriculture  { background: #ecfccb; color: #365314; }
.topic-default      { background: var(--color-border-light); color: var(--color-text-muted); }

/* ============================================================
   16. REGISTRATION PAGES (Trademark, MSME)
   ============================================================ */
.reg-hero {
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  margin-bottom: 2rem;
  color: #fff;
}

.reg-hero--trademark { background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light)); }
.reg-hero--msme      { background: linear-gradient(135deg, var(--color-accent-dark), var(--color-accent)); }

.reg-hero__icon { font-size: 3rem; margin-bottom: 1rem; }
.reg-hero__title { font-size: 1.875rem; font-weight: 900; color: #fff; margin-bottom: 0.75rem; }
.reg-hero__desc { font-size: 1rem; opacity: 0.9; }

.reg-meta {
  display: flex;
  gap: 2rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,.2);
  flex-wrap: wrap;
}

.reg-meta__item { font-size: 0.875rem; opacity: 0.9; }
.reg-meta__item strong { display: block; font-size: 0.75rem; opacity: 0.7; margin-bottom: 0.125rem; text-transform: uppercase; letter-spacing: 0.05em; }

.steps-list { display: flex; flex-direction: column; gap: 0; }

.step-item {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  border-bottom: 1px solid var(--color-border-light);
}

.step-item:last-child { border-bottom: none; }

.step-item__number {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 800;
  flex-shrink: 0;
  color: #fff;
}

.step-item__number--primary { background: var(--color-primary); }
.step-item__number--accent  { background: var(--color-accent); }

.step-item__content {}
.step-item__title { font-size: 1rem; font-weight: 700; margin-bottom: 0.25rem; }
.step-item__desc  { font-size: 0.875rem; color: var(--color-text-muted); }

.docs-list { list-style: none; display: flex; flex-direction: column; gap: 0.625rem; }

.docs-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.docs-list li::before {
  content: '✓';
  color: var(--color-success);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.free-badge {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* ============================================================
   17. SIDEBAR
   ============================================================ */
.widget-area { display: flex; flex-direction: column; gap: 1.5rem; }

.widget {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.widget__title {
  font-size: 0.875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  padding: 0.875rem 1.125rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-border-light);
}

.widget__body { padding: 1rem 1.125rem; }

.widget-nav { list-style: none; display: flex; flex-direction: column; gap: 0.25rem; }

.widget-nav a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.625rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  transition: background var(--transition), color var(--transition);
}

.widget-nav a:hover { background: var(--color-border-light); color: var(--color-primary); }

.widget-post { display: flex; flex-direction: column; gap: 0.875rem; }

.widget-post-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--color-border-light);
}

.widget-post-item:last-child { border-bottom: none; padding-bottom: 0; }

.widget-post-item__title {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
}

.widget-post-item__title a { color: var(--color-text); }
.widget-post-item__title a:hover { color: var(--color-primary); }

.widget-post-item__date { font-size: 0.7rem; color: var(--color-text-muted); margin-top: 0.25rem; }

/* ============================================================
   18. SEARCH
   ============================================================ */
.search-hero {
  background: var(--color-primary);
  padding: 2.5rem;
  border-radius: var(--radius-xl);
  margin-bottom: 2rem;
  text-align: center;
  color: #fff;
}

.search-hero h1 { color: #fff; font-size: 1.5rem; margin-bottom: 1rem; }

.search-form { display: flex; gap: 0; max-width: 540px; margin-inline: auto; }

.search-form input[type="search"] {
  flex: 1;
  padding: 0.75rem 1.125rem;
  border: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-size: 1rem;
  outline: none;
}

.search-form button {
  padding: 0.75rem 1.25rem;
  background: var(--color-accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.9375rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: background var(--transition);
}

.search-form button:hover { background: var(--color-accent-dark); }

/* ============================================================
   19. PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.375rem;
  padding-top: 2rem;
  flex-wrap: wrap;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px; height: 38px;
  padding: 0 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  transition: background var(--transition), color var(--transition);
}

.pagination .page-numbers:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.pagination .page-numbers.current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ============================================================
   20. FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255,255,255,.85);
  padding-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer-brand {}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-logo__icon {
  width: 40px; height: 40px;
  background: var(--color-accent);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
}

.footer-logo__name {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.footer-tagline {
  font-size: 0.875rem;
  opacity: 0.75;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.footer-social { display: flex; gap: 0.625rem; }

.footer-social a {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.875rem;
  color: rgba(255,255,255,.8);
  transition: background var(--transition), color var(--transition);
}

.footer-social a:hover { background: var(--color-accent); color: #fff; }

.footer-col h3 {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1rem;
}

.footer-nav { display: flex; flex-direction: column; gap: 0.5rem; }

.footer-nav a {
  font-size: 0.875rem;
  color: rgba(255,255,255,.7);
  transition: color var(--transition);
}

.footer-nav a:hover { color: var(--color-accent-light); }

.footer-bottom {
  padding-block: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  opacity: 0.65;
}

.footer-bottom a { color: inherit; }
.footer-bottom a:hover { color: var(--color-accent-light); opacity: 1; }

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

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

/* ============================================================
   21. SINGLE POST / PAGE
   ============================================================ */
.entry-header { margin-bottom: 1.5rem; }

.entry-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  background: rgba(26,58,124,.08);
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  margin-bottom: 0.75rem;
}

.entry-title {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 1.5rem;
}

.entry-meta a { color: var(--color-primary); }

.entry-thumbnail {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.5rem;
  aspect-ratio: 16/7;
  background: var(--color-border-light);
}

.entry-thumbnail img { width: 100%; height: 100%; object-fit: cover; }

.entry-content {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-text);
}

.entry-content h2 { font-size: 1.5rem; margin: 1.75rem 0 0.75rem; color: var(--color-primary); }
.entry-content h3 { font-size: 1.25rem; margin: 1.5rem 0 0.625rem; }
.entry-content h4 { font-size: 1.125rem; margin: 1.25rem 0 0.5rem; }
.entry-content p  { margin-bottom: 1.125rem; }
.entry-content ul, .entry-content ol { margin: 1rem 0 1rem 1.5rem; display: flex; flex-direction: column; gap: 0.375rem; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content a  { color: var(--color-primary); text-decoration: underline; }
.entry-content blockquote {
  border-left: 4px solid var(--color-primary);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--color-border-light);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
}
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.9375rem; }
.entry-content table th, .entry-content table td { padding: 0.625rem 0.875rem; border: 1px solid var(--color-border); }
.entry-content table th { background: var(--color-primary); color: #fff; font-weight: 700; }
.entry-content table tr:nth-child(even) { background: var(--color-border-light); }

/* ============================================================
   22. CPT DETAIL BOX (Exam, Job, etc.)
   ============================================================ */
.detail-box {
  background: var(--color-border-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.detail-box__title {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.detail-table { width: 100%; }
.detail-table tr td { padding: 0.5rem 0; border-bottom: 1px solid var(--color-border); font-size: 0.9rem; }
.detail-table tr:last-child td { border-bottom: none; }
.detail-table td:first-child { font-weight: 600; color: var(--color-text-muted); width: 42%; }
.detail-table td:last-child { color: var(--color-text); }

/* ============================================================
   23. 404 PAGE
   ============================================================ */
.error-404 { text-align: center; padding: 4rem 1rem; }
.error-404__code { font-size: 7rem; font-weight: 900; color: var(--color-primary); opacity: 0.12; line-height: 1; }
.error-404__title { font-size: 1.75rem; font-weight: 900; margin-top: -2rem; margin-bottom: 0.875rem; }
.error-404__desc { color: var(--color-text-muted); margin-bottom: 1.5rem; }

/* ============================================================
   24. NO RESULTS
   ============================================================ */
.no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-muted);
}

.no-results__icon { font-size: 3rem; opacity: 0.3; margin-bottom: 1rem; }
.no-results p { font-size: 0.9375rem; }

/* ============================================================
   25. PAGE HEADER
   ============================================================ */
.page-header {
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--color-border-light);
}

.page-header__eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: 0.375rem;
}

.page-header__title {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 900;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.page-header__desc {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
}

/* ============================================================
   26. MOBILE RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .primary-navigation ul { display: none; }
  .menu-toggle { display: flex; }

  .primary-navigation.is-open ul {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--color-surface);
    padding: 5rem 1.5rem 2rem;
    gap: 0.5rem;
    z-index: 999;
    overflow-y: auto;
  }

  .primary-navigation.is-open ul li a { font-size: 1.125rem; padding: 0.75rem 1rem; }
}

@media (max-width: 640px) {
  .hero { padding-block: 2.5rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .reg-hero { padding: 1.5rem; }
  .footer-grid { gap: 1.5rem; }
  .site-header__inner { flex-wrap: wrap; }
}

/* ============================================================
   27. UTILITY CLASSES
   ============================================================ */
.text-center { text-align: center; }
.text-muted  { color: var(--color-text-muted); }
.mt-1  { margin-top: 0.5rem; }
.mt-2  { margin-top: 1rem; }
.mt-3  { margin-top: 1.5rem; }
.mb-1  { margin-bottom: 0.5rem; }
.mb-2  { margin-bottom: 1rem; }
.mb-3  { margin-bottom: 1.5rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* ============================================================
   28. PRINT STYLES
   ============================================================ */
@media print {
  .site-header, .site-footer, .live-ticker, .breadcrumb, .pagination,
  .primary-navigation, .menu-toggle, .widget-area { display: none !important; }
  .content-area { grid-template-columns: 1fr !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd !important; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 0.75em; color: #666; }
}

/* ============================================================
   29. SCHEMA / STRUCTURED DATA HELPERS (visual)
   ============================================================ */
[itemscope] {}

/* ============================================================
   30. ACCESSIBILITY
   ============================================================ */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--color-primary);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  z-index: 9999;
  font-weight: 700;
  font-size: 0.875rem;
  transition: top 0.2s;
}

.skip-link:focus { top: 0; }
