/*
Theme Name: Astra Child
Template: astra
Version: 1.1
*/

/* ============================================
   DARK THEME - Blog / Archive / Single Post
   Applies to all pages except front-page.php
   (front-page.php has its own inline styles)
   ============================================ */

:root {
  --kp-bg:        #0d0d0d;
  --kp-bg-card:   #1a1a1a;
  --kp-bg-card2:  #222222;
  --kp-text:      #f0f0f0;
  --kp-muted:     #999999;
  --kp-accent:    #00c875;
  --kp-red:       #e85555;
  --kp-border:    rgba(255,255,255,0.08);
  --kp-header-h:  72px;
}

/* --- Global dark base --- */
.blog body,
.single body,
.page body,
.archive body,
.search body,
.error404 body {
  background: var(--kp-bg);
  color: var(--kp-text);
}

/* Also apply via direct body targeting for non-home pages */
body.blog,
body.single,
body.page,
body.archive,
body.search,
body.error404 {
  background: var(--kp-bg) !important;
  color: var(--kp-text) !important;
}

/* --- Site Header (Astra) --- */
body.blog .site-header,
body.single .site-header,
body.page .site-header,
body.archive .site-header,
body.search .site-header,
body.error404 .site-header,
body.blog #masthead,
body.single #masthead,
body.page #masthead,
body.archive #masthead,
body.search #masthead {
  background: #111111 !important;
  border-bottom: 1px solid var(--kp-border);
}

/* Logo text */
body.blog .site-title a,
body.single .site-title a,
body.page .site-title a,
body.archive .site-title a,
body.search .site-title a {
  color: var(--kp-text) !important;
}

/* Nav links */
body.blog .main-navigation a,
body.single .main-navigation a,
body.page .main-navigation a,
body.archive .main-navigation a,
body.search .main-navigation a,
body.blog .ast-header-navigation a,
body.single .ast-header-navigation a,
body.page .ast-header-navigation a,
body.archive .ast-header-navigation a,
body.search .ast-header-navigation a {
  color: var(--kp-text) !important;
}

body.blog .main-navigation a:hover,
body.single .main-navigation a:hover,
body.page .main-navigation a:hover,
body.archive .main-navigation a:hover,
body.search .main-navigation a:hover,
body.blog .ast-header-navigation a:hover,
body.single .ast-header-navigation a:hover,
body.page .ast-header-navigation a:hover,
body.archive .ast-header-navigation a:hover,
body.search .ast-header-navigation a:hover {
  color: var(--kp-accent) !important;
}

/* --- Content area background --- */
body.blog #content,
body.single #content,
body.page #content,
body.archive #content,
body.search #content,
body.blog .ast-container,
body.single .ast-container,
body.page .ast-container,
body.archive .ast-container {
  background: var(--kp-bg);
}

body.blog #primary,
body.single #primary,
body.page #primary,
body.archive #primary {
  background: var(--kp-bg);
}

