.service-single {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #6EC1E473 0%, #FFFFFF 100%);
  color: #201e1d;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  line-height: 1.55;
  padding-bottom: 60px;
}

.service-header,
.service-gallery {
  position: relative;
  z-index: 1;
  max-width: 1140px;
  margin: 0 auto;
  box-sizing: border-box;
  padding-left: 20px;
  padding-right: 20px;
}

.service-header {
  padding-top: 60px;
  padding-bottom: 35px;
  animation: service-fade-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes service-fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.service-badge {
  display: inline-flex;
  align-items: center;
  background: #106BB5;
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.service-badge:hover {
  background: #0d5690;
}

.service-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 48px;
  line-height: 1.1;
  margin: 0 0 16px;
}

.service-text {
  margin: 0;
  max-width: 640px;
  color: rgba(32, 30, 29, 0.75);
}

.service-text > *:first-child {
  margin-top: 0;
}

.service-text > *:last-child {
  margin-bottom: 0;
}

.service-gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
  margin-top: 40px;
}

.service-tile {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #ebddc5;
  border-radius: 10px;
  box-sizing: border-box;
  transform: scale(1);
  opacity: 0;
  transition: transform 0.3s ease;
}

.service-tile.is-visible {
  opacity: 1;
  transition: opacity 0.5s ease, transform 0.3s ease;
}

.service-tile:hover {
  transform: scale(0.96);
}

.service-tile-btn {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: none;
  padding: 0;
  cursor: pointer;
  background: transparent;
}

.service-tile-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) contrast(0.95) brightness(1.03);
  transition: filter 0.2s ease, transform 0.3s ease;
}

.service-tile-btn:hover .service-tile-img,
.service-tile-btn:focus-visible .service-tile-img {
  filter: saturate(1) contrast(1) brightness(1.08);
  transform: scale(1.2);
}

@media (max-width: 765px) {
  .service-gallery {
    grid-template-columns: repeat(4, 1fr);
  }

  .service-title {
    font-size: 34px;
  }
}

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

/* Archive grid: same card, 3 per row at the original (pre-halved) size */

.service-archive-empty {
  position: relative;
  z-index: 1;
  max-width: 1140px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 0 20px 60px;
}

.service-archive-grid {
  position: relative;
  z-index: 1;
  max-width: 1140px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 0 20px 60px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.service-archive-item {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-archive-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Archive cards are 20% shorter than they are wide */
.service-archive-item .service-tile {
  aspect-ratio: 5 / 4;
}

.service-archive-title {
  margin: 10px 0 0;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 16px;
  text-align: center;
}

.service-archive-title a {
  color: #201e1d;
  text-decoration: none;
}

.service-archive-title a:hover {
  text-decoration: underline;
}

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

@media (max-width: 480px) {
  .service-archive-grid {
    grid-template-columns: 1fr;
  }
}

/* Extra content blocks: Link card & Downloads */

.service-link-card-wrap,
.service-downloads-wrap {
  position: relative;
  z-index: 1;
  max-width: 1140px;
  margin: 40px auto 0;
  box-sizing: border-box;
  padding-left: 20px;
  padding-right: 20px;
}

.service-link-card {
  display: block;
  max-width: 480px;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  background: #ebddc5;
  box-shadow: 0 8px 24px rgba(46, 43, 37, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-link-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(46, 43, 37, 0.18);
}

.service-link-card-img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.service-link-card-title {
  display: block;
  padding: 16px 20px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: #201e1d;
}

.service-downloads {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 480px;
}

.service-download-item {
  border-bottom: 1px solid rgba(32, 30, 29, 0.15);
}

.service-download-item a {
  display: flex;
  align-items: center;
  padding: 14px 4px;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: #201e1d;
  text-decoration: none;
}

.service-download-item a::before {
  content: 'PDF';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 24px;
  margin-right: 12px;
  border-radius: 4px;
  background: #106BB5;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.service-download-item a:hover {
  text-decoration: underline;
}

/* Lightbox */

.service-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: rgba(46, 43, 37, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.service-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.service-lightbox-box {
  position: relative;
  width: 100%;
  max-width: 640px;
  background: #f9f4ed;
  border-radius: 28px;
  box-shadow: 0 12px 32px rgba(46, 43, 37, 0.22);
  padding: 22px;
  transform: scale(0.96);
  transition: transform 0.25s ease;
}

.service-lightbox.is-open .service-lightbox-box {
  transform: scale(1);
}

.service-lightbox-img {
  display: block;
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  background: #ebddc5;
  border-radius: 16px;
}

.service-lightbox-caption {
  margin-top: 16px;
}

.service-lightbox-title {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  color: #201e1d;
}

.service-lightbox-description {
  margin: 6px 0 0;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(32, 30, 29, 0.75);
  white-space: pre-line;
}

.service-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  cursor: pointer;
  color: #201e1d;
  background: rgba(249, 244, 237, 0.92);
  border: 1px solid rgba(32, 30, 29, 0.2);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(46, 43, 37, 0.18);
}

.service-lightbox.has-nav .service-lightbox-nav {
  display: inline-flex;
}

.service-lightbox-nav:hover {
  background: #eee7db;
}

.service-lightbox-nav svg {
  width: 18px;
  height: 18px;
}

.service-lightbox-prev {
  left: 8px;
}

.service-lightbox-next {
  right: 8px;
}

@media (min-width: 850px) {
  .service-lightbox-prev {
    left: -64px;
  }

  .service-lightbox-next {
    right: -64px;
  }
}

@media (max-width: 500px) {
  .service-lightbox-nav {
    width: 34px;
    height: 34px;
  }

  .service-lightbox-prev {
    left: 6px;
  }

  .service-lightbox-next {
    right: 6px;
  }
}

.service-lightbox-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: #201e1d;
  background: transparent;
  border: 1px solid rgba(32, 30, 29, 0.3);
  padding: 9px 20px;
  border-radius: 999px;
}

.service-lightbox-close:hover {
  background: #eee7db;
}

@media (prefers-reduced-motion: reduce) {
  .service-header,
  .service-tile,
  .service-archive-item {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
