:root {
  --white: #ffffff;
  --pale: #dffbfe;
  --aqua: #58d5e1;
  --cyan: #42bed3;
  --sky: #258fc5;
  --blue: #176fba;
  --deep: #0756b0;
  --ink: #034187;
  --navy: #022b5e;
  --text: #102f55;
  --muted: #5c7592;
  --line: rgba(3, 65, 135, .13);
  --shadow: 0 26px 80px rgba(0, 43, 94, .16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: #f7fcff;
  font-family: "Manrope", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.lightbox-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
img { display: block; max-width: 100%; }
.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 180;
  border-bottom: 1px solid rgba(3, 65, 135, .08);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: box-shadow .25s ease, background .25s ease;
}
.site-header.scrolled { box-shadow: 0 12px 36px rgba(0, 43, 94, .10); }
.nav { min-height: 82px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand img { width: 46px; height: 46px; object-fit: contain; }
.brand > span { color: var(--ink); font-family: "Montserrat", sans-serif; font-size: 18px; font-weight: 900; letter-spacing: -.04em; }
.brand > span span { color: var(--sky); }
.nav-links { display: flex; align-items: center; gap: 25px; margin-left: auto; color: var(--ink); font-size: 13px; font-weight: 800; }
.nav-links > a, .nav-dropdown-toggle { position: relative; }
.nav-links > a::after, .nav-dropdown-toggle::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  height: 2px;
  border-radius: 99px;
  background: var(--aqua);
  transform: scaleX(0);
  transition: transform .2s ease;
}
.nav-links > a:hover::after, .nav-links > a[aria-current="page"]::after, .nav-dropdown-toggle:hover::after { transform: scaleX(1); }
.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 17px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--ink), var(--sky));
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 12px 25px rgba(3, 65, 135, .18);
}
.menu { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: #fff; cursor: pointer; }

.gallery-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(74px, 9vw, 132px) 0 clamp(72px, 8vw, 118px);
  color: #fff;
  background:
    radial-gradient(circle at 82% 16%, rgba(88, 213, 225, .26), transparent 25rem),
    radial-gradient(circle at 8% 100%, rgba(37, 143, 197, .28), transparent 30rem),
    linear-gradient(145deg, #011f43 0%, var(--navy) 48%, var(--ink) 100%);
}
.gallery-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .14;
  background-image: linear-gradient(rgba(255,255,255,.16) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.16) 1px, transparent 1px);
  background-size: 74px 74px;
  mask-image: linear-gradient(to bottom, black, transparent 92%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 92%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(340px, .8fr); gap: clamp(38px, 7vw, 92px); align-items: center; }
.eyebrow { margin: 0 0 18px; color: var(--aqua); font-size: 11px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.gallery-hero h1 { margin: 0; max-width: 790px; font-family: "Montserrat", sans-serif; font-size: clamp(3.2rem, 7vw, 7.1rem); font-weight: 900; line-height: .9; letter-spacing: -.075em; }
.gallery-hero h1 span { color: transparent; -webkit-text-stroke: 1.5px rgba(223, 251, 254, .72); }
.hero-copy { max-width: 710px; margin: 27px 0 0; color: rgba(255,255,255,.76); font-size: clamp(1rem, 1.45vw, 1.18rem); line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 19px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  color: #fff;
  background: rgba(255,255,255,.08);
  font-size: 12px;
  font-weight: 900;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); background: rgba(255,255,255,.14); border-color: rgba(88,213,225,.55); }
