/* ============================================================
   NEXT LEVEL RENOVATIONS & SERVICES LLC
   PUBLIC SERVICES PAGE
   ============================================================ */

/* PAGE HERO */

.services-page-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    115deg,
    var(--navy-deep) 0%,
    var(--navy-dark) 58%,
    var(--navy-soft) 100%
  );
  color: var(--white);
}

.services-page-hero-inner {
  position: relative;
  min-height: 350px;
  display: flex;
  align-items: center;
  padding-top: 65px;
  padding-bottom: 65px;
}

.services-page-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 690px;
}

.services-page-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(48px, 6vw, 82px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.055em;
  margin: 0 0 19px;
}

.services-page-hero h1 span {
  color: #8fb4d3;
}

.services-page-hero-copy > p:not(.eyebrow) {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 15px;
  line-height: 1.7;
}

.services-page-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 27px;
}

/* ORIGINAL NEXT LEVEL LOGO WATERMARK */

.services-page-hero-mark {
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: min(43vw, 500px);
  max-width: 500px;
  opacity: 0.09;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

.services-page-hero-mark img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}


/* INTRODUCTION */

.services-page-intro {
  padding: 65px 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.services-page-intro-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 75px;
  align-items: center;
}

.services-page-intro h2 {
  color: var(--navy-dark);
  font-family: var(--font-heading);
  font-size: clamp(29px, 3.2vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.services-page-intro h2 span {
  display: block;
}

.services-page-intro-layout > p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.85;
}


/* SERVICES GRID */

.services-page-section {
  padding: 75px 0 90px;
  background: var(--off-white);
}

.services-page-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 25px;
  margin-bottom: 32px;
}

.services-page-section-heading h2 {
  color: var(--navy-dark);
  font-family: var(--font-heading);
  font-size: clamp(29px, 3vw, 39px);
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.services-page-count {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  white-space: nowrap;
  padding-bottom: 5px;
}

.services-page-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.services-page-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.services-page-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #b6c5d3;
}

.services-page-card:focus-visible {
  outline: 3px solid #709bc0;
  outline-offset: 3px;
}

.services-page-card-photo {
  position: relative;
  height: 225px;
  overflow: hidden;
  background: #e7ecf0;
}

.services-page-card-photo > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.services-page-card:hover .services-page-card-photo > img {
  transform: scale(1.045);
}

.services-page-card-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(
    135deg,
    #dce4eb 0%,
    #f2f5f7 100%
  );
  color: #a2b0bc;
}

.services-page-card-placeholder svg {
  width: 48px;
  height: 48px;
  stroke-width: 1.25;
}

.services-page-card-number {
  position: absolute;
  left: 15px;
  top: 15px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  background: rgba(7, 28, 45, 0.88);
  color: white;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 800;
}

.services-page-card-content {
  padding: 22px;
}

.services-page-card-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.services-page-card-heading h3 {
  color: var(--navy-dark);
  font-family: var(--font-heading);
  font-size: 18px;
  line-height: 1.3;
  font-weight: 800;
}

.services-page-card-heading > svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--navy);
}

.services-page-card-content > p {
  min-height: 66px;
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.8;
}

.services-page-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
}

.services-page-card-link svg {
  width: 15px;
  height: 15px;
}


/* CONTACT CTA */

.services-page-cta {
  padding: 65px 0;
  color: white;
  background: var(--navy);
}

.services-page-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.services-page-cta h2 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3vw, 39px);
  line-height: 1.15;
}

.services-page-cta p:not(.eyebrow) {
  max-width: 570px;
  margin-top: 11px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  line-height: 1.75;
}

.services-page-cta .btn {
  flex-shrink: 0;
}


/* ============================================================
   PUBLIC PHOTO GALLERY / LIGHTBOX
   ============================================================ */

.service-lightbox[hidden] {
  display: none !important;
}

.service-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 25px;
}

.service-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 12, 21, 0.92);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.service-lightbox-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(100%, 1050px);
  max-height: calc(100dvh - 50px);
  overflow: hidden;
  background: var(--navy-dark);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
}

.service-lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 19px 24px;
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.service-lightbox-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.19em;
}

.service-lightbox-header h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
}

.service-lightbox-close {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.service-lightbox-close svg {
  width: 19px;
  height: 19px;
}

.service-lightbox-viewer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  height: min(60vh, 600px);
  overflow: hidden;
  background: #06121d;
}

.service-lightbox-viewer > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.service-lightbox-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(7, 28, 45, 0.8);
  color: white;
}

.service-lightbox-arrow.previous {
  left: 17px;
}

.service-lightbox-arrow.next {
  right: 17px;
}

.service-lightbox-arrow svg {
  width: 23px;
  height: 23px;
}

.service-lightbox-arrow:disabled {
  display: none;
}

