/* ----------------------- Global Styles ----------------------- */
body {
  margin: 0;
  font-family: 'Raleway', sans-serif;
  background: url('../images/galleryBG.png') no-repeat center bottom fixed;
}

/* ----------------------- Navbar Styling ----------------------- */
.navbar {
  background: none;
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* --- Heart-to-X Navbar Toggler Styles --- */
.navbar-toggler {
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  padding: 0;
}

.heart-icon {
  width: 30px;
  height: 30px;
  background-color: #fff;
  position: relative;
  transform: rotate(-45deg);
  transition: all 0.3s ease-in-out;
}

.heart-icon::before,
.heart-icon::after {
  content: "";
  position: absolute;
  width: 30px;
  height: 30px;
  background-color: #fff;
  border-radius: 50%;
  transition: all 0.3s ease-in-out;
}

.heart-icon::before {
  top: -15px;
  left: 0;
}

.heart-icon::after {
  top: 0;
  left: 15px;
}

/* When expanded, change heart into an X */
.navbar-toggler[aria-expanded="true"] .heart-icon {
  background: transparent;
  transform: rotate(0deg);
}

.navbar-toggler[aria-expanded="true"] .heart-icon::before,
.navbar-toggler[aria-expanded="true"] .heart-icon::after {
  width: 35px;
  height: 5px;
  background: #fff;
  border-radius: 2px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}

.navbar-toggler[aria-expanded="true"] .heart-icon::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.navbar-brand {
  font-size: 3.5rem;
  font-family: 'Bonheur Royale', cursive;
  color: #fff;
  text-shadow: 3px 3px 12px rgba(0, 0, 0, 0.9);
  flex-grow: 1;
}

.navbar-brand:hover {
  transition: all 0.5s ease-in-out;
  color: #FFD700;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 1);
}

.navbar-nav .nav-item .nav-link {
  color: white;
  font-size: 1.2rem;
  margin-right: 20px;
  font-family: 'Raleway', sans-serif;
  font-weight: bold;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
}

.navbar-nav .nav-item .nav-link:hover {
  transition: all 0.5s ease-in-out;
  color: #FFD700;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 1);
}

/* Navbar Shrink: When scrolled, the navbar background turns black */
.navbar.shrink {
  background: black !important;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
}

/* ----------------------- Mobile Navbar Background ----------------------- */
/* On mobile view (screens under 992px), force the navbar background to black */
@media (max-width: 992px) {
  .navbar {
    background: black !important;
  }
}

/* ----------------------- Gallery Container ----------------------- */
.gallery-container {
  padding: 6rem 2rem;
  text-align: center;
}

.gallery-title {
  font-family: 'Bonheur Royale', cursive;
  font-size: 3.5rem;
  color: #333;
  margin-bottom: 2rem;
}

/* ----------------------- Photo Grid ----------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  padding: 10px;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.3s ease-in-out;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease-in-out;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* ----------------------- Lightbox Modal ----------------------- */
.image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
  box-sizing: border-box;
}

.image-modal .modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  animation: fadeIn 0.3s ease-in-out;
}

.image-modal img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 80vh;
  border-radius: 10px;
  box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}

/* Close Button */
.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  transition: transform 0.2s ease-in-out;
}

.close-modal:hover {
  transform: scale(1.1);
}

/* Fade-in Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ----------------------- Responsive Adjustments ----------------------- */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: repeat(1, 1fr);
  }
  .image-modal .modal-content {
    max-width: auto;
    max-height: 85vh;
  }
  .close-modal {
    font-size: 1.5rem;
  }
}

/* ----------------------- Footer ----------------------- */
footer {
  background-color: #343a40;
  color: white;
  text-align: center;
  padding: 1rem 0;
}
