/*
Theme Name: Bobs Water Damage Restoration Blog
Theme URI: https://www.bobswaterdamagerestoration.com/
Description: Kadence child theme for the Bobs Water Damage Restoration /blog/ section. Reproduces the supplied main-site header/footer styling and adds a custom blog archive and sticky emergency sidebar for posts.
Author: Loyal Web Solutions
Template: kadence
Version: 1.0.0
Text Domain: bobs-water-damage-blog
*/

/* The main site's supplied design tokens and layout values are used as the source of truth. */
:root {
  --color-primary: #0b2a6b;
  --color-primary-dark: #071b47;
  --color-secondary: #1466c6;
  --color-cyan: #22a7f0;
  --color-tint: #e8f3fd;
  --color-accent: #3d8a1e;
  --color-call: #c2410c;
  --color-call-dark: #9a330a;
  --color-text: #14213d;
  --color-muted: #4a5872;
  --color-line: #d6e0ec;
  --color-background: #f4f7fb;
  --color-white: #ffffff;
  --font-display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem);
  --step-4: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem);
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: clamp(3rem, 2rem + 4vw, 5.5rem);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 22px;
  --shadow-card: 0 1px 2px rgba(11,42,107,.08), 0 8px 24px -12px rgba(11,42,107,.25);
  --container: 1200px;
  --header-h: 76px;
  --callbar-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-white);
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--color-secondary); text-underline-offset: 3px; }
a:hover { color: var(--color-primary); }
h1,h2,h3,h4 {
  font-family: var(--font-display);
  color: var(--color-primary);
  line-height: 1.12;
  margin: 0 0 var(--space-2);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--step-4); font-weight: 800; }
h2 { font-size: var(--step-3); font-weight: 800; }
h3 { font-size: var(--step-1); font-weight: 700; }
p { margin: 0 0 var(--space-2); }
ul,ol { padding-left: 1.2em; margin: 0 0 var(--space-2); }
li { margin-bottom: .4em; }
:focus-visible { outline: 3px solid var(--color-cyan); outline-offset: 3px; border-radius: 4px; }

