/*
Theme Name: BIT Lite
Theme URI: https://backlinkindexingtools.com/
Author: BIT Lite
Author URI: https://backlinkindexingtools.com/
Description: Lightweight, fast and SEO friendly WordPress theme made for backlink and SEO guide sites. No page builder, no heavy JavaScript, system fonts only. Clean post cards, category grid, table of contents, responsive list tables and Rank Math compatibility.
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bit-lite
Tags: blog, seo, fast, lightweight, responsive, custom-menu, featured-images, translation-ready
*/

/* =Reset and base
--------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
:root {
  --bit-bg: #ffffff;
  --bit-text: #1f2937;
  --bit-muted: #64748b;
  --bit-head: #172554;
  --bit-accent: #1d4ed8;
  --bit-accent-dark: #1e40af;
  --bit-border: #e5e7eb;
  --bit-light: #f8fafc;
  --bit-card: #eff6ff;
  --bit-radius: 14px;
  --bit-shadow: 0 8px 30px rgba(23, 37, 84, .08);
  --bit-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bit-bg);
  color: var(--bit-text);
  font-family: var(--bit-font);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, video, iframe { max-width: 100%; }
h1, h2, h3 { overflow-wrap: break-word; }
a { color: var(--bit-accent); text-decoration: none; }
a:hover { color: var(--bit-accent-dark); text-decoration: underline; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { color: var(--bit-head); line-height: 1.3; margin: 1.4em 0 .5em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em 1.2em; padding: 0; }
blockquote { border-left: 4px solid var(--bit-accent); background: var(--bit-light); margin: 1.5em 0; padding: 1em 1.2em; }
code { background: var(--bit-light); padding: .15em .4em; border-radius: 6px; font-size: .9em; }
pre { background: #0f172a; color: #e2e8f0; padding: 1em; border-radius: 12px; overflow: auto; }
pre code { background: none; padding: 0; }
button, input, textarea { font: inherit; }
input[type="search"], input[type="text"], input[type="email"], textarea {
  width: 100%; border: 1px solid var(--bit-border); border-radius: 10px; padding: .7em .9em; color: var(--bit-text);
}
input:focus, textarea:focus { outline: 2px solid var(--bit-accent); outline-offset: 1px; border-color: var(--bit-accent); }
.bit-btn, button[type="submit"], .wp-block-button__link {
  display: inline-block; background: var(--bit-accent); color: #fff !important; border: 0; border-radius: 10px;
  padding: .7em 1.3em; font-weight: 700; cursor: pointer; text-decoration: none !important;
}
.bit-btn:hover, button[type="submit"]:hover { background: var(--bit-accent-dark); color: #fff; }
.bit-btn-secondary { background: #fff; color: var(--bit-head) !important; border: 1px solid var(--bit-border); }
.bit-btn-secondary:hover { background: var(--bit-light); }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link:focus { position: static; width: auto; height: auto; clip: auto; display: inline-block; padding: .5em 1em; background: var(--bit-head); color: #fff; }

/* =Layout
--------------------------------------------- */
.bit-container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.bit-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; align-items: start; padding: 32px 0 48px; }
.bit-layout-no-sidebar { grid-template-columns: minmax(0, 1fr); }
.bit-layout-no-sidebar .bit-content { max-width: 820px; margin: 0 auto; width: 100%; }

