/* =============================================================================
   Matthew Custom Theme — Main Stylesheet
   Dark Green (#166534) + Warm Cream (#fdf8f0) palette
   Mobile-first, CSS variables, minimal class names
   ========================================================================== */

/* =============================================================================
   1. CSS Custom Properties (Design Tokens)
   ========================================================================== */

:root {
  /* Colors — overridden by Customizer via inline CSS */
  --mct-primary:     #166534;
  --mct-accent:      #15803d;
  --mct-bg:          #fdf8f0;
  --mct-surface:     #f5ede0;
  --mct-border:      #e2d6c5;
  --mct-text:        #1c1917;
  --mct-text-muted:  #78716c;
  --mct-heading:     #0f172a;
  --mct-link:        #166534;
  --mct-link-hover:  #14532d;

  /* Typography */
  --mct-font-body:    "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mct-font-heading: "Merriweather", Georgia, "Times New Roman", serif;
  --mct-font-mono:    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --mct-font-size:    17px;
  --mct-line-height:  1.75;

  /* Spacing */
  --mct-space-xs:  0.25rem;
  --mct-space-sm:  0.5rem;
  --mct-space-md:  1rem;
  --mct-space-lg:  1.5rem;
  --mct-space-xl:  2rem;
  --mct-space-2xl: 3rem;
  --mct-space-3xl: 4rem;

  /* Layout */
  --mct-container-width: 1200px;
  --mct-content-width:   780px;
  --mct-sidebar-width:   320px;
  --mct-gap:             2rem;

  /* UI */
  --mct-radius-sm:  4px;
  --mct-radius-md:  8px;
  --mct-radius-lg:  12px;
  --mct-shadow-sm:  0 1px 3px rgba(0, 0, 0, 0.08);
  --mct-shadow-md:  0 4px 12px rgba(0, 0, 0, 0.10);
  --mct-transition: 200ms ease;

  /* Header */
  --mct-header-height: 64px;
  --mct-header-bg:     #fff;
  --mct-header-border: var(--mct-border);
}

/* =============================================================================
   2. Reset & Base
   ========================================================================== */

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

html {
  font-size: var(--mct-font-size);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

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

a {
  color: var(--mct-link);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--mct-transition);
}
a:hover, a:focus {
  color: var(--mct-link-hover);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--mct-font-heading);
  color: var(--mct-heading);
  line-height: 1.3;
  margin-top: 0;
  margin-bottom: var(--mct-space-md);
  font-weight: 700;
}
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.875rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

p { margin-top: 0; margin-bottom: var(--mct-space-md); }

ul, ol { padding-left: 1.5em; margin-bottom: var(--mct-space-md); }
li { margin-bottom: var(--mct-space-xs); }

blockquote {
  margin: var(--mct-space-xl) 0;
  padding: var(--mct-space-lg) var(--mct-space-xl);
  border-left: 4px solid var(--mct-primary);
  background: var(--mct-surface);
  border-radius: 0 var(--mct-radius-md) var(--mct-radius-md) 0;
  font-style: italic;
  font-size: 1.05rem;
}
blockquote p:last-child { margin-bottom: 0; }

code, kbd, samp {
  font-family: var(--mct-font-mono);
  font-size: 0.875em;
  background: var(--mct-surface);
  padding: 0.1em 0.4em;
  border-radius: var(--mct-radius-sm);
  border: 1px solid var(--mct-border);
}

pre {
  overflow-x: auto;
  background: var(--mct-heading);
  color: #f8f8f2;
  padding: var(--mct-space-lg);
  border-radius: var(--mct-radius-md);
  margin-bottom: var(--mct-space-xl);
  line-height: 1.6;
}
pre code {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  color: inherit;
}

