:root {
  --bg: #f9f8f3;
  --bg-white: #ffffff;
  --text: #1f2937;
  --text-muted: #6b7280;
  --green: #0f6b4f;
  --green-dark: #0b553f;
  --green-light: #1f9d74;
  --navy: #1e2a4a;
  --border: #e8e4da;
  --shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
  --radius: 16px;
  --radius-sm: 10px;
  --container: 1180px;
  --font: "DM Sans", system-ui, -apple-system, Segoe UI, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--green);
  text-decoration: none;
}

a:hover {
  color: var(--green-dark);
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 0;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-green {
  background: var(--green);
  color: #fff;
}

.btn-green:hover {
  background: var(--green-dark);
  color: #fff;
}

.btn-navy {
  background: var(--navy);
  color: #fff;
}

.btn-navy:hover {
  background: #162038;
  color: #fff;
}

.btn-lg {
  padding: 1rem 1.75rem;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.btn-block {
  width: 100%;
}

/* Header */
.site-header {
  background: rgba(249, 248, 243, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(232, 228, 218, 0.8);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 1rem;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.35rem;
}

.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2dd4bf, #0f6b4f);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.35);
}

.custom-logo-link img {
  max-height: 48px;
  width: auto;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.header-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-menu a {
  color: var(--text);
  font-weight: 500;
}

.header-menu a:hover {
  color: var(--green);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  padding: 0;
  position: relative;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px auto;
}

.mobile-nav {
  padding: 1rem;
  border-top: 1px solid var(--border);
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-menu {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.mobile-menu a {
  display: block;
  padding: 0.75rem 0;
  color: var(--text);
  font-weight: 500;
}

/* Hero */
.hero {
  position: relative;
  overflow: visible;
  z-index: 20;
  padding: 4.5rem 0 3rem;
}

.hero-shapes .shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.55;
  filter: blur(0.5px);
}

.shape-a {
  width: 120px;
  height: 120px;
  background: #b8ead8;
  top: 40px;
  left: 8%;
}

.shape-b {
  width: 90px;
  height: 90px;
  background: #d8c7f3;
  top: 120px;
  right: 12%;
}

.shape-c {
  width: 70px;
  height: 70px;
  background: #b9d9ff;
  bottom: 80px;
  left: 18%;
}

.shape-d {
  width: 110px;
  height: 110px;
  background: #c6efd9;
  bottom: 40px;
  right: 20%;
}

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero-title {
  margin: 0 auto 1rem;
  max-width: 860px;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.text-accent {
  color: var(--green-light);
}

.hero-subtitle {
  margin: 0 auto 2rem;
  max-width: 680px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.hero-search {
  display: flex;
  align-items: stretch;
  max-width: 760px;
  margin: 0 auto 1rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 0.35rem 0.35rem 0.35rem 1rem;
}

.search-icon {
  display: flex;
  align-items: center;
  color: #9ca3af;
  width: 22px;
  flex: 0 0 22px;
}

.search-icon svg {
  width: 20px;
  height: 20px;
}

.hero-search input {
  flex: 1;
  border: 0;
  outline: none;
  font: inherit;
  font-size: 0.98rem;
  padding: 0.85rem 0.75rem;
  background: transparent;
  min-width: 0;
}

.hero-search .btn {
  border-radius: 999px;
  min-width: 120px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.82rem;
}

/* Live AJAX search */
.live-search {
  position: relative;
  z-index: 30;
}

.live-search-hero {
  max-width: 760px;
  margin: 0 auto 1rem;
}

.live-search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.5rem);
  z-index: 200;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(17, 24, 39, 0.18);
  max-height: min(420px, 60vh);
  overflow: auto;
  text-align: left;
}

.live-search-loading,
.live-search-empty {
  padding: 1rem 1.1rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.live-search-list {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
}

.live-search-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem 1rem;
  color: var(--text);
  border-bottom: 1px solid #f3f4f6;
}

.live-search-item:last-child {
  border-bottom: 0;
}

.live-search-item:hover,
.live-search-item:focus {
  background: #f0fdf8;
  color: var(--green-dark);
  outline: none;
}

.live-search-item-title {
  font-weight: 600;
  font-size: 0.96rem;
  line-height: 1.35;
}

.live-search-item-meta {
  display: inline-block;
  width: fit-content;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  background: #f3f4f6;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.live-search-item-excerpt {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.live-search-view-all {
  display: block;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  background: #fafafa;
}

.live-search-view-all:hover {
  background: #f0fdf8;
}

.live-search-inline {
  margin-top: 1.25rem;
  max-width: 560px;
}

.inline-search-form,
.sidebar-search-form {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
}

.inline-search-form input,
.sidebar-search-form input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.8rem 1rem;
  font: inherit;
  background: #fff;
  min-width: 0;
}

.sidebar-search-form {
  flex-direction: column;
}

.sidebar-search-form input {
  border-radius: var(--radius-sm);
  width: 100%;
}

.live-search-sidebar .live-search-results {
  position: relative;
  top: 0.5rem;
  max-height: 320px;
}

.popular-search {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.popular-label {
  font-weight: 600;
  color: var(--text);
}

.popular-search a {
  color: var(--text-muted);
}

.popular-search a:hover {
  color: var(--green);
}

.popular-search .sep {
  margin: 0 0.15rem;
}

/* Hub grid */
.hub-grid-section {
  position: relative;
  z-index: 1;
  padding: 1rem 0 4rem;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.35rem;
}

.hub-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.hub-card-icon {
  width: 42px;
  height: 42px;
  color: var(--green);
  margin-bottom: 1rem;
}

.hub-card-icon svg {
  width: 42px;
  height: 42px;
}

.hub-card-title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}

.hub-card-desc {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.hub-card-links {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.hub-card-links li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
}

.link-icon {
  width: 16px;
  color: #9ca3af;
  margin-top: 0.15rem;
  flex: 0 0 16px;
}

.link-icon svg {
  width: 16px;
  height: 16px;
}

.hub-card-links a {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.45;
}

.hub-card-links a:hover {
  color: var(--green);
}

.hub-card-empty {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.hub-card-more {
  margin-top: 1rem;
  font-weight: 600;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* CTA */
.cta-section {
  padding: 3rem 0 4.5rem;
}

.cta-inner {
  text-align: center;
}

.cta-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.25;
}

.cta-arrow {
  color: var(--green-light);
}

.cta-text {
  margin: 0 auto 1.5rem;
  max-width: 620px;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}

.footer-top,
.footer-columns,
.footer-bottom {
  padding-bottom: 1.5rem;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef2ff;
  color: var(--navy);
  font-weight: 700;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.footer-col h4,
.footer-widget-title {
  margin: 0 0 0.85rem;
  font-size: 1rem;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 0.45rem;
}

.footer-col a {
  color: var(--text-muted);
}

.footer-col a:hover {
  color: var(--green);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.footer-bottom p {
  margin: 0;
}

/* Hide stray WordPress widgets if old sidebar was configured */
.site-footer .widget,
.site-footer .widget_categories,
.site-footer .footer-widgets {
  display: none !important;
}

/* Inner pages */
.page-header {
  padding: 2.5rem 0 1.5rem;
}

.page-header-compact {
  padding-top: 1.5rem;
}

.page-header h1 {
  margin: 0.5rem 0 0;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.breadcrumbs {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs .current {
  color: var(--text);
}

.archive-description {
  margin-top: 0.75rem;
  color: var(--text-muted);
  max-width: 760px;
}

.inline-search,
.inline-search-form {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  max-width: 560px;
}

.inline-search input,
.inline-search-form input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.8rem 1rem;
  font: inherit;
  background: #fff;
}

.archive-section,
.page-content-section {
  padding: 0 0 3rem;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.post-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.post-card-link {
  color: inherit;
  display: block;
  height: 100%;
}

.post-card-thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.post-card-thumb-placeholder {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #ecfdf5, #f3f4f6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
}

.post-card-thumb-placeholder svg {
  width: 42px;
  height: 42px;
}

.post-card-body {
  padding: 1rem 1.1rem 1.2rem;
}

.post-card-meta {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-bottom: 0.45rem;
}

.post-card-title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  line-height: 1.35;
}

.post-card-excerpt {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.post-card-more {
  display: inline-block;
  margin-top: 0.85rem;
  font-weight: 600;
  color: var(--green);
  font-size: 0.9rem;
}

.pagination {
  margin-top: 2rem;
}

.pagination .nav-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 0.75rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
}

.pagination .current {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

/* Single post */
.single-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 2rem;
  padding-bottom: 3rem;
}

.single-content {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
}

.entry-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1.2;
}

.entry-meta {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
}

.meta-sep {
  margin: 0 0.35rem;
}

.entry-featured {
  margin-bottom: 1.25rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.entry-content {
  font-size: 1.02rem;
}

.entry-content h2,
.entry-content h3 {
  margin-top: 1.75rem;
  line-height: 1.25;
}

.entry-content pre,
.entry-content code {
  font-family: Consolas, "Courier New", monospace;
}

.entry-content pre {
  background: #111827;
  color: #e5e7eb;
  padding: 1rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
}

.entry-content img {
  border-radius: var(--radius-sm);
}

.post-tags {
  margin-top: 1.5rem;
  color: var(--text-muted);
}

.single-sidebar .sidebar-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem;
  margin-bottom: 1rem;
}

.single-sidebar h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.single-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.single-sidebar li {
  margin-bottom: 0.55rem;
}

.single-sidebar a {
  color: var(--text);
  font-size: 0.92rem;
}

.sidebar-search input,
.sidebar-search-form input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  font: inherit;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 1024px) {
  .hub-grid,
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .single-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-nav {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    padding-top: 3rem;
  }

  .hero-search {
    flex-direction: column;
    border-radius: var(--radius);
    padding: 0.75rem;
  }

  .hero-search .btn {
    width: 100%;
  }

  .hub-grid,
  .post-grid,
  .footer-columns {
    grid-template-columns: 1fr;
  }

  .inline-search,
  .inline-search-form {
    flex-direction: column;
  }

  .inline-search .btn,
  .inline-search-form .btn {
    width: 100%;
  }
}
