/* =========================================================
   7. CONSTRUCTION SERVICES
   ========================================================= */
.services { padding: 110px 0; background: var(--bg); }
.services .container { width: min(1160px, 100% - 32px); }
.service-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px; align-items: stretch;
}
.service-card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 16px; overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.service-card:hover, .service-card:focus-within {
  transform: translateY(-4px); border-color: var(--accent);
  box-shadow: 0 18px 40px rgba(8, 18, 25, .45);
}
.service-card:has(.service-card-link:focus-visible) {
  outline: 2px solid var(--accent); outline-offset: 3px;
}
.service-card-media {
  flex: none; aspect-ratio: 16 / 9; background: var(--tile); overflow: hidden;
}
.service-card-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 40%;
  transition: transform .6s ease;
}
.service-card:hover .service-card-media img,
.service-card:focus-within .service-card-media img { transform: scale(1.05); }
.service-card-body {
  flex: 1; display: flex; flex-direction: column; padding: 22px 24px 26px;
}
.service-card-title {
  font-family: var(--font-display); font-weight: 900; font-size: 18px;
  line-height: 1.3; letter-spacing: .3px; text-transform: uppercase;
  color: var(--white); margin: 0 0 12px; text-wrap: balance;
}
.service-card-desc { font-size: 14.5px; line-height: 1.65; color: #c4cdd4; margin: 0 0 20px; }
.service-card-link {
  margin-top: auto; padding-top: 12px; display: inline-flex; align-items: center;
  align-self: flex-start; gap: 6px; font-family: var(--font-body); font-size: 13px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 1.04px; color: var(--accent-light);
  transition: gap .25s ease;
}
/* The card is the containing block, so its one link covers the photo and body. */
.service-card-link::after { content: ""; position: absolute; inset: 0; }
/* Links inside a card's description sit above the stretched card link so they stay clickable. */
.service-card-desc a { position: relative; z-index: 1; color: var(--accent-light); text-decoration: underline; text-underline-offset: 3px; }
.service-card-link svg { width: 14px; height: 14px; flex: none; }
.service-card-link:hover, .service-card-link:focus-visible { gap: 10px; }
.service-card-link:focus-visible { outline: none; }

/* =========================================================
   8. WHY CLIENTS TRUST MSNT PROJECTS
   ========================================================= */
.why { padding: 100px 0 140px; }
.why-title { text-align: center; width: min(100%, 24ch); max-width: 1100px; margin-inline: auto; text-wrap: balance; }
.why-lead { margin-top: 30px; font-size: 16px; line-height: 1.7; color: rgba(255, 255, 255, .86); }
.why-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 38px 40px; margin-top: 64px; }
.why-grid li {
  display: flex; align-items: center; gap: 18px; min-width: 0;
  font-family: var(--font-display); font-size: 15px; font-weight: 700; line-height: 1.6;
  text-transform: uppercase; letter-spacing: .5px; color: var(--white);
}
.why-icon {
  display: grid; place-items: center; flex: none; width: 54px; height: 54px;
  border-radius: 50%; background: var(--white); color: var(--bg);
}
.why-icon svg { width: 26px; height: 26px; }
.why .btn-lg { margin-top: 60px; }

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

@media (max-width: 1024px) {
  .services { padding: 80px 0 110px; }
  .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 699px) {
  .service-grid { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin-inline: auto; }
}