hr {
  border: none;
  border-top: 1px solid var(--mct-border);
  margin: var(--mct-space-2xl) 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--mct-space-xl);
  font-size: 0.9rem;
}
th {
  background: var(--mct-surface);
  font-family: var(--mct-font-body);
  font-weight: 600;
  text-align: left;
  padding: var(--mct-space-sm) var(--mct-space-md);
  border-bottom: 2px solid var(--mct-border);
}
td {
  padding: var(--mct-space-sm) var(--mct-space-md);
  border-bottom: 1px solid var(--mct-border);
}
tr:last-child td { border-bottom: none; }

figure { margin: 0 0 var(--mct-space-xl); }
figcaption {
  font-size: 0.85rem;
  color: var(--mct-text-muted);
  text-align: center;
  margin-top: var(--mct-space-sm);
}

/* =============================================================================
   3. Accessibility
   ========================================================================== */

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  word-wrap: normal !important;
}

.mct-skip-link {
  left: 6px;
  top: -9999px;
  position: absolute;
  z-index: 99999;
}
.mct-skip-link:focus {
  background: var(--mct-primary);
  color: #fff;
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: normal;
  padding: 15px 23px;
  top: 6px;
  text-decoration: none;
  border-radius: var(--mct-radius-md);
}

:focus-visible {
  outline: 2px solid var(--mct-primary);
  outline-offset: 3px;
}

/* =============================================================================
   4. Layout
   ========================================================================== */

.mct-container {
  max-width: var(--mct-container-width);
  margin: 0 auto;
  padding: var(--mct-space-2xl) var(--mct-space-lg);
  display: flex;
  gap: var(--mct-gap);
  align-items: flex-start;
}

.mct-content-area {
  flex: 1;
  min-width: 0;
}

.mct-main {
  width: 100%;
}

/* Sidebar layouts */
.mct-layout--with-sidebar {
  display: contents;
}

/* Full-width (no sidebar) */
.mct-layout--full-width .mct-main {
  max-width: var(--mct-content-width);
  margin: 0 auto;
}

/* =============================================================================
   5. Header
   ========================================================================== */

.mct-site-header {
  background: var(--mct-header-bg);
  border-bottom: 1px solid var(--mct-header-border);
  z-index: 100;
  transition: box-shadow var(--mct-transition);
}

.mct-site-header--sticky {
  position: sticky;
  top: 0;
}

.mct-site-header.is-scrolled {
  box-shadow: var(--mct-shadow-md);
}

.mct-header-inner {
  max-width: var(--mct-container-width);
  margin: 0 auto;
  padding: 0 var(--mct-space-lg);
  height: var(--mct-header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--mct-space-md);
}

/* Branding */
.mct-site-branding { flex-shrink: 0; }
.mct-site-name { margin: 0; font-size: 1.25rem; }
.mct-site-name a {
  color: var(--mct-heading);
  text-decoration: none;
  font-weight: 700;
}
.mct-site-name a:hover { color: var(--mct-primary); }
.mct-site-tagline {
  margin: 0;
  font-size: 0.75rem;
  color: var(--mct-text-muted);
}
.mct-site-logo img {
  max-height: 50px;
  width: auto;
}

/* Nav */
.mct-primary-nav { flex: 1; margin-left: var(--mct-space-lg); }
.mct-nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--mct-space-xs);
  justify-content: flex-end;
}
.mct-nav-menu li { position: relative; }
.mct-nav-menu a {
  display: block;
  padding: var(--mct-space-sm) var(--mct-space-md);
  color: var(--mct-text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--mct-radius-sm);
  transition: background var(--mct-transition), color var(--mct-transition);
}
.mct-nav-menu a:hover,
.mct-nav-menu .current-menu-item > a {
  background: var(--mct-surface);
  color: var(--mct-primary);
}

/* Dropdown */
.mct-nav-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 200px;
  background: var(--mct-header-bg);
  border: 1px solid var(--mct-border);
  border-radius: var(--mct-radius-md);
  box-shadow: var(--mct-shadow-md);
  padding: var(--mct-space-sm) 0;
  list-style: none;
  margin: 0;
  z-index: 200;
  flex-direction: column;
  gap: 0;
}
.mct-nav-menu li:hover > .sub-menu,
.mct-nav-menu li:focus-within > .sub-menu {
  display: flex;
}
.mct-nav-menu .sub-menu a {
  padding: var(--mct-space-sm) var(--mct-space-lg);
  border-radius: 0;
}