.service-lightbox-footer {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 88px;
  padding: 13px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

#serviceLightboxCounter {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 700;
}

.service-lightbox-thumbnails {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.service-lightbox-thumbnail {
  flex: 0 0 65px;
  width: 65px;
  height: 53px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 3px;
  background: #152c42;
  opacity: 0.65;
}

.service-lightbox-thumbnail.active {
  border-color: white;
  opacity: 1;
}

.service-lightbox-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.service-lightbox-open {
  overflow: hidden;
}


/* ============================================================
   HOME SERVICE COVER IMAGES
   ============================================================ */

#homeServices .service-card {
  cursor: pointer;
  overflow: hidden;
}

#homeServices .service-card:focus-visible {
  outline: 3px solid #709bc0;
  outline-offset: 3px;
}

#homeServices .service-photo {
  overflow: hidden;
}

#homeServices .service-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.3s ease;
}

#homeServices .service-card:hover .service-photo img {
  transform: scale(1.05);
}


/* ============================================================
   TABLET
   ============================================================ */

@media (max-width: 1000px) {
  .services-page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .services-page-intro-layout {
    gap: 35px;
  }

  .services-page-hero-mark {
    right: -35px;
    width: min(48vw, 420px);
    opacity: 0.08;
  }
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 600px) {
  .services-page-hero-inner {
    min-height: 320px;
    padding-top: 55px;
    padding-bottom: 55px;
  }

  .services-page-hero h1 {
    font-size: clamp(45px, 11vw, 60px);
  }

  .services-page-hero-copy > p:not(.eyebrow) {
    font-size: 13px;
  }

  .services-page-hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .services-page-hero-actions .btn {
    width: 100%;
  }

  .services-page-hero-mark {
    right: -45px;
    top: 54%;
    width: 78%;
    max-width: 340px;
    opacity: 0.065;
  }

  .services-page-intro {
    padding: 45px 0;
  }

  .services-page-intro-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .services-page-intro-layout > p {
    font-size: 13px;
  }

  .services-page-section {
    padding: 48px 0 60px;
  }

  .services-page-section-heading {
    align-items: start;
    gap: 12px;
  }

  .services-page-count {
    padding-top: 4px;
    font-size: 9px;
  }

  .services-page-grid {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  .services-page-card-photo {
    height: 215px;
  }

  .services-page-card-content {
    padding: 19px;
  }

  .services-page-card-content > p {
    min-height: 0;
  }

  .services-page-cta {
    padding: 48px 0;
  }

  .services-page-cta-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 25px;
  }

  .services-page-cta .btn {
    width: 100%;
  }

  .service-lightbox {
    padding: 0;
  }

  .service-lightbox-panel {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .service-lightbox-header {
    padding: 17px;
  }

  .service-lightbox-header h2 {
    font-size: 17px;
  }

  .service-lightbox-viewer {
    flex: 1;
    height: auto;
    min-height: 0;
  }

  .service-lightbox-arrow {
    width: 35px;
    height: 35px;
  }

  .service-lightbox-arrow.previous {
    left: 9px;
  }

  .service-lightbox-arrow.next {
    right: 9px;
  }

  .service-lightbox-footer {
    min-height: 83px;
    padding: 12px 15px;
    gap: 12px;
  }

  .service-lightbox-thumbnail {
    flex-basis: 56px;
    width: 56px;
    height: 47px;
  }

}

/* ============================================================
   GALLERY AVAILABILITY STATES
   ============================================================ */

.services-page-card[data-has-gallery="false"] {
  cursor: default;
}

.services-page-card[data-has-gallery="false"]:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
  border-color: var(--border);
}

.services-page-card-link.is-muted {
  color: var(--text-muted);
}

.services-page-card-link.is-muted svg {
  display: none;
}


/* ============================================================
   FULL SCOPE OF SERVICES
   ============================================================ */

.services-scope {
  padding: 75px 0;
  background: var(--white);
  border-top: 1px solid var(--border);
}

.services-scope-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 60px;
  align-items: start;
}

.services-scope-intro h2 {
  color: var(--navy-dark);
  font-family: var(--font-heading);
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.services-scope-intro > p:not(.eyebrow) {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.8;
}

.services-scope-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--border);
}

.services-scope-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 12px 6px;
  border-bottom: 1px solid var(--border);
  color: var(--navy-dark);
  font-size: 14px;
  font-weight: 700;
}

.services-scope-list li:nth-child(odd) {
  padding-right: 18px;
}

.services-scope-list svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  color: var(--navy-soft);
}

