
:root {
  --navy: #123563;
  --blue: #0875bc;
  --yellow: #ffd668;
  --cream: #fff7df;
  --light: #eff9fd;
}

.gallery-hero,
.gallery-section,
.gallery-cta-section {
  font-family: "Inter", Arial, sans-serif;
}

.gallery-hero *,
.gallery-section *,
.gallery-cta-section *,
.gallery-lightbox * {
  box-sizing: border-box;
}

/* HERO */
.gallery-hero {
  position: relative;
  overflow: hidden;
  padding: 110px 0 95px;
  background: linear-gradient(120deg, #fff7df 0%, #fffaf0 55%, #e9f7ff 100%);
}

.gallery-hero .container {
  z-index: 2;
}

.gallery-eyebrow,
.section-tag {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 3px;
  font-weight: 800;
  color: var(--blue);
  margin-bottom: 15px;
}

.gallery-hero h1 {
  font-size: clamp(38px, 5vw, 65px);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 18px;
}

.gallery-hero h1 span,
.gallery-heading h2 span {
  color: #eeb32d;
}

.gallery-hero p {
  max-width: 610px;
  margin: 0 auto;
  color: #63758d;
  font-size: 16px;
  line-height: 1.8;
}

.gallery-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 25px;
  font-size: 14px;
  color: var(--navy);
}

.gallery-breadcrumb a {
  color: var(--blue);
  text-decoration: none;
}

.shape {
  position: absolute;
  pointer-events: none;
}

.shape-one {
  width: 160px;
  height: 160px;
  background: var(--yellow);
  border-radius: 50%;
  top: 40px;
  left: -90px;
}

.shape-two {
  width: 100px;
  height: 100px;
  border: 2px solid #ff8296;
  border-radius: 50%;
  top: 110px;
  left: 30px;
}

.shape-three {
  width: 170px;
  height: 170px;
  border: 2px solid #ffd668;
  border-radius: 50%;
  bottom: -85px;
  right: 5%;
}

/* GALLERY SECTION */
.gallery-section {
  padding: 85px 0;
  background: #fff;
}

.gallery-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 25px;
  margin-bottom: 35px;
}

.gallery-heading h2 {
  font-size: clamp(30px, 3.5vw, 44px);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 10px;
}

.gallery-heading p {
  color: #718097;
  margin-bottom: 0;
}

.gallery-counter {
  text-align: center;
  padding: 15px 25px;
  background: var(--light);
  border-radius: 15px;
}

.gallery-counter strong {
  display: block;
  font-size: 28px;
  color: var(--blue);
}

.gallery-counter span {
  font-size: 12px;
  color: #61738c;
}

/* FILTERS */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 38px;
}

.filter-btn {
  padding: 12px 22px;
  background: #f2f8fc;
  color: var(--navy);
  border: 1px solid #e2edf6;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
  transform: translateY(-2px);
}

/* GRID */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #e9f2f9;
  aspect-ratio: 4 / 4.5;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(18, 53, 99, .08);
  animation: galleryAppear .5s ease both;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s ease;
}

.gallery-item:hover img {
  transform: scale(1.09);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  background: linear-gradient(transparent 35%, rgba(5, 27, 55, .85));
  color: white;
  opacity: 0;
  transition: opacity .3s ease;
}

.gallery-item:hover .gallery-overlay,
.gallery-item:focus-visible .gallery-overlay {
  opacity: 1;
}

.gallery-overlay h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 5px;
}

.gallery-overlay p {
  font-size: 12px;
  margin: 0;
}

.gallery-zoom {
  position: absolute;
  right: 18px;
  top: 18px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: 50%;
  color: var(--navy);
  font-size: 23px;
}

/* BUTTON */
.gallery-more {
  margin-top: 40px;
}

.gallery-button,
.gallery-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 14px 27px;
  border: 0;
  border-radius: 50px;
  background: var(--navy);
  color: white;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .3s, background .3s;
}

.gallery-button:hover,
.gallery-cta-btn:hover {
  background: var(--blue);
  color: white;
  transform: translateY(-3px);
}