/* Header controls */
.mct-header-controls {
  display: flex;
  align-items: center;
  gap: var(--mct-space-md);   /* space between search / dark-mode / hamburger */
  flex-shrink: 0;
  margin-left: auto;          /* always push to the far right */
}

.mct-dark-mode-toggle,
.mct-search-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--mct-space-sm);
  color: var(--mct-text-muted);
  border-radius: var(--mct-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--mct-transition), background var(--mct-transition);
}
.mct-dark-mode-toggle:hover,
.mct-search-toggle:hover {
  color: var(--mct-primary);
  background: var(--mct-surface);
}

/* Dark mode icon states */
.mct-dark-mode-toggle__icon--dark { display: none; }
[data-theme="dark"] .mct-dark-mode-toggle__icon--light { display: none; }
[data-theme="dark"] .mct-dark-mode-toggle__icon--dark  { display: flex; }

/* Mobile menu toggle */
.mct-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--mct-space-sm);
  width: 40px;
  height: 40px;
}
.mct-menu-toggle__bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--mct-text);
  border-radius: 2px;
  transition: transform var(--mct-transition), opacity var(--mct-transition);
}

/* Header search */
.mct-header-search {
  border-top: 1px solid var(--mct-border);
  background: var(--mct-header-bg);
  padding: var(--mct-space-md) 0;
}
.mct-header-search__inner {
  max-width: var(--mct-container-width);
  margin: 0 auto;
  padding: 0 var(--mct-space-lg);
}
.mct-header-search[hidden] { display: none; }

/* =============================================================================
   6. Ad Zones
   ========================================================================== */

.mct-ad {
  text-align: center;
  overflow: hidden;
}

.mct-ad--header {
  background: var(--mct-surface);
  padding: var(--mct-space-sm) var(--mct-space-lg);
  border-bottom: 1px solid var(--mct-border);
}

.mct-ad--in-content {
  margin: var(--mct-space-xl) 0;
  padding: var(--mct-space-md);
  background: var(--mct-surface);
  border-radius: var(--mct-radius-md);
  border: 1px solid var(--mct-border);
}

.mct-ad--footer {
  padding: var(--mct-space-lg);
  border-top: 1px solid var(--mct-border);
  background: var(--mct-surface);
}

.mct-ad--sidebar {
  margin-bottom: var(--mct-space-xl);
  padding: var(--mct-space-md);
  background: var(--mct-surface);
  border-radius: var(--mct-radius-md);
  border: 1px solid var(--mct-border);
}

/* =============================================================================
   7. Post Cards (Archive / Homepage Grid)
   ========================================================================== */

.mct-posts-grid {
  display: grid;
  gap: var(--mct-space-xl);
}

/* Grid layout */
@media (min-width: 640px) {
  .mct-posts-grid:has(.mct-post-card--grid) {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .mct-posts-grid:has(.mct-post-card--grid) {
    grid-template-columns: repeat(3, 1fr);
  }
}

.mct-post-card {
  background: #fff;
  border: 1px solid var(--mct-border);
  border-radius: var(--mct-radius-lg);
  overflow: hidden;
  transition: transform var(--mct-transition), box-shadow var(--mct-transition);
  display: flex;
  flex-direction: column;
}
.mct-post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--mct-shadow-md);
}

.mct-post-card--list {
  flex-direction: row;
}

.mct-post-card__thumbnail img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 300ms ease;
}
.mct-post-card:hover .mct-post-card__thumbnail img {
  transform: scale(1.02);
}
.mct-post-card--list .mct-post-card__thumbnail {
  flex-shrink: 0;
  width: 240px;
}
.mct-post-card--list .mct-post-card__thumbnail img {
  height: 100%;
}

