/* richardgindersgroundworks.co.uk - the only hand-written stylesheet. Plain CSS, no build step.
   Bootstrap 4.4.1 utilities/grid live in vendor/bootstrap-4.4.1.purged.css (frozen); anything new goes HERE.
   Palette: dark #004169, mid #1D71B8, light #009FE3. Font: Montserrat Light (bold = synthesised, as on the old site). */

@font-face { font-family: 'Montserrat-Light'; src: url('/assets/fonts/Montserrat-Light.woff2') format('woff2'); font-display: swap; }

body { font-family: 'Montserrat-Light', sans-serif !important; }
h1, h2 { color: #1D71B8 !important; font-weight: bold !important; }
h3 { font-weight: bold !important; }

/* ---- colours */
.dark-blue { color: #004169 !important; }
.mid-blue { color: #1D71B8 !important; }
.light-blue { color: #009FE3 !important; }
.bg-dark-blue { background-color: #004169 !important; }
.bg-mid-blue { background-color: #1D71B8 !important; }
.bg-light-blue { background-color: #009FE3 !important; }
.transparent-blue { background-color: rgba(0, 65, 105, 0.81) !important; }
.transparent-dark-blue { background-color: rgba(0, 65, 105, 0.91) !important; }
.white { color: white; }
.black { color: black; }
.bg-white { background-color: white; }
.hero-title { color: #fff !important; }
.rggGradient { background-image: linear-gradient(to right, rgba(0, 65, 105, 0.81), rgba(29, 113, 184, 0.81), rgba(0, 159, 227, 0.81)) !important; }

/* ---- layout helpers (were inline style="" attributes) */
.h-20vh { height: 20vh; }
.h-80vh { height: 80vh; }
.h-200 { height: 200px; }
.brand-link { z-index: 1; }
.brand-logo { width: 120.75px; height: 112.54px; }
.card-clear { border: none; background-color: transparent; }
.clear-both { clear: both; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.centre-text-container { text-align: center; display: table; }
.centre-text { vertical-align: middle; display: table-cell; }
.top25 { top: 25%; }
.bottom25 { bottom: 25%; }
.centre { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }

/* ---- icons (Font Awesome Free 5.15.4 SVG sprite, see assets/img/icons.svg) */
.icon { box-sizing: content-box; display: inline-block; width: 1em; height: 1em; fill: currentColor; vertical-align: -0.125em; overflow: visible; }
.icon-w10 { width: 0.625em; }
.icon-w14 { width: 0.875em; }
.icon-w20 { width: 1.25em; }
.fa-2x { font-size: 2em; }
.fa-3x { font-size: 3em; }

/* ---- links and nav */
a.white:hover { transition: 0.5s; color: rgba(200, 200, 200, 1); text-decoration: none; }
a.black:hover { transition: 0.5s; color: rgba(150, 150, 150, 1); text-decoration: none; }
.serviceLink { cursor: pointer; }
.serviceLink, .serviceLink:hover { color: inherit; text-decoration: none; }
.navbar-dark .navbar-nav .nav-link { color: rgba(255, 255, 255, 0.75) !important; text-transform: uppercase; }
.navbar-dark .navbar-nav .active > .nav-link, .navbar-dark .navbar-nav .nav-link.active, .navbar-dark .navbar-nav .nav-link.show, .navbar-dark .navbar-nav .show > .nav-link { color: #fff !important; font-weight: bold !important; text-transform: uppercase; }

/* ---- buttons */
/* white on #009FE3 is 3.2:1; #007ab8 is 4.7:1 (WCAG AA) */
#load-more-button.bg-light-blue { background-color: #007ab8 !important; }
/* service photo boxes need a height before they load: stacked on a phone they were 0px tall, never intersected the viewport and never loaded */
.h-100[class*="service"].lazyload { min-height: 300px; }
.btn-primary { color: white !important; border-color: white !important; }
.btn-outline-primary { color: #004169 !important; border-color: white !important; }
.btn-outline-primary:focus, .btn-outline-primary.focus { box-shadow: none; }
.btn-outline-primary:hover, .btn-outline-primary:not(:disabled):not(.disabled).active, .btn-outline-primary:not(:disabled):not(.disabled):active { background-color: #004169 !important; border-color: #004169 !important; color: white !important; }

/* ---- background photos: the class is added by site.js when the element scrolls near the viewport */
.background.lazyloaded { background-image: url('/assets/img/content/background.jpg'); background-repeat: no-repeat; background-size: cover; background-position: center; }
.background2.lazyloaded { background-image: url('/assets/img/content/background2.jpg'); background-repeat: no-repeat; background-size: cover; background-position: center; }
.background3.lazyloaded { background-image: url('/assets/img/content/background3.jpg'); background-repeat: no-repeat; background-size: cover; background-position: center; }
.background4.lazyloaded { background-image: url('/assets/img/content/background4.jpg'); background-repeat: no-repeat; background-size: cover; background-position: center; }
.background5.lazyloaded { background-image: url('/assets/img/content/background5.jpg'); background-repeat: no-repeat; background-size: cover; background-position: center; }
.fencing.lazyloaded { background-image: url('/assets/img/content/fencing.jpg'); background-repeat: no-repeat; background-size: cover; background-position: center; }
.decking.lazyloaded { background-image: url('/assets/img/content/decking.jpg'); background-repeat: no-repeat; background-size: cover; background-position: center; }
.patios.lazyloaded { background-image: url('/assets/img/content/patios.jpg'); background-repeat: no-repeat; background-size: cover; background-position: center; }
.turfing.lazyloaded { background-image: url('/assets/img/content/turfing.jpg'); background-repeat: no-repeat; background-size: cover; background-position: center; }
.diggerwork.lazyloaded { background-image: url('/assets/img/content/diggerwork.jpg'); background-repeat: no-repeat; background-size: cover; background-position: center; }
.driveways.lazyloaded { background-image: url('/assets/img/content/driveways.jpg'); background-repeat: no-repeat; background-size: cover; background-position: center; }
.serviceclearance.lazyloaded { background-image: url('/assets/img/services/serviceclearance.jpg'); background-repeat: no-repeat; background-size: cover; background-position: center; min-height: 300px; }
.servicedecking.lazyloaded { background-image: url('/assets/img/services/servicedecking.jpg'); background-repeat: no-repeat; background-size: cover; background-position: center; min-height: 300px; }
.servicediggerwork.lazyloaded { background-image: url('/assets/img/services/servicediggerwork.jpg'); background-repeat: no-repeat; background-size: cover; background-position: center; min-height: 300px; }
.servicedriveways.lazyloaded { background-image: url('/assets/img/services/servicedriveways.jpg'); background-repeat: no-repeat; background-size: cover; background-position: center; min-height: 300px; }
.servicefencing.lazyloaded { background-image: url('/assets/img/services/servicefencing.jpg'); background-repeat: no-repeat; background-size: cover; background-position: center; min-height: 300px; }
.servicegates.lazyloaded { background-image: url('/assets/img/services/servicegates.jpg'); background-repeat: no-repeat; background-size: cover; background-position: center; min-height: 300px; }
.servicepatios.lazyloaded { background-image: url('/assets/img/services/servicepatios.jpg'); background-repeat: no-repeat; background-size: cover; background-position: center; min-height: 300px; }
.servicepressurewashing.lazyloaded { background-image: url('/assets/img/services/servicepressurewashing.jpg'); background-repeat: no-repeat; background-size: cover; background-position: center; min-height: 300px; }
.serviceshedbases.lazyloaded { background-image: url('/assets/img/services/serviceshedbases.jpg'); background-repeat: no-repeat; background-size: cover; background-position: center; min-height: 300px; }
.serviceturfing.lazyloaded { background-image: url('/assets/img/services/serviceturfing.jpg'); background-repeat: no-repeat; background-size: cover; background-position: center; min-height: 300px; }

.parallax { height: 40vh; width: 100%; background-attachment: fixed; background-position: center; background-repeat: no-repeat; background-size: cover; }
.overlay { position: absolute; top: 0; height: 100%; width: 100%; opacity: 1; transition: .5s ease; background-color: rgba(0, 0, 0, 0.4); }
.overlay-container:hover .overlay { opacity: 0; }

/* ---- reviews carousel (markup is built by site.js; each slide fades in) */
.carousel-item.active, .carousel-item-left, .carousel-item-right { display: flex !important; animation-duration: 1s; animation-fill-mode: both; animation-name: fadeIn; }
#indicators { position: static; }
.indi { background-color: black !important; }
.indi.active { background-color: #009FE3 !important; }
.fadeIn { animation-duration: 2.5s; animation-fill-mode: both; animation-name: fadeIn; }
.fadeInFromBottom { animation-duration: 1.5s; animation-fill-mode: both; animation-name: fadeInBottom; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInBottom { from { opacity: 0; transform: translateY(5%); } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .carousel-item.active, .fadeIn, .fadeInFromBottom { animation: none; } .overlay { transition: none; } }

/* ---- project gallery (see site.js section 5). Without JS the figures wrap as Bootstrap columns; site.js adds .masonry and positions them. */
.my-shuffle { position: relative; overflow: hidden; }
.image-item { margin-bottom: 30px; }
.my-shuffle.masonry .image-item { position: absolute; top: 0; left: 0; margin-bottom: 0; padding-bottom: 30px; transition: transform .25s ease-out, opacity .25s ease-out; }
.aspect { position: relative; width: 100%; height: 0; padding-bottom: 100%; overflow: hidden; }
.aspect__inner { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.aspect--4x3 { padding-bottom: 75%; }
.aspect--1x1 { padding-bottom: 100%; }
.aspect--16x9 { padding-bottom: 56.25%; }
.aspect--3x2 { padding-bottom: 66.66%; }
.aspect--7x5 { padding-bottom: 71.42%; }
.aspect--10x8 { padding-bottom: 80%; }
.image-item img { display: block; width: 100%; max-width: none; height: 100%; object-fit: cover; }
.shuffleOverlay { background: rgba(0, 0, 0, 0.5); color: white; text-align: center; bottom: 0px; position: absolute; width: 100%; }

/* ---- carousel arrows are <button>s now (they were links with role=button): same invisible white-on-white controls */
.carousel-control-prev, .carousel-control-next { background: none; border: 0; padding: 0; }

/* footer logo scales with its w-25 class; the width/height attributes are only there to reserve space while the SVG loads */
footer img.w-25 { height: auto; }

/* the old Font Awesome <i> was a full-width block with a centred glyph; the SVG equivalent is a centred block */
.icon.d-block { margin-left: auto; margin-right: auto; }

/* ---- gallery: sticky filter bar, one swipeable row on phones, infinite-scroll sentinel, back-to-top */
.gallery { position: relative; }
/* the page's container has 15px side padding: bleed the bar's background to the screen edges, keep the chips where they were */
.gallery-filter-bar { margin: 0 -15px; padding: 0 15px; position: sticky; top: var(--gallery-sticky-top, 0px); z-index: 20; background: #fff; text-align: center; }
.gallery-filter-bar.is-stuck { box-shadow: 0 2px 8px rgba(0, 65, 105, 0.25); }
.gallery-filters { min-height: 4.25rem; }
.filter-chip { white-space: nowrap; }
.filter-chip:focus-visible, .back-to-top:focus-visible { outline: 3px solid #009FE3; outline-offset: 2px; }
.gallery-sentinel { height: 1px; }
/* "fixed" bottom-right while the gallery is on screen: a zero-height sticky anchor at the end of the gallery section, so the button stops at the footer and never covers its links */
/* its own gutter below the grid and the Facebook link: the resting button (48px + 16px + safe area) sits here and can never cover gallery content */
.gallery #shuffleContainer { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)) !important; }
.back-to-top-anchor { position: sticky; bottom: 0; height: 0; z-index: 30; pointer-events: none; }
.back-to-top { position: absolute; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); pointer-events: auto; width: 48px; height: 48px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: #004169; color: #fff; font-size: 1.5rem; line-height: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); }
.back-to-top[hidden] { display: none; }
.back-to-top:hover { background: #1D71B8; }
.back-to-top .icon { box-sizing: border-box; vertical-align: 0; display: block; flex: none; width: 24px; height: 24px; fill: currentColor; }
@media (max-width: 640px) {
  .gallery-filter-bar { padding: 0; }
  /* a single row you swipe sideways (was 3 wrapped rows); the active chip is scrolled into view by site.js */
  .gallery-filters.row { flex-wrap: nowrap; justify-content: flex-start !important; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scroll-padding: 0 16px; -webkit-overflow-scrolling: touch; padding: 0.5rem 16px !important; gap: 8px; position: relative; scrollbar-width: none; min-height: 3.5rem; }
  .gallery-filters.row::-webkit-scrollbar { display: none; }
  .gallery-filters .btn { flex: 0 0 auto; scroll-snap-align: center; border-radius: 999px !important; border: 1px solid #004169 !important; margin: 0 !important; }
  .gallery-filters .btn.active { border-color: #004169 !important; }
}
