/* =========================================================
   CERTIFICATIONS (PRO) — MAX HIGH-END
   Keep your HTML exactly as-is.

   What this does:
   - Ultra-premium section backdrop (subtle navy wash + grain)
   - Cards feel “luxury”: layered surface, crisp border, soft depth
   - Left lane becomes a hero “credential showcase” (NO box)
   - Images get BIG, float, and read as the selling point
   - Typography NEVER breaks mid-word (no cheap cuts)
   - Hover feels expensive (lift + light sweep + lane glow)

   NOTE: This replaces your existing certsPro CSS.
========================================================= */

/* =========================================================
   TOKENS
========================================================= */
:root{
  --gold: #cd9a26;
  --navy: #2c3a50;

  --ink: #0b0f17;
  --muted: rgba(11,15,23,.70);

  --line: rgba(44, 58, 80,.14);
  --line2: rgba(44, 58, 80,.10);

  --r-xl: 24px;
  --r-lg: 18px;

  --shadow-1: 0 10px 24px rgba(11,15,23,.06);
  --shadow-2: 0 22px 70px rgba(11,15,23,.12);
  --shadow-3: 0 32px 90px rgba(11,15,23,.16);
}

/* =========================================================
   SECTION (premium wash + grain)
========================================================= */
.certsPro{
  position: relative;
  background: #fff;
  color: var(--ink);
  padding: clamp(56px, 7vw, 96px) 0;
  overflow: hidden;
}

/* Navy + gold ambient lighting (very subtle) */
.certsPro::before{
  content:"";
  position:absolute;
  inset:-180px;
  background:
    radial-gradient(1000px 520px at 12% 18%, rgba(44, 58, 80,.10), transparent 62%),
    radial-gradient(820px 520px at 84% 62%, rgba(205, 154, 38,.10), transparent 60%),
    linear-gradient(180deg, #fff, #fff);
  pointer-events:none;
}

/* Soft grain texture */
.certsPro::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 18% 24%, rgba(11,15,23,.06), transparent 50%),
    radial-gradient(circle at 82% 66%, rgba(11,15,23,.05), transparent 52%),
    radial-gradient(circle at 44% 88%, rgba(11,15,23,.045), transparent 55%);
  opacity:.16;
  mix-blend-mode:multiply;
  pointer-events:none;
}

.certsPro__inner{
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(18px, 3.4vw, 44px);
}

.certsPro__head{
  max-width: 78ch;
  margin-bottom: clamp(18px, 2.2vw, 26px);
}

.certsPro__title{
  margin: 0 0 10px;
  letter-spacing: -.028em;
  line-height: 1.05;
  font-size: clamp(1.95rem, 3.1vw, 2.7rem);
  display: inline-block;
  position: relative;
}

/* High-end underline (not a bar on cards) */
.certsPro__title::after{
  content:"";
  display:block;
  width: clamp(96px, 11vw, 160px);
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), rgba(205, 154, 38,.20));
  margin-top: 12px;
}

.certsPro__lede{
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
  font-size: clamp(1.06rem, 1.25vw, 1.16rem);
}

/* =========================================================
   GRID (premium spacing, no squish)
========================================================= */
.certsPro__grid{
  display:grid;
  gap: clamp(16px, 2vw, 22px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

@media (max-width: 1080px){
  .certsPro__grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  .certsPro__grid{ grid-template-columns: 1fr; }
}

/* =========================================================
   CARD (luxury surface + expensive hover)
========================================================= */
.certProCard{
  position: relative;
  display: grid;

  /* give text room (fix cheap cuts) */
  grid-template-columns: 184px 1fr;
  grid-template-rows: auto auto;
  column-gap: 18px;
  row-gap: 6px;
  align-items: center;

  padding: 16px 16px;
  min-height: 160px;

  border-radius: var(--r-xl);

  /* layered surface */
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.90));
  border: 1px solid rgba(44, 58, 80,.16);
  box-shadow: var(--shadow-1);

  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform .20s ease, box-shadow .20s ease, border-color .20s ease, background .20s ease;
}

