/* =========================================================
   IMAGE GALLERY COMPONENT
   ========================================================= */

.image-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.image-gallery__link {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  line-height: 0;
}

.image-gallery__link img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.25s ease;
}

.image-gallery__link:hover img,
.image-gallery__link:focus-visible img {
  transform: scale(1.03);
}

/* Tablet */
@media (max-width: 900px) {
  .image-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile */
@media (max-width: 600px) {
  .image-gallery {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

/* =========================================================
   GALLERY LIGHTBOX
   ========================================================= */

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.9);
}

.gallery-lightbox.is-open {
  display: flex;
}

.gallery-lightbox__content {
  max-width: min(92vw, 1400px);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.gallery-lightbox__image {
  display: block;
  max-width: 100%;
  max-height: 72vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  touch-action: pan-y;
}

.gallery-lightbox__caption {
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: center;
  min-height: 1.4em;
  max-width: 90%;
}

/* Navigation */
.gallery-lightbox__nav,
.gallery-lightbox__close {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.gallery-lightbox__nav:hover,
.gallery-lightbox__close:hover,
.gallery-lightbox__nav:focus-visible,
.gallery-lightbox__close:focus-visible {
  background: rgba(255, 255, 255, 0.24);
}

.gallery-lightbox__close {
  top: 1rem;
  right: 1rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
}

.gallery-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
}

.gallery-lightbox__nav--prev {
  left: 1rem;
}

.gallery-lightbox__nav--next {
  right: 1rem;
}

/* Thumbnail strip */
.gallery-lightbox__thumbs {
  display: flex;
  gap: 0.75rem;
  max-width: 100%;
  overflow-x: auto;
  padding: 0.25rem 0 0.5rem;
  scrollbar-width: thin;
}

.gallery-lightbox__thumbs::-webkit-scrollbar {
  height: 8px;
}

.gallery-lightbox__thumbs::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.35);
  border-radius: 999px;
}

.gallery-lightbox__thumb {
  flex: 0 0 auto;
  width: 88px;
  height: 58px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: transparent;
  cursor: pointer;
  opacity: 0.72;
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.gallery-lightbox__thumb:hover,
.gallery-lightbox__thumb:focus-visible {
  opacity: 1;
  transform: translateY(-1px);
}

.gallery-lightbox__thumb.is-active {
  opacity: 1;
  border-color: #fff;
}

.gallery-lightbox__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Mobile improvements */
@media (max-width: 767px) {
  .gallery-lightbox {
    padding: 0.75rem;
  }

  .gallery-lightbox__content {
    width: 100%;
    gap: 0.75rem;
  }

  .gallery-lightbox__image {
    max-height: 62vh;
  }

  .gallery-lightbox__thumb {
    width: 72px;
    height: 48px;
  }

  .gallery-lightbox__nav {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.6rem;
  }

  .gallery-lightbox__nav--prev {
    left: 0.5rem;
  }

  .gallery-lightbox__nav--next {
    right: 0.5rem;
  }

  .gallery-lightbox__close {
    top: 0.5rem;
    right: 0.5rem;
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.8rem;
  }
}

.article-highlight-box {
  margin: 28px 0;
  padding: 18px 22px;
  background: #f4f7fb;
  border-left: 5px solid #1e3a8a;
  border-radius: 4px;
}

.article-highlight-box h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  line-height: 1.3;
}

.article-highlight-box p {
  margin: 0 0 10px;
}

.article-highlight-box p:last-child {
  margin-bottom: 0;
}

.author-box {
  margin: 28px 0;
  padding: 18px 22px;
  background: #f4f7fb;
  border-left: 5px solid #1e3a8a;
  border-radius: 4px;
}

.author-box__inner {
  display: flex;
  align-items: center;
  gap: 18px;
}

.author-box__image img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
}

.author-box__content h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.author-box__content p {
  margin: 0 0 8px;
}

.author-box__content p:last-child {
  margin-bottom: 0;
}

/* Mobil */
@media (max-width: 600px) {
  .author-box__inner {
    flex-direction: column;
    text-align: center;
  }

  .author-box__image img {
    width: 80px;
    height: 80px;
  }
}