/*
Theme Name: Okeigbo Baze
Theme URI: https://okeigbobaze.com.ng
Author: Okeigbo Baze Digital
Description: Fast editorial & music magazine theme for Okeigbo Baze with centered full brand header, wrapped multi-row pill menu, dark/light mode toggle, ad slots, and Okeigbo App card.
Version: 1.4.2
License: GPL-2.0-or-later
Text Domain: okeigbobaze
*/

:root,
html[data-theme="light"] {
  --ob-bg: #f6f7f9;
  --ob-surface: #ffffff;
  --ob-surface-2: #eef1f5;
  --ob-border: #dde2ea;
  --ob-text: #12151a;
  --ob-muted: #556070;
  --ob-accent: #059669;
  --ob-accent-hover: #047857;
  --ob-accent-soft: rgba(5, 150, 105, 0.12);
  --ob-badge-text: #ffffff;
  --ob-shadow: 0 6px 18px rgba(18, 21, 26, 0.06);
}

html[data-theme="dark"] {
  --ob-bg: #111315;
  --ob-surface: #1a1d21;
  --ob-surface-2: #22262c;
  --ob-border: #2c313a;
  --ob-text: #f3f5f7;
  --ob-muted: #9aa3b2;
  --ob-accent: #10b981;
  --ob-accent-hover: #059669;
  --ob-accent-soft: rgba(16, 185, 129, 0.14);
  --ob-badge-text: #ffffff;
  --ob-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  background-color: var(--ob-bg);
  color: var(--ob-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a { color: var(--ob-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; border-radius: 10px; }

.ob-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 14px;
}

.ob-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background-color: var(--ob-surface);
  border-bottom: 1px solid var(--ob-border);
  box-shadow: var(--ob-shadow);
}

.ob-header-top {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 12px 0 6px 0;
}

.ob-brand {
  text-align: center;
  color: var(--ob-text) !important;
  text-decoration: none !important;
}

.ob-brand-name {
  font-size: clamp(1.45rem, 6vw, 2.2rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.05;
  white-space: nowrap;
}

.ob-brand-name span { color: var(--ob-accent); }

.ob-header-actions {
  position: absolute;
  right: 0;
  top: 14px;
}

.ob-btn-icon {
  background: var(--ob-surface-2);
  color: var(--ob-text);
  border: 1px solid var(--ob-border);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.ob-nav-bar { padding: 6px 0 8px 0; }
.ob-nav-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.ob-nav-break { flex-basis: 100%; display: flex; justify-content: center; }
.ob-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--ob-surface-2);
  color: var(--ob-text) !important;
  border: 1px solid var(--ob-border);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  text-decoration: none !important;
}
.ob-pill:hover, .ob-pill.is-active {
  background: var(--ob-accent);
  color: var(--ob-badge-text) !important;
  border-color: var(--ob-accent);
}
.ob-pill-accent { border-color: var(--ob-accent); }
.ob-pill-blue { background: #1d4ed8; border-color: #2563eb; color: #ffffff !important; }
.ob-pill-outline {
  background: transparent;
  border-color: var(--ob-accent);
  color: var(--ob-accent) !important;
  padding: 6px 16px;
}

.ob-search-wrap { padding: 0 0 12px 0; }
.ob-search-form {
  display: flex;
  gap: 8px;
  background: var(--ob-surface-2);
  border: 1px solid var(--ob-border);
  border-radius: 999px;
  padding: 4px 6px 4px 16px;
}
.ob-search-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  color: var(--ob-text);
  font-size: 0.92rem;
  outline: none;
}
.ob-search-submit {
  background: var(--ob-accent);
  color: var(--ob-badge-text);
  border: none;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.ob-main { padding: 20px 0 36px 0; }
.ob-layout { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 900px) {
  .ob-layout.has-sidebar { grid-template-columns: minmax(0, 1fr) 310px; }
}

.ob-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 14px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ob-accent);
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ob-feed { display: flex; flex-direction: column; gap: 14px; }
.ob-card {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--ob-surface);
  border: 1px solid var(--ob-border);
  border-radius: 14px;
  padding: 12px;
  box-shadow: var(--ob-shadow);
}
.ob-card-thumb {
  position: relative;
  flex: 0 0 104px;
  width: 104px;
  height: 76px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--ob-surface-2);
}
@media (min-width: 600px) {
  .ob-card-thumb { flex: 0 0 156px; width: 156px; height: 104px; }
}
.ob-card-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.ob-card-body { flex: 1; min-width: 0; }
.ob-card-cat {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--ob-accent);
  margin-bottom: 4px;
}
.ob-card-title { margin: 0 0 6px 0; font-size: 1rem; font-weight: 800; line-height: 1.32; }
.ob-card-title a { color: var(--ob-text); text-decoration: none; }
.ob-card-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 0.78rem; color: var(--ob-muted); }