.mct-post-card__body {
  padding: var(--mct-space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.mct-post-card__title {
  font-size: 1.1rem;
  margin-bottom: var(--mct-space-sm);
  line-height: 1.35;
}
.mct-post-card__title a {
  color: var(--mct-heading);
  text-decoration: none;
}
.mct-post-card__title a:hover { color: var(--mct-primary); }

.mct-post-card__excerpt {
  font-size: 0.9rem;
  color: var(--mct-text-muted);
  margin-bottom: var(--mct-space-lg);
  flex: 1;
}
.mct-post-card__excerpt p { margin: 0; }

.mct-post-card__read-more { align-self: flex-start; }

/* Featured post card (hero) */
.mct-featured-post { margin-bottom: var(--mct-space-2xl); }
.mct-post-card--featured {
  display: grid;
  border-radius: var(--mct-radius-lg);
  overflow: hidden;
  background: var(--mct-heading);
  color: #fff;
  border: none;
}
@media (min-width: 768px) {
  .mct-post-card--featured {
    grid-template-columns: 1fr 1fr;
    min-height: 420px;
  }
}
.mct-post-card__thumbnail--hero {
  overflow: hidden;
  min-height: 260px;
}
.mct-post-card__thumbnail--hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mct-post-card__body--featured {
  padding: var(--mct-space-2xl);
  justify-content: center;
}
.mct-post-card--featured .mct-post-card__title--featured {
  color: #fff;
  font-size: clamp(1.4rem, 3vw, 2rem);
}
.mct-post-card--featured .mct-post-card__title--featured a { color: #fff; }
.mct-post-card--featured .mct-post-card__excerpt { color: rgba(255,255,255,0.75); }
.mct-post-card--featured .mct-cat-badge {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

/* =============================================================================
   8. Post Meta
   ========================================================================== */

.mct-post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--mct-space-sm);
  font-size: 0.8rem;
  color: var(--mct-text-muted);
  margin-bottom: var(--mct-space-md);
}
.mct-post-meta a { color: var(--mct-text-muted); text-decoration: none; }
.mct-post-meta a:hover { color: var(--mct-primary); }

.mct-cat-badge {
  display: inline-block;
  background: var(--mct-primary);
  color: #fff !important;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 100px;
  text-decoration: none !important;
}

.mct-tag-badge {
  display: inline-block;
  background: var(--mct-surface);
  color: var(--mct-text-muted) !important;
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: 100px;
  border: 1px solid var(--mct-border);
  text-decoration: none !important;
  transition: background var(--mct-transition), color var(--mct-transition);
}
.mct-tag-badge:hover {
  background: var(--mct-primary);
  color: #fff !important;
  border-color: var(--mct-primary);
}

/* =============================================================================
   9. Single Post
   ========================================================================== */

.mct-single-post { max-width: var(--mct-content-width); }

.mct-single-post__header { margin-bottom: var(--mct-space-xl); }

.mct-single-post__title {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  line-height: 1.2;
  margin-bottom: var(--mct-space-lg);
}

.mct-single-post__thumbnail {
  margin-bottom: var(--mct-space-xl);
  border-radius: var(--mct-radius-lg);
  overflow: hidden;
}
.mct-single-post__thumbnail img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
}

.mct-single-post__footer {
  margin-top: var(--mct-space-2xl);
  padding-top: var(--mct-space-xl);
  border-top: 1px solid var(--mct-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--mct-space-md);
}

.mct-single-post__tags { display: flex; flex-wrap: wrap; gap: var(--mct-space-sm); }

/* Prose content */
.mct-prose {
  max-width: var(--mct-content-width);
  color: var(--mct-text);
  font-size: 1rem;
  line-height: var(--mct-line-height);
}
.mct-prose p { margin-bottom: 1.5em; }
.mct-prose img {
  border-radius: var(--mct-radius-md);
  margin: var(--mct-space-lg) auto;
}
.mct-prose h2, .mct-prose h3 {
  margin-top: 2em;
}
.mct-prose a { color: var(--mct-link); }
.mct-prose a:hover { color: var(--mct-link-hover); }
.mct-prose ul li::marker { color: var(--mct-primary); }

/* =============================================================================
   10. Author Box
   ========================================================================== */

.mct-author-box {
  display: flex;
  gap: var(--mct-space-lg);
  align-items: flex-start;
  background: var(--mct-surface);
  border: 1px solid var(--mct-border);
  border-radius: var(--mct-radius-lg);
  padding: var(--mct-space-xl);
  margin: var(--mct-space-2xl) 0;
}
.mct-author-box__img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--mct-border);
}
.mct-author-box__name {
  font-family: var(--mct-font-heading);
  font-weight: 700;
  margin: 0 0 var(--mct-space-sm);
  font-size: 1.1rem;
}
.mct-author-box__name a { color: var(--mct-heading); text-decoration: none; }
.mct-author-box__name a:hover { color: var(--mct-primary); }
.mct-author-box__bio {
  margin: 0;
  font-size: 0.9rem;
  color: var(--mct-text-muted);
  line-height: 1.6;
}

