/*
Theme Name: Bonfem Blue Grid
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. Single-column row-list layout, serif headlines, full-bleed hero images on posts, off-canvas menu. No page builder, no bloat. 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-grid
Tags: blog, news, one-column, 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-blue: #1D63C7;        /* CTAs, links, accent */
  --bf-blue-dark: #123F8A;   /* 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;
  --bf-band-bg: #F1EEE7;     /* light gray band behind "You May Also Want" */

  /* Type */
  --bf-font-heading: 'Playfair Display', Georgia, 'Times New Roman', 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-blue); text-decoration: none; }
a:hover{ color: var(--bf-blue-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-blue);
  outline-offset: 2px;
}

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

/* =========================================================
   HEADER — centered title, hamburger-triggered menu at all sizes
   ========================================================= */
.bf-site-header{
  background: var(--bf-white);
  border-bottom: 1px solid var(--bf-border);
  position: sticky;
  top: 0;
  z-index: 999;
}
.bf-header-inner{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem 1.25rem;
}
.bf-menu-toggle{
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0.4rem;
}
.bf-menu-toggle span{
  display: block;
  width: 24px;
  height: 3px;
  background: var(--bf-blue);
  margin: 5px 0;
  border-radius: 2px;
}
.bf-logo{
  font-family: var(--bf-font-heading);
  font-weight: 700;
  font-size: 1.9rem;
  color: var(--bf-navy);
  text-align: center;
}
.bf-logo img{ max-height: 46px; width: auto; }
.bf-logo a{ color: var(--bf-navy); text-decoration: none; }
.bf-logo a:hover{ color: var(--bf-blue-dark); }

.bf-primary-nav{
  display: none;
  background: var(--bf-navy);
}
.bf-primary-nav.is-open{ display: block; }
.bf-primary-nav ul{
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  max-width: var(--bf-max-width);
  margin: 0 auto;
}
.bf-primary-nav li{ border-bottom: 1px solid rgba(255,255,255,0.08); }
.bf-primary-nav li:last-child{ border-bottom: none; }
.bf-primary-nav a{
  display: block;
  padding: 0.85rem 1.25rem;
  color: #fff;
  font-weight: 500;
  text-decoration: none;
}
.bf-primary-nav a:hover{ color: var(--bf-blue); }

/* =========================================================
   POST ROW LIST — homepage / archive / search / related
   ========================================================= */
.bf-section-title{
  text-align: center;
  background: var(--bf-cream);
  padding: 1rem 0;
  margin: 0 0 1.5rem;
  border-top: 1px solid var(--bf-border);
  border-bottom: 1px solid var(--bf-border);
  font-size: 1.3rem;
}

.bf-row-list{
  display: flex;
  flex-direction: column;
}
.bf-row{
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--bf-border);
  align-items: flex-start;
}
.bf-row-thumb{
  flex: 0 0 130px;
  width: 130px;
  aspect-ratio: 145 / 100;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bf-border);
}
.bf-row-thumb img{ width: 100%; height: 100%; object-fit: cover; }
.bf-row-body{ flex: 1; min-width: 0; }
.bf-row-tag{
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--bf-blue);
  text-decoration: none;
  margin-bottom: 0.3rem;
}
.bf-row-tag:hover{ color: var(--bf-blue-dark); }
.bf-row-title{
  font-size: 1.08rem;
  line-height: 1.35;
  margin: 0;
}
.bf-row-title a{ color: var(--bf-navy); text-decoration: none; }
.bf-row-title a:hover{ color: var(--bf-blue-dark); }

@media (min-width: 700px){
  .bf-row-thumb{ flex-basis: 180px; width: 180px; }
  .bf-row-title{ font-size: 1.2rem; }
}

/* =========================================================
   SINGLE POST — full-bleed hero with overlaid title
   ========================================================= */
.bf-hero{
  position: relative;
  width: 100%;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  background: var(--bf-navy);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.bf-hero::before{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,31,58,0.15) 0%, rgba(11,31,58,0.85) 100%);
}
.bf-hero-inner{
  position: relative;
  z-index: 1;
  padding: 2.5rem 1.25rem 2rem;
  max-width: var(--bf-max-width);
  margin: 0 auto;
  width: 100%;
}
.bf-hero-title{
  color: #fff;
  font-size: clamp(1.7rem, 4.5vw, 2.6rem);
  margin: 0;
  text-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
@media (min-width: 700px){
  .bf-hero{ min-height: 440px; }
}

.bf-single-wrap{
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}
.bf-single-meta{
  color: var(--bf-gray);
  font-size: 0.88rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--bf-border);
}
.bf-single-content p{ max-width: none; font-size: 1.05rem; }
.bf-single-content h2, .bf-single-content h3{
  color: var(--bf-navy);
  font-weight: 700;
  margin-top: 1.8em;
}
.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-blue); color: #fff; border-color: var(--bf-blue); }

