/*
Theme Name: RRH Theme
Theme URI: https://www.rapidresponseheatingcalgary.com/
Author: Rapid Response Heating Calgary
Author URI: https://www.rapidresponseheatingcalgary.com/
Description: Custom WordPress theme for Rapid Response Heating Calgary.
             Matches the static site design exactly.
Version: 1.0
License: Private
Text Domain: rrh-theme
*/

/* ── RESET ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-text-dark);
  background: #ffffff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }

/* ── GOOGLE FONTS ───────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@700;800&family=Outfit:wght@400;500;600&display=swap');

/* ── CSS VARIABLES ──────────────────────────────────── */
:root {
  --color-brand-red:     #CC2222;
  --color-brand-darkred: #9A1515;
  --color-brand-orange:  #F97316;
  --color-brand-dark:    #0A0F1E;
  --color-brand-mid:     #141E32;
  --color-brand-steel:   #1E2D45;
  --color-white:         #FFFFFF;
  --color-off-white:     #F5F4F0;
  --color-text-dark:     #111827;
  --color-text-muted:    #6B7280;
  --color-border:        #E5E7EB;
  --color-success:       #16A34A;
  --font-display:        'Syne', sans-serif;
  --font-body:           'Outfit', sans-serif;
  --container-max:       1200px;
  --border-radius:       12px;
}

/* ── SHARED UTILITIES ───────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.btn-primary {
  display: inline-block;
  padding: 10px 20px;
  background: var(--color-brand-red);
  color: #fff;
  border-radius: 6px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
}
.btn-primary:hover { background: var(--color-brand-darkred); color: #fff; }

.btn-secondary {
  display: inline-block;
  padding: 10px 20px;
  border: 1.5px solid rgba(255,255,255,0.3);
  color: #fff;
  border-radius: 6px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.btn-secondary:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255,255,255,0.08);
}

.btn-white {
  display: inline-block;
  padding: 10px 20px;
  background: #fff;
  color: var(--color-brand-red);
  border-radius: 6px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
}
.btn-white:hover { background: var(--color-off-white); }

.section-label {
  display: block;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-brand-red);
  margin-bottom: 8px;
}

/* ── URGENCY BAR ─────────────────────────────────────── */
.urgency-bar {
  background: #9A1515;
  padding: 7px 16px;
  font-size: 11px;
  font-weight: 500;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}
.urgency-bar a { color: #fff; text-decoration: underline; }
.urgency-pulse {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #fff;
  border-radius: 50%;
  animation: pulse 1.4s infinite;
  flex-shrink: 0;
}
.urgency-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #fff;
  border-radius: 50%;
  animation: pulse 1.4s infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ── SITE HEADER ─────────────────────────────────────── */
.site-header {
  background: var(--color-brand-dark);
  padding: 10px 0;
  border-bottom: 0.5px solid rgba(255,255,255,0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow 0.2s;
}
.site-header.is-scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.site-logo-mark {
  width: 30px;
  height: 30px;
  background: var(--color-brand-red);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  font-family: var(--font-body);
  flex-shrink: 0;
}
.site-logo-name {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  font-family: var(--font-body);
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
}
.site-nav a {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  font-family: var(--font-body);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}
.site-nav a:hover,
.site-nav a.active,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a {
  color: #fff;
}
.site-nav .has-dropdown { position: relative; }
.site-nav .dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  background: #141E32;
  border-radius: 8px;
  padding: 8px;
  min-width: 220px;
  border: 0.5px solid rgba(255,255,255,0.1);
  z-index: 200;
}
.site-nav .has-dropdown:hover .dropdown { display: block; }
.site-nav .dropdown a {
  display: block;
  padding: 8px 12px;
  font-size: 12px;
  border-radius: 5px;
  color: rgba(255,255,255,0.7);
}
.site-nav .dropdown a:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}
.site-header-cta { margin-left: 12px; }
.site-hamburger {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
}

