/*
Theme Name: DivHit Blog
Theme URI: https://divhitsolutions.com
Author: DivHit Solutions
Author URI: https://divhitsolutions.com
Description: Custom WordPress theme for the DivHit Solutions blog. Pixel-matched to the main React marketing site — same deep navy (#082f8a) + electric cyan (#00d4ff) branding, Inter typography, premium centered reading layout (Medium-style, no sidebar). All header navigation links back to the main site.
Version: 1.0.0
License: Proprietary
Text Domain: divhit-blog
*/

/* ============================================================
   1. Design tokens (matching the React site)
   ============================================================ */
:root {
  --primary: #082f8a;
  --primary-dark: #051f5e;
  --accent: #00d4ff;
  --bg: #ffffff;
  --bg-soft: #eef2f9;
  --fg: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -2px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 25px -5px rgba(8,47,138,.10), 0 8px 10px -6px rgba(8,47,138,.08);
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --container: 1200px;
  --read: 720px;
}

/* ============================================================
   2. Reset & base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent); }
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--fg);
  letter-spacing: -0.02em;
}

/* ============================================================
   3. Header (sticky, blurred — matches React Header)
   ============================================================ */
.dh-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid rgba(226,232,240,.4);
  background: rgba(255,255,255,.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.dh-header__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dh-logo img { width: 160px; height: auto; }
.dh-nav { display: none; gap: 2rem; align-items: center; }
@media (min-width: 768px) { .dh-nav { display: flex; } }
.dh-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color .2s;
}
.dh-nav a:hover, .dh-nav a.is-active { color: var(--primary); }
.dh-cta {
  display: none;
  background: var(--primary);
  color: #fff !important;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  transition: all .2s;
}
@media (min-width: 768px) { .dh-cta { display: inline-flex; } }
.dh-cta:hover { background: var(--primary-dark); color: #fff !important; transform: translateY(-1px); }

/* Mobile menu toggle */
.dh-menu-btn {
  display: inline-flex; padding: .5rem; border: 0; background: transparent;
  color: var(--muted); cursor: pointer; border-radius: var(--radius);
}
@media (min-width: 768px) { .dh-menu-btn { display: none; } }
.dh-mobile-menu {
  display: none; padding: 1rem 1.5rem; border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.95);
}
.dh-mobile-menu.is-open { display: block; }
.dh-mobile-menu a {
  display: block; padding: .75rem; border-radius: var(--radius);
  color: var(--muted); font-size: 14px; font-weight: 500;
}
.dh-mobile-menu a:hover { background: #f8fafc; color: var(--fg); }

/* ============================================================
   4. Main content
   ============================================================ */
.dh-main { min-height: calc(100vh - 64px - 320px); }

/* Page hero (blog index) */
.dh-hero {
  padding: 4rem 1.5rem 2.5rem;
  text-align: center;
  background: linear-gradient(180deg, #f8faff 0%, #ffffff 100%);
}
.dh-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 .75rem;
  background: linear-gradient(90deg, var(--primary) 0%, #1e40af 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.dh-hero p {
  max-width: 640px; margin: 0 auto;
  font-size: 1.1rem; color: var(--muted);
}

/* Blog list (cards) */
.dh-grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .dh-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .dh-grid { grid-template-columns: repeat(3, 1fr); } }

.dh-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all .25s ease;
  display: flex; flex-direction: column;
}
.dh-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(8,47,138,.2); }
.dh-card__thumb { aspect-ratio: 16/9; background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%); overflow: hidden; }
.dh-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.dh-card__body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.dh-card__meta { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .5rem; }
.dh-card__title { font-size: 1.2rem; margin: 0 0 .75rem; line-height: 1.35; }
.dh-card__title a { color: var(--fg); }
.dh-card__title a:hover { color: var(--primary); }
.dh-card__excerpt { font-size: .95rem; color: var(--muted); margin: 0 0 1rem; flex: 1; }
.dh-card__more {
  font-size: .9rem; font-weight: 600; color: var(--primary);
  display: inline-flex; align-items: center; gap: .35rem;
}
.dh-card__more::after { content: "→"; transition: transform .2s; }
.dh-card__more:hover::after { transform: translateX(3px); }

/* ============================================================
   5. Single post (Medium-style, centered, no sidebar)
   ============================================================ */
