/* Kano Electric — Gallery grid + HD lightbox */

.ke-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 2.5rem;
  list-style: none;
  padding: 0;
}

.ke-gallery-row-gap {
  grid-column: 1 / -1;
  height: 100px;
  pointer-events: none;
}

.ke-gallery-item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 6px;
  background: #f4f6f8;
  aspect-ratio: 4 / 3;
  cursor: pointer;
}

.ke-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.ke-gallery-item::after {
  content: "\f00e";
  font-family: FontAwesome;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 29, 41, 0.55);
  color: #fff;
  font-size: 1.4rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ke-gallery-item:hover img,
.ke-gallery-item:focus img {
  transform: scale(1.06);
}

.ke-gallery-item:hover::after,
.ke-gallery-item:focus::after {
  opacity: 1;
}

.ke-gallery-cta {
  text-align: center;
  margin-top: 2.75rem;
}

a.ke-more-works {
  display: inline-block;
  background: #ff6768;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 14px 36px;
  border-radius: 4px;
  border: 2px solid #ff6768;
  transition: background 0.25s ease, color 0.25s ease;
}

a.ke-more-works:hover,
a.ke-more-works:focus {
  background: #101d29;
  border-color: #101d29;
  color: #fff;
  text-decoration: none;
}

.ke-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(11, 23, 33, 0.92);
}

.ke-lightbox.is-open {
  display: flex;
}

.ke-lightbox-stage {
  position: relative;
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ke-lightbox-stage img {
  max-width: 92vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.ke-lightbox-stage img.is-loaded {
  opacity: 1;
}

.ke-lightbox-counter {
  margin-top: 12px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.ke-lightbox-btn {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  z-index: 2;
}

.ke-lightbox-btn:hover,
.ke-lightbox-btn:focus {
  background: #ff6768;
  outline: none;
}

.ke-lightbox-close {
  top: 18px;
  right: 18px;
  font-size: 32px;
}

.ke-lightbox-prev {
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.ke-lightbox-next {
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.ke-lightbox-spinner {
  position: absolute;
  width: 42px;
  height: 42px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #ff6768;
  border-radius: 50%;
  animation: ke-spin 0.7s linear infinite;
  display: none;
}

.ke-lightbox.is-loading .ke-lightbox-spinner {
  display: block;
}

@keyframes ke-spin {
  to {
    transform: rotate(360deg);
  }
}

body.ke-lightbox-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .ke-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }

  .ke-lightbox-btn {
    width: 42px;
    height: 42px;
    font-size: 22px;
  }

  .ke-lightbox-prev {
    left: 8px;
  }

  .ke-lightbox-next {
    right: 8px;
  }

  a.ke-more-works {
    padding: 12px 26px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .ke-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
