
:root {
  --bg: #f7f7f8;
  --card: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --brand: #dc2626;
  --brand-600: #b91c1c;
  --line: #e5e7eb;
  --ink-weak: #374151;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  --header-h: 80px; /* header height used for sticky + scroll-offset */
}

* { box-sizing: border-box; }

html, body { margin: 0; }

html { scroll-behavior: smooth; }

/* Offset the scroll position by the header height */
section[id] {
  scroll-margin-top: calc(var(--header-h) + 12px);
}

body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* remove iOS/Android tap flash on links & buttons */
a, .btn, .trust-item, .trust-button {
  -webkit-tap-highlight-color: transparent;
}

/* your existing outline focus is fine; just ensure it’s not blue */
a:focus-visible .trust-item.trust-button{
  outline:none;
  box-shadow:0 0 0 3px rgba(59,130,246,.15);
  background:#fff;
  border-color:#9ca3af;
}

.trust-grid a { display:inline-block; } 

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(8px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img {
  height: var(--header-h);
  width: auto;
  object-fit: contain;
  display: block;
}
.brand small { color: var(--muted); }

.header-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); }
.btn-outline { border-color: #d1d5db; background: #fff; }
.btn-outline:hover { border-color: #9ca3af; }

.phone-pill { display: none; }
@media (min-width: 768px) { .phone-pill { display: inline-flex; } }

.email-pill { display: none; }
@media (min-width: 768px) { .email-pill { display: inline-flex; } }

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: -1;
}
.hero-inner { padding: 46px 0; }
.hero h1 {
  color: #fff;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.1;
  margin: 0 0 12px;
}
.hero p {
  color: #f3f4f6;
  font-size: clamp(16px, 2.2vw, 20px);
  max-width: 720px;
}
.hero .actions { /* descendant (not .hero.actions) */
  position: relative;
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
  padding: 12px 16px;
}

/* Add gentle padding around hero text only (no background change) */
.hero-copy { display: inline-block; padding: 12px 16px; }

/* Buttons stay in normal flow */
.hero .actions { position: relative; }

/* Absolutely positioned ticker (overlays, doesn't change height) */
.hero-ticker{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  /* top value is set by JS so it sits just below the buttons */
  max-width: 720px;                /* same width cap as hero text */
  pointer-events: auto;
  background: transparent;
  border: 0; box-shadow: none;
  color: #fff;
}

/* readability over the photo */
.hero-ticker .label,
.hero-ticker .msg,
.hero-ticker .bullet{
  color:#fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.45);
}

/* edge fade (optional) */
.hero-ticker .ticker-viewport{
  overflow:hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 97%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 10%, #000 97%, transparent);
}

/* marquee row */
.ticker-row{
  display:flex; align-items:center; gap:24px;
  white-space:nowrap;
  padding: 6px 0;
  animation: heroTicker 28s linear infinite;
  will-change: transform;
}
.segment{ display:inline-flex; align-items:center; gap:12px; }
.label{ font-weight:700; opacity:.9; margin-right:6px; }
.bullet{ opacity:.6; }

.hero-ticker:hover .ticker-row{ animation-play-state: paused; }
@media (prefers-reduced-motion: reduce){ .ticker-row{ animation:none; } }

@keyframes heroTicker {
  from { transform: translateX(0); }
  to   { transform: translateX(var(--dist, -50%)); }
}

@media (max-width:480px){
  .hero-ticker{ max-width: 100%; }
  .ticker-row{ gap:16px; }
  .segment{ gap:8px; }
  .label,.msg{ font-size:12px; }
}

/* Trust bar */
.trust { background: #fff; border-bottom: 1px solid var(--line); }
/* Trust grid layout */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Always 2 per row */
  gap: 1rem;
  width: 100%;
  max-width: 1200px; /* optional, keeps it tidy on large screens */
  margin: 0 auto;
  padding: 1rem;
  box-sizing: border-box;
  justify-items:center;   /* horizontal */
  align-items:center;     /* vertical */
}
.trust-logo{
  height:16px;        /* tweak 16–20px to taste */
  width:auto;
  display:block;
}

/* Trust item appearance */
.trust-item {
  background: #ffffff;
  color: #0f172a;
  border-radius: 9999px;
  text-align: center;
  font-weight: 600;
  transition: all 0.2s ease;
  user-select: none;
}

/* Linked items — pointer and hover feedback */
a .trust-item {
  cursor: pointer;
}

a:hover .trust-item,
a:focus-visible .trust-item {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(14,165,233,0.25);
}

/* Active press */
a:active .trust-item {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(14,165,233,0.2);
}

/* Prevent sticky pressed/visited state on trust button */
.trust-item:visited {
  color: #0f172a;             /* normal text colour */
  background: #ffffff;        /* normal background */
}

.trust-item:focus {
  outline: none;              /* remove native focus highlight */
  box-shadow: none;
  background: #ffffff;
  color: #0f172a;
}

.trust-item:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(14,165,233,0.2);
}
/* Outline-style, compact, clickable trust item */
.trust-item.trust-button{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 12px;                  /* tighter than normal buttons */
  border:1px solid #d1d5db;          /* same as .btn-outline */
  border-radius:9999px;              /* pill */
  background:#fff;                   /* same as .btn-outline */
  color:var(--ink);                  /* inherit your text colour */
  line-height:1;
  font-weight:600;
  transition:border-color .2s ease, box-shadow .2s ease, transform .1s ease;
  box-shadow:none;
}