.btn.primary { color: var(--navy); border-color: var(--aqua); background: var(--aqua); }
.hero-visual { position: relative; min-height: 410px; }
.hero-photo { position: absolute; overflow: hidden; border: 1px solid rgba(255,255,255,.18); border-radius: 30px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo:focus-visible { outline: 4px solid var(--aqua); outline-offset: 6px; }
.hero-photo.one { inset: 0 8% 14% 0; transform: rotate(-3deg); }
.hero-photo.two { width: 52%; height: 48%; right: 0; bottom: 0; transform: rotate(4deg); }
.hero-badge { position: absolute; right: 4%; top: 5%; z-index: 2; display: grid; place-items: center; width: 118px; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; color: var(--navy); background: var(--aqua); text-align: center; font-family: "Montserrat", sans-serif; font-size: 12px; font-weight: 900; line-height: 1.25; box-shadow: 0 18px 45px rgba(0,0,0,.25); }

.section { padding: clamp(72px, 8vw, 116px) 0; }
.section-kicker { margin-bottom: 14px; color: var(--sky); font-size: 11px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.section-title { margin: 0; max-width: 850px; color: var(--ink); font-family: "Montserrat", sans-serif; font-size: clamp(2.4rem, 5vw, 5.25rem); font-weight: 900; line-height: .94; letter-spacing: -.065em; }
.section-copy { max-width: 720px; margin: 22px 0 0; color: var(--muted); font-size: 16px; line-height: 1.75; }

.event-gallery-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 46px; }
.event-gallery-card { position: relative; min-height: 530px; overflow: hidden; border-radius: 32px; color: #fff; background: var(--navy); box-shadow: var(--shadow); }
.event-gallery-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(1,20,43,.96) 0%, rgba(1,20,43,.52) 48%, rgba(1,20,43,.04) 82%); }
.event-gallery-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1), filter .5s ease; }
.event-gallery-card:hover img { transform: scale(1.055); filter: saturate(1.08); }
.event-card-content { position: absolute; inset: auto 0 0; z-index: 2; padding: clamp(25px, 4vw, 42px); }
.event-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; color: var(--aqua); font-size: 11px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.event-gallery-card h2 { margin: 0; font-family: "Montserrat", sans-serif; font-size: clamp(2rem, 3.8vw, 4rem); font-weight: 900; line-height: .95; letter-spacing: -.055em; }
.event-gallery-card p { max-width: 550px; margin: 18px 0 24px; color: rgba(255,255,255,.75); line-height: 1.7; }
.card-button { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 18px; border-radius: 999px; color: var(--navy); background: var(--aqua); font-size: 12px; font-weight: 900; transition: transform .2s ease, box-shadow .2s ease; }
.event-gallery-card:hover .card-button { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(88,213,225,.3); }

