/* Reset and base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: ghostwhite;
  color: black;
  line-height: 1.6;
  scroll-behavior: smooth;
  padding-top: 70px; /* To offset fixed navbar */
}

/* Navbar reuse */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1rem 2rem;
  background: #8c1528;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(6px);
  font-weight: 700;
}

.nav-links a.active {
  background-color: white;
  color: black;
  border-radius: 10px;
  padding: 0.3rem 0.8rem;
  transition: background-color 0.3s, color 0.3s;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-weight: 700;
  font-size: 1.2rem;
}

.logo img {
  width: 40px;
  height: 40px;
}

.navbar ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.navbar a {
  padding: 0.4rem 1rem;
  border-radius: 20px;
  transition: all 0.3s ease;
  color: whitesmoke;
   text-decoration: none;
}

.navbar a:hover,
.navbar a.active {
  background-color: white;
  color: black;
}

/* Page Title */
.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin: 2rem 0 3rem;
  color: #8c1528;
  font-weight: 700;
}

/* Gallery container */
.gallery-section {
  max-width: 1200px;
  margin: 0 auto 4rem;
  padding: 0 1rem;
}

/* Each category */
.gallery-category {
  margin-bottom: 3rem;

}

.gallery-category h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: #4b0e1b;
  border-bottom: 2px solid #8c1528;
  padding-bottom: 0.3rem;
}

/* Grid for images */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  column-gap: 3rm;
  row-gap: 3rm;
  padding: 1rem;
}

.gallery-grid img {
  width: 60%;
  height: 150px;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,128,0,0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-grid img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(140, 21, 40, 0.5);
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.85);
  backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 1rem;
}

.modal-img {
  max-width: 90vw;
  max-height: 70vh;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,128,0,0.7);
  margin-bottom: 1rem;
  user-select: none;
}

/* Modal controls container */
.modal-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
}

/* Buttons styling */
.modal-controls button {
  background-color: #8c1528;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 30px;
  color: white;
  cursor: pointer;
  font-size: 1.3rem;
  user-select: none;
  transition: background-color 0.3s ease;
}

.modal-controls button:disabled {
  background-color: #444;
  cursor: not-allowed;
}

.modal-controls button:hover:not(:disabled) {
  background-color: #b22b3a;
}

/* Close button */
.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2.5rem;
  font-weight: bold;
  color: #e33;
  cursor: pointer;
  user-select: none;
  transition: color 0.3s ease;
}

.close-btn:hover {
  color: #ff4444;
}

/* Responsive text sizes */
@media (max-width: 600px) {
  .gallery-grid img {
    height: 120px;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .gallery-category h2 {
    font-size: 1.5rem;
  }
}


#backToTop {
  position: fixed;
  bottom: 40px;
  right: 30px;
  z-index: 1000;
  background-color: rgba(0, 51, 0, 0.6); /* Semi-transparent dark green */
  color: white;
  border: 2px solid white;
  border-radius: 12px; /* Rounded edges */
  padding: 10px 14px;
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, background-color 0.3s ease;
  backdrop-filter: blur(4px); /* optional: adds nice modern transparency effect */
}

#backToTop:hover {
  background-color: rgba(0, 128, 0, 0.85); /* Stronger green on hover */
  border-color: #cfffcc;
}