/*
Theme Name: Bonfem
Theme URI: https://bonfem.media
Author: Bonfem Media
Author URI: https://bonfem.media
Description: A lightweight, mobile-first WordPress theme built for career, scholarship, and opportunity content. No page builder, no bloat — just fast-loading pages, bold readable headings, and clean card-based layouts. Built by Bonfem Media.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 6.6
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: bonfem
Tags: blog, news, two-columns, right-sidebar, custom-colors, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* =========================================================
   BONFEM — DESIGN TOKENS
   ========================================================= */
:root{
  /* Color */
  --bf-navy: #0B1F3A;        /* headings, header bg, primary text on light */
  --bf-navy-soft: #16294a;   /* hover / secondary navy */
  --bf-ochre: #C7861E;       /* CTAs, links, accent */
  --bf-ochre-dark: #a86e15;  /* CTA hover */
  --bf-sage: #3E6259;        /* secondary tag color */
  --bf-cream: #FAF9F5;       /* page background */
  --bf-white: #FFFFFF;
  --bf-charcoal: #2A2A2A;    /* body text */
  --bf-gray: #6B7280;        /* muted text, meta */
  --bf-border: #E7E3D8;

  /* Type */
  --bf-font-heading: 'Space Grotesk', 'Arial Narrow', Arial, sans-serif;
  --bf-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --bf-max-width: 1180px;
  --bf-radius: 6px;
  --bf-gap: 1.75rem;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body{
  margin: 0;
  font-family: var(--bf-font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--bf-charcoal);
  background: var(--bf-cream);
}

img{ max-width: 100%; height: auto; display: block; }
a{ color: var(--bf-ochre); text-decoration: none; }
a:hover{ color: var(--bf-ochre-dark); text-decoration: underline; }
ul, ol{ padding-left: 1.25rem; }

h1, h2, h3, h4, h5, h6{
  font-family: var(--bf-font-heading);
  color: var(--bf-navy);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}
h1{ font-size: clamp(1.9rem, 4vw, 2.6rem); }
h2{ font-size: clamp(1.5rem, 3vw, 2rem); }
h3{ font-size: clamp(1.2rem, 2.4vw, 1.45rem); }
h4{ font-size: 1.1rem; }

p{ margin: 0 0 1.2em; max-width: 68ch; }

.bf-container{
  max-width: var(--bf-max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.screen-reader-text{
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px,1px,1px,1px);
  white-space: nowrap;
}
.screen-reader-text:focus{
  position: static;
  width: auto; height: auto;
  padding: 0.5rem 1rem;
  background: var(--bf-navy);
  color: #fff;
  z-index: 100000;
}

/* Visible keyboard focus */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible{
  outline: 3px solid var(--bf-ochre);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* =========================================================
   HEADER
   ========================================================= */
.bf-site-header{
  background: var(--bf-navy);
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 1px 0 rgba(0,0,0,0.08);
}
.bf-header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
}
.bf-logo{
  font-family: var(--bf-font-heading);
  font-weight: 700;
  font-size: 1.4rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.bf-logo img{ max-height: 40px; width: auto; }
.bf-logo a{ color: #fff; text-decoration: none; }
.bf-logo a:hover{ color: var(--bf-ochre); }

.bf-primary-nav ul{
  list-style: none;
  display: flex;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
}
.bf-primary-nav a{
  color: #fff;
  font-weight: 500;
  font-size: 0.97rem;
  text-decoration: none;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
}
.bf-primary-nav a:hover,
.bf-primary-nav .current-menu-item > a{
  color: #fff;
  border-bottom-color: var(--bf-ochre);
}

.bf-menu-toggle{
  display: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0.5rem;
}
.bf-menu-toggle span{
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  border-radius: 2px;
}

@media (max-width: 860px){
  .bf-menu-toggle{ display: block; }
  .bf-primary-nav{
    display: none;
    width: 100%;
    background: var(--bf-navy-soft);
  }
  .bf-primary-nav.is-open{ display: block; }
  .bf-primary-nav ul{
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1.25rem 1rem;
  }
  .bf-primary-nav li{ border-top: 1px solid rgba(255,255,255,0.08); }
  .bf-primary-nav a{ display: block; padding: 0.75rem 0; }
  .bf-header-inner{ flex-wrap: wrap; }
}

/* =========================================================
   POST CARD GRID (home / archive)
   ========================================================= */
.bf-content-layout{
  display: grid;
  grid-template-columns: 2.4fr 1fr;
  gap: 2.5rem;
  padding: 2.5rem 0;
  align-items: start;
}
@media (max-width: 960px){
  .bf-content-layout{ grid-template-columns: 1fr; }
}

.bf-card-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--bf-gap);
}
@media (max-width: 960px){
  .bf-card-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px){
  .bf-card-grid{ grid-template-columns: 1fr; }
}

.bf-card{
  background: var(--bf-white);
  border: 1px solid var(--bf-border);
  border-radius: var(--bf-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.bf-card-thumb{
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bf-border);
}
.bf-card-thumb img{ width: 100%; height: 100%; object-fit: cover; }
.bf-card-body{ padding: 1.1rem 1.15rem 1.3rem; display: flex; flex-direction: column; flex: 1; }

.bf-tag{
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--bf-sage);
  padding: 0.28rem 0.6rem;
  border-radius: 3px;
  margin-bottom: 0.65rem;
  width: fit-content;
}
.bf-tag.is-ochre{ background: var(--bf-ochre); }

.bf-card-title{
  font-size: 1.08rem;
  margin-bottom: 0.5rem;
}
.bf-card-title a{
  color: var(--bf-navy);
  text-decoration: none;
}
.bf-card-title a:hover{ color: var(--bf-ochre-dark); }

.bf-card-excerpt{
  color: var(--bf-gray);
  font-size: 0.92rem;
  margin-bottom: 0;
}
.bf-card-meta{
  margin-top: auto;
  padding-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--bf-gray);
}

/* =========================================================
   SINGLE POST
   ========================================================= */
.bf-single{
  background: var(--bf-white);
  border: 1px solid var(--bf-border);
  border-radius: var(--bf-radius);
  padding: 2rem;
}
@media (max-width: 620px){
  .bf-single{ padding: 1.25rem; }
}
.bf-single-title{ font-size: clamp(1.7rem, 4vw, 2.3rem); }
.bf-single-meta{
  color: var(--bf-gray);
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--bf-border);
}
.bf-single-thumb{
  margin: 0 0 1.75rem;
  border-radius: var(--bf-radius);
  overflow: hidden;
}
.bf-single-content p{ max-width: none; }
.bf-single-content h2{
  margin-top: 1.8em;
  padding-top: 0.2em;
}
.bf-single-content h2, .bf-single-content h3{
  color: var(--bf-navy);
  font-weight: 700;
}
.bf-single-content ul li, .bf-single-content ol li{ margin-bottom: 0.4em; }
.bf-single-content table{
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
}
.bf-single-content table th, .bf-single-content table td{
  border: 1px solid var(--bf-border);
  padding: 0.6rem 0.8rem;
  text-align: left;
}
.bf-single-content table th{ background: var(--bf-cream); }