.event-gallery-hero { padding: clamp(65px, 8vw, 104px) 0 clamp(56px, 7vw, 90px); }
.event-gallery-hero .hero-grid { grid-template-columns: minmax(0, 1.2fr) minmax(300px, .62fr); }
.event-gallery-hero h1 { font-size: clamp(3rem, 6vw, 6.4rem); }
.gallery-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.gallery-stat { padding: 22px; border: 1px solid rgba(255,255,255,.14); border-radius: 23px; background: rgba(255,255,255,.075); backdrop-filter: blur(13px); }
.gallery-stat strong { display: block; color: #fff; font-family: "Montserrat", sans-serif; font-size: clamp(1.65rem, 3vw, 2.8rem); font-weight: 900; letter-spacing: -.05em; }
.gallery-stat span { display: block; margin-top: 5px; color: rgba(255,255,255,.6); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }

.gallery-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.gallery-progress { flex: 0 0 auto; padding: 12px 15px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: #fff; font-size: 12px; font-weight: 900; box-shadow: 0 8px 28px rgba(3,65,135,.07); }
.photo-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.photo-card { position: relative; aspect-ratio: 4 / 3; overflow: hidden; padding: 0; border: 0; border-radius: 18px; color: #fff; background: linear-gradient(145deg, var(--navy), var(--ink)); cursor: zoom-in; box-shadow: 0 12px 35px rgba(3,65,135,.10); }
.photo-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s ease, filter .35s ease, opacity .3s ease; }
.photo-card::before { content: ""; position: absolute; inset: auto 0 0; z-index: 1; height: 45%; background: linear-gradient(to top, rgba(1,20,43,.72), transparent); opacity: 0; transition: opacity .25s ease; }
.photo-card::after { content: attr(data-label); position: absolute; left: 12px; bottom: 11px; z-index: 2; color: #fff; font-size: 10px; font-weight: 900; letter-spacing: .07em; opacity: 0; transform: translateY(6px); transition: opacity .25s ease, transform .25s ease; }
.photo-card:hover img, .photo-card:focus-visible img { transform: scale(1.055); filter: saturate(1.08); }
.photo-card:hover::before, .photo-card:hover::after, .photo-card:focus-visible::before, .photo-card:focus-visible::after { opacity: 1; transform: none; }
.photo-card.is-unavailable { cursor: pointer; }
.photo-card.is-unavailable img { opacity: 0; }
.photo-error { position: absolute; inset: 0; z-index: 3; display: none; place-items: center; padding: 16px; text-align: center; color: rgba(255,255,255,.84); background: radial-gradient(circle at 50% 15%, rgba(88,213,225,.2), transparent 45%), linear-gradient(145deg, var(--navy), var(--ink)); }
.photo-error span { display: block; font-size: 12px; font-weight: 900; line-height: 1.45; }
.photo-error small { display: block; margin-top: 6px; color: rgba(255,255,255,.55); font-size: 10px; }
.photo-card.is-unavailable .photo-error { display: grid; }
.gallery-controls { display: grid; justify-items: center; gap: 14px; margin-top: 38px; }
.gallery-loading { display: none; align-items: center; gap: 10px; color: var(--ink); font-size: 12px; font-weight: 900; }
.gallery-loading.active { display: flex; }
.spinner { width: 22px; height: 22px; border: 3px solid rgba(3,65,135,.14); border-top-color: var(--sky); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.load-more { min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px; color: #fff; background: linear-gradient(135deg, var(--ink), var(--sky)); font-size: 12px; font-weight: 900; cursor: pointer; box-shadow: 0 14px 35px rgba(3,65,135,.2); transition: transform .2s ease, box-shadow .2s ease; }
.load-more:hover { transform: translateY(-2px); box-shadow: 0 18px 45px rgba(3,65,135,.26); }
.load-more[hidden] { display: none; }
.gallery-sentinel { width: 1px; height: 1px; }
.coming-soon { padding: clamp(48px, 8vw, 90px) 24px; border: 1px solid var(--line); border-radius: 30px; text-align: center; background: #fff; box-shadow: var(--shadow); }
.coming-soon strong { display: block; color: var(--ink); font-family: "Montserrat", sans-serif; font-size: clamp(2rem, 4vw, 4.2rem); font-weight: 900; letter-spacing: -.055em; }
.coming-soon p { max-width: 600px; margin: 16px auto 0; color: var(--muted); line-height: 1.7; }

.gallery-lightbox { position: fixed; inset: 0; z-index: 500; display: none; place-items: center; padding: 24px; background: rgba(1, 20, 43, .97); }
.gallery-lightbox.open { display: grid; }
.gallery-lightbox-image { max-width: min(1600px, 92vw); max-height: 84vh; object-fit: contain; border-radius: 15px; box-shadow: 0 32px 100px rgba(0,0,0,.55); }
.lightbox-control { position: absolute; display: grid; place-items: center; width: 50px; height: 50px; padding: 0; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; color: #fff; background: rgba(255,255,255,.09); font-size: 24px; cursor: pointer; backdrop-filter: blur(14px); transition: background .2s ease, transform .2s ease; }
.lightbox-control:hover { background: rgba(255,255,255,.18); transform: scale(1.04); }
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-meta { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); padding: 10px 15px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; color: #fff; background: rgba(255,255,255,.08); font-size: 11px; font-weight: 900; letter-spacing: .08em; backdrop-filter: blur(12px); }
.lightbox-original { position: absolute; top: 22px; left: 22px; padding: 10px 14px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; color: #fff; background: rgba(255,255,255,.08); font-size: 11px; font-weight: 900; }
.lightbox-status { position: absolute; inset: 50% auto auto 50%; display: none; transform: translate(-50%, -50%); max-width: min(440px, 80vw); color: rgba(255,255,255,.82); text-align: center; font-weight: 800; line-height: 1.6; }
.gallery-lightbox.has-error .gallery-lightbox-image { display: none; }
.gallery-lightbox.has-error .lightbox-status { display: block; }

@media (max-width: 1120px) {
  .photo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .nav-links { gap: 18px; }
}
@media (max-width: 900px) {
  .hero-grid, .event-gallery-hero .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 350px; max-width: 650px; }
  .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nav-cta { display: none; }
  .menu { display: grid; place-items: center; margin-left: auto; }
  .nav-links {
    position: absolute;
    top: calc(100% + 1px);
    left: 20px;
    right: 20px;
    display: none;
    align-items: stretch;
    gap: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(0,43,94,.18);
  }
  .nav-links.open { display: grid; }
  .nav-links > a, .nav-dropdown-toggle { width: 100%; padding: 13px 12px; }
  .nav-links > a::after, .nav-dropdown-toggle::after { display: none; }
  .nav-dropdown { display: block; width: 100%; }
  .nav-dropdown-toggle { justify-content: space-between; }
  .nav-dropdown-menu { position: static; display: none; width: 100%; margin-top: 7px; opacity: 1; visibility: visible; transform: none; color: var(--ink); border-color: var(--line); background: #eef8fd; box-shadow: none; }
  .nav-dropdown.open .nav-dropdown-menu { display: grid; transform: none; }
  .nav-dropdown-menu a { color: var(--ink) !important; }
  .nav-dropdown-menu small { color: var(--muted); }
}
@media (max-width: 700px) {
  .container { width: min(100% - 24px, 1180px); }
  .nav { min-height: 70px; }
  .brand img { width: 40px; height: 40px; }
  .gallery-hero { padding-top: 58px; }
  .hero-visual { min-height: 285px; }
  .hero-photo.one { right: 6%; }
  .hero-badge { width: 92px; font-size: 10px; }
  .event-gallery-cards { grid-template-columns: 1fr; }
  .event-gallery-card { min-height: 440px; border-radius: 24px; }
  .gallery-toolbar { align-items: flex-start; flex-direction: column; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .photo-card { border-radius: 13px; }
  .photo-card::before, .photo-card::after { display: none; }
  .gallery-progress { font-size: 11px; }
  .lightbox-control { width: 46px; height: 46px; }
  .lightbox-prev { left: 7px; }
  .lightbox-next { right: 7px; }
  .lightbox-close { top: 10px; right: 10px; }
  .lightbox-original { top: 12px; left: 12px; }
  .gallery-lightbox { padding: 10px; }
  .gallery-lightbox-image { max-width: 96vw; max-height: 80vh; }
  .gallery-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .gallery-hero h1 { font-size: 3rem; }
  .event-card-content { padding: 24px; }
  .gallery-stat { padding: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

/* Explicit media positioning for stable card and hero rendering */
.hero-photo { margin: 0; }
.event-gallery-card > img {
  position: absolute;
  inset: 0;
}

/* Search-focused supporting content and results hub */
.gallery-info-section{padding-top:0}
.gallery-info-card{max-width:980px;padding:clamp(24px,4vw,48px);border:1px solid rgba(14,92,179,.15);border-radius:24px;background:#fff;box-shadow:0 18px 48px rgba(3,65,135,.08)}
.gallery-info-card h2{margin:0 0 14px;font-family:Montserrat,sans-serif;font-size:clamp(1.55rem,3vw,2.35rem);line-height:1.1;color:#082f49}
.gallery-info-card p{max-width:820px;margin:0 0 12px;color:#42566a;line-height:1.75}
.gallery-info-card p:last-child{margin-bottom:0}
.gallery-info-card a{color:#0e5cb3;font-weight:800;text-decoration-thickness:2px;text-underline-offset:3px}
.results-hub-grid{margin-top:34px}
.results-hub-grid .event-card-media{display:block}
.results-hub-grid .event-card-media img{width:100%;height:100%;object-fit:cover}
@media(max-width:700px){.gallery-info-card{border-radius:18px}.results-hub-grid{margin-top:24px}}

/* Fifty-photo gallery pagination */
.gallery-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}
.pagination-button,
.page-select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 10px 30px rgba(3,65,135,.08);
}
.pagination-button {
  min-width: 128px;
  padding: 0 19px;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.pagination-button:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(3,65,135,.28);
  box-shadow: 0 15px 38px rgba(3,65,135,.14);
}
.pagination-button:disabled {
  cursor: not-allowed;
  opacity: .42;
  box-shadow: none;
}
.pagination-select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.page-select {
  min-width: 72px;
  padding: 0 32px 0 16px;
  cursor: pointer;
}
@media (max-width: 520px) {
  .gallery-pagination { width: 100%; gap: 9px; }
  .pagination-button { min-width: 0; flex: 1 1 118px; }
  .pagination-select-wrap { order: -1; width: 100%; justify-content: center; }
}


/* 20260727-mobile-final: mobile gallery image stability */
.photo-card img, .gallery-item img, .event-card-media img {
  display:block !important;
  visibility:visible !important;
  opacity:1;
}
@media (max-width:700px) {
  .photo-card { min-height:124px; aspect-ratio:4/3; }
  .photo-card img { width:100%; height:100%; object-fit:cover; }
}
