/* Component Crate — Home / landing page (front page only, pure CSS, no JS)
   Palette: Golden Summer Glow
   Navy #0d3b66 · Lemon Chiffon #faf0ca · Royal Gold #f4d35e · Sandy #ee964b · Tomato #f95738 */

/* ---------- hero H1 (the theme entry-title, up-sized for a landing hero) ---------- */
body.home .entry-header .entry-title{
  font-family:'Aldrich',sans-serif;
  font-weight:600;
  font-size:clamp(1.9rem,4.6vw,3rem);
  line-height:1.08;
  color:#0d3b66;
  margin:0 0 .4em;
}
/* lead paragraph (first <p> under the H1) */
body.home .entry-content > p:first-child{
  font-family:'Space Grotesk',sans-serif;
  font-size:clamp(1.02rem,1.9vw,1.28rem);
  line-height:1.6;
  color:#243447;
  max-width:62ch;
  margin:0 0 2.2rem;
}

/* ---------- 4 pillar cards ---------- */
/* Desktop: 4 cards in one horizontal row, each with a fixed max width so they
   "stack horizontally" (user request). When bg-image + dark overlay is added,
   text switches to light-on-dark for legibility. */
.cc-home-pillars{
  display:grid;
  grid-template-columns:repeat(4,1fr);         /* 4 cards horizontal row on desktop */
  gap:14px;
  max-width:1200px;                             /* contain so 4 cards fit without touching viewport edges */
  margin:0 auto 3rem;
}
/* wpautop() injects <br> between/inside the pillar <a> tags in the saved
   post_content. In this grid a <br> is a full grid item occupying its own
   column -> huge gaps + wrapping to a 2x2 "vertical" layout. Kill them. */