/* CTA */
.gallery-cta-section {
  padding: 45px 0 85px;
}

.gallery-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  padding: 50px;
  border-radius: 22px;
  background: linear-gradient(115deg, #123563, #07518a);
  color: white;
  overflow: hidden;
}

.gallery-cta > div > span {
  color: var(--yellow);
  font-size: 12px;
  letter-spacing: 2px;
  font-weight: 700;
}

.gallery-cta h2 {
  max-width: 600px;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  margin: 14px 0;
  color: #fff;
}

.gallery-cta p {
  color: #d5e6f4;
  margin: 0;
}

.gallery-cta-btn {
  flex-shrink: 0;
  background: var(--yellow);
  color: var(--navy);
}

.gallery-cta-btn:hover {
  background: white;
  color: var(--navy);
}

/* LIGHTBOX */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(4, 15, 30, .94);
  padding: 65px;
}

.gallery-lightbox.active {
  display: flex;
}

.lightbox-content {
  text-align: center;
  max-width: 100%;
}

.lightbox-content img {
  display: block;
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 10px;
  margin: auto;
}

.lightbox-content p {
  color: white;
  margin-top: 15px;
  font-size: 15px;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: none;
  color: white;
  background: rgba(255, 255, 255, .15);
  cursor: pointer;
}

.lightbox-close {
  top: 20px;
  right: 25px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  font-size: 30px;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 45px;
  height: 55px;
  font-size: 35px;
  border-radius: 8px;
}

.lightbox-prev { left: 15px; }
.lightbox-next { right: 15px; }

/* ANIMATIONS */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

@keyframes galleryAppear {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* RESPONSIVE */
@media (max-width: 991px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gallery-cta {
    padding: 35px;
  }
}

@media (max-width: 767px) {
  .gallery-hero {
    padding: 80px 0;
  }

  .gallery-section {
    padding: 60px 0;
  }

  .gallery-heading {
    align-items: flex-start;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .gallery-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .gallery-counter {
    display: none;
  }

  .gallery-overlay {
    opacity: 1;
    padding: 12px;
  }

  .gallery-overlay h3 {
    font-size: 12px;
  }

  .gallery-overlay p {
    font-size: 10px;
  }

  .gallery-zoom {
    width: 30px;
    height: 30px;
    font-size: 18px;
  }

  .gallery-lightbox {
    padding: 55px 12px;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    gap: 9px;
  }

  .gallery-item {
    border-radius: 10px;
  }

  .filter-btn {
    padding: 10px 15px;
    font-size: 11px;
  }

  .gallery-cta {
    padding: 28px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .gallery-item,
  .gallery-item img,
  .gallery-button,
  .gallery-cta-btn {
    animation: none;
    transition: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* GALLERY IMAGE IMPROVEMENTS */

.gallery-grid {
  align-items: stretch;
}

.gallery-item {
  isolation: isolate;
}

.gallery-item img {
  transition: transform 0.6s ease, filter 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
  filter: brightness(0.9);
}

.gallery-item:focus-visible {
  outline: 3px solid #0875bc;
  outline-offset: 4px;
}

/* LIGHTBOX IMPROVEMENTS */

.gallery-lightbox {
  backdrop-filter: blur(8px);
}

.lightbox-content {
  width: min(100%, 1100px);
}

.lightbox-content img {
  max-height: 78vh;
  width: auto;
  height: auto;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: #0875bc;
}

/* MOBILE */

@media (max-width: 767px) {
  .gallery-item {
    aspect-ratio: 4 / 5;
  }

  .gallery-overlay {
    background: linear-gradient(
      transparent 40%,
      rgba(5, 27, 55, 0.88)
    );
  }

  .gallery-zoom {
    top: 10px;
    right: 10px;
  }
}

/* HTML-controlled Gallery Images */

.gallery-item[hidden] {
  display: none !important;
}

.gallery-item:focus-visible {
  outline: 3px solid #0875bc;
  outline-offset: 4px;
}

.gallery-item {
  animation: galleryAppear 0.5s ease both;
}

.gallery-item:hover img {
  transform: scale(1.08);
}