/* Remove any card-top gold bars (you said “not it”) */
.certProCard::after{ content:none !important; }

/* subtle inner highlight like high-end UI */
.certProCard{
  background-image:
    radial-gradient(800px 220px at 12% 0%, rgba(255,255,255,.75), transparent 52%),
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.90));
}

.certProCard:hover{
  transform: translateY(-4px);
  border-color: rgba(44, 58, 80,.28);
  box-shadow: var(--shadow-3);
}

.certProCard:focus-visible{
  outline: 3px solid rgba(205, 154, 38,.34);
  outline-offset: 3px;
}

/* =========================================================
   IMAGE LANE — FULL HEIGHT WASH (SELLING POINT)
   - No box around image (lane is the surface)
   - Wash fills entire lane top→bottom (no dead white)
   - Sweep fills entire lane
   - Image can occupy the lane without distortion
========================================================= */
.certProCard__logo{
  grid-row: 1 / -1;
  align-self: stretch;
  justify-self: stretch;

  position: relative;
  overflow: hidden;                 /* clip lane wash + sweep */
  display: grid;
  place-items: center;

  /* keep your spacing */
  padding: 10px 14px 10px 10px;

  /* separation line (clean) */
  border-right: 1px solid rgba(44, 58, 80,.10);
}

/* FULL-LANE wash */
.certProCard__logo::before{
  content:"";
  position:absolute;
  inset: 0;                         /* FULL lane */
  border-radius: 0;                 /* lane is rectangular inside card */
  pointer-events:none;
  z-index: 0;

  /* Full-height premium wash + vignette */
  background:
    linear-gradient(
      180deg,
      rgba(44, 58, 80,.18) 0%,
      rgba(44, 58, 80,.10) 34%,
      rgba(205, 154, 38,.08) 70%,
      rgba(44, 58, 80,.06) 100%
    ),
    radial-gradient(
      120% 120% at 50% 50%,
      rgba(255,255,255,0) 35%,
      rgba(11,15,23,.07) 100%
    );
}

/* FULL-LANE sweep on hover */
.certProCard__logo::after{
  content:"";
  position:absolute;
  inset: 0;                         /* FULL lane */
  border-radius: 0;
  pointer-events:none;
  z-index: 1;

  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255,255,255,.55) 48%,
    transparent 72%
  );

  opacity: 0;
  transform: translateX(-30px);
  transition: opacity .22s ease, transform .22s ease;
}

.certProCard:hover .certProCard__logo::after{
  opacity: .85;
  transform: translateX(26px);
}

/* Big, lane-filling credential image (no distortion) */
.certProCard__logo img{
  position: relative;
  z-index: 2;

  /* lane defines constraints now */
  max-width: none;
  max-height: none;

  width: 100%;
  height: 100%;

  object-fit: contain;
  object-position: center;
  display: block;
}

/* =========================================================
   TEXT — NEVER break mid-word, tighter + richer type
========================================================= */
.certProCard__text{
  min-width: 0;  /* CRITICAL */
  align-self: start;
}

/* NO cheap mid-word breaks */
.certProCard__name,
.certProCard__desc{
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto; /* if it must break, it breaks nicely */
}

.certProCard__name{
  font-weight: 950;
  letter-spacing: -.018em;
  line-height: 1.08;
  font-size: 1.18rem;
  color: rgba(11,15,23,.92);

  /* keep it tidy without chopping letters */
  display: block;
  margin-right: 6px;
}

.certProCard__desc{
  margin-top: 8px;
  color: rgba(11,15,23,.66);
  font-size: 14px;
  line-height: 1.45;
  display: block;
}

/* =========================================================
   MOBILE — keep premium, prevent crowding
========================================================= */
@media (max-width: 560px){
  .certProCard{
    grid-template-columns: 156px 1fr;
    padding: 14px 14px;
    column-gap: 14px;
    min-height: 0;
  }

  .certProCard__logo{
    padding: 10px 12px 10px 10px;
  }

  /* keep same full-lane behavior; only adjust image breathing */
  .certProCard__logo img{
    width: 92%;
    height: 84%;
  }

  .certProCard__link{
    justify-self: start;
  }
}