/* ── SITE FOOTER ─────────────────────────────────────── */
.site-footer {
  background: #060C18;
  color: #fff;
  padding: 40px 0 0;
}
.site-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
}
.site-footer-col-title {
  font-size: 10px;
  font-weight: 500;
  color: var(--color-brand-orange);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.site-footer-tagline {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  line-height: 1.6;
  margin-top: 8px;
}
.site-footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.site-footer-links a {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.15s;
}
.site-footer-links a:hover { color: #fff; }
.site-footer-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.site-footer-contact span {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
}
.site-footer-contact a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
}
.site-footer-contact a:hover { color: #fff; }
.site-footer-bottom {
  border-top: 0.5px solid rgba(255,255,255,0.08);
  padding: 14px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.site-footer-bottom span,
.site-footer-bottom a {
  font-size: 11px;
  color: rgba(255,255,255,0.25);
  text-decoration: none;
}
.site-footer-bottom a:hover { color: rgba(255,255,255,0.5); }

/* ── BLOG LISTING (index.php) ───────────────────────── */
.blog-hero {
  background: var(--color-brand-dark);
  padding: 60px 0;
  text-align: center;
}
.blog-hero-eyebrow {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-brand-red);
  margin-bottom: 12px;
  display: block;
}
.blog-hero-heading {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
  line-height: 1.2;
}
.blog-hero-sub {
  font-size: 16px;
  color: rgba(255,255,255,0.55);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}
.blog-main {
  background: var(--color-off-white);
  padding: 60px 0;
}
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}
.blog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.blog-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  border: 0.5px solid var(--color-border);
  transition: transform 0.15s, box-shadow 0.15s;
}
.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.blog-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--color-brand-mid);
}
.blog-card-image-placeholder {
  width: 100%;
  height: 200px;
  background: var(--color-brand-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.blog-card-body { padding: 20px; }
.blog-card-category {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(204,34,34,0.1);
  color: var(--color-brand-red);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  text-decoration: none;
}
.blog-card-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: 10px;
  line-height: 1.3;
}
.blog-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}
.blog-card-title a:hover { color: var(--color-brand-red); }
.blog-card-excerpt {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
}
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--color-text-muted);
  margin-bottom: 14px;
}
.blog-card-read-more {
  font-size: 12px;
  color: var(--color-brand-red);
  font-weight: 500;
  text-decoration: none;
}
.blog-card-read-more:hover { text-decoration: underline; }
.blog-pagination {
  display: flex;
  gap: 8px;
  margin-top: 32px;
  justify-content: center;
}
.blog-pagination a,
.blog-pagination span {
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  border: 0.5px solid var(--color-border);
  color: var(--color-text-dark);
  text-decoration: none;
  transition: all 0.15s;
}
.blog-pagination a:hover {
  background: var(--color-brand-red);
  color: #fff;
  border-color: var(--color-brand-red);
}
.blog-pagination .current {
  background: var(--color-brand-red);
  color: #fff;
  border-color: var(--color-brand-red);
}
.blog-pagination ul {
  list-style: none;
  display: flex;
  gap: 8px;
  padding: 0;
  margin: 0;
}

/* ── SIDEBAR ─────────────────────────────────────────── */
.blog-sidebar { position: sticky; top: 80px; }
.sidebar-cta-card {
  background: var(--color-brand-dark);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 20px;
  border: 0.5px solid rgba(255,255,255,0.08);
}
.sidebar-cta-heading {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  line-height: 1.3;
}
.sidebar-cta-body {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
  margin-bottom: 16px;
}
.sidebar-cta-phone {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-brand-red);
  display: block;
  text-decoration: none;
  text-align: center;
  margin-top: 10px;
}
.sidebar-services-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  border: 0.5px solid var(--color-border);
  margin-bottom: 20px;
}
.sidebar-services-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.sidebar-services-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-services-links a {
  font-size: 12px;
  color: var(--color-text-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s;
}
.sidebar-services-links a::before {
  content: '→';
  color: var(--color-brand-red);
  font-size: 12px;
}
.sidebar-services-links a:hover { color: var(--color-brand-red); }
.sidebar-categories-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  border: 0.5px solid var(--color-border);
}
.sidebar-categories-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.sidebar-categories-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar-categories-list a {
  font-size: 12px;
  color: var(--color-text-muted);
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.15s;
}
.sidebar-categories-list a:hover { color: var(--color-brand-red); }
.sidebar-categories-list .count {
  font-size: 11px;
  background: var(--color-off-white);
  padding: 2px 7px;
  border-radius: 10px;
}

/* ── SINGLE POST (single.php) ───────────────────────── */
.post-hero {
  background: var(--color-brand-dark);
  padding: 60px 0 40px;
}
.post-breadcrumb {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 16px;
}
.post-breadcrumb a {
  color: rgba(255,255,255,0.4);
  text-decoration: none;
}
.post-breadcrumb a:hover { color: #fff; }
.post-breadcrumb span { margin: 0 6px; }
.post-category-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(204,34,34,0.2);
  color: var(--color-brand-red);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  text-decoration: none;
}
.post-title {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 16px;
  max-width: 760px;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  flex-wrap: wrap;
}
.post-meta-author { color: rgba(255,255,255,0.65); font-weight: 500; }
.post-featured-image {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: 10px;
  margin-top: 32px;
}
.post-main {
  background: #fff;
  padding: 60px 0;
}
.post-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}
.post-content-area { min-width: 0; }

