/* ============================================================
   CophieuAZ Theme — Main Stylesheet
   Design: Modern Financial Magazine (Navy + Gold)
   ============================================================ */

/* ── 1. Design Tokens ──────────────────────────────────────── */
:root {
  --color-navy:        #1B2A4A;
  --color-navy-dark:   #111827;
  --color-navy-mid:    #243460;
  --color-navy-light:  #EEF2F8;
  --color-gold:        #C9A84C;
  --color-gold-dark:   #A8893A;
  --color-gold-light:  #F5E9C8;

  --color-bg:          #FFFFFF;
  --color-bg-light:    #F8F9FB;
  --color-bg-card:     #FFFFFF;

  --color-text:        #1A202C;
  --color-text-light:  #4A5568;
  --color-text-muted:  #718096;

  --color-border:      #E2E8F0;
  --color-border-dark: #CBD5E0;

  --font-serif:   'Merriweather', Georgia, serif;
  --font-sans:    'Inter', 'Segoe UI', system-ui, sans-serif;

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

  --shadow-sm:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --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);

  --header-h:     64px;
  --container-w:  1200px;
  --content-w:    720px;

  --transition:   0.2s ease;
}

/* ── 2. Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

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

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea { font: inherit; }

/* ── 3. Typography ─────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1.2em; }

/* ── 4. Layout Utilities ───────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: 20px;
}

.layout-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
  padding-block: 40px;
}

@media (max-width: 1024px) {
  .layout-with-sidebar {
    grid-template-columns: 1fr;
  }
}

/* ── 5. Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-navy);
  height: var(--header-h);
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

.header-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 32px;
}

/* Logo */
.site-branding {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-branding .custom-logo {
  height: 38px;
  width: auto;
}

.site-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.site-title span {
  color: var(--color-gold);
}

.site-tagline {
  font-size: 0.65rem;
  color: rgba(255,255,255,.55);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

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

.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
}

.primary-nav a {
  display: block;
  padding: 8px 14px;
  color: rgba(255,255,255,.85);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current-menu-ancestor > a {
  color: var(--color-gold);
  background: rgba(255,255,255,.06);
}

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

.primary-nav .sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 100;
}

.primary-nav li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.primary-nav .sub-menu a {
  color: var(--color-text);
  padding: 10px 16px;
  border-radius: 0;
  font-size: 0.875rem;
}

.primary-nav .sub-menu li:first-child a { border-radius: var(--radius-md) var(--radius-md) 0 0; }
.primary-nav .sub-menu li:last-child  a { border-radius: 0 0 var(--radius-md) var(--radius-md); }

.primary-nav .sub-menu a:hover {
  background: var(--color-navy-light);
  color: var(--color-navy);
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.btn-search {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: rgba(255,255,255,.8);
  transition: background var(--transition), color var(--transition);
}

.btn-search:hover { background: rgba(255,255,255,.1); color: #fff; }

.btn-search svg { width: 18px; height: 18px; }

/* Search bar */
.search-bar {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-navy-dark);
  padding: 16px 20px;
  display: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
}

.search-bar.is-open { display: flex; gap: 10px; }

.search-bar input {
  flex: 1;
  height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 0.95rem;
}

.search-bar input::placeholder { color: rgba(255,255,255,.5); }

.search-bar input:focus {
  outline: none;
  border-color: var(--color-gold);
}

.search-bar .btn-search-submit {
  height: 44px;
  padding: 0 20px;
  background: var(--color-gold);
  color: var(--color-navy-dark);
  font-weight: 600;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  transition: background var(--transition);
}

.search-bar .btn-search-submit:hover { background: var(--color-gold-dark); }

/* Mobile hamburger */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 6px;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,.9);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.menu-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-active span:nth-child(2) { opacity: 0; }
.menu-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-navy-dark);
  z-index: 999;
  overflow-y: auto;
  padding: 20px;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.mobile-nav.is-open {
  transform: translateX(0);
}

.mobile-nav ul { display: flex; flex-direction: column; gap: 0; }