/* =============================================================================
   11. Related Posts
   ========================================================================== */

.mct-related-posts {
  margin: var(--mct-space-2xl) 0;
  padding-top: var(--mct-space-xl);
  border-top: 1px solid var(--mct-border);
}
.mct-related-posts__title {
  font-size: 1.25rem;
  margin-bottom: var(--mct-space-lg);
}
.mct-related-posts__grid {
  display: grid;
  gap: var(--mct-space-lg);
}
@media (min-width: 640px) {
  .mct-related-posts__grid { grid-template-columns: repeat(3, 1fr); }
}
.mct-related-posts__item { display: flex; flex-direction: column; gap: var(--mct-space-sm); }
.mct-related-posts__thumb img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--mct-radius-md);
}
.mct-related-posts__post-title {
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.4;
}
.mct-related-posts__post-title a { color: var(--mct-heading); text-decoration: none; }
.mct-related-posts__post-title a:hover { color: var(--mct-primary); }
.mct-related-posts__date { font-size: 0.78rem; color: var(--mct-text-muted); }

/* =============================================================================
   12. Social Share
   ========================================================================== */

.mct-social-share {
  display: flex;
  align-items: center;
  gap: var(--mct-space-sm);
  flex-wrap: wrap;
}
.mct-social-share__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--mct-text-muted);
}
.mct-social-share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--mct-surface);
  border: 1px solid var(--mct-border);
  color: var(--mct-text);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: background var(--mct-transition), color var(--mct-transition), border-color var(--mct-transition);
}
.mct-social-share__btn:hover {
  background: var(--mct-primary);
  color: #fff;
  border-color: var(--mct-primary);
}

/* =============================================================================
   13. Post Navigation
   ========================================================================== */

.mct-post-navigation {
  margin: var(--mct-space-2xl) 0;
  padding-top: var(--mct-space-xl);
  border-top: 1px solid var(--mct-border);
}
.mct-post-navigation .nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--mct-space-lg);
}
.mct-post-navigation .nav-previous,
.mct-post-navigation .nav-next {
  display: flex;
  flex-direction: column;
  gap: var(--mct-space-xs);
}
.mct-post-navigation .nav-next { text-align: right; }
.mct-post-navigation a { text-decoration: none; }
.mct-post-navigation__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--mct-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.mct-post-navigation__title {
  display: block;
  font-family: var(--mct-font-heading);
  font-weight: 600;
  color: var(--mct-heading);
  font-size: 0.95rem;
  line-height: 1.4;
}
.mct-post-navigation a:hover .mct-post-navigation__title {
  color: var(--mct-primary);
}

/* =============================================================================
   14. Sidebar
   ========================================================================== */

