/* ==========================================================
   GALLERY PAGE — Full design-system consistency with
   About, Resources & other SSK public pages
   ========================================================== */

/* Local design tokens (matching about_us.css / resources.css) */
:root {
  --gal-primary:      #123860;
  --gal-primary-dark: #0d2a47;
  --gal-accent:       #b38b4a;
  --gal-accent-soft:  #e7d9bf;
  --gal-ink:          #172437;
  --gal-muted:        #5f7086;
  --gal-surface:      #ffffff;
  --gal-surface-soft: #f4f8fd;
  --gal-border:       #dbe4ef;
  --gal-shadow-sm:    0 10px 24px rgba(8, 29, 53, 0.08);
  --gal-shadow-md:    0 16px 36px rgba(8, 29, 53, 0.12);
  --gal-radius-md:    16px;
  --gal-radius-sm:    10px;
  --gal-transition:   240ms ease;
}

/* Page body */
body.gallery-page {
  background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
  color: var(--gal-ink);
}

body.gallery-page .gallery-hero,
body.gallery-page .gallery-section {
  font-family: "Manrope", "Segoe UI", sans-serif;
}

body.gallery-page h1,
body.gallery-page h2,
body.gallery-page h3 {
  font-family: "Source Serif 4", Georgia, serif;
  letter-spacing: -0.01em;
}

/* Container width matching other pages */
body.gallery-page .gallery-hero .container,
body.gallery-page .gallery-section .container {
  width: min(1180px, calc(100% - 3rem));
  margin-inline: auto;
  padding: 0;
}

/* ==========================================================
   HERO — identical gradient + radial orbs as About / Resources
   ========================================================== */
.gallery-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(4rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 46%),
    linear-gradient(130deg, #102d4d 0%, #0b2744 42%, #11365d 100%);
}

/* Bottom-left gold orb */
.gallery-hero::before {
  content: "";
  position: absolute;
  inset: auto auto -210px -150px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(179, 139, 74, 0.24) 0%, rgba(179, 139, 74, 0) 74%);
}

/* Top-right warm orb */
.gallery-hero::after {
  content: "";
  position: absolute;
  inset: -220px -130px auto auto;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 220, 197, 0.18) 0%, rgba(233, 220, 197, 0) 74%);
}

/* Hero content — left-aligned, same as about/resources */
.gallery-hero__content {
  position: relative;
  z-index: 2;
  max-width: 860px;
  text-align: left;
}

/* Eyebrow — identical style to .about-hero__eyebrow */
.gallery-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  color: rgba(239, 245, 253, 0.93);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 800;
}

.gallery-hero__eyebrow::after {
  content: "";
  width: 56px;
  height: 2px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gal-accent) 0%, #e9dcc5 100%);
}

/* Title */
.gallery-hero__title {
  margin: 0.9rem 0 0;
  font-size: clamp(2rem, 4.4vw, 3.85rem);
  line-height: 1.08;
  color: #ffffff !important;
  text-shadow: 0 14px 28px rgba(5, 15, 28, 0.42) !important;
}

/* Subtitle */
.gallery-hero__subtitle {
  margin: 1rem 0 0;
  max-width: 740px;
  font-size: clamp(1rem, 1.7vw, 1.16rem);
  line-height: 1.75;
  color: rgba(236, 243, 252, 0.9) !important;
  opacity: 1 !important;
}

/* ==========================================================
   GALLERY SECTION
   ========================================================== */
.gallery-section {
  padding: clamp(2.8rem, 5vw, 4.5rem) 0 clamp(3.5rem, 6vw, 6rem);
}

/* ==========================================================
   FILTER TABS — consistent pill style
   ========================================================== */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: clamp(1.8rem, 3.2vw, 2.5rem);
}

.gal-filter {
  border: 1px solid var(--gal-border);
  background: var(--gal-surface);
  color: var(--gal-muted);
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: "Manrope", "Segoe UI", sans-serif;
  cursor: pointer;
  transition: all var(--gal-transition);
  box-shadow: 0 1px 3px rgba(8, 29, 53, 0.05);
  line-height: 1.4;
}

.gal-filter:hover {
  border-color: #c4d3e4;
  background: #f0f5fb;
  color: var(--gal-ink);
}