/* Ensure this overrides earlier link hover that turns items blue */
a:hover .trust-item.trust-button,
a:focus-visible .trust-item.trust-button{
  background:#fff;                   /* keep outline look */
  color:var(--ink);
  border-color:#9ca3af;              /* same hover as .btn-outline */
  transform:translateY(-1px);
  box-shadow:0 4px 10px rgba(0,0,0,0.06);
}

/* Keyboard focus ring */
a:focus-visible .trust-item.trust-button{
  outline:none;
  box-shadow:0 0 0 3px rgba(59,130,246,.15); /* subtle focus */
}

/* Active press */
a:active .trust-item.trust-button{
  transform:translateY(0);
}

/* only desktops/laptops */
@media (hover:hover) and (pointer:fine){
  a:hover .trust-item.trust-button,
  a:focus-visible .trust-item.trust-button{
    background:#fff;            /* keep outline look */
    color:var(--ink);
    border-color:#9ca3af;
    transform:translateY(-1px);
    box-shadow:0 4px 10px rgba(0,0,0,0.06);
  }

  /* If you still want blue hover for non-outline items, keep it here */
  .trust-item:hover{
    transform:translateY(-2px);
    box-shadow:0 4px 10px rgba(14,165,233,0.25);
  }
}

/* On very wide screens, optionally show all in one line */
@media (min-width: 768px) {
  .trust-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Sections */
.section-title { font-size: 28px; font-weight: 800; margin: 10px 0 8px; }
.section-sub { color: var(--muted); margin: 0 0 24px; }

/* Cards grid */
.grid { display: grid; gap: 20px; }
.grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
/* Tablet: 2 columns for grid-4 */
@media (min-width: 640px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* Large tablet: 3 columns for grid-4 */
@media (min-width: 900px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}

/* Desktop+ : 4 columns for grid-4 */
@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.card .media { height: 160px; position: relative; }
.card .media img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 18px; }
.card h3 { margin: 0; font-size: 18px; }
.card p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

/* About */
.about { display: grid; gap: 24px; }

@media (min-width: 960px) {
  .about { grid-template-columns: 1fr 1fr; align-items: start; }
}

/* Desktops (≥1024px): keep the nicer 1.1 / 0.9 split */
@media (min-width: 1024px) {
  .about { grid-template-columns: 1.1fr 0.9fr; }
}

.about ul {
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--ink-weak);
}

/* Ensure the photo scales nicely */
.about-photo{
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  height: auto;
  display: block;
}