.bwd-skip { position:absolute; left:1rem; top:-100px; z-index:999; background:#fff; color:var(--color-primary); padding:.75rem 1rem; border-radius:var(--radius-sm); font-weight:700; }
.bwd-skip:focus { top:1rem; }
.bwd-container { width:min(100% - 2.5rem,var(--container)); margin-inline:auto; }

/* Header: based on the supplied main-site HTML/CSS. */
.bwd-topbar { background:var(--color-primary-dark); color:#d9e6fb; font-size:var(--step--1); }
.bwd-topbar .bwd-container { display:flex; justify-content:space-between; align-items:center; gap:1rem; min-height:38px; }
.bwd-topbar a { color:#fff; font-weight:700; text-decoration:none; display:inline-flex; align-items:center; gap:.4rem; min-height:38px; }
.bwd-phone-icon { width:1em; height:1em; flex:none; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }

.bwd-site-header { position:sticky; top:0; z-index:100; background:#fff; border-bottom:1px solid var(--color-line); }
.bwd-header-inner { display:flex; align-items:center; gap:1rem; min-height:var(--header-h); }
.bwd-brand { display:block; flex:none; }
.bwd-brand img { width:170px; height:auto; aspect-ratio:480/213; }
.bwd-header-call { margin-left:0; display:none; }
.bwd-header-call .bwd-btn { min-height:48px; padding:.55rem 1.2rem; }
.bwd-call-label { display:block; font-size:.72rem; font-weight:600; line-height:1; opacity:.9; }
.bwd-call-number { display:block; line-height:1.15; }

.bwd-btn {
  display:inline-flex; align-items:center; justify-content:center; gap:.55rem;
  min-height:52px; padding:.8rem 1.5rem;
  font-family:var(--font-display); font-weight:800; font-size:1.05rem; letter-spacing:.01em;
  border-radius:999px; border:2px solid transparent; text-decoration:none; cursor:pointer;
}
.bwd-btn-call { background:var(--color-call); color:#fff !important; }
.bwd-btn-call:hover { background:var(--color-call-dark); color:#fff !important; }
.bwd-btn-lg { min-height:60px; font-size:1.2rem; padding-inline:1.9rem; }

.bwd-nav-toggle {
  margin-left:auto; display:inline-flex; align-items:center; gap:.5rem;
  min-height:48px; padding:.5rem .9rem; border:2px solid var(--color-primary);
  background:#fff; color:var(--color-primary); border-radius:var(--radius-sm);
  font:700 1rem var(--font-body); cursor:pointer;
}
.bwd-bars,.bwd-bars:before,.bwd-bars:after { display:block; width:20px; height:2px; background:currentColor; position:relative; transition:transform .2s; }
.bwd-bars:before,.bwd-bars:after { content:""; position:absolute; left:0; }
.bwd-bars:before { top:-6px; } .bwd-bars:after { top:6px; }
.bwd-nav-toggle[aria-expanded="true"] .bwd-bars { background:transparent; }
.bwd-nav-toggle[aria-expanded="true"] .bwd-bars:before { transform:translateY(6px) rotate(45deg); }
.bwd-nav-toggle[aria-expanded="true"] .bwd-bars:after { transform:translateY(-6px) rotate(-45deg); }

.bwd-primary-nav {
  position:fixed; inset:calc(var(--header-h) + 38px) 0 0 0; z-index:99;
  background:#fff; overflow-y:auto; padding:1rem 1.25rem calc(var(--callbar-h) + 2rem);
  display:none;
}
.bwd-primary-nav.is-open { display:block; }
.bwd-nav-list,.bwd-subsub-list { list-style:none; margin:0; padding:0; }
.bwd-nav-list > li { border-bottom:1px solid var(--color-line); margin:0; position:relative; }
.bwd-nav-link,.bwd-sub-toggle {
  display:flex; width:100%; align-items:center; justify-content:space-between;
  min-height:52px; padding:.5rem .25rem; background:none; border:0;
  font:700 1.1rem var(--font-display); color:var(--color-primary); text-decoration:none; text-align:left; cursor:pointer;
}
.bwd-chevron { width:12px; height:12px; border-right:2.5px solid currentColor; border-bottom:2.5px solid currentColor; transform:rotate(45deg); transition:transform .2s; margin-right:6px; }
.bwd-sub-toggle[aria-expanded="true"] .bwd-chevron { transform:rotate(-135deg); }
.bwd-submenu { display:none; padding:0 0 1rem .5rem; }
.bwd-submenu.is-open { display:block; }
.bwd-sub-feature { margin-bottom:.5rem; }
.bwd-sub-feature a,.bwd-subsub-list a {
  display:flex; align-items:center; min-height:44px; padding:.3rem .5rem;
  color:var(--color-text); text-decoration:none; font-weight:500;
}
.bwd-sub-feature a { font-weight:700; color:var(--color-primary); }
.bwd-sub-group { margin-bottom:.5rem; }
.bwd-sub-group-title { display:none; }
.bwd-sub-group-toggle {
  display:flex; width:100%; justify-content:space-between; align-items:center; min-height:46px;
  background:var(--color-background); border:0; border-radius:var(--radius-sm); padding:.4rem .75rem;
  font:700 1rem var(--font-body); color:var(--color-text); cursor:pointer; text-align:left;
}
.bwd-subsub-list.is-open { display:block; }
.bwd-subsub-list { display:none; padding:.25rem 0 .25rem .75rem; }
.bwd-subgroup-chevron { width:9px; height:9px; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(45deg); transition:transform .2s; }
.bwd-sub-group-toggle[aria-expanded="true"] .bwd-subgroup-chevron { transform:rotate(-135deg); }
.bwd-nav-call { padding-top:1.25rem; border-bottom:0 !important; }
.bwd-nav-call .bwd-btn { width:100%; }

@media (min-width:1080px) {
  .bwd-nav-toggle { display:none; }
  .bwd-header-call { display:block; margin-left:0; }
  .bwd-primary-nav { position:static; display:block; padding:0; overflow:visible; background:none; margin-left:auto; }
  .bwd-nav-list { display:flex; align-items:center; gap:.25rem; }
  .bwd-nav-list > li { border:0; }
  .bwd-nav-link,.bwd-sub-toggle { min-height:44px; padding:.4rem .8rem; font-size:1rem; border-radius:var(--radius-sm); justify-content:flex-start; gap:.5rem; }
  .bwd-nav-link:hover,.bwd-sub-toggle:hover,.bwd-nav-link[aria-current="page"] { background:var(--color-tint); }
  .bwd-chevron { width:8px; height:8px; border-width:2px; margin:-4px 0 0 2px; }
  .bwd-nav-call { display:none; }
  .bwd-submenu {
    position:absolute; top:calc(100% + 10px); left:50%; transform:translateX(-50%);
    background:#fff; border:1px solid var(--color-line); border-radius:var(--radius-md);
    box-shadow:0 20px 50px -20px rgba(7,27,71,.35); padding:1.25rem; width:max-content; max-width:min(92vw,860px);
  }
  .bwd-submenu:before { content:""; position:absolute; top:-12px; left:0; right:0; height:12px; }
  .bwd-has-sub:hover > .bwd-submenu,.bwd-has-sub:focus-within > .bwd-submenu { display:block; }
  .bwd-submenu-grid { display:grid; grid-template-columns:repeat(var(--cols,3),minmax(190px,1fr)); gap:.75rem 1.5rem; }
  .bwd-sub-group-toggle { display:none; }
  .bwd-sub-group-title { display:block; font:700 .85rem var(--font-body); color:var(--color-muted); margin:0 0 .25rem .5rem; }
  .bwd-subsub-list { display:block; padding:0; }
  .bwd-subsub-list a,.bwd-sub-feature a { min-height:38px; border-radius:var(--radius-sm); }
  .bwd-subsub-list a:hover,.bwd-sub-feature a:hover { background:var(--color-tint); text-decoration:none; }
  .bwd-sub-feature { border-bottom:1px solid var(--color-line); padding-bottom:.5rem; margin-bottom:.75rem; }
  .bwd-sub-feature .bwd-all-link { font-weight:600; color:var(--color-secondary); }
}

/* Blog archive */
.bwd-blog-hero { background:var(--color-primary); color:#dbe7fa; padding:clamp(2.75rem,4vw,4.5rem) 0; position:relative; overflow:hidden; }
.bwd-blog-hero:after {
  content:""; position:absolute; left:0; right:0; bottom:-1px; height:34px;
  background:linear-gradient(170deg,transparent 0 48%,#22a7f0 49% 63%,#fff 64%);
  opacity:.9;
}
.bwd-blog-hero .bwd-container { position:relative; z-index:1; }
.bwd-blog-kicker { color:#8fd3fb; font:800 .9rem var(--font-display); letter-spacing:.08em; text-transform:uppercase; margin-bottom:.65rem; }
.bwd-blog-hero h1 { color:#fff; max-width:20ch; }
.bwd-blog-hero p { color:#dbe7fa; max-width:66ch; font-size:var(--step-1); margin:0; }
.bwd-blog-layout { padding:var(--space-5) 0; }
.bwd-post-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:var(--space-3); }
.bwd-post-card {
  display:flex; flex-direction:column; background:#fff; border:1px solid var(--color-line);
  border-radius:var(--radius-md); overflow:hidden; box-shadow:var(--shadow-card); min-width:0;
}
.bwd-post-thumb { aspect-ratio:16/9; background:var(--color-tint); overflow:hidden; }
.bwd-post-thumb img { width:100%; height:100%; object-fit:cover; }
.bwd-post-thumb .bwd-thumb-placeholder { height:100%; display:grid; place-items:center; background:linear-gradient(135deg,#e8f3fd,#b9dcf7); color:var(--color-primary); font:800 1rem var(--font-display); text-align:center; padding:1rem; }
.bwd-post-body { display:flex; flex-direction:column; padding:var(--space-3); flex:1; }
.bwd-post-meta { color:var(--color-muted); font-size:.875rem; margin-bottom:.55rem; }
.bwd-post-title { font-size:1.45rem; margin-bottom:.65rem; }
.bwd-post-title a { color:var(--color-primary); text-decoration:none; }
.bwd-post-title a:hover { color:var(--color-secondary); text-decoration:underline; }
.bwd-post-excerpt { color:var(--color-muted); font-size:1rem; flex:1; }
.bwd-read-more { margin-top:1rem; font:800 .98rem var(--font-display); color:var(--color-secondary); text-decoration:none; }
.bwd-read-more:hover { text-decoration:underline; }
.bwd-pagination { margin-top:var(--space-4); }
.bwd-pagination .page-numbers { display:inline-flex; align-items:center; justify-content:center; min-width:42px; min-height:42px; margin:.2rem; border:1px solid var(--color-line); border-radius:var(--radius-sm); text-decoration:none; font-weight:700; }
.bwd-pagination .current { background:var(--color-primary); color:#fff; border-color:var(--color-primary); }
.bwd-empty { padding:var(--space-4); background:var(--color-background); border-radius:var(--radius-md); }

/* Single post */
.bwd-single-wrap { padding:var(--space-5) 0; }
.bwd-breadcrumbs { font-size:.875rem; margin-bottom:var(--space-3); color:var(--color-muted); }
.bwd-breadcrumbs a { color:var(--color-secondary); }
.bwd-single-grid { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:var(--space-4); align-items:start; }
.bwd-article { min-width:0; }
.bwd-entry-header { margin-bottom:var(--space-3); }
.bwd-entry-title { font-size:clamp(2.1rem,1.6rem + 2.4vw,3.5rem); max-width:24ch; }
.bwd-entry-meta { color:var(--color-muted); font-size:.92rem; margin-bottom:0; }
.bwd-featured-image { margin:0 0 var(--space-4); border-radius:var(--radius-md); overflow:hidden; background:var(--color-tint); }
.bwd-featured-image img { width:100%; height:auto; }
.bwd-entry-content { font-size:1.08rem; line-height:1.75; max-width:78ch; }
.bwd-entry-content h2 { margin-top:2.2rem; }
.bwd-entry-content h3 { margin-top:1.7rem; }
.bwd-entry-content img { border-radius:var(--radius-md); }
.bwd-entry-content blockquote { margin:1.5rem 0; padding:1rem 1.25rem; border-left:5px solid var(--color-cyan); background:var(--color-tint); }
.bwd-entry-content ul,.bwd-entry-content ol { padding-left:1.4rem; }
.bwd-entry-content table { width:100%; border-collapse:collapse; margin:1.5rem 0; }
.bwd-entry-content th,.bwd-entry-content td { border:1px solid var(--color-line); padding:.7rem; text-align:left; }
.bwd-entry-content pre { overflow:auto; padding:1rem; background:#06163a; color:#eaf2ff; border-radius:var(--radius-md); }
.bwd-entry-content .wp-caption { max-width:100%; }
.bwd-entry-content .aligncenter { margin-inline:auto; }

.bwd-emergency-box {
  position:sticky; top:calc(var(--header-h) + 20px);
  background:linear-gradient(180deg,#fff7ed 0%,#fff 100%);
  border:2px solid var(--color-call); border-top:7px solid var(--color-call);
  border-radius:var(--radius-md); padding:1.5rem; box-shadow:0 12px 30px rgba(194,65,12,.14);
}
.bwd-emergency-badge { display:inline-block; background:var(--color-call); color:#fff; border-radius:999px; padding:.3rem .65rem; font:800 .78rem var(--font-display); letter-spacing:.05em; text-transform:uppercase; margin-bottom:.75rem; }
.bwd-emergency-box h2 { font-size:1.55rem; margin-bottom:.55rem; color:var(--color-primary); }
.bwd-emergency-box p { color:var(--color-muted); }
.bwd-emergency-phone { display:block; font:800 clamp(1.65rem,1.2rem + 1vw,2.15rem) var(--font-display); color:var(--color-call); text-decoration:none; margin:.6rem 0 1rem; overflow-wrap:anywhere; }
.bwd-emergency-phone:hover { color:var(--color-call-dark); }
.bwd-emergency-box .bwd-btn { width:100%; }
.bwd-emergency-note { margin-top:1rem; padding-top:1rem; border-top:1px solid var(--color-line); font-size:.9rem; color:var(--color-muted); }

/* Footer: values copied from the supplied main-site design system. */
.bwd-site-footer { background:#06163a; color:#b9c8e4; font-size:.98rem; padding:var(--space-5) 0 calc(var(--space-3) + var(--callbar-h)); }
.bwd-footer-grid { display:grid; gap:var(--space-4); }
.bwd-footer-brand .bwd-logo-plate { display:inline-block; background:#fff; border-radius:var(--radius-md); padding:.75rem 1rem; }
.bwd-footer-brand img { width:200px; height:auto; aspect-ratio:480/213; }
.bwd-footer-brand p { margin-top:1rem; max-width:40ch; }
.bwd-site-footer h2 { font:700 1.05rem var(--font-display); color:#fff; margin-bottom:.75rem; }
.bwd-site-footer ul { list-style:none; padding:0; margin:0; }
.bwd-site-footer li { margin:0; }
.bwd-site-footer a { color:#d6e2f7; text-decoration:none; display:inline-flex; min-height:34px; align-items:center; }
.bwd-site-footer a:hover { color:#fff; text-decoration:underline; }
.bwd-footer-phone { gap:.5rem; font:800 1.4rem var(--font-display); color:#fff !important; }
.bwd-footer-bottom { border-top:1px solid rgba(255,255,255,.12); margin-top:var(--space-4); padding-top:var(--space-3); display:flex; flex-wrap:wrap; gap:.5rem 1.5rem; justify-content:space-between; font-size:.88rem; }
.bwd-footer-bottom p { margin:0; }
.bwd-disclaimer { border-top:1px solid rgba(255,255,255,.12); margin-top:var(--space-4); padding-top:var(--space-3); font-size:.82rem; line-height:1.55; color:#9fb1d1; max-width:100%; }
@media (min-width:760px) { .bwd-footer-grid { grid-template-columns:1.3fr 1fr 1fr; } }
@media (min-width:1100px) { .bwd-footer-grid { grid-template-columns:1.4fr 1fr 1fr .9fr .9fr; } .bwd-site-footer { padding-bottom:var(--space-3); } }

/* Mobile sticky call bar */
.bwd-callbar {
  position:fixed; left:0; right:0; bottom:0; z-index:120; height:var(--callbar-h);
  padding:8px 12px calc(8px + env(safe-area-inset-bottom,0px));
  background:rgba(255,255,255,.96); border-top:1px solid var(--color-line);
  box-shadow:0 -6px 20px -10px rgba(7,27,71,.35);
}
.bwd-callbar a {
  display:flex; align-items:center; justify-content:center; gap:.6rem; height:100%;
  background:var(--color-call); color:#fff; border-radius:999px; text-decoration:none;
  font:800 1.1rem var(--font-display);
}
body { padding-bottom:calc(var(--callbar-h) + env(safe-area-inset-bottom,0px)); }
@media (min-width:1080px) { .bwd-callbar { display:none; } body { padding-bottom:0; } }

@media (max-width:1079px) {
  .bwd-topbar .area-note { display:none; }
  .bwd-topbar .bwd-container { justify-content:center; }
  .bwd-post-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:820px) {
  .bwd-single-grid { grid-template-columns:1fr; }
  .bwd-emergency-box { position:static; order:2; }
}
@media (max-width:640px) {
  .bwd-container { width:min(100% - 2rem,var(--container)); }
  .bwd-post-grid { grid-template-columns:1fr; }
  .bwd-blog-hero { padding:2.5rem 0 3.5rem; }
  .bwd-blog-hero h1 { font-size:2.35rem; }
  .bwd-single-wrap { padding:3rem 0; }
  .bwd-entry-title { font-size:2.2rem; }
}
@media (prefers-reduced-motion:reduce) { *,*:before,*:after { transition:none !important; animation:none !important; scroll-behavior:auto !important; } }
@media print { .bwd-callbar,.bwd-site-header,.bwd-topbar { display:none; } }
