/*
Theme Name: Malachi Press
Theme URI: https://malachisoft.com/
Author: MalachiSoft Inc
Author URI: https://malachisoft.com/
Description: A modern magazine-style blog theme built for the MalachiSoft Digital Marketing Blog. Featured hero slider, card-based post grid with sidebar, and full-width distraction-free single posts.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: malachi-press
Tags: blog, news, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

:root {
  /* Palette taken from malachisoft.com */
  --mp-brand: #38bdf8;        /* sky accent (secondary) */
  --mp-brand-dark: #0d0d14;   /* dark surface (--bg-2) */
  --mp-heading: #f4f4fb;
  --mp-accent: #a78bfa;       /* violet accent — overridable via Customizer */
  --mp-accent-soft: rgba(167, 139, 250, .14);
  --mp-highlight: #f472b6;    /* pink accent */
  --mp-text: #e6e6f0;
  --mp-muted: #9a9ab0;
  --mp-bg: #07070b;           /* page background (--bg) */
  --mp-card: #0d0d14;
  --mp-input: #13131d;
  --mp-border: #1e1e2c;
  --mp-radius: 14px;
  --mp-shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .35);
  --mp-shadow-lg: 0 4px 12px rgba(0, 0, 0, .45), 0 16px 40px rgba(0, 0, 0, .5);
  --mp-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--mp-font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--mp-text);
  background: var(--mp-bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--mp-accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--mp-brand); }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--mp-font);
  font-weight: 800;
  line-height: 1.25;
  color: var(--mp-heading);
  margin: 0 0 .5em;
  letter-spacing: -.015em;
}
.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden;
  padding: 0; position: absolute !important; word-wrap: normal !important;
}
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 999; background: var(--mp-brand); color: #fff; padding: 10px 18px; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; color: #fff; }

.mp-container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* ---------- Top bar ---------- */
.mp-topbar { background: var(--mp-brand-dark); color: #b9c6d4; font-size: 13px; }
.mp-topbar .mp-container { display: flex; justify-content: space-between; align-items: center; min-height: 38px; gap: 16px; }
.mp-topbar a { color: #d7e1eb; }
.mp-topbar a:hover { color: #fff; }
.mp-top-social { display: flex; gap: 14px; align-items: center; }
.mp-top-social svg { width: 15px; height: 15px; fill: currentColor; display: block; }

/* ---------- Header ---------- */
.mp-header { background: var(--mp-card); border-bottom: 1px solid var(--mp-border); position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 0 rgba(16,34,56,.03); }
.mp-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.mp-branding { display: flex; align-items: center; gap: 14px; min-width: 0; }
.mp-branding img.custom-logo { max-height: 48px; width: auto; }
.mp-site-title { font-size: 22px; font-weight: 800; margin: 0; letter-spacing: -.02em; white-space: nowrap; }
.mp-site-title a { color: var(--mp-heading); }
.mp-site-title a:hover { color: var(--mp-accent); }
.mp-tagline { margin: 0; font-size: 12.5px; color: var(--mp-muted); display: none; }
@media (min-width: 900px) { .mp-tagline { display: block; } }

/* Nav */
.mp-nav { display: flex; align-items: center; gap: 8px; }
.mp-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.mp-nav li { position: relative; }
.mp-nav a {
  display: block; padding: 10px 14px; font-weight: 600; font-size: 14.5px;
  color: var(--mp-text); border-radius: 8px;
}
.mp-nav a:hover { color: var(--mp-accent); background: var(--mp-accent-soft); }
.mp-nav .current-menu-item > a, .mp-nav .current_page_item > a { color: var(--mp-accent); }
.mp-nav ul ul {
  position: absolute; top: 100%; left: 0; min-width: 210px; flex-direction: column; gap: 0;
  background: var(--mp-card); border: 1px solid var(--mp-border); border-radius: 10px;
  box-shadow: var(--mp-shadow-lg); padding: 6px;
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: all .18s ease;
}
.mp-nav li:hover > ul, .mp-nav li:focus-within > ul { opacity: 1; visibility: visible; transform: translateY(0); }
.mp-nav ul ul a { padding: 9px 12px; border-radius: 7px; }

.mp-search-toggle, .mp-menu-toggle {
  appearance: none; background: none; border: 1px solid var(--mp-border); border-radius: 10px;
  width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--mp-text); transition: all .15s ease;
}
.mp-search-toggle:hover, .mp-menu-toggle:hover { border-color: var(--mp-accent); color: var(--mp-accent); }
.mp-search-toggle svg, .mp-menu-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.mp-menu-toggle { display: none; }

/* Header search drawer */
.mp-search-drawer { display: none; border-top: 1px solid var(--mp-border); background: var(--mp-card); padding: 18px 0; }
.mp-search-drawer.open { display: block; }
.mp-search-drawer form { display: flex; gap: 10px; max-width: 680px; margin: 0 auto; }
.mp-search-drawer input[type="search"] {
  flex: 1; padding: 12px 16px; border: 1.5px solid var(--mp-border); border-radius: 10px;
  font-size: 15px; font-family: inherit; outline: none;
  background: var(--mp-input); color: var(--mp-text);
}
.mp-search-drawer input[type="search"]:focus { border-color: var(--mp-accent); }

/* Mobile nav */
@media (max-width: 880px) {
  .mp-menu-toggle { display: inline-flex; }
  .mp-nav-menu { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--mp-card); border-bottom: 1px solid var(--mp-border); box-shadow: var(--mp-shadow-lg); padding: 12px 24px 20px; }
  .mp-nav-menu.open { display: block; }
  .mp-nav-menu ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .mp-nav-menu ul ul { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; padding-left: 16px; }
}

/* ---------- Hero / featured ---------- */
.mp-hero { padding: 32px 0 8px; }
.mp-hero-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 20px; }
@media (max-width: 880px) { .mp-hero-grid { grid-template-columns: 1fr; } }

