/* =====================================================================
   polish.css  -  loaded LAST on every page.
   1. Paragraph alignment (justify) fixes
   2. Service pages  (slope-protection.html, geo-environmental.html)
   3. Blog list + blog posts
   4. Case-study list + case-study pages
   To undo any part, delete its block; nothing else depends on this file.
   ===================================================================== */

:root { --nav-h: 96px; }

/* ---------------------------------------------------------------------
   1. ALIGNMENT  - paragraphs that were left-aligned are now justified.
      (last line stays left so short lines never stretch)
   --------------------------------------------------------------------- */
.gt-struct-card p,
.gt-cta-text p,
.bp-article p.bp-lead,
.bp-article .bp-card p,
.bp-callout p,
.bp-leadin,
.blog-content p,
.sv-list li {
    text-align: justify !important;
    text-align-last: left !important;
    -webkit-hyphens: auto;
    hyphens: auto;
}

/* ---------------------------------------------------------------------
   2. SERVICE PAGES
   --------------------------------------------------------------------- */

/* hero: contour-map texture + offset frame on the photo */
.sv-hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07;
    background: url(../img/contours.svg) center / cover no-repeat;
    filter: invert(1) brightness(.2) sepia(1) hue-rotate(190deg) saturate(6);
}
.sv-hero > .container { position: relative; }
.sv-hero img {
    border-radius: 6px;
    box-shadow: 16px 16px 0 0 rgba(255, 94, 21, .9), 0 24px 48px rgba(0, 22, 89, .22);
    margin-right: 16px; width: calc(100% - 16px);
}

