/*
Theme Name: BloggingDive Editorial
Theme URI: https://bloggingdive.com/
Author: OpenAI
Description: A responsive editorial WordPress theme adapted from the supplied BloggingDive Framer design. Built for Gutenberg and dynamic WordPress posts.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: bloggingdive-signal
Tags: blog, news, grid-layout, one-column, two-columns, custom-logo, custom-menu, featured-images, full-width-template, threaded-comments, translation-ready, block-styles
*/

:root {
  --bd-accent: #2563eb;
  --bd-ink: #0f172a;
  --bd-muted: #64748b;
  --bd-line: #e2e8f0;
  --bd-soft: #f8fafc;
  --bd-green: #047857;
  --bd-max: 1136px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  margin: 0; background: #fff; color: var(--bd-ink);
  font: 15px/1.7 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--bd-accent); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #93c5fd; outline-offset: 3px; }
.bd-wrap { width: min(var(--bd-max), calc(100% - 64px)); margin-inline: auto; }
.bd-skip-link { position: absolute; left: -9999px; top: 0; z-index: 1000; padding: 12px; background: #fff; }
.bd-skip-link:focus { left: 12px; }
.bd-site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.97);
  border-bottom: 1px solid #e5e9ef; backdrop-filter: blur(12px);
}
.admin-bar .bd-site-header { top: 32px; }
.bd-header-inner { min-height: 80px; display: flex; align-items: center; gap: 30px; }
.bd-brand { flex: 0 0 auto; display: inline-flex; align-items: center; font-size: 27px; line-height: 1; font-weight: 800; letter-spacing: -1.4px; }
.bd-brand img { width: auto; max-height: 44px; }
.bd-brand-dot { color: var(--bd-accent); }
.bd-primary-nav { display: flex; align-items: center; gap: 25px; flex: 1; font-size: 12px; font-weight: 600; }
.bd-primary-nav ul { list-style: none; display: flex; align-items: center; gap: 25px; padding: 0; margin: 0; }
.bd-primary-nav li { margin: 0; }
.bd-nav-spacer { flex: 1; }
.bd-header-actions { display: flex; align-items: center; gap: 12px; }
.bd-search-toggle, .bd-menu-toggle {
  display: inline-flex; align-items: center; justify-content: center; border: 0;
  background: transparent; color: var(--bd-ink); padding: 9px; cursor: pointer;
}
.bd-search-toggle svg { width: 19px; height: 19px; }
.bd-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 17px; border: 0; border-radius: 5px; background: var(--bd-accent);
  color: #fff; font-size: 12px; font-weight: 700; cursor: pointer;
}
.bd-button:hover { color: #fff; filter: brightness(.94); }
.bd-menu-toggle { display: none; font-size: 12px; font-weight: 700; }
.bd-search-panel { padding: 0 0 16px; }
.bd-search-panel form { display: flex; gap: 8px; }
.bd-search-panel input[type="search"] {
  flex: 1; min-width: 0; border: 1px solid #cbd5e1; border-radius: 5px; padding: 11px 13px;
}
.bd-hero { padding: 49px 0 31px; }
.bd-eyebrow {
  display: inline-block; color: var(--bd-accent); font-size: 10px; line-height: 1.5;
  letter-spacing: 1.7px; font-weight: 800; text-transform: uppercase;
}
.bd-hero h1 { margin: 12px 0 8px; max-width: 850px; font-size: clamp(34px, 4vw, 43px); line-height: 1.14; letter-spacing: -1.8px; }
.bd-hero p { margin: 0; color: var(--bd-muted); font-size: 15px; }
.bd-section-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  border-top: 1px solid var(--bd-line); padding: 20px 0 18px;
}
.bd-section-heading h2, .bd-section-heading strong {
  margin: 0; font-size: 11px; line-height: 1.4; letter-spacing: 1.3px; font-weight: 800;
}
.bd-section-heading small { color: var(--bd-muted); font-size: 10px; }
.bd-featured-grid { display: grid; grid-template-columns: 1.12fr 1fr; gap: 25px 32px; padding-bottom: 42px; }
.bd-feature { min-width: 0; }
.bd-feature-primary { grid-row: span 2; }
.bd-feature-link { display: block; }
.bd-thumb { overflow: hidden; border-radius: 7px; background: #f1f5f9; aspect-ratio: 16/9; }
.bd-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.bd-feature-link:hover .bd-thumb img, .bd-post-card:hover .bd-thumb img { transform: scale(1.035); }
.bd-feature-primary .bd-thumb { aspect-ratio: 1.9/1; }
.bd-feature-side .bd-feature-link { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 20px; align-items: stretch; }
.bd-feature-side .bd-thumb { height: 100%; min-height: 188px; aspect-ratio: auto; }
.bd-feature-side .bd-feature-copy { align-self: center; }
.bd-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 16px 0 9px; color: var(--bd-muted); font-size: 10px; line-height: 1.5; }
.bd-category-pill {
  display: inline-block; padding: 3px 8px; border-radius: 4px; background: #eff6ff;
  color: var(--bd-accent); font-size: 9px; font-weight: 750; letter-spacing: 0;
}
.bd-category-pill.bd-green { color: var(--bd-green); background: #ecfdf5; }
.bd-feature h2 { margin: 0 0 9px; font-size: 27px; line-height: 1.27; letter-spacing: -.8px; }
.bd-feature p { margin: 0; color: var(--bd-muted); font-size: 12px; line-height: 1.7; }
.bd-feature-side .bd-meta { margin: 0 0 9px; gap: 7px; }
.bd-feature-side h2 { font-size: 19px; line-height: 1.3; letter-spacing: -.45px; }
.bd-byline { display: flex; align-items: center; gap: 8px; margin-top: 17px; color: var(--bd-muted); font-size: 10px; }
.bd-avatar {
  display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px;
  flex: 0 0 26px; border-radius: 50%; background: #e2e8f0; color: #334155; font-size: 8px; font-weight: 700;
}
.bd-latest { border-top: 1px solid var(--bd-line); padding-top: 29px; }
.bd-latest-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.bd-latest-head h2 { margin: 0; font-size: 25px; line-height: 1.2; letter-spacing: -.7px; }
.bd-category-links { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.bd-category-links a { padding: 6px 11px; border-radius: 5px; color: var(--bd-muted); font-size: 11px; }
.bd-category-links a:hover, .bd-category-links a.is-active { background: var(--bd-ink); color: #fff; }
.bd-post-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 30px 25px; }
.bd-post-card { min-width: 0; overflow: hidden; border: 1px solid #e5e9ef; border-radius: 8px; transition: transform .2s ease, box-shadow .2s ease; }
.bd-post-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(15,23,42,.06); }
.bd-post-card .bd-thumb { border-radius: 0; aspect-ratio: 1.78/1; }
.bd-post-copy { padding: 0 17px 17px; }
.bd-post-copy h3 { margin: 0 0 8px; font-size: 18px; line-height: 1.4; letter-spacing: -.4px; }
.bd-post-copy p { margin: 0; color: var(--bd-muted); font-size: 12px; line-height: 1.7; }
.bd-post-copy .bd-byline { padding-top: 13px; margin-top: 15px; border-top: 1px solid #eef2f6; }
.bd-pagination { display: flex; justify-content: center; gap: 7px; padding: 32px 0 48px; }
.bd-pagination .page-numbers { display: inline-flex; min-width: 36px; min-height: 36px; align-items: center; justify-content: center; border: 1px solid var(--bd-line); border-radius: 5px; padding: 5px 10px; font-size: 12px; }
.bd-pagination .current { background: var(--bd-ink); color: #fff; border-color: var(--bd-ink); }
.bd-newsletter {
  display: grid; grid-template-columns: 1fr 1fr; gap: 35px; align-items: center;
  margin: 0 0 54px; padding: 30px 33px; border: 1px solid #dbe7ff; border-radius: 8px; background: #f0f5ff;
}
.bd-newsletter h2 { margin: 5px 0; font-size: 23px; line-height: 1.25; letter-spacing: -.6px; }
.bd-newsletter p { margin: 0; color: var(--bd-muted); font-size: 12px; }
.bd-newsletter-note { color: var(--bd-muted); font-size: 10px; }
.bd-site-footer { border-top: 1px solid var(--bd-line); background: var(--bd-soft); padding: 38px 0 20px; }
.bd-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 35px; }
.bd-footer-grid h2 { margin: 0 0 13px; font-size: 11px; }
.bd-footer-grid p { max-width: 250px; margin: 12px 0; color: var(--bd-muted); font-size: 11px; }
.bd-footer-grid ul { list-style: none; margin: 0; padding: 0; }
.bd-footer-grid li { margin: 7px 0; }
.bd-footer-grid li a { color: var(--bd-muted); font-size: 11px; }
.bd-footer-bottom { display: flex; justify-content: space-between; gap: 15px; margin-top: 28px; padding-top: 17px; border-top: 1px solid var(--bd-line); color: var(--bd-muted); font-size: 10px; }
.bd-content-layout { display: grid; grid-template-columns: minmax(0, 760px) minmax(220px, 300px); gap: 55px; padding: 45px 0 55px; }
.bd-entry-header { margin-bottom: 25px; }
.bd-entry-title { margin: 10px 0 12px; font-size: clamp(32px, 4vw, 43px); line-height: 1.16; letter-spacing: -1.5px; }
.bd-entry-content { color: #263449; font-size: 16px; line-height: 1.85; overflow-wrap: break-word; }
.bd-entry-content > * { max-width: 100%; }
.bd-entry-content h2, .bd-entry-content h3, .bd-entry-content h4 { color: var(--bd-ink); line-height: 1.3; letter-spacing: -.5px; margin-top: 1.7em; }
.bd-entry-content h2 { font-size: 28px; }
.bd-entry-content h3 { font-size: 22px; }
.bd-entry-content a { color: var(--bd-accent); text-decoration: underline; text-underline-offset: 3px; }
.bd-entry-content img { border-radius: 6px; }
.bd-entry-content blockquote { margin: 25px 0; padding: 5px 0 5px 20px; border-left: 3px solid var(--bd-accent); color: var(--bd-muted); }
.bd-entry-content .wp-block-button__link { background: var(--bd-accent); color: #fff; text-decoration: none; }
.bd-featured-image { margin: 0 0 25px; border-radius: 8px; overflow: hidden; }
.bd-featured-image img { display: block; width: 100%; height: auto; }
.bd-sidebar .widget { margin-bottom: 28px; padding-bottom: 22px; border-bottom: 1px solid var(--bd-line); }
.bd-sidebar .widget-title { margin: 0 0 14px; font-size: 13px; }
.bd-sidebar ul { margin: 0; padding-left: 18px; color: var(--bd-muted); font-size: 12px; }
.bd-sidebar li { margin: 8px 0; }
.bd-sidebar a { color: inherit; }
.bd-sidebar input { max-width: 100%; }
.bd-archive-header { padding: 45px 0 28px; border-bottom: 1px solid var(--bd-line); }
.bd-archive-header h1 { margin: 8px 0; font-size: 38px; line-height: 1.2; letter-spacing: -1.2px; }
.bd-archive-header p { color: var(--bd-muted); margin: 0; }
.bd-comments { margin-top: 45px; }
.bd-comments h2 { font-size: 22px; }
.bd-comments input, .bd-comments textarea { max-width: 100%; padding: 10px; border: 1px solid var(--bd-line); border-radius: 5px; }
.bd-comments .submit { padding: 10px 16px; border: 0; border-radius: 5px; color: #fff; background: var(--bd-accent); }
.bd-empty { padding: 50px 0; }
.bd-empty h1 { font-size: 35px; }
.alignwide { max-width: 1100px; margin-left: auto; margin-right: auto; }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }
.wp-block-image figcaption, .wp-block-embed figcaption { color: var(--bd-muted); font-size: 12px; text-align: center; }
.wp-block-table { overflow-x: auto; }
@media (max-width: 1000px) {
  .bd-header-inner { gap: 18px; }
  .bd-primary-nav, .bd-primary-nav ul { gap: 14px; font-size: 11px; }
  .bd-feature-side .bd-feature-link { grid-template-columns: 135px minmax(0,1fr); gap: 15px; }
  .bd-feature-side .bd-thumb { min-height: 155px; }
  .bd-content-layout { gap: 30px; }
}
@media (max-width: 760px) {
  .bd-wrap { width: min(100% - 40px, var(--bd-max)); }
  .admin-bar .bd-site-header { top: 46px; }
  .bd-header-inner { min-height: 67px; flex-wrap: wrap; gap: 10px; }
  .bd-brand { margin-right: auto; font-size: 25px; }
  .bd-primary-nav { display: none; order: 5; flex: 0 0 100%; padding: 4px 0 16px; }
  .bd-primary-nav.is-open { display: block; }
  .bd-primary-nav ul { display: flex; flex-wrap: wrap; gap: 7px 18px; }
  .bd-primary-nav .bd-nav-spacer { display: none; }
  .bd-menu-toggle { display: inline-flex; }
  .bd-header-actions .bd-button { display: none; }
  .bd-hero { padding: 35px 0 27px; }
  .bd-hero h1 { font-size: 34px; }
  .bd-featured-grid { grid-template-columns: 1fr; gap: 23px; }
  .bd-feature-primary { grid-row: auto; }
  .bd-feature-primary .bd-thumb { aspect-ratio: 1.85/1; }
  .bd-feature h2 { font-size: 24px; }
  .bd-feature-side .bd-feature-link { grid-template-columns: 125px minmax(0,1fr); gap: 14px; }
  .bd-feature-side .bd-thumb { min-height: 135px; }
  .bd-feature-side h2 { font-size: 17px; }
  .bd-feature-side .bd-feature-copy { align-self: center; }
  .bd-latest-head { align-items: flex-start; flex-direction: column; gap: 13px; }
  .bd-post-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 14px; }
  .bd-post-copy { padding: 0 12px 13px; }
  .bd-post-copy h3 { font-size: 16px; }
  .bd-newsletter { grid-template-columns: 1fr; gap: 15px; padding: 24px; }
  .bd-footer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
  .bd-content-layout { display: block; padding-top: 30px; }
  .bd-sidebar { margin-top: 45px; }
}
@media (max-width: 480px) {
  .bd-post-grid { grid-template-columns: 1fr; }
  .bd-post-card .bd-thumb { aspect-ratio: 1.8/1; }
  .bd-section-heading small { display: none; }
  .bd-feature-side .bd-feature-link { grid-template-columns: 112px minmax(0,1fr); }
  .bd-feature-side .bd-thumb { min-height: 120px; }
  .bd-footer-bottom { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