/* Static page (no hero) */
.bf-page-wrap{
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}
.bf-page-thumb{ margin-bottom: 1.75rem; border-radius: var(--bf-radius); overflow: hidden; }

/* =========================================================
   MAIN CONTENT WRAPPER (single column, full width, no sidebar rail)
   ========================================================= */
.bf-main-wrap{
  max-width: var(--bf-max-width);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 2.5rem;
}

/* =========================================================
   FEATURED POSTS (stacked full-width block, not a side rail)
   ========================================================= */
.bf-featured-block{
  max-width: var(--bf-max-width);
  margin: 2.5rem auto 0;
  padding: 0 1.25rem;
}
.bf-featured-block .bf-section-title{ text-align: left; background: transparent; border: none; padding: 0 0 1rem; }
.bf-featured-post{ display: flex; gap: 0.9rem; padding: 0.75rem 0; border-bottom: 1px solid var(--bf-border); }
.bf-featured-post:last-child{ border-bottom: none; }
.bf-featured-post img{ width: 70px; height: 70px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.bf-featured-post-title{ font-size: 0.92rem; font-weight: 500; line-height: 1.35; color: var(--bf-navy); text-decoration: none; }
.bf-featured-post-title:hover{ color: var(--bf-blue-dark); }

/* =========================================================
   PAGINATION
   ========================================================= */
.bf-pagination{
  display: flex;
  gap: 0.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}
.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-blue); color: #fff; border-color: var(--bf-blue); }

/* =========================================================
   FOOTER — solid dark, centered links
   ========================================================= */
.bf-site-footer{
  background: #14181f;
  color: #cbd3e0;
  margin-top: 3rem;
}
.bf-footer-inner{
  padding: 2rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  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-blue); text-decoration: underline; }
.bf-footer-bottom{
  font-size: 0.8rem;
  color: #7c869c;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.1rem;
  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-blue); }

.bf-breadcrumbs{ font-size: 0.85rem; color: var(--bf-gray); padding: 0.9rem 1.25rem 0; max-width: var(--bf-max-width); margin: 0 auto; }
.bf-breadcrumbs a{ color: var(--bf-gray); }

.bf-cta-btn{
  display: inline-block;
  background: var(--bf-blue);
  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-blue-dark); color: #fff; text-decoration: none; }

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

/* =========================================================
   RELATED POSTS — "You May Also Want" — white row-cards on a
   light gray band, no divider lines (matches reference site).
   ========================================================= */
.bf-related-band{
  background: var(--bf-band-bg);
  border-top: 1px solid var(--bf-border);
  border-bottom: 1px solid var(--bf-border);
  margin-top: 2.5rem;
  padding-bottom: 1.75rem;
}
.bf-related-band .bf-section-title{
  background: transparent;
  border: none;
  margin-bottom: 1.25rem;
}
.bf-related-list{
  max-width: var(--bf-max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.bf-related-row{
  display: flex;
  gap: 1rem;
  background: var(--bf-white);
  padding: 0.9rem;
}
.bf-related-thumb{
  flex: 0 0 130px;
  width: 130px;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--bf-border);
}
.bf-related-thumb img{ width: 100%; height: 100%; object-fit: cover; }
.bf-related-body{ flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.bf-related-tag{
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--bf-blue);
  text-decoration: none;
  margin-bottom: 0.3rem;
}
.bf-related-tag:hover{ color: var(--bf-blue-dark); }
.bf-related-title{
  font-size: 1.12rem;
  line-height: 1.35;
  margin: 0;
  font-family: var(--bf-font-heading);
  font-weight: 700;
}
.bf-related-title a{ color: var(--bf-navy); text-decoration: none; }
.bf-related-title a:hover{ color: var(--bf-blue-dark); }

@media (min-width: 700px){
  .bf-related-thumb{ flex-basis: 160px; width: 160px; }
  .bf-related-title{ font-size: 1.22rem; }
}