/* sticky stage navigator (built by js/polish.js) */
.sv-rail {
    position: sticky; top: var(--nav-h); z-index: 20;
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px);
    border-bottom: 1px solid #e3e7f1; box-shadow: 0 6px 18px rgba(0, 22, 89, .06);
}
.sv-rail-in {
    display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: none;
    max-width: 1320px; margin: 0 auto; padding: .55rem 1rem;
}
.sv-rail-in::-webkit-scrollbar { display: none; }
.sv-rail a {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: .55rem;
    padding: .5rem .95rem; border-radius: 4px; text-decoration: none; white-space: nowrap;
    font-size: .92rem; font-weight: 500; color: #4a5578; transition: background .2s, color .2s;
}
.sv-rail a b {
    font-family: "Roboto", Arial, sans-serif; font-size: 1rem; color: var(--bs-secondary);
    -webkit-text-stroke: 0; transition: color .2s;
}
.sv-rail a:hover { background: #eef1f9; color: var(--bs-primary); }
.sv-rail a.on { background: var(--bs-primary); color: #fff; }
.sv-rail a.on b { color: #ffb08a; }
.sv-rail-bar { position: absolute; left: 0; bottom: -1px; height: 3px; width: 0; background: var(--bs-secondary); transition: width .15s linear; }

.sv-stage, #faq, #enquiry { scroll-margin-top: calc(var(--nav-h) + 64px); }

/* stage heading: big outlined numeral, same language as the case-study pages */
.sv-stage-head { align-items: flex-end; gap: 1.1rem; margin-bottom: 1rem; }
.sv-stage-head .no {
    display: inline-flex; align-items: baseline; gap: .7rem;
    font-family: "Roboto", Arial, sans-serif; font-weight: 700; text-transform: none; letter-spacing: 0;
    font-size: clamp(3rem, 6vw, 4.6rem); line-height: .9;
    color: transparent; -webkit-text-stroke: 1.6px var(--bs-secondary);
}
.sv-stage-head .no small {
    font: 500 .95rem "Roboto", sans-serif; letter-spacing: 0; text-transform: none;
    color: #5a6483; -webkit-text-stroke: 0;
}
.sv-dark .sv-stage-head .no small { color: rgba(255, 255, 255, .75); }
.sv-stage-head .of { text-transform: none; letter-spacing: 0; font-size: .85rem; padding-bottom: .35rem; }
.sv-stage-head::after { margin-bottom: .6rem; }

/* photos: quiet offset shadow instead of a plain rounded box */
.sv-img { border-radius: 6px; box-shadow: -12px 12px 0 0 rgba(0, 22, 89, .09); }
.sv-dark .sv-img { box-shadow: -12px 12px 0 0 rgba(255, 94, 21, .35); }

/* "what it covers" box: navy title band + tick list */
.sv-box { border: 1px solid #dfe4f0; border-top: 0; border-radius: 6px; padding: 0; overflow: hidden; box-shadow: 0 10px 26px rgba(0, 22, 89, .07); }
.sv-box > h6 {
    margin: 0; padding: .85rem 1.5rem; background: var(--bs-primary); color: #fff;
    text-transform: none; letter-spacing: 0; font-size: 1.02rem; font-weight: 600;
    font-family: "Roboto", Arial, sans-serif; border-bottom: 3px solid var(--bs-secondary);
}
.sv-box > p, .sv-box > .sv-list { padding: 1.2rem 1.5rem 1.35rem; }
.sv-box .sv-list li { padding: .4rem 0 .4rem 2rem; border-bottom: 1px dashed #e6e9f2; }
.sv-box .sv-list li::before {
    content: "\f00c"; left: 0; top: .5rem; width: 1.25rem; height: 1.25rem; border-radius: 50%;
    background: var(--bs-secondary); color: #fff; font-size: .62rem;
    display: flex; align-items: center; justify-content: center;
}

/* output callout */
.sv-out { border-left: 0; border-radius: 6px; background: #fff4ee; position: relative; padding-left: 1.6rem; align-items: center; }
.sv-out::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; border-radius: 6px 0 0 6px; background: var(--bs-secondary); }
.sv-out .k {
    background: var(--bs-secondary); color: #fff; border-radius: 3px; padding: .3rem .7rem;
    letter-spacing: .04em; text-transform: none; font-size: .82rem;
}

/* overview cards: fill navy on hover */
.sv-index a { border-radius: 6px; border-top-width: 4px; position: relative; overflow: hidden; }
.sv-index .n {
    font-family: "Roboto", Arial, sans-serif; font-size: 2rem; line-height: 1; letter-spacing: 0;
    color: transparent; -webkit-text-stroke: 1.2px var(--bs-secondary); display: block; margin-bottom: .35rem;
}
.sv-index a:hover { background: var(--bs-primary); border-color: var(--bs-primary); border-top-color: var(--bs-secondary); }
.sv-index a:hover h5 { color: #fff; }
.sv-index a:hover p { color: rgba(255, 255, 255, .8); }

.sv-energy, .sv-sector { border-radius: 6px; border-top: 3px solid var(--bs-secondary); }
.sv-tablegrid div { border-left: 3px solid var(--bs-secondary); border-radius: 3px; }

/* mobile: g-5 gutters were wider than the container padding and made the page scroll sideways */
@media (max-width: 767px) {
    .row.g-5 { --bs-gutter-x: 1.5rem; }
}
@media (max-width: 991px) {
    :root { --nav-h: 76px; }
    .sv-hero img { box-shadow: 10px 10px 0 0 rgba(255, 94, 21, .9), 0 18px 36px rgba(0, 22, 89, .2); margin-right: 10px; width: calc(100% - 10px); }
}

/* ---------------------------------------------------------------------
   3. BLOG
   --------------------------------------------------------------------- */

/* list: original simple 3-card row, with a light polish (border, hover lift, category tag) */
.blog-mag .blog-item { border-radius: 8px; overflow: hidden; background: #fff; border: 1px solid #e3e7f1; box-shadow: 0 10px 28px rgba(0, 22, 89, .07); transition: transform .35s, box-shadow .35s; }
.blog-mag .blog-item:hover { transform: translateY(-5px); box-shadow: 0 22px 44px rgba(0, 22, 89, .16); }
.blog-mag .blog-img { position: relative; overflow: hidden; }
.blog-mag .blog-img img { transition: transform .7s; }
.blog-mag .blog-item:hover .blog-img img { transform: scale(1.06); }
.blog-mag .blog-content > .d-flex { flex-wrap: wrap; gap: .5rem; justify-content: flex-start !important; align-items: center; }
.blog-mag .blog-content > .d-flex p { font-size: .85rem; color: #5a6483; text-align: left !important; text-align-last: left !important; }
.blog-mag .blog-content > .d-flex p:last-child { background: #fff0e8; color: #b8400c; padding: .2rem .7rem; border-radius: 3px; font-weight: 500; }

/* posts: editorial drop cap on the opening paragraph, framed lead */
.bp-article p.bp-lead { border-left: 4px solid var(--bs-secondary); padding-left: 1.3rem; }
.bp-article p.bp-lead::first-letter {
    float: left; font-family: "Roboto", Arial, sans-serif; font-weight: 700;
    font-size: 4rem; line-height: .82; padding: .3rem .6rem 0 0; color: var(--bs-secondary);
}
.bp-article .bp-card, .bp-callout { border-radius: 8px; }
.bp-hero { position: relative; }
.bp-hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .09;
    background: url(../img/contours.svg) center / cover no-repeat;
}
.bp-hero > * { position: relative; }

/* ---------------------------------------------------------------------
   4. CASE STUDIES
   --------------------------------------------------------------------- */

/* list: first project is a wide feature card, the other four sit in a clean 2x2 */
.csl-grid > .csl-card:first-child {
    grid-column: 1 / -1; flex-direction: row; min-height: 380px;
}
.csl-grid > .csl-card:first-child .csl-card-img { flex: 0 0 52%; height: auto; min-height: 380px; }
.csl-grid > .csl-card:first-child .csl-card-body { justify-content: center; padding: 2.4rem 2.6rem; }
.csl-grid > .csl-card:first-child .csl-card-title { font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
.csl-grid > .csl-card:first-child .csl-excerpt { font-size: 1.04rem; }
.csl-grid > .csl-card:first-child .csl-num { font-size: 2.6rem; }
.csl-card { border-radius: 10px; border-bottom: 4px solid transparent; }
.csl-card:hover { border-bottom-color: var(--bs-secondary); }
.csl-card-title { font-family: "Roboto", Arial, sans-serif; font-weight: 700; color: var(--bs-primary); }
.csl-excerpt { text-align: justify; text-align-last: left; hyphens: auto; }
@media (max-width: 991px) {
    .csl-grid > .csl-card:first-child { flex-direction: column; min-height: 0; }
    .csl-grid > .csl-card:first-child .csl-card-img { flex: none; min-height: 240px; }
    .csl-grid > .csl-card:first-child .csl-card-body { padding: 1.6rem; }
}

/* case-study pages: contour texture in the hero, softer cards */
.cs-hero { position: relative; }
.cs-hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .08; z-index: 0;
    background: url(../img/contours.svg) center / cover no-repeat;
}
.cs-hero > * { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
    .blog-mag .blog-item, .blog-mag .blog-img img, .csl-card, .csl-card-img, .sv-index a, .sv-rail-bar { transition: none !important; }
}

/* ---- Page banners (Blog / Case Studies / About): full-width, no oversize crop ---- */
.gt-pagebanner{line-height:0;background:#eaf4ff;width:100%;overflow:hidden}
.gt-pagebanner img{width:100%;max-width:100%;display:block;height:clamp(260px,32vw,520px);object-fit:cover;object-position:left 50%}
@media(max-width:767px){.gt-pagebanner img{height:auto;object-fit:contain}}