.dh-post {
  max-width: var(--read);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4rem;
}
.dh-post__back {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: 14px; color: var(--muted); margin-bottom: 2rem;
}
.dh-post__back:hover { color: var(--primary); }
.dh-post__meta { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.dh-post__title {
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.15;
  margin: 0 0 1.25rem;
  letter-spacing: -0.025em;
}
.dh-post__lede { font-size: 1.2rem; color: var(--muted); line-height: 1.6; margin: 0 0 2rem; }
.dh-post__featured { aspect-ratio: 16/9; border-radius: var(--radius-lg); overflow: hidden; margin: 0 0 2.5rem; box-shadow: var(--shadow-md); }
.dh-post__featured img { width: 100%; height: 100%; object-fit: cover; }

/* Long-form prose */
.dh-prose { font-size: 1.075rem; line-height: 1.75; color: #1e293b; }
.dh-prose > * + * { margin-top: 1.25rem; }
.dh-prose h2 { font-size: 1.75rem; margin-top: 3rem; margin-bottom: 1rem; }
.dh-prose h3 { font-size: 1.35rem; margin-top: 2.25rem; margin-bottom: .75rem; }
.dh-prose p { margin: 0 0 1.25rem; }
.dh-prose a { color: var(--primary); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.dh-prose a:hover { color: var(--accent); }
.dh-prose strong { color: var(--fg); font-weight: 700; }
.dh-prose ul, .dh-prose ol { padding-left: 1.5rem; margin: 0 0 1.25rem; }
.dh-prose li { margin: .5rem 0; }
.dh-prose blockquote {
  border-left: 4px solid var(--accent);
  background: var(--bg-soft);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: #334155;
}
.dh-prose code {
  background: #f1f5f9; color: #be185d;
  padding: .15rem .4rem; border-radius: .25rem;
  font-family: 'Fira Code', Consolas, monospace; font-size: .9em;
}
.dh-prose pre {
  background: #0f172a; color: #f8fafc;
  padding: 1.25rem; border-radius: var(--radius-lg);
  overflow-x: auto; font-size: .9rem;
}
.dh-prose pre code { background: transparent; color: inherit; padding: 0; }
.dh-prose img { border-radius: var(--radius-lg); margin: 2rem auto; box-shadow: var(--shadow-md); }
.dh-prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }

/* End-of-post CTA */
.dh-cta-box {
  margin-top: 3.5rem;
  padding: 2.5rem 2rem;
  text-align: center;
  background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.dh-cta-box h3 { color: #fff; font-size: 1.5rem; margin: 0 0 .5rem; }
.dh-cta-box p { color: rgba(255,255,255,.85); margin: 0 0 1.5rem; }
.dh-cta-box a {
  display: inline-block;
  background: var(--accent);
  color: var(--primary) !important;
  padding: .85rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 15px;
  transition: all .2s;
  box-shadow: 0 4px 12px rgba(0,212,255,.4);
}
.dh-cta-box a:hover { transform: translateY(-2px); background: #fff; color: var(--primary) !important; }

/* Comments */
.dh-comments { max-width: var(--read); margin: 3rem auto; padding: 0 1.5rem; }
.dh-comments h2 { font-size: 1.4rem; margin-bottom: 1.5rem; }

/* ============================================================
   6. Footer (matches React Footer)
   ============================================================ */
.dh-footer { background: var(--bg-soft); border-top: 2px solid var(--border); }
.dh-footer__strip { height: 4px; background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%); }
.dh-footer__inner {
  max-width: var(--container); margin: 0 auto;
  padding: 3rem 1.5rem;
  display: grid; gap: 2.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .dh-footer__inner { grid-template-columns: 2fr 1fr 1fr; } }
.dh-footer__brand img { width: 175px; height: auto; margin-bottom: 1rem; }
.dh-footer__brand p { color: var(--muted); font-size: 14px; max-width: 320px; line-height: 1.6; }
.dh-footer__col h4 {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .12em; color: #94a3b8; margin: 0 0 1rem;
}
.dh-footer__col ul { list-style: none; padding: 0; margin: 0; }
.dh-footer__col li { margin-bottom: .6rem; }
.dh-footer__col a { font-size: 14px; color: #475569; }
.dh-footer__col a:hover { color: var(--primary); }
.dh-footer__bottom {
  border-top: 1px solid var(--border);
  max-width: var(--container); margin: 0 auto;
  padding: 1.5rem; display: flex; flex-wrap: wrap; gap: 1rem;
  justify-content: space-between; align-items: center;
  font-size: 12px; color: #94a3b8;
}
.dh-footer__bottom a { color: #94a3b8; }
.dh-footer__bottom a:hover { color: var(--primary); }
.dh-footer__legal { display: flex; gap: 1.25rem; }

/* ============================================================
   7. 404 + search results
   ============================================================ */
.dh-empty {
  max-width: var(--read); margin: 0 auto; padding: 5rem 1.5rem; text-align: center;
}
.dh-empty h1 { font-size: 3rem; color: var(--primary); margin: 0 0 .75rem; }
.dh-empty p { color: var(--muted); font-size: 1.1rem; margin: 0 0 2rem; }
.dh-empty a {
  display: inline-block; background: var(--primary); color: #fff !important;
  padding: .85rem 1.75rem; border-radius: var(--radius); font-weight: 600;
}

/* Pagination */
.dh-pagination {
  max-width: var(--container); margin: 0 auto 4rem;
  padding: 0 1.5rem; display: flex; justify-content: center; gap: .5rem;
}
.dh-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 .75rem;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--muted); font-size: 14px; font-weight: 500;
}
.dh-pagination .page-numbers:hover, .dh-pagination .page-numbers.current {
  background: var(--primary); border-color: var(--primary); color: #fff;
}