.mobile-nav a {
  display: block;
  padding: 14px 4px;
  color: rgba(255,255,255,.85);
  font-size: 1.05rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.mobile-nav a:hover, .mobile-nav .current-menu-item > a { color: var(--color-gold); }

.mobile-nav .sub-menu { padding-left: 16px; }
.mobile-nav .sub-menu a { font-size: 0.9rem; padding: 10px 4px; }

@media (max-width: 1024px) {
  .primary-nav { display: none; }
  .menu-toggle { display: flex; }
  .mobile-nav  { display: block; }
}

/* ── 6. Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.btn-gold {
  background: var(--color-gold);
  color: var(--color-navy-dark);
}
.btn-gold:hover { background: var(--color-gold-dark); box-shadow: 0 4px 12px rgba(201,168,76,.4); }

.btn-navy {
  background: var(--color-navy);
  color: #fff;
}
.btn-navy:hover { background: var(--color-navy-mid); }

.btn-outline {
  border: 2px solid var(--color-gold);
  color: var(--color-gold);
  background: transparent;
}
.btn-outline:hover { background: var(--color-gold); color: var(--color-navy-dark); }

/* ── 7. Post Cards ─────────────────────────────────────────── */
.post-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

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

.post-card-image {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-bg-light);
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-card:hover .post-card-image img { transform: scale(1.04); }

.post-card-image .post-category-badge {
  position: absolute;
  top: 12px;
  left: 12px;
}

.post-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--color-text);
  transition: color var(--transition);
}

.post-card:hover .post-card-title { color: var(--color-navy); }

.post-card-excerpt {
  font-size: 0.875rem;
  color: var(--color-text-light);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
  flex: 1;
}

/* Category badge */
.post-category-badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--color-navy);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.post-category-badge:hover { background: var(--color-gold); color: var(--color-navy-dark); }

/* ── 8. Post Meta ──────────────────────────────────────────── */
.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-top: auto;
}

.meta-author {
  font-weight: 600;
  color: var(--color-text-light);
}

.meta-author:hover { color: var(--color-navy); }

.meta-sep { color: var(--color-border-dark); }

/* ── 9. Post Grids ─────────────────────────────────────────── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

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

.post-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
  .post-grid, .post-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .post-grid, .post-grid-2, .post-grid-4 { grid-template-columns: 1fr; }
}

/* ── 10. Section Headers ───────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--color-border);
  gap: 12px;
}

.section-header-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--color-navy);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-header-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 22px;
  background: var(--color-gold);
  border-radius: 2px;
  flex-shrink: 0;
}

.section-header-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-navy);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: color var(--transition);
}

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

/* ── 11. Hero Section ──────────────────────────────────────── */
.hero-section {
  position: relative;
  background: var(--color-navy-dark);
  min-height: 480px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(17,24,39,.1) 0%,
    rgba(17,24,39,.55) 60%,
    rgba(17,24,39,.9) 100%
  );
  z-index: 1;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 48px 0;
}

.hero-inner {
  max-width: var(--container-w);
  padding-inline: 20px;
  margin-inline: auto;
  max-width: 780px;
}

.hero-category {
  margin-bottom: 12px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,.4);
}

.hero-excerpt {
  color: rgba(255,255,255,.8);
  font-size: 1rem;
  margin-bottom: 24px;
  max-width: 600px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-meta {
  color: rgba(255,255,255,.65);
  font-size: 0.82rem;
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── 12. Homepage Sections ─────────────────────────────────── */
.homepage-section {
  padding-block: 48px;
}

.homepage-section:nth-child(even) {
  background: var(--color-bg-light);
}

.latest-posts-section { padding-block: 48px; }

/* Newsletter CTA */
.newsletter-section {
  background: var(--color-navy);
  padding-block: 60px;
  text-align: center;
}

.newsletter-section h2 {
  color: #fff;
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 8px;
}

.newsletter-section p {
  color: rgba(255,255,255,.7);
  margin-bottom: 28px;
  font-size: 1rem;
}

.newsletter-form {
  display: flex;
  gap: 10px;
  max-width: 480px;
  margin-inline: auto;
}

.newsletter-form input {
  flex: 1;
  height: 48px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 0.95rem;
}

.newsletter-form input::placeholder { color: rgba(255,255,255,.5); }
.newsletter-form input:focus { outline: none; border-color: var(--color-gold); }

.newsletter-form .btn { height: 48px; }

@media (max-width: 480px) {
  .newsletter-form { flex-direction: column; }
  .newsletter-form .btn { justify-content: center; }
}

/* ── 13. Single Post ───────────────────────────────────────── */
.single-post-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  max-width: var(--container-w);
  margin-inline: auto;
  padding: 40px 20px;
  align-items: start;
}

@media (max-width: 1024px) {
  .single-post-wrapper { grid-template-columns: 1fr; }
}

.single-post-header {
  margin-bottom: 24px;
}

.single-post-header .post-category-badge { margin-bottom: 12px; }

.single-post-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 16px;
  color: var(--color-text);
}

