/* Gallery Section */
.gallery {
  padding: 5rem 0;
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
}

.gallery-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(56, 189, 248, 0.1);
}

.gallery-slides {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.gallery-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-slide.active {
  opacity: 1;
  z-index: 1;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.3);
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(56, 189, 248, 0.9);
  border: none;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.gallery-nav:hover {
  background: rgba(56, 189, 248, 1);
  transform: translateY(-50%) scale(1.1);
}

.gallery-prev {
  left: 20px;
}

.gallery-next {
  right: 20px;
}

.gallery-nav svg {
  width: 24px;
  height: 24px;
}

.gallery-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.gallery-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0px;
}

.gallery-dot:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.2);
}

.gallery-dot.active {
  background: rgba(56, 189, 248, 1);
  width: 30px;
  border-radius: 6px;
}

/* Gallery Responsive Styles */

/* Tablet Landscape - 768px to 1023px */
@media screen and (max-width: 1023px) {
  .gallery {
    padding: 4rem 1.5rem;
  }

  .gallery-nav {
    width: 45px;
    height: 45px;
  }

  .gallery-prev {
    left: 15px;
  }

  .gallery-next {
    right: 15px;
  }
}

/* Tablet Portrait - 600px to 767px */
@media screen and (max-width: 767px) {
  .gallery {
    padding: 3rem 1.5rem;
  }

  .gallery-slides {
    aspect-ratio: 4 / 3;
  }

  .gallery-nav {
    width: 40px;
    height: 40px;
  }

  .gallery-nav svg {
    width: 20px;
    height: 20px;
  }

  .gallery-prev {
    left: 10px;
  }

  .gallery-next {
    right: 10px;
  }

  .gallery-indicators {
    bottom: 15px;
  }

  .gallery-dot {
    width: 10px;
    height: 10px;
  }

  .gallery-dot.active {
    width: 24px;
  }
}

/* Mobile Landscape - 480px to 599px */
@media screen and (max-width: 599px) {
  .gallery {
    padding: 2.5rem 1rem;
  }

  .gallery-container {
    border-radius: 15px;
  }

  .gallery-slides {
    aspect-ratio: 1 / 1;
  }
}

/* Mobile Portrait - 375px to 479px */
@media screen and (max-width: 479px) {
  .gallery {
    padding: 2rem 1rem;
  }

  .gallery-nav {
    width: 36px;
    height: 36px;
  }

  .gallery-nav svg {
    width: 18px;
    height: 18px;
  }

  .gallery-prev {
    left: 8px;
  }

  .gallery-next {
    right: 8px;
  }

  .gallery-indicators {
    bottom: 12px;
    gap: 8px;
  }

  .gallery-dot {
    width: 8px;
    height: 8px;
  }

  .gallery-dot.active {
    width: 20px;
  }
}

/* Small Mobile - 320px to 374px */
@media screen and (max-width: 374px) {
  .gallery-container {
    border-radius: 12px;
  }

  .gallery-nav {
    width: 32px;
    height: 32px;
  }

  .gallery-nav svg {
    width: 16px;
    height: 16px;
  }

  .gallery-prev {
    left: 6px;
  }

  .gallery-next {
    right: 6px;
  }

  .gallery-indicators {
    bottom: 10px;
    gap: 6px;
  }

  .gallery-dot {
    width: 7px;
    height: 7px;
  }

  .gallery-dot.active {
    width: 18px;
  }

  /* --- Lightbox Styles (Matches your existing theme) --- */

  #lightbox {
    display: none;
    /* Hidden by default, JS will toggle this */
    position: fixed;
    z-index: 10000;
    /* Higher than everything else */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.9);
    /* Matches your gallery background */
    backdrop-filter: blur(10px);
    /* Matches your nav blur */
    justify-content: center;
    align-items: center;
    flex-direction: column;
  }

  .lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 15px;
    border: 1px solid rgba(56, 189, 248, 0.3);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    object-fit: contain;
  }

  /* Close Button */
  .close-lightbox {
    position: absolute;
    top: 30px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
  }

  .close-lightbox:hover {
    color: #38bdf8;
    /* Matches your accent blue */
  }

  /* Lightbox Nav Buttons */
  .lightbox-nav {
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    /* Allow clicking the image through the container */
  }

  .lightbox-nav button {
    pointer-events: auto;
    background: rgba(56, 189, 248, 0.9);
    border: none;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
  }

  .lightbox-nav button:hover {
    background: #38bdf8;
    transform: scale(1.1);
  }

  /* Make your existing gallery images look clickable */
  .gallery-slide img {
    cursor: zoom-in;
  }

  /* Prevent scrolling when lightbox is open */
  body.lightbox-open {
    overflow: hidden;
  }

  /* Ensure the slides are on top of the container background */
  .gallery-slides {
    z-index: 5;
    position: relative;
  }

  /* Ensure images are clickable */
  .gallery-slide img {
    pointer-events: auto !important;
    cursor: pointer !important;
  }

  /* Body lock when lightbox is active */
  body.lightbox-open {
    overflow: hidden;
  }