.bf-tags-list{ margin-top: 2rem; }
.bf-tags-list a{
  display: inline-block;
  font-size: 0.78rem;
  background: var(--bf-cream);
  border: 1px solid var(--bf-border);
  color: var(--bf-navy);
  padding: 0.3rem 0.65rem;
  border-radius: 3px;
  margin: 0 0.4rem 0.4rem 0;
  text-decoration: none;
}
.bf-tags-list a:hover{ background: var(--bf-ochre); color: #fff; border-color: var(--bf-ochre); }

/* =========================================================
   SIDEBAR / WIDGETS
   ========================================================= */
.bf-sidebar .widget{
  background: var(--bf-white);
  border: 1px solid var(--bf-border);
  border-radius: var(--bf-radius);
  padding: 1.3rem;
  margin-bottom: 1.75rem;
}
.bf-sidebar .widget-title{
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 2px solid var(--bf-ochre);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}
.bf-sidebar ul{ list-style: none; padding: 0; margin: 0; }
.bf-sidebar li{ padding: 0.55rem 0; border-bottom: 1px solid var(--bf-border); }
.bf-sidebar li:last-child{ border-bottom: none; }
.bf-sidebar a{ color: var(--bf-navy); font-size: 0.92rem; font-weight: 500; text-decoration: none; }
.bf-sidebar a:hover{ color: var(--bf-ochre-dark); }

.bf-featured-post{ display: flex; gap: 0.75rem; padding: 0.65rem 0; border-bottom: 1px solid var(--bf-border); }
.bf-featured-post:last-child{ border-bottom: none; }
.bf-featured-post img{ width: 64px; height: 64px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.bf-featured-post-title{ font-size: 0.87rem; font-weight: 600; line-height: 1.35; color: var(--bf-navy); }
.bf-featured-post-title:hover{ color: var(--bf-ochre-dark); }

/* =========================================================
   PAGINATION
   ========================================================= */
.bf-pagination{
  display: flex;
  gap: 0.5rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}
.bf-pagination a, .bf-pagination span{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.6rem;
  border: 1px solid var(--bf-border);
  border-radius: 4px;
  color: var(--bf-navy);
  text-decoration: none;
  font-size: 0.9rem;
  background: var(--bf-white);
}
.bf-pagination a:hover{ background: var(--bf-navy); color: #fff; border-color: var(--bf-navy); text-decoration: none; }
.bf-pagination .current{ background: var(--bf-ochre); color: #fff; border-color: var(--bf-ochre); }

/* =========================================================
   FOOTER
   ========================================================= */
.bf-site-footer{
  background: var(--bf-navy);
  color: #cbd3e0;
  margin-top: 3rem;
}
.bf-footer-inner{
  padding: 2.5rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  text-align: center;
}
.bf-footer-links{
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  padding: 0;
  margin: 0;
}
.bf-footer-links a{
  color: #cbd3e0;
  font-size: 0.88rem;
  text-decoration: none;
}
.bf-footer-links a:hover{ color: var(--bf-ochre); text-decoration: underline; }
.bf-footer-bottom{
  font-size: 0.8rem;
  color: #8894ab;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.25rem;
  width: 100%;
}

/* =========================================================
   FORMS / SEARCH / MISC
   ========================================================= */
.bf-search-form{ display: flex; }
.bf-search-form input[type="search"]{
  flex: 1;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--bf-border);
  border-right: none;
  border-radius: 4px 0 0 4px;
  font-family: var(--bf-font-body);
  font-size: 0.92rem;
}
.bf-search-form button{
  background: var(--bf-navy);
  color: #fff;
  border: none;
  padding: 0 1rem;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}
.bf-search-form button:hover{ background: var(--bf-ochre); }

.bf-breadcrumbs{ font-size: 0.85rem; color: var(--bf-gray); margin-bottom: 1rem; }
.bf-breadcrumbs a{ color: var(--bf-gray); }

.bf-cta-btn{
  display: inline-block;
  background: var(--bf-ochre);
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  margin-top: 0.5rem;
}
.bf-cta-btn:hover{ background: var(--bf-ochre-dark); color: #fff; text-decoration: none; }

.bf-empty-state{ text-align: center; padding: 3rem 1rem; color: var(--bf-gray); }
