/* ============================================================
   "Our Latest Blogs" (include/latest-blogs.php) — every page.
   Each card is fully clickable: the title link is stretched over
   the card. Colours and alignment are explicit because some pages
   ship bare h2/h3/p/a rules.
   ============================================================ */

.lb-wrap{
  --lb-ink:#0a1633; --lb-text:#3b4a63; --lb-muted:#5b6a86; --lb-line:#e3ebf6;
  align-self:stretch; width:100%; box-sizing:border-box;   /* some pages make <body> a centred flex column */
  padding:88px 24px 84px; text-align:center;
  background:radial-gradient(800px 360px at 10% 0%, #e7f0ff 0%, transparent 60%), linear-gradient(180deg,#f6f9ff 0%,#ffffff 100%);
  font-family:'Inter','Segoe UI',system-ui,-apple-system,sans-serif;
}
.lb-wrap *, .lb-wrap *::before, .lb-wrap *::after{ box-sizing:border-box; }
.lb-head{ max-width:780px; margin:0 auto 46px; }
.lb-head .lb-kicker{ margin:0 0 10px; color:#ff7b06; font-size:13px; font-weight:800; letter-spacing:2.5px; text-transform:uppercase; text-align:center; }
.lb-wrap h2{ margin:0; padding:0; color:var(--lb-ink); font-size:clamp(28px,3.4vw,42px); font-weight:800; line-height:1.15; letter-spacing:-.5px; text-align:center; }
.lb-wrap h2 span{ background:linear-gradient(120deg,#0b6fe0 0%,#00a9c4 100%); -webkit-background-clip:text; background-clip:text; color:transparent; }
.lb-wrap h2::after{ content:''; display:block; width:72px; height:4px; margin:18px auto 0; border-radius:4px; background:linear-gradient(120deg,#002357,#0b8cff); }
.lb-head .lb-lead{ margin:18px auto 0; max-width:680px; color:var(--lb-muted); font-size:16.5px; line-height:1.75; text-align:center; }

.lb-grid{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:26px; max-width:1240px; margin:0 auto; text-align:left; }
.lb-card{
  position:relative; display:flex; flex-direction:column; overflow:hidden; background:#fff;
  border:1px solid var(--lb-line); border-radius:22px; box-shadow:0 14px 34px rgba(10,22,51,.08);
  transition:translate .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s, border-color .35s;
}
.lb-card:hover, .lb-card:focus-within{ translate:0 -8px; box-shadow:0 26px 54px rgba(10,22,51,.15); border-color:rgba(11,140,255,.35); }

/* cover: colour + icon per category */
.lb-cover{ position:relative; isolation:isolate; height:170px; display:grid; place-items:center; overflow:hidden; color:#fff; }
.lb-cover::before{
  content:''; position:absolute; inset:0; z-index:-1; opacity:.5;
  background:radial-gradient(rgba(255,255,255,.28) 1px, transparent 1.3px) 0 0/20px 20px;
  -webkit-mask-image:radial-gradient(circle at 50% 50%, #000 0%, transparent 75%); mask-image:radial-gradient(circle at 50% 50%, #000 0%, transparent 75%);
}
.lb-cover::after{ content:''; position:absolute; width:220px; height:220px; right:-70px; bottom:-90px; border-radius:50%; background:rgba(255,255,255,.12); z-index:-1; }
.lb-cover i{
  width:78px; height:78px; display:grid; place-items:center; border-radius:22px; font-size:32px;
  background:rgba(255,255,255,.16); border:1px solid rgba(255,255,255,.3); box-shadow:0 14px 30px rgba(0,10,40,.25);
  transition:transform .5s cubic-bezier(.2,.7,.2,1);
}
.lb-card:hover .lb-cover i{ transform:scale(1.08) rotate(-4deg); }
/* photo cover (image/blog/<slug>.webp) with a small category badge */
.lb-cover-img{ height:auto; aspect-ratio:16/9; display:block; background:#fff; }
.lb-cover-img::before, .lb-cover-img::after{ display:none; }
.lb-cover-img img{ display:block; width:100%; height:100%; object-fit:cover; transition:transform .7s cubic-bezier(.2,.7,.2,1); }
.lb-card:hover .lb-cover-img img{ transform:scale(1.06); }
.lb-badge{
  position:absolute; left:16px; bottom:16px; z-index:2; width:44px; height:44px; display:grid; place-items:center;
  border-radius:14px; color:#fff; font-size:18px; border:3px solid #fff; box-shadow:0 10px 22px rgba(10,22,51,.2);
  background:inherit;
}
.lb-cover-img{ overflow:hidden; border-bottom:1px solid var(--lb-line); }
/* the badge's icon must not pick up the big fallback icon styles (.lb-cover i) */
.lb-cover-img .lb-badge i{ width:auto; height:auto; display:inline; font-size:18px; border:0; border-radius:0; background:none; box-shadow:none; transform:none !important; }

.lb-t-cost{  background:linear-gradient(135deg,#0b8cff 0%,#00b4c8 100%); }
.lb-t-tech{  background:linear-gradient(135deg,#021a44 0%,#0b5fd6 100%); }
.lb-t-buyer{ background:linear-gradient(135deg,#3b2ad9 0%,#0b8cff 100%); }
.lb-t-seo{   background:linear-gradient(135deg,#0c8f6c 0%,#22c0a0 100%); }

.lb-body{ display:flex; flex-direction:column; flex:1; padding:24px 26px 26px; }
.lb-cat{
  align-self:flex-start; margin-bottom:12px; padding:5px 12px; border-radius:999px;
  background:#eef5ff; color:#0b5fd6; font-size:12px; font-weight:800; letter-spacing:.6px; text-transform:uppercase;
}
.lb-card h3{ margin:0 0 10px; padding:0; font-size:19px; font-weight:700; line-height:1.4; text-align:left; }
.lb-card h3 a{ color:var(--lb-ink); text-decoration:none; }
.lb-card h3 a::after{ content:''; position:absolute; inset:0; z-index:1; border-radius:22px; }   /* whole card clickable */
.lb-card h3 a:hover, .lb-card h3 a:focus-visible{ color:#0b5fd6; text-decoration:none; }
.lb-card h3 a:focus-visible{ outline:none; }
.lb-card:focus-within{ outline:2px solid #0b8cff; outline-offset:2px; }
.lb-card p{
  margin:0 0 16px; color:var(--lb-text); font-size:15px; line-height:1.7; text-align:left;
  display:-webkit-box; -webkit-line-clamp:3; line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;
}
.lb-meta{ display:flex; flex-wrap:wrap; gap:6px 16px; margin-top:auto; color:var(--lb-muted); font-size:13.5px; }
.lb-meta i{ color:#0b6fe0; margin-right:3px; }
.lb-more{ display:inline-flex; align-items:center; gap:8px; margin-top:16px; color:#0b5fd6; font-size:15px; font-weight:700; }
.lb-more i{ transition:translate .25s; }
.lb-card:hover .lb-more i{ translate:4px 0; }

.lb-all{ margin-top:40px; text-align:center; }
.lb-all a{
  display:inline-flex; align-items:center; gap:10px; padding:15px 32px; border-radius:14px; text-decoration:none;
  color:#fff; font-size:15.5px; font-weight:700; letter-spacing:.3px;
  background:linear-gradient(120deg,#002357 0%,#0b8cff 100%); box-shadow:0 14px 30px rgba(11,140,255,.32);
  transition:translate .25s, box-shadow .25s;
}
.lb-all a:hover, .lb-all a:focus-visible{ color:#fff; text-decoration:none; translate:0 -3px; box-shadow:0 20px 38px rgba(11,140,255,.42); }

@media (max-width:991px){ .lb-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:640px){
  .lb-wrap{ padding:60px 16px 56px; }
  .lb-head{ margin-bottom:32px; }
  .lb-grid{ grid-template-columns:1fr; gap:18px; }
  .lb-cover:not(.lb-cover-img){ height:140px; } /* image covers keep 16:9 - a fixed 140px cropped their top and bottom */
}
@media (prefers-reduced-motion:reduce){
  .lb-card, .lb-cover i, .lb-more i, .lb-all a{ transition:none; }
  .lb-card:hover, .lb-card:focus-within, .lb-all a:hover{ translate:none; }
  .lb-card:hover .lb-cover i{ transform:none; }
  .lb-card:hover .lb-cover-img img{ transform:none; }
}
