/* ========================================
   Newspaper Gallery – Final Compact Version
   ======================================== */

/* Bootstrap-Based Layout (3 cards per row) */
#galleryGrid {
  margin-left: -12px;
  margin-right: -12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

#galleryGrid > div {
  padding-left: 12px;
  padding-right: 12px;
  margin-bottom: 25px;
}

/* Large screens – 3 per row */
@media (min-width: 1200px) {
  #galleryGrid > div {
    flex: 0 0 auto;
    width: 33.3333%;
  }
}

/* Medium screens – 2 per row */
@media (max-width: 1199px) and (min-width: 768px) {
  #galleryGrid > div {
    flex: 0 0 auto;
    width: 50%;
  }
}

/* Small screens – 1 per row */
@media (max-width: 767px) {
  #galleryGrid > div {
    flex: 0 0 auto;
    width: 100%;
  }
}

/* ========================================
   Card Design
   ======================================== */
.gallery-item-card {
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.gallery-item-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Image Section */
.gallery-item-img {
  width: 100%;
  height: 270px;
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid #eee;
}

.gallery-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.3s ease;
}

.gallery-item-card:hover .gallery-item-img img {
  transform: scale(1.05);
}

/* Zoom Overlay */
.zoom-icon-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item-card:hover .zoom-icon-overlay {
  opacity: 1;
}

.zoom-icon-overlay i {
  font-size: 36px;
  color: #fff;
}

/* ========================================
   Text Section (Info)
   ======================================== */
.gallery-item-info {
  padding: 12px 14px;
  text-align: left;
  background: #fff;
}

.gallery-item-info h5 {
  font-size: 17px;
  font-weight: 600;
  color: #222;
  margin-bottom: 6px;
}

.gallery-item-info p {
  font-size: 13.5px;
  color: #555;
  line-height: 1.5;
  margin-bottom: 5px;
}

.gallery-item-info i {
  color: #ff7e54;
  margin-right: 5px;
}

/* ========================================
   Modal (Popup)
   ======================================== */
#imageModal .modal-content {
  background: transparent;
  border: none;
}

#imageModal .modal-body {
  padding: 0;
}

#imageModal .modal-body img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

#imageModalLabel{
    color: white;
}


/* ========================================
   Pagination
   ======================================== */
.theme-pagination ul {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin-top: 25px;
}

.theme-pagination ul li a {
  display: inline-block;
  padding: 8px 14px;
  background: #ffffff;
  color: #333;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.theme-pagination ul li a:hover,
.theme-pagination ul li a.active {
  background: #ff7e54;
  color: #fff;
}
#imageModal {
    background-color: black
}

    #imageModal .btn-close {
        filter: invert(1) grayscale(100%) brightness(200%);
        opacity: 1;
    }
/* ========================================
   Responsive Fine-Tuning
   ======================================== */
@media (max-width: 1200px) {
  .gallery-item-img {
    height: 220px;
  }
}

@media (max-width: 992px) {
  .gallery-item-img {
    height: 210px;
  }
}

@media (max-width: 768px) {
  .gallery-item-img {
    height: 200px;
  }
  .gallery-item-info h5 {
    font-size: 16px;
  }
}