.single-post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 28px;
}

.single-post-featured-image {
  margin-bottom: 32px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.single-post-featured-image img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

/* Article body */
.post-content {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--color-text-light);
  max-width: var(--content-w);
}

.post-content p { margin-bottom: 1.4em; }

.post-content h2 {
  font-size: 1.5rem;
  margin-top: 2em;
  margin-bottom: 0.6em;
  color: var(--color-text);
  border-left: 4px solid var(--color-gold);
  padding-left: 14px;
}

.post-content h3 {
  font-size: 1.2rem;
  margin-top: 1.6em;
  margin-bottom: 0.5em;
  color: var(--color-text);
}

.post-content ul, .post-content ol {
  list-style: initial;
  padding-left: 1.6em;
  margin-bottom: 1.4em;
}

.post-content ol { list-style: decimal; }

.post-content li { margin-bottom: 0.4em; }

.post-content a {
  color: var(--color-navy);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-content a:hover { color: var(--color-gold-dark); }

.post-content blockquote {
  border-left: 4px solid var(--color-gold);
  padding: 12px 20px;
  margin: 1.6em 0;
  background: var(--color-gold-light);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--color-text);
}

.post-content img {
  border-radius: var(--radius-md);
  margin-block: 1.4em;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.4em;
  font-size: 0.9rem;
}

.post-content th {
  background: var(--color-navy);
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
}

.post-content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
}

.post-content tr:nth-child(even) td { background: var(--color-bg-light); }

/* Tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.post-tags a {
  display: inline-block;
  padding: 4px 12px;
  background: var(--color-navy-light);
  color: var(--color-navy);
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 20px;
  transition: background var(--transition), color var(--transition);
}

.post-tags a:hover { background: var(--color-navy); color: #fff; }

/* Author bio */
.author-bio {
  display: flex;
  gap: 20px;
  padding: 28px;
  background: var(--color-bg-light);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  margin-top: 40px;
}

.author-bio-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.author-bio-avatar img { width: 100%; height: 100%; object-fit: cover; }

.author-bio-name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.author-bio-desc {
  font-size: 0.875rem;
  color: var(--color-text-light);
  line-height: 1.6;
}

/* Related posts */
.related-posts {
  margin-top: 48px;
}

/* ── 14. Sidebar ───────────────────────────────────────────── */
.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

.widget {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 24px;
}

.widget-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-gold);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-title::before {
  content: '';
  display: block;
  width: 3px;
  height: 16px;
  background: var(--color-navy);
  border-radius: 2px;
}

/* Recent posts widget */
.widget-recent-post {
  display: flex;
  gap: 12px;
  padding-block: 10px;
  border-bottom: 1px solid var(--color-border);
}

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

.widget-recent-post-image {
  width: 72px;
  height: 54px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-bg-light);
}

.widget-recent-post-image img { width: 100%; height: 100%; object-fit: cover; }

.widget-recent-post-title {
  font-family: var(--font-serif);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--color-text);
  transition: color var(--transition);
}

.widget-recent-post-title:hover { color: var(--color-navy); }

