* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.gallery-section {
  width: 100%;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #1a1a2e;
  background-color: var(--color-surface, #f8f9fa);
  padding: 48px 0;
}

.gallery-title {
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  color: var(--color-heading, #0d0d1a);
  letter-spacing: -0.02em;
}

.gallery-subtitle {
  text-align: center;
  color: #4b5563;
  font-size: 0.95rem;
  margin: 8px auto 32px;
  max-width: 540px;
  line-height: 1.6;
}

.service-block {
  margin-bottom: 40px;
}

.service-block:last-child {
  margin-bottom: 0;
}

.service-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-primary, #0432ff);
}

.service-icon {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary, #0432ff);
  border-radius: 7px;
  flex-shrink: 0;
}

.service-icon svg {
  width: 16px;
  height: 16px;
  fill: white;
}

.service-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-heading, #0d0d1a);
  text-transform: capitalize;
  flex: 1;
}

.project-count {
  font-size: 0.75rem;
  color: #9ca3af;
  font-weight: 500;
  white-space: nowrap;
}

.project-block {
  margin-bottom: 20px;
}

.project-block:last-child {
  margin-bottom: 0;
}

.project-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #4b5563;
  margin-bottom: 8px;
  padding-left: 2px;
}

.carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
}

.carousel-viewport {
  overflow: hidden;
  flex: 1;
  border-radius: 10px;
}

.carousel-track {
  display: flex;
  gap: 10px;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.carousel-track.no-transition {
  transition: none;
}

.carousel-arrow {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: white;
  border: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
  z-index: 1;
}

.carousel-arrow:active {
  transform: scale(0.92);
}

.carousel-arrow:hover {
  background: var(--color-primary, #0432ff);
  box-shadow: 0 2px 8px rgba(4, 50, 255, 0.25);
}

.carousel-arrow:hover svg {
  fill: white;
}

.carousel-arrow svg {
  width: 18px;
  height: 18px;
  fill: #555;
  transition: fill 0.2s;
}

.gallery-item {
  flex: 0 0 auto;
  width: 200px;
  height: 150px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  background: #eee;
}

.gallery-item:active {
  transform: scale(0.97);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-item .img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.35), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
  display: flex;
  align-items: flex-end;
  padding: 10px;
}

.gallery-item:hover .img-overlay {
  opacity: 1;
}

.gallery-item .expand-icon {
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item .expand-icon svg {
  width: 12px;
  height: 12px;
  fill: #444;
}

/* lightbox */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 10000;
  justify-content: center;
  align-items: center;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.lightbox-close:active {
  transform: scale(0.92);
}

.lightbox-close svg {
  width: 20px;
  height: 20px;
  fill: white;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.lightbox-nav:active {
  transform: translateY(-50%) scale(0.92);
}

.lightbox-nav svg {
  width: 22px;
  height: 22px;
  fill: white;
}

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

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

.lightbox-image-wrapper {
  max-width: 88vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image-wrapper img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-counter {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.5);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
}

@media (min-width: 600px) {
  .gallery-section {
    padding: 48px 0;
  }

  .gallery-title {
    font-size: 2rem;
  }

  .gallery-subtitle {
    font-size: 1rem;
    margin-bottom: 36px;
  }

  .service-block {
    margin-bottom: 48px;
  }

  .service-header h2 {
    font-size: 1.25rem;
  }

  .service-icon {
    width: 34px;
    height: 34px;
  }

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

  .gallery-item {
    width: 220px;
    height: 165px;
  }

  .carousel-track {
    gap: 12px;
  }

  .carousel-arrow {
    width: 36px;
    height: 36px;
  }
}

@media (min-width: 1024px) {
  .gallery-section {
    padding: 80px 0;
  }

  .gallery-title {
    font-size: 2.5rem;
  }

  .gallery-subtitle {
    font-size: 1.1rem;
    margin-bottom: 44px;
  }

  .service-block {
    margin-bottom: 60px;
  }

  .service-header {
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom-width: 3px;
  }

  .service-header h2 {
    font-size: 1.5rem;
  }

  .service-icon {
    width: 36px;
    height: 36px;
  }

  .service-icon svg {
    width: 20px;
    height: 20px;
  }

  .project-name {
    font-size: 0.9rem;
    margin-bottom: 10px;
  }

  .project-block {
    margin-bottom: 28px;
  }

  .gallery-item {
    width: 280px;
    height: 210px;
  }

  .carousel-track {
    gap: 16px;
  }

  .carousel-arrow {
    width: 40px;
    height: 40px;
  }

  .carousel-arrow svg {
    width: 20px;
    height: 20px;
  }

  .carousel-wrapper {
    gap: 8px;
  }
}
