  .gallery-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    margin-bottom: 20px;
    transition: all 0.3s ease;
  }

  .gallery-row.expanded {
    overflow-x: hidden;
    flex-wrap: wrap;
  }

  .gallery-row.single {
    justify-content: center;
  }

  .post-card {
    position: relative;
    width: 32%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
  }

  .gallery-row.single .post-card {
    width: 100%;
    aspect-ratio: auto;
  }

  .post-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s ease;
  }

  .post-card img:hover {
    transform: scale(1.03);
  }

  .more-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    border-radius: 6px;
    cursor: pointer;
  }
 /* Modal Container */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px; /* prevents edge overflow on small screens */
}

/* Modal Image - Fixed Width but Responsive */
.modal-content {
  width: 600px;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.3s ease;
  display: block;
  margin: auto;
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Navigation Buttons */
.prev, .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 42px;
  background: rgba(0,0,0,0.3);
  color: white;
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  user-select: none;
}

.prev:hover, .next:hover {
  background: rgba(255,255,255,0.2);
}

.prev { left: 20px; }
.next { right: 20px; }

/* Close Button */
.close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 36px;
  color: white;
  cursor: pointer;
}

.dots {
  text-align: center;
  margin-top: 12px;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 4px;
  background: #999;
  border-radius: 50%;
  cursor: pointer;
}

.dot.active {
  background: #fff;
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .modal-content {
    width: 90%;
  }

  .prev, .next {
    font-size: 30px;
    padding: 6px 10px;
  }

  .close {
    font-size: 30px;
    top: 16px;
    right: 20px;
  }
}



/* Fullscreen transparent background */
.connect-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5); /* dark transparent */
  backdrop-filter: blur(3px);     /* optional blur */
  z-index: 9998;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Modal box in center */
.connect-box {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  max-width: 360px;
  width: 100%;
  position: relative;
  z-index: 9999;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.connect-box .close-btn {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 22px;
  color: #555;
  cursor: pointer;
}

/* Optional: disable body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

.connect-box {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 360px;
  padding: 24px 20px;
  text-align: center;
  z-index: 9999; 
  backdrop-filter: blur(10px); /* blur behind */
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}


.connect-box .close-btn {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 22px;
  color: #555;
  cursor: pointer;
}

.connect-box .icon-image {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 16px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.connect-box h2 {
  font-size: 17px;
  color: #222;
  margin-bottom: 24px;
  line-height: 1.5;
}

.connect-box .open-btn {
  background-color: #007acc;
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.3s;
}

.connect-box .open-btn:hover {
  background-color: #005ea2;
}

@media (max-width: 480px) {
  .connect-box {
    padding: 20px 16px;
  }

  .connect-box .icon-image {
    width: 60px;
    height: 60px;
  }

  .connect-box h2 {
    font-size: 15px;
  }

  .connect-box .open-btn {
    font-size: 14px;
  }
}