@media (max-width: 640px) {
  .services { padding: 64px 0 100px; }
  .service-card-body { padding: 20px 20px 22px; }
  .service-card-title { font-size: 17px; }
  .why { padding: 72px 0 100px; }
  .why-grid { grid-template-columns: minmax(0, 1fr); row-gap: 22px; }
  .why-grid li { font-size: 14px; }
  .why-icon { width: 46px; height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  .service-card, .service-card-media img, .service-card-link { transition: none; }
  .service-card:hover, .service-card:focus-within,
  .service-card:hover .service-card-media img,
  .service-card:focus-within .service-card-media img { transform: none; }
  .service-card-link:hover, .service-card-link:focus-visible { gap: 6px; }
  .why .btn-lg { transition: none; }
}

/* =========================================================
   7c. SERVICE LIST: residential and commercial panels
   Restored from the first build (aandaroof "Our Trusted Services").
   Sits after the build stages, so it carries its own top padding.
   ========================================================= */
.service-list { padding: 100px 0; }
.services-panel {
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: 20px; padding: 100px 70px;
  background: var(--surface);
}
.services-panel-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.services-panel-bg::before, .services-panel-bg::after { content: ""; position: absolute; inset: 0; }
.services-panel-bg::before {
  background: url("../../img/projects/msnt-roof-sheeting-installer-on-roof-sm.webp") center / cover no-repeat;
  filter: blur(30px) brightness(.4) saturate(.6); transform: scale(1.15);
}
.services-panel-bg::after {
  background: linear-gradient(180deg, rgba(19, 37, 48, .72), rgba(12, 25, 33, .86));
}
.service-list .services-title {
  text-align: center; font-size: clamp(28px, 3.4vw, 48px); margin-bottom: 80px;
  text-wrap: balance;
}
.services-cols {
  display: grid; grid-template-columns: minmax(0, 1fr) 180px minmax(0, 1fr); align-items: stretch;
}
.service-box {
  min-width: 0; border: 1px solid var(--white); border-radius: 20px;
  padding: 30px 30px 48px; text-align: center;
}
.service-box-icon { width: 80px; height: 80px; color: var(--accent); margin: 0 auto 18px; }
.service-box-title {
  font-family: var(--font-display); font-size: 28px; font-weight: 900; line-height: 1.3;
  text-transform: uppercase; color: var(--white); margin-bottom: 26px; text-wrap: balance;
}
.service-pills li {
  border: 1px solid rgba(255,255,255,.5); border-radius: 30px;
  padding: 11px 18px; margin-bottom: 12px;
  font-family: var(--font-body); font-size: 15px; font-weight: 600; line-height: 1.5;
  text-transform: uppercase; letter-spacing: 1px; color: var(--white);
  transition: border-color .2s ease, background-color .2s ease;
}
.service-pills li:last-child { margin-bottom: 0; }
.service-pills li:hover { border-color: var(--accent); background: rgba(236, 104, 16, .08); }

/* The background draws the rule, leaving both pseudo-elements for its endpoints. */
.services-spine {
  position: relative; width: 1px; justify-self: center;
  background: var(--white);
}
.services-spine::before, .services-spine::after {
  content: ""; position: absolute; left: 50%; width: 8px; height: 8px;
  border-radius: 50%; background: var(--white); transform: translate(-50%, -50%);
}
.services-spine::before { top: 0; }
.services-spine::after { top: 100%; }
.spine-logo {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: grid; place-items: center; width: 76px; height: 76px;
  border-radius: 50%; background: var(--white);
}
.spine-logo svg { width: 44px; height: 37px; --mark-core: var(--surface); }

@media (max-width: 1320px) {
  .services-panel { padding: 80px 40px; }
  .services-cols { grid-template-columns: minmax(0, 1fr) 120px minmax(0, 1fr); }
}

@media (max-width: 1024px) {
  .service-list { padding: 80px 0; }
  .services-panel { padding: 64px 24px; }
  .service-list .services-title { margin-bottom: 48px; }
  .services-cols { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .services-spine { width: 100%; height: 76px; background: linear-gradient(var(--white), var(--white)) center / 100% 1px no-repeat; }
  .services-spine::before, .services-spine::after { top: 50%; }
  .services-spine::before { left: 0; }
  .services-spine::after { left: 100%; }
}

@media (max-width: 640px) {
  .service-list { padding: 64px 0; }
  .services-panel { padding: 48px 16px; }
  .service-box { padding: 24px 16px 32px; }
  .service-box-title { font-size: 22px; }
  .service-box-icon { width: 64px; height: 64px; }
  .service-pills li { font-size: 13px; padding: 10px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .service-pills li { transition: none; }
}

.services-all { display: flex; justify-content: center; margin: 32px 0 0; }
/* Own class: .service-card-link stretches an invisible layer over its card, and outside a card that
   layer covered the whole page (it hijacked clicks on the hero's quote button). */
.services-all-link { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-body); font-size: 13px; font-weight: 700; letter-spacing: 1.04px; text-transform: uppercase; color: var(--accent-light); transition: gap .25s ease; }
.services-all-link svg { width: 14px; height: 14px; flex: none; }
.services-all-link:hover, .services-all-link:focus-visible { gap: 10px; }
.services-all-link:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 4px; }
.service-pills li { padding: 0; border: 0; }
.service-pills a {
  display: block; border: 1px solid rgba(255,255,255,.5); border-radius: 30px;
  padding: 11px 18px; color: inherit; transition: border-color .2s ease, background-color .2s ease;
}
.service-pills a:hover, .service-pills a:focus-visible { border-color: var(--accent); background: rgba(236, 104, 16, .12); }
.service-pills a:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .service-pills a { transition: none; } }