.widget-recent-post-date {
  font-size: 0.73rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* Category list widget */
.widget ul li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 0.875rem;
  color: var(--color-text-light);
  border-bottom: 1px solid var(--color-border);
  transition: color var(--transition);
}

.widget ul li:last-child a { border-bottom: none; }
.widget ul li a:hover { color: var(--color-navy); }

/* ── 15. Archive Page ──────────────────────────────────────── */
.archive-header {
  background: var(--color-navy);
  padding: 48px 20px;
  text-align: center;
  margin-bottom: 40px;
}

.archive-header-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 8px;
}

.archive-header-title {
  color: #fff;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: 8px;
}

.archive-header-desc {
  color: rgba(255,255,255,.7);
  max-width: 560px;
  margin-inline: auto;
}

/* ── 16. Pagination ────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

.pagination .page-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  list-style: none;
}

.pagination .page-numbers li { display: block; }

.pagination .page-numbers a,
.pagination .page-numbers span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding-inline: 8px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--color-border);
  color: var(--color-text-light);
  transition: all var(--transition);
}

.pagination .page-numbers a:hover {
  background: var(--color-navy-light);
  border-color: var(--color-navy);
  color: var(--color-navy);
}

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

/* ── 17. Footer ────────────────────────────────────────────── */
.site-footer {
  background: var(--color-navy-dark);
  color: rgba(255,255,255,.75);
  padding-top: 60px;
}

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

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

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

.footer-brand .site-title { font-size: 1.2rem; margin-bottom: 10px; }
.footer-brand .site-tagline { display: block; color: rgba(255,255,255,.5); font-size: 0.8rem; margin-bottom: 14px; }

.footer-desc {
  font-size: 0.875rem;
  line-height: 1.65;
  color: rgba(255,255,255,.55);
}

.footer-widget-title {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer-links { display: flex; flex-direction: column; gap: 2px; }

.footer-links a {
  display: block;
  padding: 5px 0;
  font-size: 0.875rem;
  color: rgba(255,255,255,.6);
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--color-gold); }

/* Footer recent posts */
.footer-recent-post {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-block: 8px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.footer-recent-post:last-child { border-bottom: none; }

.footer-recent-post-title {
  font-size: 0.82rem;
  color: rgba(255,255,255,.75);
  line-height: 1.4;
  transition: color var(--transition);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.footer-recent-post-title:hover { color: var(--color-gold); }

.footer-recent-post-date {
  font-size: 0.73rem;
  color: rgba(255,255,255,.35);
}

/* Footer bottom bar */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copyright {
  font-size: 0.8rem;
  color: rgba(255,255,255,.4);
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.6);
  font-size: 0.85rem;
  transition: background var(--transition), color var(--transition);
}

.footer-social a:hover { background: var(--color-gold); color: var(--color-navy-dark); }

/* ── 18. Search Results ────────────────────────────────────── */
.search-results-header {
  padding: 40px 0 24px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 32px;
}

.search-results-header h1 {
  font-size: 1.6rem;
}

.search-results-header span { color: var(--color-gold); }

/* ── 19. 404 Page ──────────────────────────────────────────── */
.error-404 {
  text-align: center;
  padding: 80px 20px;
}

.error-404-code {
  font-family: var(--font-serif);
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 900;
  color: var(--color-navy-light);
  line-height: 1;
  margin-bottom: 16px;
}

.error-404 h2 {
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.error-404 p {
  color: var(--color-text-muted);
  max-width: 420px;
  margin-inline: auto;
  margin-bottom: 28px;
}

/* ── 20. Utility Classes ───────────────────────────────────── */
.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.text-center { text-align: center; }
.mt-0  { margin-top: 0; }
.mb-0  { margin-bottom: 0; }
.gap-section { gap: 48px; }

/* WP Alignment Classes */
.alignwide  { margin-inline: -40px; }
.alignfull  { margin-inline: calc(50% - 50vw); width: 100vw; }
.alignleft  { float: left; margin-right: 24px; margin-bottom: 12px; }
.alignright { float: right; margin-left: 24px; margin-bottom: 12px; }
.aligncenter { display: block; margin-inline: auto; }