/* Post body typography */
.post-body { font-size: 15px; color: #374151; line-height: 1.85; }
.post-body h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--color-text-dark);
  margin: 36px 0 14px;
  line-height: 1.25;
}
.post-body h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-dark);
  margin: 28px 0 10px;
}
.post-body p { margin-bottom: 18px; }
.post-body ul, .post-body ol {
  padding-left: 20px;
  margin-bottom: 18px;
}
.post-body li { margin-bottom: 8px; }
.post-body strong { font-weight: 600; color: var(--color-text-dark); }
.post-body a { color: var(--color-brand-red); text-decoration: underline; }
.post-body a:hover { color: var(--color-brand-darkred); }
.post-body img {
  border-radius: 8px;
  margin: 24px 0;
  width: 100%;
}
.post-body blockquote {
  border-left: 4px solid var(--color-brand-red);
  padding: 16px 20px;
  background: var(--color-off-white);
  border-radius: 0 8px 8px 0;
  margin: 24px 0;
  font-style: italic;
  color: #374151;
}
.post-body code {
  background: var(--color-off-white);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

/* Post CTA box (embedded mid-article) */
.post-inline-cta {
  background: var(--color-brand-dark);
  border-radius: 10px;
  padding: 24px;
  margin: 32px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.post-inline-cta-text {
  font-size: 15px;
  font-weight: 500;
  color: #fff;
}
.post-inline-cta-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
}

/* Post tags */
.post-tags {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 0.5px solid var(--color-border);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.post-tag {
  padding: 4px 10px;
  background: var(--color-off-white);
  border-radius: 4px;
  font-size: 11px;
  color: var(--color-text-muted);
  text-decoration: none;
}
.post-tag:hover { background: var(--color-brand-red); color: #fff; }

/* Author box */
.post-author-box {
  background: var(--color-off-white);
  border-radius: 10px;
  padding: 24px;
  margin-top: 36px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.post-author-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color-brand-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  font-family: var(--font-display);
}
.post-author-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: 2px;
}
.post-author-title {
  font-size: 12px;
  color: var(--color-brand-red);
  font-weight: 500;
  margin-bottom: 8px;
}
.post-author-bio {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Related posts */
.post-related {
  background: var(--color-off-white);
  padding: 50px 0;
}
.post-related-heading {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: 24px;
}
.post-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ── ARCHIVE PAGE ─────────────────────────────────────── */
.archive-hero {
  background: var(--color-brand-dark);
  padding: 50px 0;
  text-align: center;
}
.archive-hero-label {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.archive-hero-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: #fff;
}

/* ── 404 PAGE ─────────────────────────────────────────── */
.error-404-section {
  background: var(--color-brand-dark);
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 0;
}
.error-404-code {
  font-family: var(--font-display);
  font-size: 100px;
  font-weight: 800;
  color: var(--color-brand-red);
  opacity: 0.3;
  line-height: 1;
}
.error-404-heading {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}
.error-404-body {
  font-size: 15px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 28px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* ── FINAL CTA BANNER ────────────────────────────────── */
.blog-cta-banner {
  background: var(--color-brand-red);
  padding: 50px 0;
}
.blog-cta-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
}
.blog-cta-heading {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}
.blog-cta-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.8);
}
.blog-cta-buttons {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

/* ── MOBILE RESPONSIVE ───────────────────────────────── */
@media (max-width: 768px) {
  .site-nav { display: none; }
  .site-nav.is-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--color-brand-dark);
    padding: 80px 24px 40px;
    z-index: 500;
    gap: 0;
    overflow-y: auto;
  }
  .site-nav.is-open a {
    font-size: 16px;
    padding: 14px 0;
    border-bottom: 0.5px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.8);
  }
  .site-nav .dropdown { display: block; position: static;
    background: transparent; border: none; padding: 0 0 0 16px; }
  .site-header-cta { display: none; }
  .site-hamburger { display: block; }

  .blog-hero-heading { font-size: 26px; }
  .blog-layout { grid-template-columns: 1fr; }
  .blog-sidebar { position: static; }
  .blog-grid { grid-template-columns: 1fr; }

  .post-title { font-size: 26px; }
  .post-layout { grid-template-columns: 1fr; }
  .post-related-grid { grid-template-columns: 1fr; }
  .post-inline-cta { flex-direction: column; }

  .blog-cta-inner { flex-direction: column; text-align: center; }
  .blog-cta-buttons { justify-content: center; flex-wrap: wrap; }

  .site-footer-grid { grid-template-columns: 1fr; }
  .site-footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}