.mct-sidebar {
  width: var(--mct-sidebar-width);
  flex-shrink: 0;
}
.mct-sidebar--sticky .mct-sidebar__inner {
  position: sticky;
  top: calc(var(--mct-header-height) + var(--mct-space-lg));
}

/* Sidebar widget styles */
.widget {
  margin-bottom: var(--mct-space-xl);
  padding: var(--mct-space-lg);
  background: #fff;
  border: 1px solid var(--mct-border);
  border-radius: var(--mct-radius-lg);
}
.widget-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mct-text-muted);
  margin: 0 0 var(--mct-space-md);
  padding-bottom: var(--mct-space-sm);
  border-bottom: 2px solid var(--mct-primary);
}
.widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.widget ul li {
  padding: var(--mct-space-xs) 0;
  border-bottom: 1px solid var(--mct-border);
  margin: 0;
}
.widget ul li:last-child { border-bottom: none; }
.widget ul a {
  color: var(--mct-text);
  text-decoration: none;
  font-size: 0.9rem;
}
.widget ul a:hover { color: var(--mct-primary); }

/* =============================================================================
   15. Breadcrumbs
   ========================================================================== */

.mct-breadcrumbs {
  margin-bottom: var(--mct-space-lg);
  font-size: 0.8rem;
  color: var(--mct-text-muted);
}
.mct-breadcrumbs ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--mct-space-xs);
}
.mct-breadcrumbs a { color: var(--mct-text-muted); }
.mct-breadcrumbs a:hover { color: var(--mct-primary); }
.mct-breadcrumb__sep { margin: 0 2px; opacity: 0.5; }
.mct-breadcrumbs [aria-current="page"] { color: var(--mct-text); }

/* =============================================================================
   16. Pagination
   ========================================================================== */

.mct-pagination {
  margin-top: var(--mct-space-2xl);
}
.mct-pagination .page-numbers {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--mct-space-sm);
  justify-content: center;
}
.mct-pagination .page-numbers li {}
.mct-pagination .page-numbers a,
.mct-pagination .page-numbers span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--mct-space-sm);
  border-radius: var(--mct-radius-sm);
  border: 1px solid var(--mct-border);
  text-decoration: none;
  color: var(--mct-text);
  font-size: 0.9rem;
  transition: background var(--mct-transition), color var(--mct-transition), border-color var(--mct-transition);
}
.mct-pagination .page-numbers a:hover {
  background: var(--mct-primary);
  color: #fff;
  border-color: var(--mct-primary);
}
.mct-pagination .page-numbers .current {
  background: var(--mct-primary);
  color: #fff;
  border-color: var(--mct-primary);
}

/* =============================================================================
   17. Buttons
   ========================================================================== */

.mct-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--mct-space-xs);
  padding: 0.6em 1.25em;
  border-radius: var(--mct-radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--mct-transition), color var(--mct-transition), border-color var(--mct-transition);
  line-height: 1.4;
}
.mct-btn--primary {
  background: var(--mct-primary);
  color: #fff;
  border-color: var(--mct-primary);
}
.mct-btn--primary:hover {
  background: var(--mct-accent);
  border-color: var(--mct-accent);
  color: #fff;
}
.mct-btn--ghost {
  background: transparent;
  color: var(--mct-primary);
  border-color: var(--mct-primary);
}
.mct-btn--ghost:hover {
  background: var(--mct-primary);
  color: #fff;
}

/* =============================================================================
   18. Archive Header
   ========================================================================== */

.mct-archive-header {
  margin-bottom: var(--mct-space-2xl);
  padding-bottom: var(--mct-space-xl);
  border-bottom: 1px solid var(--mct-border);
}
.mct-archive-header__title {
  margin: 0 0 var(--mct-space-sm);
}
.mct-archive-header__desc { color: var(--mct-text-muted); margin: 0; }
.mct-archive-header__search { margin-top: var(--mct-space-md); max-width: 500px; }

/* =============================================================================
   19. Search Form
   ========================================================================== */