/* --- Blog post cards --- */
body.blog .ast-article-post,
body.blog article,
body.archive article {
  background: var(--kp-bg-card);
  border: 1px solid var(--kp-border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  transition: border-color 0.2s;
}

body.blog .ast-article-post:hover,
body.blog article:hover,
body.archive article:hover {
  border-color: var(--kp-accent);
}

/* Post titles */
body.blog .entry-title,
body.single .entry-title,
body.page .entry-title,
body.archive .entry-title {
  color: var(--kp-text) !important;
}

body.blog .entry-title a,
body.single .entry-title a,
body.archive .entry-title a {
  color: var(--kp-text) !important;
}

body.blog .entry-title a:hover,
body.archive .entry-title a:hover {
  color: var(--kp-accent) !important;
}

/* Post meta (date, author, categories) */
body.blog .entry-meta,
body.single .entry-meta,
body.archive .entry-meta,
body.blog .posted-on,
body.single .posted-on,
body.blog .byline,
body.single .byline,
body.blog .cat-links,
body.single .cat-links {
  color: var(--kp-muted) !important;
}

body.blog .entry-meta a,
body.single .entry-meta a,
body.archive .entry-meta a {
  color: var(--kp-muted) !important;
}

body.blog .entry-meta a:hover,
body.single .entry-meta a:hover {
  color: var(--kp-accent) !important;
}

/* --- Article container (Astra white box override) --- */
body.single article,
body.single .hentry,
body.single .ast-article-single,
body.page article,
body.page .hentry {
  background: var(--kp-bg) !important;
  box-shadow: none !important;
}

/* Post body text */
body.blog .entry-content,
body.single .entry-content,
body.page .entry-content {
  color: var(--kp-text);
}

body.single .entry-content p,
body.page .entry-content p {
  color: rgba(240,240,240,0.88);
  line-height: 1.9;
}

body.single .entry-content h2,
body.single .entry-content h3,
body.single .entry-content h4,
body.page .entry-content h2,
body.page .entry-content h3 {
  color: var(--kp-text);
  border-left: 3px solid var(--kp-accent);
  padding-left: 12px;
  margin-top: 2em;
}

/* Links in content */
body.single .entry-content a,
body.page .entry-content a {
  color: var(--kp-accent);
}

body.single .entry-content a:hover,
body.page .entry-content a:hover {
  opacity: 0.8;
}

/* --- Category tags --- */
body.blog .cat-links a,
body.blog .ast-blog-single-element a,
body.archive .cat-links a {
  background: rgba(0,200,117,0.12);
  color: var(--kp-accent) !important;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 0.78rem;
  text-decoration: none;
}

/* --- Page title / blog header --- */
body.blog .page-header,
body.archive .page-header,
body.blog .ast-archive-description,
body.archive .ast-archive-description,
body.blog .ast-page-header-wrap,
body.archive .ast-page-header-wrap {
  background: #0d0d0d !important;
  padding: 48px 0 32px;
}

body.blog .page-title,
body.archive .page-title,
body.blog .page-header h1,
body.archive .page-header h1,
body.blog .page-header h2,
body.archive .page-header h2,
body.archive .entry-title,
body.blog .entry-title {
  color: #f0f0f0 !important;
}

/* --- Footer --- */
body.blog .site-footer,
body.single .site-footer,
body.page .site-footer,
body.archive .site-footer {
  background: #0a0a0a !important;
  border-top: 1px solid var(--kp-border);
  color: var(--kp-muted);
}

body.blog .site-footer a,
body.single .site-footer a,
body.page .site-footer a {
  color: var(--kp-muted);
}

body.blog .site-footer a:hover,
body.single .site-footer a:hover {
  color: var(--kp-accent);
}

/* --- Sidebar --- */
body.blog .widget,
body.single .widget {
  background: var(--kp-bg-card);
  border: 1px solid var(--kp-border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

body.blog .widget-title,
body.single .widget-title {
  color: var(--kp-text) !important;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--kp-border);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

body.blog .widget a,
body.single .widget a {
  color: var(--kp-muted);
}

body.blog .widget a:hover,
body.single .widget a:hover {
  color: var(--kp-accent);
}

/* --- Pagination --- */
body.blog .nav-links a,
body.single .nav-links a,
body.archive .nav-links a,
body.blog .page-numbers,
body.archive .page-numbers {
  background: var(--kp-bg-card2);
  color: var(--kp-text);
  border: 1px solid var(--kp-border);
  border-radius: 6px;
  padding: 8px 16px;
  text-decoration: none;
}

body.blog .nav-links a:hover,
body.archive .nav-links a:hover,
body.blog .page-numbers:hover {
  border-color: var(--kp-accent);
  color: var(--kp-accent);
}

body.blog .page-numbers.current,
body.archive .page-numbers.current {
  background: var(--kp-accent);
  color: #000 !important;
  border-color: var(--kp-accent);
}

/* --- Code blocks --- */
body.single .entry-content code,
body.page .entry-content code {
  background: #1e1e1e;
  color: #00c875;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
}

body.single .entry-content pre,
body.page .entry-content pre {
  background: #1e1e1e;
  border: 1px solid var(--kp-border);
  border-radius: 8px;
  padding: 16px 20px;
  overflow-x: auto;
}

/* --- Blockquote --- */
body.single .entry-content blockquote,
body.page .entry-content blockquote {
  border-left: 3px solid var(--kp-accent);
  background: rgba(0,200,117,0.05);
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 8px 8px 0;
}

/* --- Astra grid blog layout --- */
body.blog .ast-article-post .ast-blog-featured-section img {
  border-radius: 8px 8px 0 0;
}

/* --- Hamburger menu (mobile) --- */
body.blog .ast-mobile-menu-buttons,
body.single .ast-mobile-menu-buttons {
  color: var(--kp-text);
}

body.blog button.menu-toggle,
body.single button.menu-toggle {
  color: var(--kp-text) !important;
}

/* --- Mobile nav dropdown --- */
body.blog .ast-mobile-popup-drawer,
body.single .ast-mobile-popup-drawer {
  background: #111111 !important;
}

body.blog .ast-mobile-popup-drawer a,
body.single .ast-mobile-popup-drawer a {
  color: var(--kp-text) !important;
}