/* Optional: keep your lane wash behind the image */
.certProCard__logo::before{ z-index: 0 !important; }
.certProCard__logo::after{  z-index: 1 !important; }
.certProCard__logo img{     z-index: 2 !important; }



/* LANE = full-bleed area */
.certProCard__logo{
  padding: 0 !important;          /* lane touches card edges */
  place-items: center !important; /* keep logo centered */
}

/* LOGO = always fully visible (no crop) */
.certProCard__logo img{
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;   /* <— key: NO crop */
  object-position: center !important;
  display: block !important;
}




/* =========================================================
   FIX: logo lane touches the LEFT blue rail + remove lane shading
========================================================= */

/* 1) Make the logo lane bleed into the card padding so it hits the left edge */
.certProCard{
  /* keep your existing padding everywhere else */
  overflow: hidden; /* already true, but ensure lane bleed clips clean */
}

.certProCard__logo{
  /* pull the lane out to the card edges (removes the 16px inset) */
  margin: -16px 0 -16px -10px !important;  /* top right bottom left */
  padding: 0 !important;

  /* keep the divider line on the right side of the lane */
  border-right: 1px solid rgba(44, 58, 80,.10) !important;

  /* no background tint behind the image */
  background: transparent !important;
}

/* 2) Remove ALL lane shading + sweep (you said none) */
.certProCard__logo::before,
.certProCard__logo::after{
  content: none !important;
  background: none !important;
}

/* 3) Keep logo fully visible (cropping) */
.certProCard__logo img{
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;  /* never cut off */
  object-position: center !important;
  display: block !important;
}

/* PROJECT SECTION */

/* =========================================================
   CASE STUDIES — RECENT PROJECTS SECTION (Premium Navy/Gold)
   Brand:
     Gold: #cd9a26
     Navy: #2c3a50
========================================================= */

:root{
  --cs-ink: #0b0f17;
  --cs-muted: rgba(11,15,23,.72);
  --cs-faint: rgba(11,15,23,.10);
  --cs-line: rgba(11,15,23,.12);

  --cs-white: #fff;
  --cs-navy: #2c3a50;
  --cs-gold: #cd9a26;

  --cs-wrap: clamp(18px, 3.4vw, 44px);
  --cs-max: 1240px;

  --cs-radius-xl: 26px;
  --cs-radius-lg: 18px;
  --cs-radius-md: 14px;

  --cs-shadow: 0 20px 70px rgba(11,15,23,.10);
  --cs-shadow-soft: 0 14px 40px rgba(11,15,23,.08);

  --cs-ease: cubic-bezier(.2,.8,.2,1);
}

/* Section shell */
.csSection{
  background: #fff;
  color: var(--cs-ink);
  padding: clamp(54px, 7vw, 96px) 0;
}

.csWrap{
  max-width: var(--cs-max);
  margin: 0 auto;
  padding: 0 var(--cs-wrap);
}

/* Header */
.csHead{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}

.csKicker{
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--cs-navy);
}

.csKicker::before{
  content:"";
  width: 44px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cs-gold), var(--cs-navy));
}

.csTitle{
  margin: 0;
  font-size: clamp(1.8rem, 2.8vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: -.02em;
}

.csSub{
  margin: 10px 0 0;
  max-width: 70ch;
  color: var(--cs-muted);
  line-height: 1.55;
  grid-column: 1 / -1;
}

/* Controls */
.csControls{
  display: inline-flex;
  gap: 10px;
  align-self: center;
  justify-self: end;
}

.csBtn{
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--cs-line);
  background: #fff;
  color: var(--cs-navy);
  box-shadow: 0 10px 28px rgba(11,15,23,.08);
  cursor: pointer;
  transition: transform .18s var(--cs-ease), border-color .18s var(--cs-ease), box-shadow .18s var(--cs-ease);
  font-size: 22px;
  line-height: 1;
}

.csBtn:hover{
  transform: translateY(-1px);
  border-color: rgba(44, 58, 80,.35);
  box-shadow: 0 16px 42px rgba(11,15,23,.12);
}

