/*
Theme Name: Bobs Electrical Services Blog
Template: kadence
Version: 1.0.0
Description: Kadence child theme reproducing the supplied BobsElectricalservices.com header, navigation, footer and design system for the /blog/ section.
Author: Loyal Web Solutions
*/

/* ==========================================================================
   WordPress Blog Templates
   The source site's design system above is retained. These rules only add
   the WordPress blog/archive/single-post presentation.
   ========================================================================== */

.blog-hero {
  background: var(--char-800);
  color: #dfe2e7;
  border-bottom: 5px solid var(--red-600);
  padding-block: clamp(42px, 6vw, 78px);
}
.blog-hero h1 { color: #fff; max-width: 900px; }
.blog-hero p { max-width: 800px; margin: 0; color: #d8dce2; font-size: clamp(1.08rem, 1rem + .4vw, 1.22rem); }

.blog-section { padding-block: clamp(50px, 7vw, 92px); background: var(--gray-50); }
.blog-section .section-head { max-width: 780px; margin-bottom: clamp(24px, 4vw, 40px); }

.blog-grid {
  display: grid;
  gap: clamp(14px, 2vw, 22px);
  grid-template-columns: 1fr;
}
.blog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.blog-card:hover { border-color: #e7a3ad; box-shadow: var(--shadow); transform: translateY(-3px); }
.blog-card__image {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--gray-50);
  text-decoration: none;
}
.blog-card__image img { width: 100%; height: 100%; object-fit: cover; }
.blog-card__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  text-align: center;
  background: var(--char-800);
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.45rem;
}
.blog-card__body { display: flex; flex-direction: column; flex: 1; padding: 1.2rem 1.25rem 1.35rem; }
.blog-card__meta {
  margin-bottom: .4rem;
  color: var(--red-700);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.blog-card h2 { font-size: clamp(1.45rem, 1.2rem + .8vw, 1.85rem); margin-bottom: .5rem; }
.blog-card h2 a { color: var(--ink); text-decoration: none; }
.blog-card h2 a:hover { color: var(--red-700); }
.blog-card__excerpt { font-size: .96rem; flex: 1; }
.blog-card__excerpt p:last-child { margin-bottom: 0; }
.blog-card__read { display: inline-flex; margin-top: 1rem; font-weight: 800; color: var(--red-700); text-decoration: none; }

.blog-pagination { margin-top: 2rem; text-align: center; }
.blog-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  margin: .2rem;
  padding: 0 .7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--char-800);
  font-weight: 800;
  text-decoration: none;
}
.blog-pagination .page-numbers.current {
  background: var(--red-600);
  border-color: var(--red-600);
  color: #fff;
}

.blog-post-section { padding-block: clamp(48px, 7vw, 92px); }
.blog-post-layout { display: grid; gap: 2.5rem; }
.blog-post-content { min-width: 0; }
.blog-post-content .entry-title { margin-bottom: .4rem; }
.blog-post-meta { color: var(--muted); font-size: .9rem; margin-bottom: 1.6rem; }
.blog-featured-image {
  margin: 0 0 clamp(2rem, 4vw, 2.8rem);
  overflow: hidden;
  border-radius: var(--r-lg);
}
.blog-featured-image img { width: 100%; height: auto; }
.blog-prose { font-size: 1.0625rem; }
.blog-prose h2 { margin-top: 2.2rem; }
.blog-prose h3 { margin-top: 1.5rem; }
.blog-prose img { border-radius: var(--r); }
.blog-prose blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 5px solid var(--red-600);
  border-radius: 0 var(--r) var(--r) 0;
  background: var(--red-50);
}
.blog-prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.blog-prose th, .blog-prose td { padding: .7rem; border: 1px solid var(--line); text-align: left; }

.blog-sidebar {
  display: grid;
  gap: 1.2rem;
  align-content: start;
}
.blog-emergency {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  background: var(--char-800);
  color: #d9dde3;
  border: 0;
  border-top: 5px solid var(--red-600);
  border-radius: var(--r);
  padding: 1.3rem;
  box-shadow: var(--shadow);
}
.blog-emergency h2 { color: #fff; font-size: 1.55rem; }
.blog-emergency p { font-size: .95rem; }
.blog-emergency .emergency-phone {
  display: block;
  margin: .7rem 0 1rem;
  color: #fff;
  font-size: 1.55rem;
  font-weight: 800;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.blog-emergency .btn { width: 100%; }

.blog-side-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.2rem;
}
.blog-side-card h2 { font-family: var(--font-body); font-size: 1rem; margin-bottom: .65rem; }
.blog-side-card ul { list-style: none; margin: 0; padding: 0; }
.blog-side-card li a {
  display: flex;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid #eef0f2;
  color: var(--text);
  text-decoration: none;
}
.blog-side-card li:last-child a { border-bottom: 0; }
.blog-side-card li a:hover { color: var(--red-700); }

.blog-breadcrumbs {
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: .86rem;
}
.blog-breadcrumbs a { color: var(--red-700); text-decoration: none; }

.blog-empty {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 2rem;
}

@media (min-width: 640px) {
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .blog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .blog-post-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 3.5rem; }
}
@media (max-width: 899px) {
  .blog-emergency { position: static; }
}