.ob-article {
  background: var(--ob-surface);
  border: 1px solid var(--ob-border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--ob-shadow);
}
.ob-article-title { margin: 8px 0 12px 0; font-size: 1.55rem; font-weight: 900; line-height: 1.24; }
.ob-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.84rem;
  color: var(--ob-muted);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ob-border);
}
.ob-featured-wrap { margin: 0 0 20px 0; }
.ob-featured-wrap img { width: 100%; max-height: 520px; object-fit: cover; }
.ob-entry-content { font-size: 1.02rem; line-height: 1.75; }
.ob-entry-content p { margin: 0 0 16px 0; }

.ob-share-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 14px 0;
  border-top: 1px solid var(--ob-border);
}
.ob-share-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff !important;
  text-decoration: none !important;
}
.ob-share-wa { background: #16a34a; }
.ob-share-fb { background: #2563eb; }
.ob-share-x  { background: #374151; }

.ob-ad-slot { margin: 14px 0; text-align: center; }

.ob-app-promo {
  margin: 22px 0;
  padding: 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--ob-surface-2), var(--ob-accent-soft));
  border: 1px solid var(--ob-accent);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
@media (min-width: 600px) {
  .ob-app-promo { flex-direction: row; align-items: center; justify-content: space-between; padding: 20px 24px; }
}
.ob-app-promo-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  background: var(--ob-accent);
  color: var(--ob-badge-text);
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.ob-app-promo-title { margin: 0 0 4px 0; font-size: 1.15rem; font-weight: 900; }
.ob-app-promo-desc { margin: 0; font-size: 0.9rem; color: var(--ob-muted); }
.ob-app-promo-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ob-accent);
  color: var(--ob-badge-text) !important;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 11px 20px;
  border-radius: 999px;
  white-space: nowrap;
  text-decoration: none !important;
}

.ob-sidebar { display: flex; flex-direction: column; gap: 18px; }
.ob-widget {
  background: var(--ob-surface);
  border: 1px solid var(--ob-border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--ob-shadow);
}

.ob-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; flex-wrap: wrap; }
.ob-pagination .page-numbers {
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--ob-surface);
  border: 1px solid var(--ob-border);
  color: var(--ob-text);
  font-weight: 700;
  text-decoration: none;
}
.ob-pagination .page-numbers.current {
  background: var(--ob-accent);
  color: var(--ob-badge-text);
  border-color: var(--ob-accent);
}

.ob-footer {
  background: var(--ob-surface);
  border-top: 1px solid var(--ob-border);
  padding: 28px 0;
  margin-top: 20px;
}
.ob-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-bottom: 14px; }
.ob-footer-links a { color: var(--ob-muted); font-size: 0.86rem; font-weight: 600; }
.ob-footer-copy { text-align: center; font-size: 0.82rem; color: var(--ob-muted); margin: 0; }

/* Mobile Post & Text Clipping Fix */
html, body, #primary, .ob-main, .ob-container, .ob-layout, .ob-layout > div, .ob-feed, .ob-card, .ob-article, .ob-entry-content {
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.ob-main, .ob-layout, .ob-article, .ob-card {
  overflow-x: clip;
}

.ob-article-title,
.ob-card-title,
.ob-card-title a,
.ob-article-meta,
.ob-card-meta,
.ob-entry-content,
.ob-entry-content p,
.ob-entry-content li,
.ob-entry-content h1,
.ob-entry-content h2,
.ob-entry-content h3,
.ob-entry-content h4,
.ob-entry-content a,
.ob-entry-content blockquote,
.ob-entry-content pre,
.ob-entry-content code {
  max-width: 100% !important;
  overflow-wrap: break-word !important;
  word-wrap: break-word !important;
  word-break: break-word;
}

.ob-entry-content table,
.ob-entry-content iframe,
.ob-entry-content video,
.ob-entry-content img,
.ob-entry-content figure,
.ob-entry-content .wp-block-group {
  max-width: 100% !important;
  height: auto;
}

/* Table of Contents (auto-generated for single posts) */
.ob-toc {
  background: #f7f8fa;
  border: 1px solid #e2e6ea;
  border-left: 4px solid var(--ob-accent, #10b981);
  border-radius: 8px;
  padding: 16px 18px 14px;
  margin: 0 0 24px;
}
.ob-toc .ob-toc-title {
  display: block;
  font-weight: 700;
  font-size: 1.05em;
  margin-bottom: 8px;
  color: #111;
}
.ob-toc-list {
  margin: 0;
  padding-left: 20px;
  counter-reset: ob-toc;
}
.ob-toc-list li {
  margin: 4px 0;
  list-style: decimal;
}
.ob-toc-list a {
  color: var(--ob-accent, #10b981);
  text-decoration: none;
}
.ob-toc-list a:hover,
.ob-toc-list a:focus {
  text-decoration: underline;
}
html[data-theme="dark"] .ob-toc {
  background: #1f2430;
  border-color: #2c3340;
}
html[data-theme="dark"] .ob-toc .ob-toc-title {
  color: #f1f3f5;
}