.csBtn:active{ transform: translateY(0px); }

.csBtn:focus-visible{
  outline: 3px solid rgba(205, 154, 38,.35);
  outline-offset: 2px;
}

/* Track: premium scroll-snap carousel (works great for 3-up like screenshot) */
.csTrack{
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 1fr);
  gap: 18px;

  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding: 6px;
  padding: 6px 2px 2px;

  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(44, 58, 80,.25) transparent;
}

.csTrack::-webkit-scrollbar{ height: 10px; }
.csTrack::-webkit-scrollbar-thumb{
  background: rgba(44, 58, 80,.25);
  border-radius: 999px;
}
.csTrack::-webkit-scrollbar-track{ background: transparent; }

@media (min-width: 980px){
  .csTrack{
    grid-auto-columns: calc((100% - 36px) / 3); /* 3 cards visible */
  }
}

/* Card */
.csCard{
  scroll-snap-align: start;
  border: 1px solid var(--cs-line);
  border-radius: var(--cs-radius-lg);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--cs-shadow-soft);
  transition: transform .22s var(--cs-ease), box-shadow .22s var(--cs-ease), border-color .22s var(--cs-ease);
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
}

.csCard:hover{
  transform: translateY(-3px);
  box-shadow: var(--cs-shadow);
  border-color: rgba(44, 58, 80,.28);
}

/* .csMedia{
  position: relative;
  aspect-ratio: 16/10;
  background: linear-gradient(180deg, rgba(44, 58, 80,.08), rgba(11,15,23,.02));
  overflow: hidden;
} */

.csMedia{
  display: block;
  text-decoration: none;
  color: inherit;
}

.csMedia img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform .55s var(--cs-ease), filter .55s var(--cs-ease);
}

.csCard:hover .csMedia img{
  transform: scale(1.06);
  filter: saturate(1.06) contrast(1.05);
}

/* Premium corner accent */
.csBadge{
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(44, 58, 80,.16);
  color: var(--cs-navy);
  font-weight: 800;
  font-size: 12px;
  box-shadow: 0 14px 34px rgba(11,15,23,.10);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.csDot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--cs-gold);
  box-shadow: 0 0 0 4px rgba(205, 154, 38,.20);
}

/* Content */
.csBody{
  padding: 16px 16px 18px;
  display: grid;
  gap: 10px;
}

.csH3{
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.2;
  letter-spacing: -.01em;
}

.csH3 a{
  color: var(--cs-navy);
  text-decoration: none;
}

.csH3 a:hover{ text-decoration: underline; text-decoration-thickness: 2px; }

.csMeta{
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
  color: var(--cs-muted);
  font-size: 0.95rem;
}

.csMeta .pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(44, 58, 80,.14);
  background: rgba(44, 58, 80,.03);
  color: rgba(44, 58, 80,.92);
  font-weight: 800;
  font-size: 12px;
}

.csExcerpt{
  color: var(--cs-muted);
  line-height: 1.55;
  margin: 2px 0 0;
}

.csRead{
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cs-navy);
  font-weight: 900;
  text-decoration: none;
}

.csRead .arrow{
  width: 34px; height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(205, 154, 38,.55);
  background: linear-gradient(180deg, rgba(205, 154, 38,.14), rgba(205, 154, 38,.06));
  color: var(--cs-navy);
  transition: transform .18s var(--cs-ease);
}

.csCard:hover .csRead .arrow{ transform: translateX(2px); }

/* Footer link */
.csFoot{
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
}

.csAll{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: var(--cs-navy);
  text-decoration: none;
  padding: 10px 0;
}
.csAll:hover{ text-decoration: underline; text-decoration-thickness: 2px; }

/* Optional divider */
.csDivider{
  height: 1px;
  width: min(1240px, calc(100% - 2*var(--cs-wrap)));
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, rgba(44, 58, 80,.20), rgba(205, 154, 38,.35), rgba(44, 58, 80,.20), transparent);
}


