/* Basic styles for the gallery */
.mc-gallery {
  display: block;
  clear: both;
}

.mc-gallery .mc-gallery-thumbnail {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.mc-gallery .mc-gallery-thumbnail img {
  display: block;
}

.mc-gallery .mc-gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(253, 253, 253, 0.8);
  color: #323232;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mc-gallery .mc-gallery-thumbnail:hover .mc-gallery-overlay {
  opacity: 1;
  pointer-events: none; /* Allow clicks to pass through */
}

.mc-gallery-overlay-caption {
  font-size: 16px;
  max-width: 90%;
  padding: 10px;
  text-align: center;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-wrap: break-word;
  line-height: 1.2;
}

/* Styles for the lightbox */
.mc-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(248, 246, 246, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 1000;
  overflow: auto;
  align-items: flex-start;
  padding-top: 60px;
}

.mc-lightbox img {
  width: 100%;
  height: auto;
  margin: auto;
  pointer-events: none;
}

#mc-lightbox-inner {
  width: 100%;
  max-width: 550px;
  background: white;
  padding: 10px 20px 40px 20px;
  border: 2px solid #bbbbbb;
  box-shadow: 0 2px 5px rgba(15, 15, 15, 0.25);
  margin-bottom: 80px;
}

.mc-controls {
  padding-bottom: 10px;
  padding-top: 5px;
}

.mc-controls::after {
  content: "";
  display: table;
  clear: both;
}

.mc-lightbox-caption {
  font-family: "Libre Franklin", "Helvetica Neue", helvetica, arial, sans-serif;
  color: #323232;
  font-size: 15px;
  margin-top: 10px;
  text-align: left;
  word-wrap: break-word;
}

.mc-lightbox-caption h1 {
  font-size: 18px;
  font-weight: 700;
  padding-bottom: 10px;
  border-bottom: 1px solid #ccc;
}

.mc-lightbox-caption h2 {
  font-size: 18px;
  font-weight: 700;
}

.mc-lightbox-caption a {
  color: #323232;
}

/* Class to show the lightbox */
.mc-lightbox.visible {
  opacity: 1;
  visibility: visible;
}

/* Class to disable background scrolling */
.mc-disable-scroll {
  overflow: hidden;
}

/* Close button in the lightbox */
.mc-lightbox-close {
  color: #7a7a7a;
  float:right;
  font-size: 22px;
  cursor: pointer;
}

/* Styles for the navigation arrows */
.mc-lightbox .prev,
.mc-lightbox .next {
  font-size: 20px;
  color: #7a7a7a;
  cursor: pointer;
  display: inline-block;
}

.mc-lightbox .prev:hover,
.mc-lightbox .next:hover,
.mc-lightbox-close:hover {
  opacity: .8;
}

.mc-lightbox .prev {
  margin-right: 10px;
}

.mc-lightbox .next {
  margin-left: 10px;
}

.mc-lightbox .disabled {
  cursor: default;
  opacity: .3 !important;
}

/* Utils */
.mc-hidden {
  display: none !important;
}

/* Loader Styles */
.mc-lightbox-loader {
  border: 5px solid #f3f3f3; /* Light grey */
  border-top: 5px solid #555; /* Dark grey */
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1001;
}

/* Animation for Loader */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}