/* Gallery */
.gallery .tile {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.gallery .tile .media { height: 220px; position: relative; }
.gallery .tile .media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Caption overlay for Recent Projects */
.gallery .media { position: relative; }
.gallery .media::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 40%;
  background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0));
  pointer-events: none;
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}
.gallery .caption {
  position: absolute;
  left: 12px; bottom: 12px;
  background: rgba(0,0,0,.65);
  color: #fff;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
@media (max-width: 480px) {
  .gallery .caption { font-size: 13px; padding: 6px 10px; }
}
@media (min-width: 1024px) {
  .gallery .caption {
    transition: transform .2s ease, opacity .2s ease;
    transform: translateY(2px);
  }
  .gallery .tile:hover .caption { transform: translateY(0); }
}

/* Uniform vertical spacing for all sections EXCEPT hero & trust */
section:not(.hero):not(.trust) { padding: 10px 0; }
@media (min-width: 1024px) {
  section:not(.hero):not(.trust) { padding: 30px 0; }
}

/* Make any header row (like your Projects heading) have the same bottom gap */
.center-between { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; }

/* White background for selected sections */
section[aria-label="Why Choose Us"],
section[aria-label="Testimonials"] { background: #fff; }

/*---Mobile layout tweaks---*/
@media (max-width: 768px) {
  .hero-inner { padding: 36px 0; }
  .hero-copy { padding: 10px 12px; }
  .hero .actions { padding: 10px 12px; gap: 10px; }
  .hero .actions a { width: 100%; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card .media { height: 150px; }
}
/* Keep header height consistent on all screens */
.header .container { padding-top: 0; padding-bottom: 0; }
@media (max-width: 480px) {
   .header .container { padding: 0 12px; } /* only side padding on phones */
  .btn { padding: 10px 12px; }
  .nowrap { white-space: normal; }
  .gallery img { height: 170px; }
}
@media (max-width: 768px) {
  .gallery .tile .media { height: 200px; }
}

/* Testimonials */
.testi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.testi .quote {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1rem;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fff;
}
.testi .quote .stars,
.testi .quote blockquote,
.testi .quote figcaption { width: 100%; }
.testi .quote .stars {
  font-size: 1.1rem;
  line-height: 1;
  margin-bottom: 0.5rem;
  color: #f59e0b;
}
/* title line under stars (styled like caption) */
.testi .quote .capline.title {
  color: var(--muted);
  font: inherit;
  opacity: .9;
  margin-bottom: 0.5rem;
}
/* quote body */
.testi .quote blockquote {
  flex: 1 1 auto;
  margin: 0 0 0.5rem 0;
}
/* caption at bottom */
.testi .quote figcaption {
  margin-top: auto;
  text-align: left;
}

/* Read-more toggle */
.quote .toggle-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
  color: inherit;
}
/* --- Testimonial toggle link --- */
blockquote .toggle {
  display: block;              /* new line below the text */
  margin-top: 0.5rem;          /* spacing from main text */
  font-size: 0.9em;            /* slightly smaller */
  color: #64748b;              /* soft grey-blue tone */
  text-decoration: underline;  /* underlined for clarity */
  text-underline-offset: 2px;  /* subtle spacing from text */
  cursor: pointer;
  transition: color 0.2s ease;
}

@media (max-width: 480px) {
  blockquote .toggle {
    font-size: 0.85em;
    margin-top: 0.4rem;
  }
}
.quote .review-text { display: inline; }
.quote .review-text.short[data-state="full"] { display: none; }
.quote .review-text.full { display: none; }
.quote .review-text.full[data-state="full"] { display: inline; }

/* Match the trust-item look for the MyBuilder link*/
.trust-button {
  display: inline-block;
  background: #ffffff;
  color: #0f172a;
  padding: 0.8rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  user-select: none;
}

/* Pressed state */
.trust-button:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(14,165,233,0.2);
}
/* Prevent sticky pressed/visited state on trust button */
.trust-button:visited {
  color: #0f172a;             /* normal text colour */
  background: #ffffff;        /* normal background */
}

.trust-button:focus {
  outline: none;              /* remove native focus highlight */
  box-shadow: none;
  background: #ffffff;
  color: #0f172a;
}

.trust-button:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(14,165,233,0.2);
}

/* Contact */
.contact { display: grid; gap: 24px; }
@media (min-width: 900px) { .contact { grid-template-columns: 1fr 0.9fr; } }
form { display: grid; gap: 12px; }
input, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
}
textarea { min-height: 120px; resize: vertical; }

