/*
Theme Name: HelpfulHub Blue Red Child
Template: kadence
Version: 1.0.0
Description: Dynamic car-focused homepage and consistent header/footer templates for HelpfulHub.
Author: OpenAI
*/

:root{
  --hh-blue:#0f3fae;
  --hh-blue-dark:#081b49;
  --hh-red:#e33b46;
  --hh-bg:#f4f7fb;
  --hh-card:#ffffff;
  --hh-text:#14213d;
  --hh-muted:#64748b;
  --hh-border:#d9e2ef;
  --hh-radius:18px;
  --hh-shadow:0 10px 30px rgba(15,30,70,.08);
}

html,body{background:var(--hh-bg); color:var(--hh-text);}
body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;}
img{max-width:100%;height:auto;display:block;}
a{text-decoration:none;}
.site{overflow-x:hidden;}

.hh-wrap{width:min(1240px,calc(100% - 32px));margin:0 auto;}
.hh-top-strip{height:6px;background:linear-gradient(90deg,var(--hh-red),var(--hh-blue));}

/* Header */
.hh-header{background:#fff;border-bottom:1px solid var(--hh-border);}
.hh-header-inner{width:min(1240px,calc(100% - 32px));margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:24px;padding:18px 0;}
.hh-brand{display:flex;align-items:center;gap:14px;min-width:0;}
.hh-brand img{max-height:70px;width:auto;}
.hh-brand-text{line-height:1.1;}
.hh-brand-title{font-size:18px;font-weight:800;color:var(--hh-text);display:block;}
.hh-brand-sub{font-size:13px;color:var(--hh-muted);display:block;margin-top:4px;}
.hh-nav ul{list-style:none;display:flex;align-items:center;gap:8px;margin:0;padding:0;}
.hh-nav li{position:relative;}
.hh-nav a{display:block;padding:10px 12px;font-size:15px;font-weight:600;color:var(--hh-text);border-radius:10px;}
.hh-nav a:hover{background:#eef4ff;color:var(--hh-blue);}
.hh-nav .menu-item-has-children > a::after{content:'▾';font-size:11px;margin-left:6px;opacity:.7;}
.hh-nav .sub-menu{position:absolute;left:0;top:100%;min-width:220px;padding:10px;margin:8px 0 0;list-style:none;background:#fff;border:1px solid var(--hh-border);border-radius:14px;box-shadow:var(--hh-shadow);display:none;z-index:99;}
.hh-nav .menu-item-has-children:hover > .sub-menu{display:block;}
.hh-nav .sub-menu a{padding:10px 12px;font-size:14px;font-weight:500;}
.hh-nav-toggle{display:none;}

/* Footer */
.hh-footer{background:linear-gradient(180deg,#061836,#041127);color:#f8fbff;margin-top:48px;}
.hh-footer-inner{width:min(1240px,calc(100% - 32px));margin:0 auto;padding:46px 0 28px;}
.hh-footer-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:48px;}
.hh-footer h4{margin:0 0 16px;font-size:16px;color:#fff;}
.hh-footer p,.hh-footer li,.hh-footer a{font-size:15px;line-height:1.7;color:#dbe7ff;}
.hh-footer ul{list-style:none;margin:0;padding:0;display:grid;gap:10px;}
.hh-footer a:hover{color:#fff;}
.hh-footer-bottom{margin-top:28px;padding-top:18px;border-top:1px solid rgba(255,255,255,.12);display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap;color:#dbe7ff;font-size:14px;}

/* Homepage */
.hh-home{padding:28px 0 8px;}
.hh-hero{display:grid;grid-template-columns:minmax(0,1.8fr) 360px;gap:22px;align-items:start;}
.hh-card{background:var(--hh-card);border:1px solid var(--hh-border);border-radius:var(--hh-radius);box-shadow:var(--hh-shadow);overflow:hidden;}
.hh-featured-thumb,.hh-side-thumb,.hh-section-thumb,.hh-mini-label{background:linear-gradient(135deg,#39b6ff,#25c37d);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800;letter-spacing:.04em;}
.hh-featured-thumb{min-height:330px;font-size:32px;}
.hh-card-body{padding:20px 22px 24px;}
.hh-badge{display:inline-flex;align-items:center;padding:6px 11px;border-radius:999px;background:#edf7ff;color:#1482c4;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;}
.hh-featured-title{font-size:26px;line-height:1.18;margin:14px 0 10px;font-weight:800;}
.hh-featured-title a{color:var(--hh-text);}
.hh-meta{font-size:13px;color:var(--hh-muted);margin:0 0 12px;}
.hh-excerpt{font-size:16px;line-height:1.7;color:#55657f;margin:0;}

.hh-side-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;}
.hh-side-story .hh-side-thumb{min-height:118px;font-size:24px;}
.hh-side-story .hh-card-body{padding:16px 16px 18px;}
.hh-side-story h3{font-size:16px;line-height:1.35;margin:10px 0 8px;font-weight:800;}
.hh-side-story h3 a{color:var(--hh-text);}
.hh-chip{display:inline-flex;padding:5px 9px;border-radius:999px;background:#edf7ff;color:#1482c4;font-size:11px;font-weight:800;text-transform:uppercase;}

.hh-breaking{margin:22px 0;padding:16px 18px;border-radius:16px;background:linear-gradient(90deg,#071839,#06224f);color:#fff;display:flex;align-items:center;gap:14px;}
.hh-breaking-label{background:var(--hh-red);padding:7px 11px;border-radius:10px;font-size:12px;font-weight:800;text-transform:uppercase;}
.hh-breaking p{margin:0;font-size:15px;line-height:1.6;}

.hh-main-grid{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:22px;align-items:start;}
.hh-section{margin-top:24px;}
.hh-section-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px;}
.hh-section-head h2{margin:0;font-size:20px;font-weight:800;padding-left:14px;position:relative;}
.hh-section-head h2::before{content:'';position:absolute;left:0;top:2px;bottom:2px;width:4px;border-radius:6px;background:linear-gradient(180deg,#1aa3ff,var(--hh-blue));}
.hh-section-link{font-size:14px;font-weight:700;color:#1788d1;}
.hh-grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;}
.hh-grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;}
.hh-post-card .hh-section-thumb{min-height:140px;font-size:26px;}
.hh-post-card h3{font-size:16px;line-height:1.4;margin:12px 0 8px;font-weight:800;}
.hh-post-card h3 a{color:var(--hh-text);}

.hh-tech-layout{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(260px,.7fr);gap:18px;}
.hh-tech-main .hh-section-thumb{min-height:240px;font-size:32px;}
.hh-tech-main h3{font-size:18px;line-height:1.35;margin:12px 0 8px;font-weight:800;}
.hh-mini-list{display:grid;gap:12px;}
.hh-mini-post{display:grid;grid-template-columns:88px 1fr;gap:12px;background:#fff;border:1px solid var(--hh-border);border-radius:16px;overflow:hidden;box-shadow:var(--hh-shadow);}
.hh-mini-label{min-height:100%;font-size:14px;padding:14px;text-align:center;}
.hh-mini-copy{padding:14px 14px 14px 0;}
.hh-mini-copy h4{margin:0 0 6px;font-size:15px;line-height:1.35;font-weight:800;}
.hh-mini-copy h4 a{color:var(--hh-text);}

/* Sidebar widgets */
.hh-sidebar{display:grid;gap:18px;}
.hh-widget{background:#fff;border:1px solid var(--hh-border);border-radius:18px;box-shadow:var(--hh-shadow);padding:18px;}
.hh-widget h3{margin:0 0 14px;font-size:18px;font-weight:800;color:var(--hh-text);}
.hh-search{display:flex;gap:8px;}
.hh-search input{flex:1;border:1px solid var(--hh-border);border-radius:12px;padding:12px 14px;font-size:14px;}
.hh-search button{border:0;background:linear-gradient(135deg,var(--hh-blue),#2758d6);color:#fff;border-radius:12px;padding:0 16px;font-weight:700;}
.hh-list{list-style:none;margin:0;padding:0;display:grid;gap:10px;}
.hh-list a{color:#2563eb;font-size:15px;line-height:1.45;}
.hh-calendar{border:1px solid #edf1f6;border-radius:16px;padding:14px;box-shadow:0 10px 20px rgba(0,0,0,.03);}
.hh-calendar-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;}
.hh-calendar-month{font-size:18px;font-weight:900;letter-spacing:.05em;color:var(--hh-blue-dark);}
.hh-calendar-year{font-size:14px;font-weight:900;color:var(--hh-red);}
.hh-calendar-days,.hh-calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:8px;}
.hh-calendar-days span{font-size:10px;font-weight:800;color:#7a8ba3;text-align:center;}
.hh-calendar-grid span{display:flex;align-items:center;justify-content:center;height:34px;border:1px solid #edf1f6;border-radius:10px;font-size:14px;color:var(--hh-text);background:#fff;}
.hh-calendar-grid .empty{visibility:hidden;}
.hh-calendar-grid .today{background:var(--hh-red);border-color:var(--hh-red);color:#fff;font-weight:800;}

/* Single + page */
.hh-content-wrap{padding:28px 0 8px;}
.hh-single-grid{width:min(980px,100%);margin:0 auto;}
.hh-article{background:#fff;border:1px solid var(--hh-border);border-radius:22px;box-shadow:var(--hh-shadow);overflow:hidden;}
.hh-article-thumb img{width:100%;height:auto;display:block;}
.hh-article-body{padding:30px;}
.hh-article-body h1{font-size:clamp(32px,4vw,48px);line-height:1.14;margin:10px 0 14px;font-weight:900;}
.hh-entry{font-size:17px;line-height:1.85;color:#34435b;}
.hh-entry h2,.hh-entry h3{color:var(--hh-text);margin-top:28px;}
.hh-post-nav{width:min(980px,100%);margin:22px auto 0;display:grid;grid-template-columns:1fr 1fr;gap:20px;}
.hh-navbox{background:#fff;border:1px solid var(--hh-border);border-radius:16px;padding:18px;box-shadow:var(--hh-shadow);}
.hh-navbox small{display:block;color:var(--hh-muted);text-transform:uppercase;font-weight:800;margin-bottom:6px;}
.hh-recent-strip{width:min(980px,100%);margin:26px auto 0;}
.hh-recent-strip h2{margin:0 0 16px;font-size:18px;font-weight:800;padding-left:14px;position:relative;}
.hh-recent-strip h2::before{content:'';position:absolute;left:0;top:2px;bottom:2px;width:4px;border-radius:6px;background:linear-gradient(180deg,#1aa3ff,var(--hh-blue));}
.hh-recent-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;}
.hh-recent-card{background:#fff;border:1px solid var(--hh-border);border-radius:18px;overflow:hidden;box-shadow:var(--hh-shadow);}
.hh-recent-card img{width:100%;height:180px;object-fit:cover;}
.hh-recent-card-body{padding:16px;}
.hh-comments{width:min(980px,100%);margin:26px auto 0;background:#fff;border:1px solid var(--hh-border);border-radius:18px;padding:22px;box-shadow:var(--hh-shadow);}

/* WordPress alignment */
.hh-entry .alignwide,.hh-entry .alignfull{margin-left:auto!important;margin-right:auto!important;}

/* Hide default theme chrome when custom templates active */
body.home .site-main-header-wrap,
body.home .site-footer,
body.page-template-default .site-main-header-wrap,
body.page-template-default .site-footer,
body.single-post .site-main-header-wrap,
body.single-post .site-footer{display:none!important;}

/* Responsive */
@media (max-width: 1100px){
  .hh-hero,.hh-main-grid{grid-template-columns:1fr;}
  .hh-side-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width: 820px){
  .hh-header-inner{padding:14px 0;align-items:flex-start;flex-direction:column;}
  .hh-nav{width:100%;overflow-x:auto;}
  .hh-nav ul{min-width:max-content;}
  .hh-grid-3,.hh-grid-2,.hh-side-grid,.hh-recent-grid,.hh-tech-layout{grid-template-columns:1fr;}
  .hh-footer-grid{grid-template-columns:1fr;gap:26px;}
  .hh-footer-bottom{flex-direction:column;align-items:flex-start;}
}
