/* Blog image lightbox modal – slideshow */
.blog-image-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}
.blog-image-modal.is-open {
  display: flex;
}
.blog-image-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  cursor: pointer;
}
.blog-image-modal-content {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.blog-image-modal-content img {
  max-width: 100%;
  max-height: 95vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.blog-image-modal-close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: #333;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s, color 0.2s;
}
.blog-image-modal-close:hover {
  background: #2c5aa0;
  color: #fff;
}
.blog-image-modal-prev,
.blog-image-modal-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s, color 0.2s, opacity 0.2s;
  z-index: 2;
}
.blog-image-modal-prev:hover,
.blog-image-modal-next:hover {
  background: #2c5aa0;
  color: #fff;
}
.blog-image-modal-prev {
  left: -60px;
}
.blog-image-modal-next {
  right: -60px;
}
@media (max-width: 768px) {
  .blog-image-modal-prev {
    left: 8px;
  }
  .blog-image-modal-next {
    right: 8px;
  }
  .blog-image-modal-prev,
  .blog-image-modal-next {
    width: 40px;
    height: 40px;
    font-size: 20px;
    background: rgba(255, 255, 255, 0.9);
  }
}
.blog-image-modal-counter {
  position: absolute;
  bottom: -36px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 14px;
  white-space: nowrap;
}
.post-info img {
  cursor: pointer;
}

/* Blog gallery images on phone: responsive height and spacing */
@media (max-width: 767px) {
  .post-info .row.mt-4.mb-4 {
    margin-left: -10px !important;
    margin-right: -10px !important;
    margin-bottom: 24px !important;
  }
  .post-info .row.mt-4.mb-4:last-of-type {
    margin-bottom: 0 !important;
  }
  .post-info .row .col-md-4,
  .post-info .row .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 20px;
  }
  .post-info .row .col-md-4:last-child,
  .post-info .row .col-md-6:last-child {
    margin-bottom: 0;
  }
  .post-info .row img.img-fluid {
    width: 100% !important;
    height: auto !important;
    min-height: 200px;
    max-height: 320px;
    object-fit: cover;
    display: block;
  }
}

/* Lightbox on phone: keep controls in view, enough padding */
@media (max-width: 767px) {
  .blog-image-modal {
    padding: 12px;
  }
  .blog-image-modal-content {
    max-width: 100%;
    max-height: 88vh;
  }
  .blog-image-modal-content img {
    max-height: 85vh;
  }
  .blog-image-modal-close {
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    font-size: 22px;
  }
  .blog-image-modal-prev {
    left: 6px;
  }
  .blog-image-modal-next {
    right: 6px;
  }
  .blog-image-modal-counter {
    bottom: -32px;
    font-size: 13px;
  }
}