/* =========================================================
   CASE STUDIES — TIGHT MODE (fit section in one screen)
   Paste AFTER your existing projects-section.css
========================================================= */

/* 1) Reduce section vertical padding */
.csSection{
  padding: clamp(28px, 3.8vw, 56px) 0; /* was 54–96 */
}

/* 2) Reduce header spacing */
.csHead{
  gap: 12px;              /* was 18 */
  margin-bottom: 12px;    /* was 18 */
}

.csKicker{
  margin-bottom: 2px;     /* tighten */
}

.csTitle{
  font-size: clamp(1.55rem, 2.2vw, 2.05rem); /* slightly smaller */
}

.csSub{
  margin-top: 6px;        /* was 10 */
  line-height: 1.45;      /* tighter */
  max-width: 66ch;
}

/* Controls slightly smaller */
.csBtn{
  width: 40px;
  height: 40px;
  font-size: 20px;
}

/* 3) Make images shorter (major height savings) */
.csMedia{
  aspect-ratio: 16/8.6;   /* was 16/10; shorter card top */
}

/* 4) Tighten card internals */
.csBody{
  padding: 12px 14px 14px; /* was 16/16/18 */
  gap: 8px;                /* was 10 */
}

.csH3{
  font-size: 1.02rem;      /* slightly smaller */
  line-height: 1.18;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;   /* keep title from getting tall */
  overflow: hidden;
}

.csMeta{
  gap: 8px 10px;           /* was 10 12 */
  font-size: 0.92rem;
}

.csMeta .pill{
  padding: 5px 9px;        /* smaller pills */
  font-size: 11.5px;
}

.csExcerpt{
  line-height: 1.45;
  margin-top: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;   /* clamp excerpt */
  overflow: hidden;
}

/* Make the Read more row tighter */
.csRead{
  margin-top: 0;
  gap: 8px;
}

.csRead .arrow{
  width: 30px;
  height: 30px;
}

/* Track padding smaller */
.csTrack{
  padding: 4px 2px 2px;  /* was 6px */
  gap: 14px;             /* was 18 */
}

/* Footer tighter */
.csFoot{
  margin-top: 10px;      /* was 18 */
}

/* Optional: hide divider to save a little vertical space */
.csDivider{ display: none; }

/* On small screens: keep it compact but readable */
@media (max-width: 520px){
  .csSub{ display: none; } /* optional: hide description on very small screens */
  .csMedia{ aspect-ratio: 16/9.2; }
}


/* =========================================================
   NAVY ACCENT for the home certifications section
   Introduces the brand navy so the section flows with the
   rest of the page (navy band + navy heading + gold rule).
========================================================= */
.certsPro{
  background:
    linear-gradient(180deg, rgba(44,58,80,0.06), rgba(44,58,80,0)) ,
    #fff;
  border-top: 4px solid #2c3a50;
}
.certsPro .certsPro__title{ color: #2c3a50; }

/* =========================================================
   ROW-GROUPED LAYOUT (round 2)
   Fixed rows regardless of card count:
     Row 1 — BBB + Best Pros In Town
     Row 2 — Trex (+ RainEscape) + TimberTech
     Row 3 — CertainTeed 5-Star + ShingleMaster
   Cards run a touch smaller than the default grid.
========================================================= */
.certsPro__grid{
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.8vw, 20px);
}
.certsPro__row{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(14px, 1.8vw, 20px);
}
.certsPro__row > .certProCard{
  flex: 1 1 300px;
  max-width: 360px;
  min-height: 132px;              /* was 160 */
  grid-template-columns: 138px 1fr;  /* logo lane a touch narrower (was 184) */
  padding: 12px 14px;
}
/* Text badge shown when a credential has no logo image */
.certProCard__mono{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 92px;
  border-radius: 12px;
  background: rgba(44, 58, 80, 0.06);
  border: 1px solid rgba(44, 58, 80, 0.14);
  color: #2c3a50;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: clamp(13px, 2.4vw, 16px);
}
@media (max-width: 640px){
  .certsPro__row > .certProCard{ flex-basis: 100%; max-width: 460px; }
}
