@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;600;700&display=swap');

:root {
  --main-color: #3867d6;
}

* {
  font-family: 'Nunito', sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-transform: capitalize;
  transition: .2s linear;
}

body {
  background: #222;
  color: #fff;
  overflow-x: hidden;
}

/* Navbar (matches homepage) */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #333;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 5%;
  z-index: 1000;
}

.logo {
  font-weight: bolder;
  color: #fff;
  font-size: 1.5rem;
}

.logo span {
  color: var(--main-color);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  font-size: 1.2rem;
  color: #fff;
  font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--main-color);
}

/* Gallery Section */
.gallery-section {
  padding: 10rem 9% 5rem;
  text-align: center;
}

.gallery-section h1 {
  font-size: 4rem;
  color: #fff;
  text-transform: uppercase;
  margin-bottom: 4rem;
  letter-spacing: 1px;
}

.gallery-section h1 span {
  color: var(--main-color);
}

/* Category Headings */
.gallery-category {
  margin-bottom: 6rem;
}

.gallery-category h2 {
  font-size: 2.5rem;
  color: var(--main-color);
  margin-bottom: 2.5rem;
  text-transform: uppercase;
  position: relative;
  display: inline-block;
}

.gallery-category h2::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 3px;
  background: var(--main-color);
  border-radius: 10px;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.8rem;
  justify-items: center;
}

.gallery-grid img {
  width: 100%;
  height: 22rem;
  object-fit: cover;
  border-radius: 0.6rem;
  border: 0.8rem solid #333;
  background: #333;
  cursor: pointer;
  transition: transform 0.3s ease, border-color 0.3s ease, filter 0.3s ease;
}

.gallery-grid img:hover {
  transform: scale(1.05);
  border-color: var(--main-color);
  filter: brightness(1.1);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 2000;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(3px);
}

.lightbox-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 900px;
  border-radius: 1rem;
  box-shadow: 0 0 25px rgba(56, 103, 214, 0.6);
}

.close {
  position: absolute;
  top: 25px;
  right: 50px;
  color: #fff;
  font-size: 4rem;
  cursor: pointer;
  transition: 0.3s;
}

.close:hover {
  color: var(--main-color);
}

/* Responsive */
@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-section {
    padding: 8rem 5% 4rem;
  }

  .gallery-category h2 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: repeat(1, 1fr);
  }

  .gallery-grid img {
    height: 20rem;
  }
}