.cc-home-pillars br,.cc-home-pillars>br,.cc-pillar br,.cc-chips br{display:none;}
.cc-pillar{
  position:relative;
  display:flex;
  flex-direction:column;
  justify-content:center;                      /* plain (no-image) cards: text vertically centered */
  gap:8px;
  aspect-ratio:1/1;                            /* square cards — user supplies square images */
  background:#fff;
  border:1px solid #e7ddc2;
  border-top:4px solid #0d3b66;
  border-radius:12px;
  padding:16px 14px 14px;
  text-decoration:none;
  min-width:0;
  overflow:hidden;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.cc-pillar:hover{
  transform:translateY(-4px);
  box-shadow:0 12px 26px -14px rgba(13,59,102,.45);
}
/* dark gradient that sits behind the text when a bg-image is present —
   light at the top (image visible) to heavy at the bottom (text zone) */
.cc-pillar.cc-has-img::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  background:linear-gradient(180deg, rgba(13,59,102,.18) 0%, rgba(13,59,102,.5) 52%, rgba(13,59,102,.88) 100%);
  pointer-events:none;
  z-index:1;
}
.cc-pillar.cc-has-img{
  justify-content:flex-end;                    /* image cards: text at the bottom, over the dark zone */
  color:#fff;
}
.cc-pillar.cc-has-img .cc-pillar-desc{color:rgba(255,255,255,.9);}
.cc-pillar.cc-has-img .cc-pillar-name{color:#fff;}
.cc-pillar-name{
  font-family:'Aldrich',sans-serif;
  font-weight:700;
  font-size:1.08rem;
  line-height:1.25;
  color:#0d3b66;
  position:relative;
  z-index:2;
}
.cc-pillar-desc{
  font-family:'Space Grotesk',sans-serif;
  font-weight:700;
  font-size:.78rem;
  line-height:1.4;
  color:#4a5a6d;
  flex:1 1 auto;
  position:relative;
  z-index:2;
}
.cc-pillar,.cc-pillar:hover,.cc-pillar *{text-decoration:none;}   /* the whole card is one clickable link — no underline, ever */
/* per-pillar accents (the image-backed card loses its border-top; the rest keep it) */
.cc-pillar-computers{
  background-image:url("../images/category-computers-laptops.jpg");
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  border-top-color:#0d3b66;
}
.cc-pillar-computers.cc-has-img{border-top-color:#f4d35e;}   /* gold accent stays visible on the dark overlay */
.cc-pillar-peripherals.cc-has-img{
  background-image:url("../images/category-keyboards-peripherals.jpg");
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
}
.cc-pillar-peripherals{border-top-color:#f4d35e;}
.cc-pillar-setup.cc-has-img{
  background-image:url("../images/category-essential-tech-setup.jpg");
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
}
.cc-pillar-setup{border-top-color:#ee964b;}
.cc-pillar-components.cc-has-img{
  background-image:url("../images/category-pc-components.jpg");
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
}
.cc-pillar-components.cc-has-img{color:#fff;}                  /* white text visible on the dark overlay */
.cc-pillar-components{border-top-color:#f95738;}

/* ---------- guide index ---------- */
.cc-home-index{margin:0 0 3rem;}
.cc-home-index > h2{
  font-family:'Aldrich',sans-serif;
  font-weight:600;
  font-size:clamp(1.5rem,3.2vw,2.1rem);
  color:#0d3b66;
  margin:0 0 .3rem;
  padding-left:14px;
  border-left:4px solid #f4d35e;
}
.cc-index-lead{
  font-family:'Space Grotesk',sans-serif;
  color:#4a5a6d;
  font-size:1rem;
  line-height:1.55;
  max-width:60ch;
  margin:0 0 1.8rem;
}
.cc-index-group{margin-bottom:1.5rem;}
.cc-index-group:last-child{margin-bottom:0;}
.cc-index-group > h3{
  font-family:'Aldrich',sans-serif;
  font-weight:600;
  font-size:1.02rem;
  margin:0 0 10px;
}
.cc-index-group > h3 a{color:#0d3b66;text-decoration:none;border-bottom:2px solid #f4d35e;padding-bottom:2px;}
.cc-index-group > h3 a:hover{color:#f95738;}
.cc-chips{display:flex;flex-wrap:wrap;gap:8px;}
.cc-chip{
  font-family:'Space Grotesk',sans-serif;
  font-size:.9rem;
  font-weight:500;
  color:#0d3b66;
  background:#faf0ca;
  border:1px solid #ecdcac;
  border-radius:999px;
  padding:7px 15px;
  text-decoration:none;
  transition:background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}
.cc-chip:hover{background:#0d3b66;color:#faf0ca;border-color:#0d3b66;transform:translateY(-2px);}

/* ---------- Component Reviews block (small cards, separate from guides) ---------- */
.cc-home-reviews{margin:0 0 3rem;}
.cc-home-reviews h2{
  font-family:'Aldrich',sans-serif;
  font-weight:600;
  font-size:1.55rem;
  color:#0d3b66;
  margin:0 0 .5rem;
}
.cc-reviews-lead{
  font-family:'Space Grotesk',sans-serif;
  color:#4a5a6d;
  line-height:1.55;
  max-width:64ch;
  margin:0 0 1.4rem;
  font-size:.98rem;
}
.cc-review-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:12px;
  max-width:1200px;
}
/* wpautop() injects <br> between the mini cards — kill them (same fix as pillars) */
.cc-review-grid br,.cc-review-grid>br,.cc-review-mini br{display:none;}
.cc-review-mini{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:4px;
  background:#fff;
  border:1px solid #e7ddc2;
  border-top:4px solid #f4d35e;
  border-radius:12px;
  padding:14px 14px 12px;
  text-decoration:none;
  min-width:0;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.cc-review-mini:hover{
  transform:translateY(-4px);
  box-shadow:0 12px 26px -14px rgba(13,59,102,.45);
  border-top-color:#f95738;
}
.cc-rm-name{
  font-family:'Aldrich',sans-serif;
  font-weight:700;
  font-size:1rem;
  line-height:1.25;
  color:#0d3b66;
}
.cc-rm-type{
  font-family:'Space Grotesk',sans-serif;
  font-weight:700;
  font-size:.72rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#b85c0d;                                /* darkened sandy: 2.31 -> 4.59 on white (WCAG AA) */
}
.cc-rm-sub{
  font-family:'Space Grotesk',sans-serif;
  font-size:.82rem;
  color:#4a5a6d;
  line-height:1.4;
  flex:1 1 auto;
}
.cc-rm-cta{
  font-family:'Space Grotesk',sans-serif;
  font-size:.82rem;
  font-weight:700;
  color:#d43e1a;                                /* darkened tomato: 3.26 -> 4.66 on white (WCAG AA) */
}
.cc-review-mini:hover .cc-rm-cta{color:#0d3b66;}
.cc-review-mini,.cc-review-mini:hover,.cc-review-mini *{text-decoration:none;}

/* ---------- no underlines on the home cards ----------
   Astra's "underline content links" option prints
   `.ast-single-post .entry-content a { text-decoration: underline }` as inline
   CSS in <head> (specificity 0,2,1). The plain `.cc-pillar` / `.cc-review-mini`
   rules above are only 0,1,0, so they lose and the whole card link ends up
   underlined. These selectors are deliberately more specific (0,3,2) and
   restore plain, fully visible text on the 4 pillar cards and the 8 review
   cards. */
body.home .entry-content a.cc-pillar,
body.home .entry-content a.cc-pillar:hover,
body.home .entry-content a.cc-pillar:focus,
body.home .entry-content a.cc-pillar *,
body.home .entry-content a.cc-review-mini,
body.home .entry-content a.cc-review-mini:hover,
body.home .entry-content a.cc-review-mini:focus,
body.home .entry-content a.cc-review-mini *{
  text-decoration:none;
}

/* ---------- trust box ---------- */
.cc-home-trust{
  background:#faf0ca;
  border:1px solid #ecdcac;
  border-radius:12px;
  padding:26px 28px;
  margin:0;
}
.cc-home-trust h2{
  font-family:'Aldrich',sans-serif;
  font-weight:600;
  font-size:1.35rem;
  color:#0d3b66;
  margin:0 0 .5rem;
}
.cc-home-trust p{font-family:'Space Grotesk',sans-serif;color:#3c4a5a;line-height:1.6;max-width:70ch;}
.cc-trust-links{margin:1rem 0 0 !important;font-size:.95rem;}
.cc-trust-links a{color:#0d3b66;font-weight:600;}
.cc-trust-links a:hover{color:#f95738;}

/* ---------- supplied manufacturer advertising banner ---------- */
body.home .entry-content .cc-home-banner{
  max-width:728px;
  margin:0 auto 2.2rem;
}
body.home .entry-content .cc-home-banner-label{
  display:block;
  color:#526273;
  font-size:.75rem;
  line-height:1.5;
  margin-bottom:4px;
}
body.home .entry-content a.cc-home-banner-link{
  display:block;
  line-height:0;
  text-decoration:none;
}
body.home .entry-content .cc-home-banner-link img{
  display:block;
  width:100%;
  max-width:728px;
  height:auto;
  aspect-ratio:728 / 90;
  margin:0;
  border-radius:0;
}
body.home .entry-content .cc-home-banner-link:focus-visible{
  outline:3px solid #046bd2;
  outline-offset:4px;
}
body.home .entry-content .cc-home-banner-note{
  font-size:.75rem;
  line-height:1.5;
  color:#526273;
  margin:6px 0 0;
}
body.home .entry-content .cc-home-banner br{display:none;}

/* ---------- mobile ---------- */
@media (max-width:781px){
  .cc-home-pillars{grid-template-columns:1fr 1fr;gap:12px;margin-bottom:2.2rem;}
  .cc-pillar{padding:14px 12px 12px;}
  .cc-pillar-name{font-size:1.05rem;}
  .cc-pillar-desc{font-size:.78rem;}
  .cc-review-grid{grid-template-columns:1fr 1fr;}
  .cc-home-reviews h2{font-size:1.35rem;}
  .cc-home-trust{padding:20px;}
}