.gal-filter.active {
  background: var(--gal-primary);
  border-color: var(--gal-primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(18, 56, 96, 0.28);
}

/* ==========================================================
   GALLERY GRID
   ========================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

/* ==========================================================
   GALLERY CARD — same as .featured-resource-card / about cards
   ========================================================== */
.gallery-card {
  background: linear-gradient(180deg, var(--gal-surface) 0%, #f8fbff 100%);
  border: 1px solid var(--gal-border);
  border-radius: var(--gal-radius-md);
  box-shadow: var(--gal-shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform var(--gal-transition), box-shadow var(--gal-transition), border-color var(--gal-transition);
  outline-offset: 3px;
}

.gallery-card:hover,
.gallery-card:focus {
  transform: translateY(-5px);
  box-shadow: var(--gal-shadow-md);
  border-color: #c4d3e4;
}

/* Thumbnail */
.gallery-card__thumb {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: var(--gal-primary-dark);
  flex-shrink: 0;
}

.gallery-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
  display: block;
}

.gallery-card:hover .gallery-card__thumb img {
  transform: scale(1.05);
}

/* Hover overlay */
.gallery-card__hover-layer {
  position: absolute;
  inset: 0;
  background: rgba(13, 42, 71, 0.52);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--gal-transition);
}

.gallery-card:hover .gallery-card__hover-layer,
.gallery-card:focus .gallery-card__hover-layer {
  opacity: 1;
}

.gallery-card__zoom {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gal-surface);
  color: var(--gal-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  transform: scale(0.8);
  transition: transform var(--gal-transition);
}

.gallery-card:hover .gallery-card__zoom {
  transform: scale(1);
}

/* Card body */
.gallery-card__body {
  padding: 1.2rem 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Category chip */
.gallery-card__cat {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gal-accent);
  margin-bottom: 0.42rem;
  font-family: "Manrope", "Segoe UI", sans-serif;
}

/* Card title */
.gallery-card__title {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gal-ink);
  line-height: 1.35;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

/* Caption */
.gallery-card__caption {
  font-size: 0.875rem;
  color: var(--gal-muted);
  line-height: 1.65;
  margin: 0;
}

/* ==========================================================
   EMPTY STATE
   ========================================================== */
.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4.5rem 1rem;
}

.gallery-empty__icon {
  font-size: 3.5rem;
  color: #c0d2e8;
  margin-bottom: 1rem;
}

.gallery-empty__title {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.4rem;
  color: var(--gal-ink);
  margin: 0 0 0.5rem;
}

.gallery-empty__text {
  font-size: 0.95rem;
  color: var(--gal-muted);
  margin: 0;
}

/* ==========================================================
   LIGHTBOX MODAL
   ========================================================== */
.gal-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(8, 18, 34, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.26s ease, visibility 0.26s ease;
}

.gal-modal.active {
  opacity: 1;
  visibility: visible;
}

.gal-modal__box {
  max-width: 900px;
  width: 100%;
  background: var(--gal-surface);
  border-radius: var(--gal-radius-md);
  overflow: hidden;
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.5);
  position: relative;
  transform: scale(0.92) translateY(12px);
  transition: transform 0.26s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.gal-modal.active .gal-modal__box {
  transform: scale(1) translateY(0);
}

.gal-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(13, 42, 71, 0.72);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  font-size: 0.95rem;
  transition: background var(--gal-transition);
}

.gal-modal__close:hover {
  background: rgba(13, 42, 71, 0.98);
}

.gal-modal__img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  background: #09172a;
  display: block;
}

.gal-modal__info {
  padding: 1.35rem 1.5rem 1.65rem;
}

.gal-modal__cat {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gal-accent);
  margin-bottom: 0.38rem;
  font-family: "Manrope", "Segoe UI", sans-serif;
}

.gal-modal__title {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gal-ink);
  margin: 0 0 0.55rem;
  letter-spacing: -0.01em;
}

.gal-modal__desc {
  font-size: 0.9rem;
  color: var(--gal-muted);
  line-height: 1.7;
  margin: 0;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
  }
}

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

  .gallery-filters {
    gap: 0.45rem;
  }

  .gal-filter {
    font-size: 0.82rem;
    padding: 0.48rem 1rem;
  }

  .gal-modal__box {
    border-radius: var(--gal-radius-sm);
  }
}