/* =Header
--------------------------------------------- */
.bit-header { border-bottom: 1px solid var(--bit-border); background: #fff; position: sticky; top: 0; z-index: 50; }
.bit-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; }
.bit-logo { font-size: 1.35rem; font-weight: 800; color: var(--bit-head) !important; letter-spacing: -.02em; white-space: nowrap; }
.bit-logo:hover { text-decoration: none; }
.bit-logo span { color: var(--bit-accent); }
.custom-logo { max-height: 44px; width: auto; display: block; }
.bit-nav ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.bit-nav a { color: var(--bit-text); font-weight: 600; font-size: .95rem; padding: .45em .7em; border-radius: 8px; }
.bit-nav a:hover { background: var(--bit-light); color: var(--bit-head); text-decoration: none; }
.bit-nav .current-menu-item a, .bit-nav .current-category-ancestor a { color: var(--bit-accent); }
.bit-header-actions { display: none; align-items: center; gap: 10px; margin-left: auto; }
.bit-search-toggle { display: none; background: #fff; color: var(--bit-head); border: 1px solid var(--bit-border); border-radius: 10px; width: 44px; height: 44px; align-items: center; justify-content: center; cursor: pointer; }
.bit-menu-toggle { display: none; background: var(--bit-head); color: #fff; border: 0; border-radius: 10px; width: 44px; height: 44px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; cursor: pointer; }
.bit-menu-toggle span { display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; transition: transform .2s ease; }
.bit-menu-toggle.bit-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.bit-menu-toggle.bit-open span:nth-child(2) { opacity: 0; }
.bit-menu-toggle.bit-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.bit-header-search { display: flex; gap: 8px; align-items: center; }
.bit-header-search input[type="search"] { width: 180px; padding: .5em .8em; }
/* Scroll to top: small, raised, does not cover content. */
.bit-to-top { display: none; position: fixed; right: 16px; bottom: 20px; z-index: 60; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--bit-head); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; box-shadow: 0 6px 20px rgba(23,37,84,.25); align-items: center; justify-content: center; }
.bit-to-top-show { display: flex; }

/* =Hero
--------------------------------------------- */
.bit-hero { background: linear-gradient(135deg, #172554 0%, #1d4ed8 100%); color: #fff; padding: 52px 0 46px; }
.bit-hero h1 { color: #fff; font-size: 2.4rem; margin: 0 0 .3em; line-height: 1.2; }
.bit-hero p { color: #dbeafe; max-width: 680px; margin: 0 0 1.2em; font-size: 1.05rem; }
.bit-hero-form { display: flex; gap: 10px; max-width: 620px; }
.bit-hero-form input[type="search"] { background: #fff; border: 0; padding: .85em 1em; }
.bit-hero-form button { background: #f59e0b; color: #172554 !important; white-space: nowrap; }
.bit-hero-form button:hover { background: #fbbf24; }
.bit-hero-tags { margin-top: 16px; font-size: .9rem; color: #bfdbfe; }
.bit-hero-tags a { color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: .2em .7em; margin: 0 4px; display: inline-block; }
.bit-hero-tags a:hover { background: rgba(255,255,255,.15); text-decoration: none; }

/* =Category grid
--------------------------------------------- */
.bit-section { padding: 36px 0 8px; }
.bit-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 18px; }
.bit-section-head h2 { margin: 0; font-size: 1.5rem; }
.bit-section-head a { font-weight: 700; font-size: .95rem; white-space: nowrap; }
.bit-cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.bit-cat-card { border: 1px solid var(--bit-border); border-radius: var(--bit-radius); padding: 18px; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.03); }
.bit-cat-card:hover { border-color: var(--bit-accent); text-decoration: none; box-shadow: var(--bit-shadow); }
.bit-cat-card strong { display: block; color: var(--bit-head); font-size: 1.05rem; margin-bottom: 4px; }
.bit-cat-card span { color: var(--bit-muted); font-size: .9rem; }

/* =Post cards
--------------------------------------------- */
.bit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.bit-card { border: 1px solid var(--bit-border); border-radius: var(--bit-radius); overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.bit-card:hover { box-shadow: var(--bit-shadow); }
.bit-card-thumb { aspect-ratio: 16 / 9; background: var(--bit-light); overflow: hidden; display: block; }
.bit-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bit-card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.bit-card-cat { font-size: .8rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 8px; }
.bit-card-cat a:hover { text-decoration: none; }
.bit-card-title { font-size: 1.12rem; line-height: 1.4; margin: 0 0 8px; }
.bit-card-title a { color: var(--bit-head); }
.bit-card-title a:hover { color: var(--bit-accent); text-decoration: none; }
.bit-card-excerpt { color: var(--bit-muted); font-size: .95rem; flex: 1; }
.bit-card-meta { color: var(--bit-muted); font-size: .85rem; margin-top: 12px; border-top: 1px solid var(--bit-border); padding-top: 12px; }
.bit-archive-list { display: grid; gap: 22px; }
.bit-archive-item { display: grid; grid-template-columns: 260px 1fr; gap: 22px; border: 1px solid var(--bit-border); border-radius: var(--bit-radius); overflow: hidden; background: #fff; }
.bit-archive-item .bit-card-thumb { height: 100%; aspect-ratio: auto; }
.bit-archive-item .bit-card-body { padding: 20px 20px 20px 0; }

/* =Single post
--------------------------------------------- */
.bit-breadcrumb { font-size: .88rem; color: var(--bit-muted); margin-bottom: 14px; }
.bit-breadcrumb a { color: var(--bit-muted); }
.bit-single-title { font-size: 2.2rem; line-height: 1.25; margin: 0 0 .4em; }
.bit-single-meta { color: var(--bit-muted); font-size: .92rem; margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--bit-border); }
.bit-single-meta a { color: var(--bit-muted); }
.bit-featured { border-radius: var(--bit-radius); overflow: hidden; margin-bottom: 26px; }
.bit-featured img { display: block; width: 100%; }
.bit-content { min-width: 0; }
.bit-content img { border-radius: 10px; }
.bit-content figure { margin: 1.5em 0; }
.bit-content figcaption { color: var(--bit-muted); font-size: .9rem; text-align: center; }
.bit-content h2 { padding-top: .2em; border-top: 1px solid var(--bit-border); margin-top: 1.6em; }
.bit-toc { background: var(--bit-light); border: 1px solid var(--bit-border); border-radius: var(--bit-radius); padding: 18px 20px; margin: 0 0 26px; }
.bit-toc strong { display: block; color: var(--bit-head); margin-bottom: 8px; }
.bit-toc ul { margin: 0; list-style: none; }
.bit-toc li { margin: 4px 0; }
.bit-toc li.bit-toc-h3 { padding-left: 18px; font-size: .95rem; }
.bit-toc a { color: var(--bit-text); }
.bit-tags { margin: 26px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.bit-tags a { background: var(--bit-light); border: 1px solid var(--bit-border); color: var(--bit-text); border-radius: 999px; padding: .25em .8em; font-size: .9rem; }
.bit-tags a:hover { text-decoration: none; border-color: var(--bit-accent); color: var(--bit-accent); }
.bit-share-note { background: var(--bit-card); border-radius: 12px; padding: 16px 18px; margin: 26px 0; }
.bit-author { display: flex; gap: 16px; border: 1px solid var(--bit-border); border-radius: var(--bit-radius); padding: 20px; margin: 26px 0; }
.bit-author img { border-radius: 50%; flex-shrink: 0; }
.bit-related h2 { font-size: 1.4rem; }
.bit-post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 30px 0; }
.bit-post-nav a { border: 1px solid var(--bit-border); border-radius: 12px; padding: 14px 16px; color: var(--bit-text); display: block; }
.bit-post-nav a:hover { text-decoration: none; border-color: var(--bit-accent); }
.bit-post-nav small { display: block; color: var(--bit-muted); font-size: .85rem; }

/* =Tables: generic and approved BCS list tables
--------------------------------------------- */
.bit-content table, .bit-table-wrap table { border-collapse: collapse; width: 100%; margin: 1.5em 0; font-size: .95rem; }
.bit-table-wrap { overflow-x: auto; }
.bit-content th, .bit-content td, .bit-table-wrap th, .bit-table-wrap td { border: 1px solid var(--bit-border); padding: .6em .8em; text-align: left; vertical-align: top; }
.bit-content th, .bit-table-wrap th { background: var(--bit-head); color: #fff; }
.bit-content tr:nth-child(even) td, .bit-table-wrap tr:nth-child(even) td { background: var(--bit-light); }
/* Approved BCS structure: .bcs-wrap / .bcs-table / .bcs-row / .bcs-cell */
.bcs-wrap { --bcs-border: #e5e7eb; --bcs-text: #1f2937; --bcs-muted: #64748b; --bcs-head: #172554; margin: 1.5em 0; }
.bcs-table { border: 1px solid var(--bcs-border); border-radius: 14px; overflow: hidden; box-shadow: 0 8px 30px rgba(23,37,84,.08); }
.bcs-row { display: grid; grid-template-columns: 54px minmax(145px,1.15fr) minmax(210px,1.8fr) 68px minmax(145px,1.1fr) minmax(145px,1.1fr); border-bottom: 1px solid var(--bcs-border); }
.bcs-row:last-child { border-bottom: 0; }
.bcs-row:nth-child(even) { background: #f8fafc; }
.bcs-row:hover { background: #eff6ff; }
.bcs-row.bcs-head { background: var(--bcs-head); color: #fff; font-weight: 700; }
.bcs-cell { padding: .7em .8em; color: var(--bcs-text); overflow-wrap: anywhere; }
.bcs-head .bcs-cell { color: #fff; }
.bcs-si { text-align: center; }
.bcs-da { text-align: center; }
.bcs-badge { display: inline-block; background: #eaf2ff; color: #1d4ed8; border-radius: 999px; padding: .15em .7em; font-size: .85rem; font-weight: 700; }
.bcs-link { color: #1d4ed8; font-weight: 600; }

/* =Sidebar, widgets, pagination
--------------------------------------------- */
.bit-sidebar .widget { border: 1px solid var(--bit-border); border-radius: var(--bit-radius); padding: 20px; margin-bottom: 22px; background: #fff; }
.bit-sidebar .widget-title, .bit-sidebar .wp-block-heading { color: var(--bit-head); font-size: 1.1rem; margin: 0 0 12px; }
.bit-sidebar ul { list-style: none; margin: 0; }
.bit-sidebar li { padding: .35em 0; border-bottom: 1px solid var(--bit-border); }
.bit-sidebar li:last-child { border-bottom: 0; }
.bit-sidebar li a { color: var(--bit-text); }
.bit-sidebar .wp-block-search__inside-wrapper { display: flex; gap: 8px; }
.bit-pagination { margin: 30px 0; display: flex; gap: 8px; flex-wrap: wrap; }
.bit-pagination .page-numbers { border: 1px solid var(--bit-border); border-radius: 8px; padding: .4em .85em; color: var(--bit-text); font-weight: 600; }
.bit-pagination .page-numbers:hover { text-decoration: none; border-color: var(--bit-accent); }
.bit-pagination .page-numbers.current { background: var(--bit-head); color: #fff; border-color: var(--bit-head); }

/* =Archive header, search, 404
--------------------------------------------- */
.bit-archive-head { padding: 34px 0 6px; }
.bit-archive-head h1 { margin: 0 0 .2em; font-size: 2rem; }
.bit-archive-head p { color: var(--bit-muted); max-width: 720px; }
.bit-empty { background: var(--bit-light); border: 1px solid var(--bit-border); border-radius: var(--bit-radius); padding: 28px; text-align: center; }

/* =Comments
--------------------------------------------- */
.bit-comments { margin-top: 36px; border-top: 1px solid var(--bit-border); padding-top: 24px; }
.comment-list { list-style: none; margin: 0; }
.comment-body { border: 1px solid var(--bit-border); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.comment-meta { color: var(--bit-muted); font-size: .88rem; }

/* =Footer
--------------------------------------------- */
.bit-footer { border-top: 1px solid var(--bit-border); background: var(--bit-light); margin-top: 20px; }
.bit-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; padding: 38px 0 26px; }
.bit-footer h3 { margin-top: 0; font-size: 1.05rem; }
.bit-footer ul { list-style: none; margin: 0; }
.bit-footer li { margin: 6px 0; }
.bit-footer li a { color: var(--bit-text); }
.bit-footer-bottom { border-top: 1px solid var(--bit-border); padding: 16px 0; color: var(--bit-muted); font-size: .9rem; display: flex; justify-content: center; text-align: center; gap: 12px; flex-wrap: wrap; }

/* =WordPress core alignment
--------------------------------------------- */
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide { max-width: 100%; }
.wp-block-image img { border-radius: 10px; }

/* =Dark mode for BCS table only, keeps main theme light for readability
--------------------------------------------- */
@media (prefers-color-scheme: dark) {
  .bcs-table { background: #111827; }
  .bcs-row:nth-child(even) { background: #1f2937; }
  .bcs-row:hover { background: #1e3a5f; }
  .bcs-cell { color: #e5e7eb; }
  .bcs-badge { background: #1e3a5f; color: #bfdbfe; }
  .bcs-link { color: #93c5fd; }
}

/* =Responsive
--------------------------------------------- */
@media (max-width: 960px) {
  .bit-layout { grid-template-columns: minmax(0, 1fr); }
  .bit-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .bit-sidebar .widget { margin-bottom: 0; }
  .bit-grid { grid-template-columns: repeat(2, 1fr); }
  .bit-cat-grid { grid-template-columns: repeat(2, 1fr); }
  .bit-header-search input[type="search"] { width: 130px; }
}
@media (max-width: 767px) {
  body { font-size: 16px; }
  /* Mobile side gap: fixed and consistent on every section. */
  .bit-container { padding-left: 18px; padding-right: 18px; }
  .bit-header-inner { flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
  .bit-header-actions { display: flex; }
  .bit-search-toggle { display: flex; }
  .bit-menu-toggle { display: flex; }
  .bit-nav { display: none; width: 100%; order: 3; }
  .bit-nav.bit-nav-open { display: block; }
  .bit-nav ul { flex-direction: column; align-items: stretch; }
  .bit-nav li { text-align: left; }
  .bit-nav a { display: block; padding: .7em 0; text-align: left; }
  .bit-header-search { display: none; width: 100%; order: 4; margin-top: 10px; }
  .bit-header-search.bit-search-open { display: flex; }
  .bit-header-search input[type="search"] { width: 100%; flex: 1; }
  .bit-header-search button { white-space: nowrap; }
  .bit-layout, .bit-content, .bit-card, .bit-archive-item { min-width: 0; }
  .bit-hero { padding: 36px 0 32px; }
  .bit-hero h1 { font-size: 1.9rem; }
  .bit-hero-form { flex-direction: column; }
  .bit-grid, .bit-cat-grid { grid-template-columns: 1fr; }
  .bit-archive-item { grid-template-columns: 1fr; }
  .bit-archive-item .bit-card-body { padding: 0 18px 20px; }
  .bit-single-title { font-size: 1.7rem; }
  .bit-sidebar { grid-template-columns: 1fr; }
  .bit-footer-grid { grid-template-columns: 1fr; }
  .bit-post-nav { grid-template-columns: 1fr; }
  /* BCS mobile cards, approved structure */
  .bcs-row.bcs-head { display: none; }
  .bcs-row { grid-template-columns: 1fr; border: 1px solid var(--bcs-border); border-radius: 12px; margin-bottom: 12px; }
  .bcs-table { border: 0; box-shadow: none; }
  .bcs-cell { display: grid; grid-template-columns: 92px 1fr; gap: 10px; text-align: right; }
  .bcs-cell::before { content: attr(data-label); text-align: left; color: var(--bcs-muted); font-weight: 700; }
  .bcs-cell.bcs-si::before { content: "SI"; }
}
