/* 
   Gallery Styles
*/

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
  width: 100%;
}

/* Gallery Container */
.gallery-container {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  min-height: 100vh;
  padding: 50px 20px;
}

/* Gallery Title */
.gallery-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

/* Gallery Item */
.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9; /* ya 4 / 3 */
  height: auto;
  box-shadow: rgba(67, 71, 85, 0.27) 0px 0px 0.25em,
              rgba(90, 125, 188, 0.05) 0px 0.25em 1em;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: #000;
  cursor: pointer;
}

.gallery-item:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery-item:hover img {
  transform: scale(1.2);
}

/* Gallery Overlay */
.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.1) 30%,
    rgba(0, 0, 0, 0.3) 60%,
    rgba(0, 0, 0, 0.7) 100%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  align-items: flex-end;
  padding: 20px;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* Gallery Caption */
.gallery-caption {
  transform: translateY(20px);
  transition: transform 0.4s ease;
  color: white;
  text-align: left;
}

.gallery-item:hover .gallery-caption {
  transform: translateY(0);
}

.gallery-caption h5 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: #fff;
}

.gallery-caption p {
  font-size: 0.875rem;
  opacity: 0.9;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

/* =========================
   POPUP MODAL (JS CONTROLLED)
========================= */

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: none;                 /* JS will toggle */
  align-items: center;
  justify-content: center;
}

/* Popup Container */
.popup-container {
  position: relative;
  width: 800px;
  height: 600px;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 75px rgba(0, 0, 0, 0.7);
  animation: popupFadeIn 0.3s ease-out;
  display: flex;
  flex-direction: column;
  z-index: 10000;
}

@keyframes popupFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Close Button */
.popup-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.popup-close:hover {
  background: rgba(231, 68, 93, 0.9);
  border-color: #e7445d;
  transform: rotate(90deg);
}

/* Popup Content */
.popup-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Popup Image */
.popup-content img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

/* Navigation Arrows */
.popup-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.popup-nav:hover {
  background: rgba(231, 68, 93, 0.9);
  border-color: #e7445d;
  transform: translateY(-50%) scale(1.1);
}

.popup-prev { left: 20px; }
.popup-next { right: 20px; }

/* Popup Caption */
.popup-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  padding: 25px;
  color: white;
  z-index: 10000;
}

.popup-caption h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: #fff;
}

.popup-caption p {
  font-size: 0.95rem;
  opacity: 0.9;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

/* =========================
   RESPONSIVE DESIGN
========================= */

@media (max-width: 1200px) {
  .gallery-item { height: 250px; }
}

@media (max-width: 992px) {
  .gallery-item { height: 220px; }
  .gallery-title { font-size: 2.5rem; }

  .popup-container {
    width: 700px;
    height: 525px;
  }
}

@media (max-width: 768px) {
  .gallery-item { height: 200px; }
  .gallery-title { font-size: 2rem; }

  .popup-container {
    width: 90vw;
    height: 70vh;
    max-width: 600px;
    max-height: 450px;
  }

  .popup-close {
    width: 35px;
    height: 35px;
    font-size: 1.2rem;
  }

  .popup-nav {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .popup-prev { left: 10px; }
  .popup-next { right: 10px; }

  .popup-caption {
    padding: 15px;
  }

  .popup-caption h3 { font-size: 1.2rem; }
  .popup-caption p { font-size: 0.85rem; }
}

@media (max-width: 576px) {
  .gallery-item { height: 180px; }

  .gallery-caption h5 { font-size: 1rem; }
  .gallery-caption p { font-size: 0.75rem; }

  .gallery-title { font-size: 1.75rem; }

  .popup-container {
    width: 95vw;
    height: 60vh;
    max-height: 400px;
    border-radius: 8px;
  }

  .popup-nav {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .popup-caption {
    padding: 10px;
  }

  .popup-caption h3 { font-size: 1.1rem; }
  .popup-caption p { font-size: 0.8rem; }
}





/* =========================
   NO DATA (EMPTY GALLERY)
========================= */

.no-data-wrapper {
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.no-data-box {
  /* background: #ffffff; */
  border-radius: 16px;
  padding: 40px 30px;
  text-align: center;
  max-width: 420px;
  width: 100%;
  /* box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08); */
  animation: fadeIn 0.4s ease;
}

.no-data-box i {
  font-size: 3.5rem;
  color: #e7445d;
  margin-bottom: 15px;
}

.no-data-box h3 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #222;
}

.no-data-box p {
  font-size: 0.95rem;
  color: #666;
  margin: 0;
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 576px) {
  .no-data-box {
    padding: 30px 20px;
  }

  .no-data-box i {
    font-size: 3rem;
  }

  .no-data-box h3 {
    font-size: 1.4rem;
  }

  .no-data-box p {
    font-size: 0.85rem;
  }
}