.mp-slider { position: relative; border-radius: var(--mp-radius); overflow: hidden; box-shadow: var(--mp-shadow); background: var(--mp-brand-dark); min-height: 420px; }
.mp-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
.mp-slide.active { opacity: 1; z-index: 2; }
.mp-slide-bg { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.001); }
.mp-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(10deg, rgba(7,7,11,.94) 25%, rgba(7,7,11,.25) 70%); }
.mp-slide-content { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 28px 30px; }
.mp-slide-content h2 { font-size: clamp(20px, 2.6vw, 30px); margin: 10px 0 8px; }
.mp-slide-content h2 a { color: #fff; }
.mp-slide-content h2 a:hover { color: #cfe2ff; }
.mp-slide-meta { color: #a9bbcd; font-size: 13px; display: flex; gap: 14px; flex-wrap: wrap; }
.mp-slider-dots { position: absolute; top: 20px; right: 20px; z-index: 4; display: flex; gap: 7px; }
.mp-slider-dots button { width: 9px; height: 9px; border-radius: 50%; border: none; background: rgba(255,255,255,.45); cursor: pointer; padding: 0; transition: all .2s; }
.mp-slider-dots button.active { background: #fff; width: 22px; border-radius: 20px; }

.mp-hero-side { display: grid; grid-template-rows: repeat(3, 1fr); gap: 20px; }
.mp-hero-tile { position: relative; border-radius: var(--mp-radius); overflow: hidden; box-shadow: var(--mp-shadow); background: var(--mp-brand-dark); min-height: 126px; }
.mp-hero-tile .mp-slide-bg { transition: transform .4s ease; }
.mp-hero-tile:hover .mp-slide-bg { transform: scale(1.05); }
.mp-hero-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(10deg, rgba(7,7,11,.92) 20%, rgba(7,7,11,.2) 75%); }
.mp-hero-tile-content { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 14px 16px; }
.mp-hero-tile-content h3 { font-size: 15px; margin: 6px 0 0; line-height: 1.35; }
.mp-hero-tile-content h3 a { color: #fff; }
.mp-hero-tile-content h3 a:hover { color: #cfe2ff; }
@media (max-width: 880px) {
  .mp-hero-side { grid-template-columns: 1fr; grid-template-rows: auto; }
  .mp-slider { min-height: 340px; }
}

/* Category pill */
.mp-cat {
  display: inline-block; background: var(--mp-accent); color: #fff; font-size: 11px;
  font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: 4px 10px; border-radius: 999px;
}
a.mp-cat:hover { background: var(--mp-highlight); color: #fff; }
.mp-cat + .mp-cat { margin-left: 6px; }

/* ---------- Main layout ---------- */
.mp-main { padding: 36px 0 60px; }
.mp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 36px; align-items: start; }
@media (max-width: 1020px) { .mp-layout { grid-template-columns: 1fr; } }

.mp-section-head { display: flex; align-items: center; gap: 14px; margin: 0 0 22px; }
.mp-section-head h2, .mp-section-head h1 { font-size: 21px; margin: 0; white-space: nowrap; }
.mp-section-head::after { content: ""; height: 3px; flex: 1; background: linear-gradient(90deg, var(--mp-accent), transparent); border-radius: 3px; }

/* Post cards grid */
.mp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 640px) { .mp-grid { grid-template-columns: 1fr; } }

.mp-card {
  background: var(--mp-card); border: 1px solid var(--mp-border); border-radius: var(--mp-radius);
  overflow: hidden; box-shadow: var(--mp-shadow); display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.mp-card:hover { transform: translateY(-4px); box-shadow: var(--mp-shadow-lg); }
.mp-card-thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, var(--mp-brand), var(--mp-accent)); }
.mp-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.mp-card:hover .mp-card-thumb img { transform: scale(1.05); }
.mp-card-thumb .mp-cat { position: absolute; top: 12px; left: 12px; }
.mp-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.mp-card-body h3 { font-size: 18px; margin: 0; line-height: 1.4; }
.mp-card-body h3 a { color: var(--mp-heading); }
.mp-card-body h3 a:hover { color: var(--mp-accent); }
.mp-card-excerpt { color: var(--mp-muted); font-size: 14.5px; margin: 0; }
.mp-card-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--mp-muted); margin-top: auto; padding-top: 8px; border-top: 1px solid var(--mp-border); }
.mp-card-meta img.avatar { width: 26px; height: 26px; border-radius: 50%; }
.mp-card-meta a { color: var(--mp-text); font-weight: 600; }
.mp-card-meta a:hover { color: var(--mp-accent); }
.mp-card-meta .sep { opacity: .5; }

/* Pagination */
.mp-pagination { margin-top: 40px; display: flex; justify-content: center; }
.mp-pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.mp-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px;
  padding: 0 14px; background: var(--mp-card); border: 1px solid var(--mp-border); border-radius: 10px;
  font-weight: 600; font-size: 14px; color: var(--mp-text);
}
.mp-pagination .page-numbers.current, .mp-pagination .page-numbers:hover { background: var(--mp-accent); border-color: var(--mp-accent); color: #fff; }

/* ---------- Sidebar ---------- */
.mp-sidebar .widget {
  background: var(--mp-card); border: 1px solid var(--mp-border); border-radius: var(--mp-radius);
  box-shadow: var(--mp-shadow); padding: 24px; margin-bottom: 24px;
}
.mp-sidebar .widget-title, .mp-sidebar .widget .wp-block-heading {
  font-size: 15px; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 16px;
  padding-bottom: 12px; border-bottom: 2px solid var(--mp-accent); display: inline-block;
}
.mp-sidebar ul { list-style: none; margin: 0; padding: 0; }
.mp-sidebar ul li { padding: 9px 0; border-bottom: 1px solid var(--mp-border); font-size: 14.5px; }
.mp-sidebar ul li:last-child { border-bottom: none; }
.mp-sidebar ul li a { color: var(--mp-text); font-weight: 500; }
.mp-sidebar ul li a:hover { color: var(--mp-accent); }
.mp-sidebar input[type="search"], .mp-sidebar input[type="text"], .mp-sidebar input[type="email"] {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--mp-border); border-radius: 10px; font-family: inherit; font-size: 14px;
  background: var(--mp-input); color: var(--mp-text);
}
.mp-sidebar input:focus { border-color: var(--mp-accent); outline: none; }
.mp-sidebar .wp-block-search__button, .mp-sidebar button[type="submit"] {
  background: var(--mp-accent); color: #fff; border: none; border-radius: 10px; padding: 11px 16px; font-weight: 600; cursor: pointer;
}