/* Footer */
.footer { background: #0b1220; color: #cbd5e1; }
.footer a { color: #e5e7eb; }
.footer .cols { display: grid; gap: 20px; }
@media (min-width: 768px) { .footer .cols { grid-template-columns: 1.2fr 1fr 1fr; } }
.logo-small { height: 40px; }

/* Utilities */
.muted { color: var(--muted); }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; padding-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; align-items: center; gap: 10px; }
.nowrap { white-space: nowrap; }
.hidden-sm { display: none; }
@media (min-width: 640px) { .hidden-sm { display: block; } }

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: #111827;
  color: #e5e7eb;
  border-bottom: 1px solid #0f172a;
}
.topbar .inner {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 14px;
}
.topbar .badge {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

/* WhatsApp */
.wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 600;
  background: #25D366;
  color: #111827;
}
.wa:hover { filter: brightness(.95); }

.whatsapp-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 70;
  background: #25D366;
  color: #111827;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .2);
}
.whatsapp-fab a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  font-size: 26px;
}

/* Team photo background */
.team-photo {
  position: relative;
  width: 100%;
  min-height: 280px;              /* adjust height as needed */
  background-image:
    
    url("../img/the-team.jpg");    /* your actual image */
  background-size: cover;
  background-position: top;
  background-repeat: no-repeat;
  border-radius: var(--radius, 12px);
  box-shadow: var(--shadow, 0 2px 8px rgba(0,0,0,0.1));
  overflow: hidden;
}

/* Optional hover effect – slightly brighten */
.team-photo:hover {
  filter: brightness(1.05);
  transition: filter 0.3s ease;
}

/* If your page uses cards with padding, reset for pure image */
.team-photo.card {
  padding: 0;
}

/* Lightbox / popup gallery */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.85);
  display: none; align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }

/* ~60–70% of the viewport on desktops, larger on small screens */
.lightbox-inner {
  position: relative;
  width: 70vw;              /* about 70% width */
  height: 70vh;             /* about 70% height */
  max-width: 1400px;        /* safety cap */
  max-height: 92vh;         /* breathing room */
}

/* Image fits inside the box */
.lightbox-img {
  position: absolute; inset: 0; margin: auto;
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
  border-radius: 12px;
  z-index: 1;               /* below buttons */
}

/* Controls (now at top) */
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  width: 44px; height: 44px;
  border-radius: 999px;
  display: grid; place-items: center;
  cursor: pointer; user-select: none;
  backdrop-filter: blur(4px);
  z-index: 2;               /* above image */
}

/* Close centered at the very top of the popup */
.lightbox-close {
  top: 8px; left: 50%;
  transform: translateX(-50%);
}

/* Prev/Next at top corners of the popup */
.lightbox-prev  { top: 8px; left: 8px;  transform: none; }
.lightbox-next  { top: 8px; right: 8px; transform: none; }

/* Caption as a centered black pill button */
.lightbox-caption{
  position: absolute;
  left: 50%; bottom: 12px;          /* inside the popup, a bit above bottom */
  transform: translateX(-50%);      /* center horizontally */
  display: inline-block;
  max-width: 90%;
  background: #000;                  /* solid black */
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  padding: 10px 16px;
  border-radius: 999px;              /* pill shape */
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
  text-align: center;
  z-index: 2;                        /* above image */
  white-space: normal;               /* allow wrapping */
  word-break: break-word;
}

/* Slightly smaller on phones */
@media (max-width: 480px){
  .lightbox-caption{
    font-size: 13px;
    padding: 8px 14px;
    max-width: 94%;
  }
}
/* Responsive tweaks */
@media (max-width: 1024px){
  .lightbox-inner { width: 80vw; height: 80vh; }
}
@media (max-width: 640px){
  .lightbox-inner { width: 92vw; height: 82vh; }
  .lightbox-close, .lightbox-prev, .lightbox-next { width: 40px; height: 40px; }
}

/* Generic: keep anchors from flashing system blue on tap */
a, .btn, .trust-item, .trust-button { -webkit-tap-highlight-color: transparent; }