/*
Theme Name: BCF Trucking Editable
Theme URI: https://bcffunding.com/
Author: OpenAI
Description: Mobile-first editable WordPress theme for trucking funding content, news feed, and SEO blog publishing.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: bcf-trucking
*/

:root {
  --bg: #ffffff;
  --surface: #f8fafc;
  --surface-2: #edf2f7;
  --text: #142033;
  --muted: #526074;
  --line: #d8e0ea;
  --brand: #0d4da3;
  --brand-dark: #0a3a7a;
  --accent: #16a34a;
  --hero-1: #0e2547;
  --hero-2: #0b4ea2;
  --hero-3: #184b88;
  --shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  --radius: 22px;
  --container: 1440px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Times New Roman", Times, serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; display: block; }

.container {
  width: calc(100% - 48px);
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  align-items: center;
  gap: 28px;
  min-height: 82px;
}
.site-branding a {
  color: var(--text);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0;
}
.site-tagline {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.95rem;
}
.main-navigation ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.main-navigation li { margin: 0; }
.main-navigation a {
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 700;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
  color: var(--brand);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: "Times New Roman", Times, serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
  white-space: nowrap;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.10);
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-whatsapp { background: var(--accent); color: #fff; }
.btn-light { background: #fff; color: var(--text); border-color: var(--line); }

.hero {
  padding: 28px 0 14px;
}
.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) 360px;
  gap: 32px;
  width: 100%;
  background: linear-gradient(135deg, var(--hero-1), var(--hero-2) 58%, var(--hero-3));
  color: #fff;
  border-radius: 30px;
  padding: 34px;
  box-shadow: var(--shadow);
}
.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(2.6rem, 4.8vw, 5rem);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: 0;
}
.hero-copy p {
  margin: 0 0 18px;
  max-width: 66ch;
  color: rgba(255,255,255,0.94);
  font-size: 1.04rem;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 22px;
}
.hero-badge {
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero-stats {
  display: grid;
  gap: 14px;
  align-content: start;
}
.hero-stat {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.12);
}
.hero-stat strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.28rem;
  font-weight: 700;
}
.hero-stat span {
  color: rgba(255,255,255,0.94);
  font-size: 1rem;
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 34px;
  align-items: start;
  margin: 26px auto 48px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin: 0 0 18px;
}
.section-heading h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1.1;
}
.section-heading p {
  margin: 6px 0 0;
  color: var(--muted);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}
.thumb-wrap {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-2);
}
.thumb-wrap a { display: block; width: 100%; height: 100%; }
.thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-content { padding: 18px; }
.post-tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e8f0fb;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
}
.post-card h2,
.post-card h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
  line-height: 1.24;
}
.post-card h2 a,
.post-card h3 a { color: var(--text); }
.post-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.96rem;
}
.post-meta {
  font-size: 0.84rem;
  color: var(--muted);
}

.sidebar {
  display: grid;
  gap: 18px;
}
.widget {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}
.widget-header {
  padding: 18px 18px 0;
}
.widget-header h3 {
  margin: 0 0 6px;
  font-size: 1.16rem;
  line-height: 1.2;
}
.widget-header p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.94rem;
}
.widget-body { padding: 0 18px 18px; }
.widget ul,
.news-feed-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.widget li,
.news-feed-list li {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.widget li:first-child,
.news-feed-list li:first-child { border-top: 0; }
.widget li a,
.news-feed-list a {
  display: block;
  color: var(--text);
  font-weight: 700;
  line-height: 1.35;
}
.feed-source {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
}
.cta-stack { display: grid; gap: 12px; }
.cta-note {
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer {
  background: #0f172a;
  color: rgba(255,255,255,0.88);
  padding: 26px 0 92px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.94rem;
}
.footer-inner a { color: #fff; }

.entry-header,
.entry-content,
.page-content,
.posts-navigation,
.post-navigation {
  width: min(100% - 28px, 860px);
  margin-left: auto;
  margin-right: auto;
}
.entry-header { margin-top: 32px; }
.entry-content,
.page-content { margin-top: 18px; margin-bottom: 56px; }
.entry-title, .page-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
}
.entry-meta {
  margin-top: 10px;
  color: var(--muted);
}
.post-thumbnail img {
  width: 100%;
  height: auto;
  border-radius: 18px;
  margin: 20px 0;
}
.archive-header {
  width: calc(100% - 48px);
  max-width: var(--container);
  margin: 28px auto 16px;
}
.archive-title {
  margin: 0 0 8px;
  font-size: clamp(2rem, 4vw, 3rem);
}
.archive-description { color: var(--muted); }

.mobile-cta-bar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 60;
  display: none;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.mobile-cta-bar .btn { flex: 1; }

@media (max-width: 1180px) {
  .header-inner { grid-template-columns: minmax(220px, 1fr) auto; }
  .header-actions { display: none; }
  .home-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .container { width: calc(100% - 28px); }
  .header-inner {
    grid-template-columns: 1fr;
    gap: 12px;
    justify-items: center;
    text-align: center;
    min-height: auto;
    padding: 14px 0;
  }
  .main-navigation ul { gap: 18px; }
  .hero-card {
    grid-template-columns: 1fr;
    padding: 24px;
    gap: 20px;
  }
  .hero-copy h1 { font-size: clamp(2.1rem, 7vw, 3.2rem); }
  .posts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .site-branding a { font-size: 1.26rem; }
  .site-tagline { font-size: 0.82rem; }
  .main-navigation ul { gap: 12px 16px; }
  .main-navigation a { font-size: 0.98rem; }
  .hero { padding: 18px 0 12px; }
  .hero-card { border-radius: 22px; padding: 20px; }
  .hero-copy p { font-size: 0.98rem; }
  .hero-actions,
  .cta-stack {
    display: grid;
    grid-template-columns: 1fr;
  }
  .hero-actions .btn,
  .cta-stack .btn,
  .mobile-cta-bar .btn { width: 100%; }
  .hero-stat strong { font-size: 1.1rem; }
  .home-layout { margin: 18px auto 34px; gap: 18px; }
  .section-heading { margin-bottom: 14px; }
  .post-card,
  .widget { border-radius: 18px; }
  .post-content,
  .widget-body { padding: 16px; }
  .widget-header { padding: 16px 16px 0; }
  .footer-inner { font-size: 0.86rem; }
  .mobile-cta-bar { display: flex; }
}