/* ---------- Single post / page (full-width reading) ---------- */
.mp-article { max-width: 780px; margin: 0 auto; }
.mp-article-header { text-align: center; padding: 44px 0 26px; }
.mp-article-header h1 { font-size: clamp(28px, 4vw, 42px); margin: 14px 0 16px; }
.mp-article-meta { display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--mp-muted); font-size: 14px; }
.mp-article-meta img.avatar { width: 34px; height: 34px; border-radius: 50%; }
.mp-article-meta a { color: var(--mp-text); font-weight: 600; }
.mp-featured-img { border-radius: var(--mp-radius); overflow: hidden; box-shadow: var(--mp-shadow-lg); margin-bottom: 36px; }
.mp-featured-img img { width: 100%; }

.mp-content { font-size: 17.5px; line-height: 1.85; }
.mp-content > * + * { margin-top: 1.2em; }
.mp-content h2 { font-size: 27px; margin-top: 1.6em; }
.mp-content h3 { font-size: 22px; margin-top: 1.5em; }
.mp-content img { border-radius: 10px; }
.mp-content blockquote {
  border-left: 4px solid var(--mp-accent); background: var(--mp-accent-soft);
  padding: 18px 24px; border-radius: 0 10px 10px 0; margin-left: 0; margin-right: 0; font-style: italic;
}
.mp-content pre { background: var(--mp-input); border: 1px solid var(--mp-border); color: #dfe9f3; padding: 20px; border-radius: 10px; overflow-x: auto; font-size: 14px; }
.mp-content code { background: var(--mp-accent-soft); padding: 2px 6px; border-radius: 5px; font-size: .9em; }
.mp-content pre code { background: none; padding: 0; }
.mp-content table { width: 100%; border-collapse: collapse; }
.mp-content th, .mp-content td { border: 1px solid var(--mp-border); padding: 10px 14px; text-align: left; }
.mp-content th { background: var(--mp-accent-soft); }
.wp-caption { max-width: 100%; }
.wp-caption-text, .wp-element-caption { font-size: 13px; color: var(--mp-muted); text-align: center; margin-top: 8px; }
.alignwide { margin-left: -60px; margin-right: -60px; max-width: none; }
@media (max-width: 940px) { .alignwide { margin-left: 0; margin-right: 0; } }
.aligncenter { margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin: 6px 24px 12px 0; }
.alignright { float: right; margin: 6px 0 12px 24px; }

.mp-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 36px 0; }
.mp-tags a {
  background: var(--mp-card); border: 1px solid var(--mp-border); color: var(--mp-muted);
  font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 999px;
}
.mp-tags a:hover { border-color: var(--mp-accent); color: var(--mp-accent); }