.search-form {
  display: flex;
  gap: var(--mct-space-sm);
}
.search-form label { flex: 1; }
.search-form .search-field {
  width: 100%;
  padding: 0.6em 1em;
  border: 1px solid var(--mct-border);
  border-radius: var(--mct-radius-md);
  background: #fff;
  color: var(--mct-text);
  font-family: var(--mct-font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--mct-transition);
}
.search-form .search-field:focus { border-color: var(--mct-primary); }
.search-form .search-submit {
  padding: 0.6em 1.2em;
  background: var(--mct-primary);
  color: #fff;
  border: none;
  border-radius: var(--mct-radius-md);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background var(--mct-transition);
}
.search-form .search-submit:hover { background: var(--mct-accent); }

/* =============================================================================
   20. 404 Page
   ========================================================================== */

.mct-404 {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  text-align: center;
}
.mct-404__inner { max-width: 500px; }
.mct-404__code {
  font-size: clamp(5rem, 15vw, 10rem);
  font-weight: 800;
  color: var(--mct-border);
  line-height: 1;
  margin: 0 0 var(--mct-space-md);
}
.mct-404__title { margin-bottom: var(--mct-space-md); }
.mct-404__message { color: var(--mct-text-muted); margin-bottom: var(--mct-space-xl); }
.mct-404__search { margin-bottom: var(--mct-space-xl); }

/* =============================================================================
   21. No Results
   ========================================================================== */

.mct-no-results {
  padding: var(--mct-space-2xl);
  text-align: center;
  background: var(--mct-surface);
  border-radius: var(--mct-radius-lg);
  border: 1px solid var(--mct-border);
}

/* =============================================================================
   22. Footer
   ========================================================================== */

.mct-site-footer {
  background: var(--mct-heading);
  color: rgba(255,255,255,0.75);
  margin-top: var(--mct-space-3xl);
}

.mct-footer-widgets {
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.mct-footer-widgets__inner {
  max-width: var(--mct-container-width);
  margin: 0 auto;
  padding: var(--mct-space-2xl) var(--mct-space-lg);
  display: grid;
  gap: var(--mct-space-xl);
}
@media (min-width: 640px) {
  .mct-footer-widgets__inner { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .mct-footer-widgets__inner { grid-template-columns: repeat(3, 1fr); }
}
.mct-footer-widgets__col .widget {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}
.mct-footer-widgets__col .widget-title {
  color: rgba(255,255,255,0.5);
  border-bottom-color: rgba(255,255,255,0.2);
}
.mct-footer-widgets__col .widget a { color: rgba(255,255,255,0.75); }
.mct-footer-widgets__col .widget a:hover { color: #fff; }
.mct-footer-widgets__col .widget ul li { border-bottom-color: rgba(255,255,255,0.1); }

.mct-footer-bar {
  padding: var(--mct-space-lg);
}
.mct-footer-bar__inner {
  max-width: var(--mct-container-width);
  margin: 0 auto;
  padding: 0 var(--mct-space-lg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--mct-space-md);
  font-size: 0.85rem;
}
.mct-footer-bar__copyright { color: rgba(255,255,255,0.6); }

.mct-footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--mct-space-md);
}
.mct-footer-menu a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.85rem;
}
.mct-footer-menu a:hover { color: #fff; }

/* =============================================================================
   23. Comments
   ========================================================================== */

.comments-area { margin-top: var(--mct-space-2xl); }
.comments-title, .comment-reply-title { margin-bottom: var(--mct-space-xl); }
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-list .children { list-style: none; padding-left: var(--mct-space-xl); }
.comment-body {
  padding: var(--mct-space-lg);
  background: var(--mct-surface);
  border-radius: var(--mct-radius-md);
  margin-bottom: var(--mct-space-lg);
  border: 1px solid var(--mct-border);
}
.comment-meta { font-size: 0.85rem; color: var(--mct-text-muted); margin-bottom: var(--mct-space-md); }
.comment-form label { display: block; font-weight: 600; margin-bottom: var(--mct-space-xs); font-size: 0.9rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 0.6em 1em;
  border: 1px solid var(--mct-border);
  border-radius: var(--mct-radius-md);
  background: #fff;
  color: var(--mct-text);
  font-family: var(--mct-font-body);
  font-size: 0.95rem;
  margin-bottom: var(--mct-space-md);
  transition: border-color var(--mct-transition);
}
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--mct-primary); outline: none; }
.comment-form textarea { min-height: 140px; resize: vertical; }
.comment-form .submit {
  background: var(--mct-primary);
  color: #fff;
  border: none;
  padding: 0.65em 1.5em;
  border-radius: var(--mct-radius-md);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background var(--mct-transition);
}
.comment-form .submit:hover { background: var(--mct-accent); }