@media (max-width: 900px) {
  .services-scope-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 600px) {
  .services-scope {
    padding: 48px 0;
  }

  .services-scope-list {
    grid-template-columns: 1fr;
  }

  .services-scope-list li {
    min-height: 52px;
    font-size: 15px;
  }

  .services-page-card-content > p {
    font-size: 14px;
  }

  .services-page-card-heading h3 {
    font-size: 19px;
  }

  .services-page-card-link {
    font-size: 14px;
  }

  .services-page-count {
    font-size: 10px;
  }

  .services-page-hero-copy > p:not(.eyebrow),
  .services-page-intro-layout > p,
  .services-page-cta p:not(.eyebrow) {
    font-size: 15px;
  }
}


/* A lone last card (7 services) is centred instead of hanging left. */
@media (min-width: 1001px) {
  .services-page-grid > .services-page-card:last-child:nth-child(3n + 1) {
    grid-column: 2;
  }
}


/* ============================================================
   SERVICE CARDS — compact swipe carousel on phones and tablets
   (desktop keeps the 3-column grid)
   ============================================================ */

@media (max-width: 900px) {
  .services-page-grid {
    --cards-gutter: 24px;
    display: grid;
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-auto-columns: 40%;
    gap: 14px;
    margin-inline: calc(var(--cards-gutter) * -1);
    padding: 4px var(--cards-gutter) 12px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--cards-gutter);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .services-page-grid::-webkit-scrollbar {
    display: none;
  }

  .services-page-card {
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
    box-shadow: 0 4px 14px rgba(6, 23, 36, 0.06);
  }

  .services-page-card:hover {
    transform: none;
  }

  .services-page-card-photo {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .services-page-card-number {
    left: 10px;
    top: 10px;
    width: 30px;
    height: 30px;
    font-size: 10px;
  }

  .services-page-card-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 14px 14px 16px;
  }

  .services-page-card-heading h3 {
    font-size: 16px;
  }

  .services-page-card-heading > svg {
    width: 16px;
    height: 16px;
  }

  /* Short description on the card; the full information opens on tap. */
  .services-page-card-content > p {
    display: -webkit-box;
    min-height: 0;
    margin-top: 8px;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.55;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
  }

  .services-page-card-link {
    margin-top: auto;
    padding-top: 12px;
    font-size: 12px;
  }
}

@media (max-width: 600px) {
  .services-page-grid {
    --cards-gutter: 16px;
    grid-auto-columns: 64%;
    gap: 12px;
  }

  .services-page-card-photo {
    height: auto;
  }

  .services-page-card-content {
    padding: 13px 13px 15px;
  }

  .services-page-card-heading h3 {
    font-size: 16px;
  }

  .services-page-card-content > p {
    font-size: 13px;
  }

  .services-page-card-link {
    font-size: 12px;
  }
}

@media (max-width: 360px) {
  .services-page-grid {
    --cards-gutter: 12px;
    grid-auto-columns: 68%;
  }
}


/* ============================================================
   PHONE — vertical composition (portrait / 9:16 screens)
   Same look as desktop, re-proportioned for a tall screen:
   tighter sections, compact headings, service scope as tiles.
   ============================================================ */

@media (max-width: 600px) {
  .services-page-hero-inner {
    min-height: 0;
    padding-top: 46px;
    padding-bottom: 46px;
  }

  .services-page-hero h1 {
    font-size: clamp(40px, 11.5vw, 52px);
    margin-bottom: 14px;
  }

  .services-page-hero-copy > p:not(.eyebrow) {
    font-size: 14.5px;
    line-height: 1.6;
  }

  .services-page-hero-actions {
    gap: 10px;
    margin-top: 22px;
  }

  .services-page-hero-actions .btn {
    min-height: 48px;
  }

  .services-page-intro {
    padding: 36px 0;
  }

  .services-page-intro h2 {
    font-size: clamp(25px, 7vw, 30px);
  }

  .services-page-intro-layout {
    gap: 14px;
  }

  .services-page-intro-layout > p {
    font-size: 14.5px;
    line-height: 1.65;
  }

  .services-page-section {
    padding: 38px 0 42px;
  }

  .services-page-section-heading {
    margin-bottom: 18px;
  }

  .services-page-section-heading h2 {
    font-size: clamp(25px, 7vw, 30px);
  }

  .services-scope {
    padding: 38px 0 42px;
  }

  .services-scope-layout {
    gap: 20px;
  }

  .services-scope-intro h2 {
    font-size: clamp(25px, 7vw, 30px);
  }

  .services-scope-intro p {
    font-size: 14.5px;
    line-height: 1.65;
  }

  /* Scope list as a 2-column grid of compact tiles instead of a long list. */
  .services-scope-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    border-top: 0;
  }

  .services-scope-list li {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    min-height: 86px;
    padding: 13px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #f7f9fb;
    font-size: 13.5px;
    line-height: 1.3;
  }

  .services-scope-list svg {
    width: 18px;
    height: 18px;
  }

  .services-page-cta {
    padding: 40px 0;
  }

  .services-page-cta-inner {
    gap: 20px;
  }

  .services-page-cta .btn {
    min-height: 48px;
  }
}
