/* Base */
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #f2f7f3;
  background-image: url(Images/BGImg.jpg);
  background-size: cover;
  background-position: center;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
}

.back-home {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
}

.back-home a {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 10px 14px;
  font-size: 20px;
  font-weight: 600;

  color: #f2f7f3;
  text-decoration: none;

  background: rgba(16,31,21,.9);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 3px;

  backdrop-filter: blur(6px);
  box-shadow: 0 8px 20px rgba(0,0,0,.35);

  transition: transform .2s ease, background .2s ease;
}

.back-home a:hover {
  background: rgba(22,96,62,.95);
  transform: translateY(-2px);
}
/* Header */
.gallery-header {
  padding: 60px 0 40px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.gallery-header h1 {
  margin: 0 0 10px;
  font-size: 36px;
}

.gallery-header p {
  color: #c6d4cb;
  max-width: 60ch;
}

/* Gallery items */
.gallery-item {
  margin-top: 60px;
}

.gallery-item h2 {
  margin-bottom: 16px;
  font-size: 22px;
}

.image-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 700px) {
  .image-pair {
    grid-template-columns: 1fr;
  }
}

figure {
  margin: 0;
  background: rgba(16,31,21,.85);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 6px;
  overflow: hidden;
}

figure img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}


figcaption {
  padding: 10px 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #c6d4cb;
}

.gallery-img {
  cursor: pointer;
  transition: transform .2s ease, filter .2s ease;
}

.gallery-img:hover {
  transform: scale(1.02);
  filter: brightness(1.05);
}

/* Modal background */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: rgba(0,0,0,0.9);
  overflow: auto;
}

/* Modal image */
.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80vh;
  margin-top: 5vh;
  border-radius: 6px;
}

/* Caption text */
#caption {
  margin: 14px auto 0;
  max-width: 90%;
  text-align: center;
  color: #c6d4cb;
  font-size: 14px;
}

/* Close button */
.close {
  position: fixed;
  top: 20px;
  right: 28px;
  color: #ffffff;
  font-size: 36px;
  font-weight: bold;
  cursor: pointer;
  transition: opacity .2s ease;
}

.close:hover {
  opacity: .7;
}

/* Mobile optimisation */
@media (max-width: 700px) {
 /* ---------- Gallery ---------- */
  .gallery {
    gap: 10px;
  }

  figure img {
    height: 200px;
  }

  /* ---------- Gallery modal ---------- */
  .modal-content {
    max-width: 96%;
    max-height: 75vh;
  }

  /* ---------- Back-home button ---------- */
  .back-home a {
    font-size: 14px;
    padding: 8px 12px;
  }

  /* ---------- Contact section ---------- */
  .contactRow {
    gap: 12px;
  }

  .pill {
    width: 100%;
  }

  .ctaRow a {
    width: 100%;
    justify-content: center;
  }

  /* ---------- Footer ---------- */
  .footerRow {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .footerRow .btn {
    width: 100%;
    justify-content: center;
  }

  .site-credit {
    margin-top: 14px;
    text-align: center;
  }
}

.visually-hidden {
  position: absolute;
  left: -9999px;
}