/* Gallery page styles */
html, body {
  height: 100%;
}

body {
  background-color: #edf4ff;
}

.app-wrapper {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* Hero: matches interior pages */
.hero-section {
  background: linear-gradient(135deg, #0b3c8a 0%, #122142 45%, #0b3c8a 100%);
  color: #ffffff;
  padding: 2.4rem 1rem 2.25rem;
  min-height: auto;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.hero-breadcrumb {
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
  color: #c7d8ff;
}

.hero-breadcrumb a {
  color: #ffc107;
  text-decoration: none;
}

.hero-breadcrumb a:hover {
  text-decoration: underline;
}

.hero-title {
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.hero-subtitle {
  font-size: 1rem;
  color: #dbe6ff;
  margin-bottom: 0;
  max-width: 44rem;
}

main {
  flex: 1 1 auto;
  padding: 1.75rem 1rem 1.75rem;
}

.main-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.gallery-intro .badge {
  border-radius: 0.75rem;
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.gallery-item {
  border: 1px solid #d3def8;
  border-radius: 0.85rem;
  background: #f9fbff;
  box-shadow: 0 4px 14px rgba(11, 60, 138, 0.08);
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  width: 100%;
}

.gallery-item:hover,
.gallery-item:focus-visible {
  border-color: #0b3c8a;
  box-shadow: 0 10px 24px rgba(11, 60, 138, 0.18);
  transform: translateY(-2px);
  outline: none;
}

.gallery-item:focus-visible {
  outline: 2px dashed #ffc107;
  outline-offset: 4px;
}

.gallery-thumb {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 0.7rem;
  background: #dfe8fb;
  aspect-ratio: 4 / 3;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-thumb img,
.gallery-item:focus-visible .gallery-thumb img {
  transform: scale(1.03);
}

.gallery-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0 0.35rem 0.35rem;
}

.gallery-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #122142;
}

.gallery-zoom {
  font-size: 0.82rem;
  color: #0b3c8a;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 600;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1050;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.lightbox.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 20, 38, 0.72);
  backdrop-filter: blur(3px);
}

.lightbox-content {
  position: relative;
  max-width: 960px;
  width: 92%;
  max-height: 86vh;
  background: rgba(242, 246, 255, 0.98);
  border-radius: 1rem;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
}

.lightbox-figure {
  margin: 0;
  text-align: center;
  display: grid;
  gap: 0.5rem;
}

.lightbox-figure img {
  max-width: 100%;
  max-height: 72vh;
  border-radius: 0.75rem;
  object-fit: contain;
  box-shadow: 0 10px 30px rgba(11, 60, 138, 0.25);
}

.lightbox-figure figcaption {
  font-size: 0.95rem;
  color: #122142;
  font-weight: 600;
}

.lightbox-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  border: none;
  background: rgba(0, 0, 0, 0.08);
  color: #122142;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  background: #0b3c8a;
  color: #ffffff;
  outline: none;
}

.lightbox-nav {
  border: 1px solid #d3def8;
  background: #ffffff;
  color: #0b3c8a;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 6px 18px rgba(11, 60, 138, 0.12);
}

.lightbox-nav:hover,
.lightbox-nav:focus-visible {
  background: #0b3c8a;
  color: #ffffff;
  border-color: #0b3c8a;
  outline: none;
}

.lightbox-prev {
  grid-column: 1;
}

.lightbox-figure {
  grid-column: 2;
}

.lightbox-next {
  grid-column: 3;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 1.55rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .lightbox-content {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .lightbox-prev,
  .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
  }

  .lightbox-prev {
    left: 0.6rem;
  }

  .lightbox-next {
    right: 0.6rem;
  }
}

@media (max-width: 575.98px) {
  main {
    padding-inline: 0.75rem;
  }

  .hero-section {
    padding-inline: 0.75rem;
  }
}