.mp-author-box {
  display: flex; gap: 20px; background: var(--mp-card); border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius); box-shadow: var(--mp-shadow); padding: 26px; margin: 36px 0; align-items: flex-start;
}
.mp-author-box img.avatar { width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0; }
.mp-author-box h4 { margin: 0 0 6px; font-size: 17px; }
.mp-author-box p { margin: 0; color: var(--mp-muted); font-size: 14.5px; }

.mp-post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 36px 0; }
.mp-post-nav a {
  display: block; background: var(--mp-card); border: 1px solid var(--mp-border); border-radius: var(--mp-radius);
  padding: 18px 20px; box-shadow: var(--mp-shadow); color: var(--mp-text);
}
.mp-post-nav a:hover { border-color: var(--mp-accent); }
.mp-post-nav .label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--mp-muted); display: block; margin-bottom: 5px; }
.mp-post-nav .title { font-weight: 700; font-size: 14.5px; line-height: 1.4; }
.mp-post-nav .next { text-align: right; }
@media (max-width: 640px) { .mp-post-nav { grid-template-columns: 1fr; } .mp-post-nav .next { text-align: left; } }

/* Comments */
.mp-comments { margin: 44px 0 0; }
.mp-comments .comment-list { list-style: none; padding: 0; margin: 0 0 30px; }
.mp-comments .comment-body {
  background: var(--mp-card); border: 1px solid var(--mp-border); border-radius: var(--mp-radius);
  padding: 20px 22px; margin-bottom: 16px;
}
.mp-comments .children { list-style: none; padding-left: 34px; }
.mp-comments .comment-meta { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.mp-comments .comment-meta img.avatar { border-radius: 50%; width: 42px; height: 42px; }
.mp-comments .fn { font-style: normal; font-weight: 700; }
.mp-comments .comment-metadata { font-size: 12.5px; color: var(--mp-muted); }
.comment-form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--mp-border); border-radius: 10px;
  font-family: inherit; font-size: 15px; margin-bottom: 16px;
  background: var(--mp-input); color: var(--mp-text);
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--mp-accent); outline: none; }
.comment-form .submit, .mp-btn {
  display: inline-block; background: var(--mp-accent); color: #fff; border: none; border-radius: 10px;
  padding: 13px 26px; font-weight: 700; font-size: 15px; cursor: pointer; font-family: inherit;
  transition: background .15s ease;
}
.comment-form .submit:hover, .mp-btn:hover { background: var(--mp-brand); color: #fff; }

/* ---------- Footer ---------- */
.mp-footer { background: var(--mp-brand-dark); border-top: 1px solid var(--mp-border); color: #9a9ab0; margin-top: 40px; }
.mp-footer a { color: #d7e1eb; }
.mp-footer a:hover { color: #fff; }
.mp-footer-widgets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; padding: 52px 0 36px; }
@media (max-width: 820px) { .mp-footer-widgets { grid-template-columns: 1fr; padding: 40px 0 20px; } }
.mp-footer .widget-title, .mp-footer .wp-block-heading { color: #fff; font-size: 15px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 16px; }
.mp-footer ul { list-style: none; margin: 0; padding: 0; }
.mp-footer ul li { padding: 6px 0; font-size: 14.5px; }
.mp-footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 20px 0; font-size: 13.5px; }
.mp-footer-bottom .mp-container { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

/* 404 / no results */
.mp-empty { text-align: center; padding: 70px 20px; }
.mp-empty h1 { font-size: 64px; margin-bottom: 8px; color: var(--mp-accent); }
.mp-empty p { color: var(--mp-muted); max-width: 480px; margin: 0 auto 24px; }

/* Sticky badge */
.mp-sticky-badge { display: inline-block; background: var(--mp-highlight); color: #fff; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; padding: 3px 9px; border-radius: 999px; margin-left: 8px; vertical-align: middle; }
