* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background: #f5f7fb;
  overflow-x: hidden;
}

/* ================= SECTION ================= */
.masonry-section {
  padding: 0 0 70px;
  background: url("../images/Rectangle 308 (1).png") center/cover no-repeat;
}

.masonry-div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 70px;
}

.masonry-title {
  font-family: Merriweather;
  font-size: 36px;
  color: #1c3f94;
  font-family: Merriweather;
  font-weight: 700;
  font-style: Bold;

  letter-spacing: 1%;
}

.masonry-div button {
  padding: 10px 25px;
  border-radius: 8px;
  background: transparent;
  color: #ee1b22;
  border: 2px solid #ee1b22;
  cursor: pointer;
  transition: 0.4s;

  font-family: Poppins;
  font-weight: 600;
  font-style: SemiBold;
  font-size: 16px;

  letter-spacing: 1%;
}

.masonry-div button:hover {
  background: #ee1b22;
  color: #fff;
}

/* ================= SCROLL AREA ================= */
.masonry-wrapper {
  overflow: hidden;
  width: 100%;
}

.masonry-track {
  display: flex;
  gap: 30px;
  width: max-content;
  animation: moveLeft 80s linear infinite;
}

@keyframes moveLeft {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ================= MASONRY ================= */
.masonry-group {
  width: 260px;
  display: grid;
  row-gap: 18px;
}

.masonry-group img {
  width: 100%;
  border-radius: 18px;
  object-fit: cover;
  cursor: pointer;
  transition: 0.4s;
}

.masonry-group img:nth-child(1) {
  height: 180px;
}
.masonry-group img:nth-child(2) {
  height: 280px;
}
.masonry-group img:nth-child(3) {
  height: 220px;
}

.masonry-group img:hover {
  transform: scale(1.06);
}

/* ================= LIGHTBOX ================= */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: 0.4s;
  z-index: 99999;
}

.gallery-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.gallery-lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 20px;
}

/* ================= CONTROLS ================= */
.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 60px;
  color: #fff;
  cursor: pointer;
}

.gallery-prev {
  left: 40px;
}
.gallery-next {
  right: 40px;
}

.gallery-close {
  position: absolute;
  top: 25px;
  right: 40px;
  font-size: 42px;
  color: #fff;
  cursor: pointer;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  .masonry-div {
    flex-direction: column;
    gap: 15px;
  }
  .masonry-title {
    font-size: 24px;
    text-align: center;
  }
  .gallery-nav-btn {
    font-size: 40px;
  }
}