/* =============================================================================
   24. WordPress Core Classes
   ========================================================================== */

.alignleft  { float: left; margin: 0 var(--mct-space-lg) var(--mct-space-md) 0; }
.alignright { float: right; margin: 0 0 var(--mct-space-md) var(--mct-space-lg); }
.aligncenter { display: block; margin: 0 auto var(--mct-space-md); }
.alignwide   { max-width: calc(var(--mct-content-width) + 200px); margin-left: auto; margin-right: auto; }
.alignfull   { max-width: 100%; }

.wp-caption { max-width: 100%; }
.wp-caption-text {
  font-size: 0.85rem;
  color: var(--mct-text-muted);
  text-align: center;
  margin-top: var(--mct-space-xs);
}

.sticky { border-left: 3px solid var(--mct-primary); padding-left: var(--mct-space-md); }

.page-links {
  margin: var(--mct-space-xl) 0;
  font-weight: 600;
}

/* =============================================================================
   25. Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  .mct-container {
    flex-direction: column;
  }
  .mct-sidebar {
    width: 100%;
  }
  .mct-sidebar--sticky .mct-sidebar__inner {
    position: static;
  }
}

@media (max-width: 768px) {
  :root {
    --mct-space-2xl: 2rem;
    --mct-space-3xl: 2.5rem;
    --mct-gap: 1.5rem;
  }

  .mct-container { padding: var(--mct-space-lg); }

  /* Mobile nav */
  .mct-menu-toggle { display: flex; }
  .mct-primary-nav {
    position: absolute;
    top: var(--mct-header-height);
    left: 0;
    right: 0;
    background: var(--mct-header-bg);
    border-bottom: 1px solid var(--mct-border);
    box-shadow: var(--mct-shadow-md);
    display: none;
    padding: var(--mct-space-md);
  }
  .mct-primary-nav.is-open { display: block; }
  .mct-nav-menu {
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
  }
  .mct-nav-menu a {
    padding: var(--mct-space-md);
    border-bottom: 1px solid var(--mct-border);
  }
  .mct-nav-menu .sub-menu {
    position: static;
    display: block;
    box-shadow: none;
    border: none;
    padding-left: var(--mct-space-lg);
  }

  .mct-post-card--list { flex-direction: column; }
  .mct-post-card--list .mct-post-card__thumbnail { width: 100%; }
  .mct-post-card--list .mct-post-card__thumbnail img { height: 200px; }

  .mct-author-box { flex-direction: column; }
  .mct-related-posts__grid { grid-template-columns: 1fr; }
  .mct-post-navigation .nav-links { grid-template-columns: 1fr; }
  .mct-footer-bar__inner { flex-direction: column; text-align: center; }
}

/* =============================================================================
   26. Print
   ========================================================================== */

@media print {
  .mct-site-header,
  .mct-sidebar,
  .mct-ad,
  .mct-social-share,
  .mct-post-navigation,
  .mct-related-posts,
  .mct-site-footer { display: none; }
  .mct-container { max-width: 100%; padding: 0; }
  body { font-size: 12pt; color: #000; background: #fff; }
  a { text-decoration: none; color: #000; }
  .mct-prose img { max-width: 60%; }
}
