/* Gallery and verified-document routes */

.gallery-page .sr-only,
.certificates-page .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.gallery-page .page-hero::after { background: radial-gradient(circle, rgba(94, 210, 255, .25), rgba(146, 108, 255, .13) 43%, transparent 70%); }
.certificates-page .page-hero::after { background: radial-gradient(circle, rgba(122, 232, 255, .22), rgba(96, 121, 255, .14) 45%, transparent 70%); }

.gallery-hero-art,
.certificate-hero-art {
  position: relative;
  min-height: 350px;
  overflow: hidden;
  border: 1px solid rgba(171, 224, 255, .23);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(24, 70, 119, .62), rgba(21, 26, 75, .76));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 30px 65px rgba(0, 7, 30, .28);
}

.gallery-hero-art::before,
.certificate-hero-art::before {
  position: absolute;
  inset: 17px;
  border: 1px solid rgba(185, 224, 255, .14);
  border-radius: 18px;
  content: "";
  pointer-events: none;
}

.gallery-hero-art::after,
.certificate-hero-art::after {
  position: absolute;
  top: -40%;
  right: -22%;
  width: 82%;
  aspect-ratio: 1;
  border-radius: 50%;
  content: "";
  background: radial-gradient(circle, rgba(53, 221, 255, .25), transparent 66%);
  filter: blur(3px);
}

.gallery-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(70%, 245px);
  aspect-ratio: 1;
  border: 1px solid rgba(130, 229, 255, .3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.gallery-orbit::before,
.gallery-orbit::after {
  position: absolute;
  border: 1px solid rgba(159, 127, 255, .36);
  border-radius: inherit;
  content: "";
}

.gallery-orbit::before { inset: 14%; transform: rotate(48deg) scaleX(1.55); }
.gallery-orbit::after { inset: 31%; border-color: rgba(83, 231, 255, .48); transform: rotate(-28deg) scaleX(1.8); }

.gallery-frame {
  position: absolute;
  z-index: 1;
  width: 155px;
  height: 106px;
  overflow: hidden;
  border: 1px solid rgba(178, 237, 255, .38);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(38, 111, 165, .7), rgba(17, 37, 76, .8));
  box-shadow: 0 17px 35px rgba(0, 7, 30, .28);
}

.gallery-frame::before {
  position: absolute;
  inset: 11px;
  border: 1px solid rgba(214, 247, 255, .23);
  border-radius: 8px;
  content: "";
}

.gallery-frame::after {
  position: absolute;
  width: 47px;
  height: 47px;
  border-radius: 50%;
  content: "";
  background: radial-gradient(circle, rgba(84, 237, 255, .94) 0 4%, rgba(84, 237, 255, .34) 7%, transparent 62%);
}

.gallery-frame--one { top: 18%; left: 12%; transform: rotate(-9deg); }
.gallery-frame--one::after { right: 11px; bottom: 8px; }
.gallery-frame--two { right: 10%; bottom: 17%; transform: rotate(9deg); }
.gallery-frame--two::after { top: 14px; left: 11px; background: radial-gradient(circle, rgba(174, 137, 255, .95) 0 4%, rgba(174, 137, 255, .35) 7%, transparent 62%); }
.gallery-frame--three { bottom: 10%; left: 19%; width: 123px; height: 84px; transform: rotate(3deg); }

.gallery-frame span {
  position: absolute;
  right: 16px;
  bottom: 14px;
  color: #d8f8ff;
  font-family: var(--font-mono);
  font-size: .47rem;
  letter-spacing: .1em;
}

.gallery-hero-art > p,
.certificate-hero-art > p {
  position: absolute;
  z-index: 2;
  right: 27px;
  bottom: 25px;
  margin: 0;
  color: #a9c2df;
  font-family: var(--font-mono);
  font-size: .56rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.gallery-context-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(270px, .95fr);
  gap: clamp(36px, 7vw, 110px);
  align-items: start;
}

.gallery-context-copy h2,
.document-notice h2 { margin: 0 0 17px; color: #133866; }
.gallery-context-copy h2 span,
.document-notice h2 span { color: #4384ca; }
.gallery-context-copy > p { max-width: 660px; margin: 0; color: #607795; font-size: .93rem; line-height: 1.8; }

.source-note {
  position: relative;
  padding: 27px 28px;
  overflow: hidden;
  border: 1px solid #c7ddef;
  border-radius: 18px;
  background: rgba(255, 255, 255, .75);
  box-shadow: 0 16px 35px rgba(25, 69, 126, .06);
}

.source-note::before {
  position: absolute;
  top: -51px;
  right: -54px;
  width: 157px;
  aspect-ratio: 1;
  border-radius: 50%;
  content: "";
  background: radial-gradient(circle, rgba(59, 212, 255, .2), transparent 66%);
}

.source-note > * { position: relative; z-index: 1; }
.source-note i { display: grid; width: 39px; height: 39px; place-items: center; margin-bottom: 20px; border-radius: 11px; color: #1d73c2; background: #e0f4ff; font-size: .88rem; }
.source-note strong { display: block; margin-bottom: 9px; color: #183d6c; font-size: .96rem; }
.source-note p { margin: 0; color: #667e9c; font-size: .76rem; line-height: 1.72; }

.gallery-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 29px;
}

.gallery-controls > p { margin: 0; color: #6c83a1; font-family: var(--font-mono); font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; }
.gallery-filter { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.gallery-filter button {
  padding: 9px 13px;
  border: 1px solid #c6dced;
  border-radius: 7px;
  color: #597694;
  background: #fff;
  font-size: .67rem;
  font-weight: 800;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}

.gallery-filter button:hover { border-color: #73cbe9; color: #1f70bd; transform: translateY(-2px); }
.gallery-filter button.is-active { border-color: var(--cyan); color: #092448; background: var(--cyan); box-shadow: 0 8px 20px rgba(47, 220, 255, .17); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}

.gallery-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #c7dff1;
  border-radius: 18px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 14px 34px rgba(25, 69, 126, .07);
  transition: border-color .28s ease, box-shadow .28s ease, transform .28s ease;
}

.gallery-card:hover { z-index: 1; border-color: #80cae9; box-shadow: 0 23px 42px rgba(25, 69, 126, .15); transform: translateY(-7px); }
.gallery-card[hidden] { display: none; }
.gallery-card--featured { border-color: #9bdff2; background: linear-gradient(145deg, rgba(255, 255, 255, .96), rgba(234, 251, 255, .86)); }
.gallery-featured-badge {
  position: absolute;
  z-index: 2;
  top: 13px;
  left: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid rgba(215, 250, 255, .5);
  border-radius: 999px;
  color: #eaffff;
  background: rgba(7, 36, 72, .8);
  box-shadow: 0 8px 20px rgba(0, 23, 56, .2);
  font-family: var(--font-mono);
  font-size: .5rem;
  font-weight: 500;
  letter-spacing: .08em;
  pointer-events: none;
  text-transform: uppercase;
}
.gallery-featured-badge i { color: var(--cyan); font-size: .58rem; }
.gallery-card.is-gallery-entering { animation: gallery-card-in .42s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--gallery-index, 0) * 55ms); }

@keyframes gallery-card-in {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.gallery-state {
  display: flex;
  min-height: 220px;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  padding: 32px 24px;
  border: 1px dashed #c6ddec;
  border-radius: 18px;
  color: #607895;
  background: rgba(245, 251, 255, .7);
  text-align: center;
}
.gallery-state i { color: #378aca; font-size: 1.1rem; }
.gallery-state p { max-width: 460px; margin: 0; font-size: .82rem; line-height: 1.65; }
.gallery-state button {
  padding: 8px 12px;
  border: 1px solid #9ccde7;
  border-radius: 7px;
  color: #1e6bab;
  background: #fff;
  font: inherit;
  font-size: .72rem;
  font-weight: 800;
  cursor: pointer;
}
.gallery-state button:hover { border-color: var(--cyan); color: #123f71; background: #ecfbff; }
.gallery-state button:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

.gallery-image-button,
.certificate-image-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.gallery-image-wrap,
.certificate-image-wrap {
  position: relative;
  aspect-ratio: 1.28;
  overflow: hidden;
  background: #dcecff;
}

.gallery-image-wrap img,
.certificate-image-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s cubic-bezier(.2, .7, .2, 1); }
.gallery-card:hover .gallery-image-wrap img,
.certificate-card:hover .certificate-image-wrap img { transform: scale(1.06); }

.gallery-image-wrap::after,
.certificate-image-wrap::after {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0;
  background: linear-gradient(145deg, rgba(14, 45, 84, .05), rgba(20, 31, 91, .56));
  transition: opacity .3s ease;
}

.gallery-card:hover .gallery-image-wrap::after,
.certificate-card:hover .certificate-image-wrap::after { opacity: 1; }

.image-expand {
  position: absolute;
  z-index: 1;
  right: 14px;
  bottom: 14px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(227, 249, 255, .42);
  border-radius: 10px;
  color: #e5fbff;
  opacity: 0;
  background: rgba(6, 24, 53, .72);
  box-shadow: 0 9px 20px rgba(0, 12, 30, .22);
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
}

.gallery-card:hover .image-expand,
.certificate-card:hover .image-expand,
.gallery-image-button:focus-visible .image-expand,
.certificate-image-button:focus-visible .image-expand { opacity: 1; transform: translateY(0); }

.gallery-card-copy { padding: 20px 21px 22px; }
.gallery-card-copy small,
.certificate-meta { display: block; margin-bottom: 7px; color: #4b83c1; font-family: var(--font-mono); font-size: .53rem; letter-spacing: .09em; text-transform: uppercase; }
.gallery-card h3 { margin: 0 0 8px; color: #173d6d; font-size: 1rem; }
.gallery-card p { margin: 0; color: #687f9d; font-size: .72rem; line-height: 1.63; }

.certificate-hero-art { background: linear-gradient(145deg, rgba(30, 75, 119, .64), rgba(25, 30, 84, .78)); }
.document-mark { position: absolute; z-index: 1; top: 50%; left: 50%; width: min(59%, 240px); aspect-ratio: .77; padding: 22px; border: 1px solid rgba(201, 242, 255, .38); border-radius: 10px; background: linear-gradient(145deg, rgba(232, 249, 255, .94), rgba(173, 222, 255, .89)); box-shadow: 0 23px 44px rgba(0, 9, 36, .35); transform: translate(-50%, -50%) rotate(-5deg); }
.document-mark::before { position: absolute; inset: 11px; border: 1px solid rgba(36, 92, 145, .23); border-radius: 5px; content: ""; }
.document-mark::after { position: absolute; right: -34px; bottom: -30px; width: 112px; aspect-ratio: 1; border: 1px solid rgba(108, 215, 255, .38); border-radius: 50%; content: ""; box-shadow: 0 0 0 21px rgba(101, 213, 255, .055), 0 0 0 43px rgba(109, 123, 255, .05); }
.document-mark > * { position: relative; z-index: 1; }
.document-mark span { display: block; margin-bottom: 22px; color: #5284b9; font-family: var(--font-mono); font-size: .48rem; letter-spacing: .1em; }
.document-mark strong { display: block; max-width: 120px; color: #163a69; font-size: 1.32rem; letter-spacing: -.06em; line-height: 1.03; }
.document-mark i { position: absolute; right: 19px; bottom: 19px; display: grid; width: 34px; aspect-ratio: 1; place-items: center; border-radius: 50%; color: #f7ffff; background: linear-gradient(145deg, #36bfe9, #536bc9); box-shadow: 0 0 0 7px rgba(78, 191, 235, .18); font-size: .72rem; }

.document-notice {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(270px, .9fr);
  gap: clamp(35px, 7vw, 102px);
  align-items: center;
}

.document-notice > div > p { max-width: 700px; margin: 0; color: #637a98; font-size: .91rem; line-height: 1.8; }
.verified-note { display: flex; align-items: flex-start; gap: 14px; padding: 23px; border: 1px solid #bde0eb; border-radius: 16px; color: #245372; background: linear-gradient(135deg, #e8fbff, #eef2ff); }
.verified-note i { flex: 0 0 auto; margin-top: 2px; color: #2387c2; font-size: 1rem; }
.verified-note strong { display: block; margin-bottom: 5px; color: #16466c; font-size: .79rem; }
.verified-note p { margin: 0; color: #557694; font-size: .7rem; line-height: 1.63; }

.certificate-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.certificate-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #c7dff1;
  border-radius: 18px;
  background: rgba(255, 255, 255, .84);
  box-shadow: 0 14px 34px rgba(25, 69, 126, .07);
  transition: border-color .28s ease, box-shadow .28s ease, transform .28s ease;
}

.certificate-card:hover { z-index: 1; border-color: #80cae9; box-shadow: 0 23px 42px rgba(25, 69, 126, .15); transform: translateY(-7px); }
.certificate-copy { padding: 22px 22px 24px; }
.certificate-copy h3 { margin: 0 0 14px; color: #173d6d; font-size: 1.06rem; }
.certificate-details { display: grid; gap: 8px; margin: 0; }
.certificate-details div { display: flex; justify-content: space-between; gap: 14px; padding-bottom: 8px; border-bottom: 1px solid #e1ebf6; }
.certificate-details dt { color: #7390ad; font-family: var(--font-mono); font-size: .52rem; letter-spacing: .06em; text-transform: uppercase; }
.certificate-details dd { margin: 0; color: #406487; font-size: .65rem; font-weight: 700; text-align: right; }
.certificate-view { display: inline-flex; align-items: center; gap: 8px; margin-top: 19px; padding: 0; border: 0; color: #236fbf; background: transparent; font-size: .7rem; font-weight: 800; }
.certificate-view i { transition: transform .2s ease; }
.certificate-image-button:hover + .certificate-copy .certificate-view i,
.certificate-image-button:focus-visible + .certificate-copy .certificate-view i,
.certificate-view:hover i { transform: translateX(4px); }

.gallery-lightbox,
.document-lightbox {
  position: fixed;
  z-index: 300;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  color: var(--white);
  background: rgba(2, 12, 29, .92);
  backdrop-filter: blur(12px);
}

.gallery-lightbox[hidden],
.document-lightbox[hidden] { display: none; }
.gallery-lightbox__dialog,
.document-lightbox__dialog { position: relative; display: grid; width: min(960px, 100%); max-height: calc(100dvh - 56px); grid-template-rows: minmax(0, 1fr) auto; overflow: hidden; border: 1px solid rgba(173, 225, 255, .28); border-radius: 18px; background: #07172f; box-shadow: 0 30px 75px rgba(0, 0, 0, .45); }
.gallery-lightbox__dialog img,
.document-lightbox__dialog img { width: 100%; max-height: calc(100dvh - 157px); object-fit: contain; background: #051126; }
.lightbox-caption { padding: 15px 61px 16px 20px; color: #c2d7ee; font-size: .76rem; line-height: 1.55; }
.lightbox-close,
.lightbox-navigation {
  position: absolute;
  z-index: 1;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(208, 243, 255, .32);
  border-radius: 9px;
  color: #e8fbff;
  background: rgba(4, 23, 51, .84);
  transition: color .2s ease, background .2s ease, transform .2s ease;
}
.lightbox-close { top: 13px; right: 13px; }.lightbox-navigation { top: 50%; transform: translateY(-50%); }.lightbox-navigation--previous { left: 13px; }.lightbox-navigation--next { right: 13px; }
.lightbox-close:hover,
.lightbox-navigation:hover { color: #062142; background: var(--cyan); }.lightbox-navigation:hover { transform: translateY(-50%) scale(1.04); }

.gallery-image-button:focus-visible,
.certificate-image-button:focus-visible,
.certificate-view:focus-visible,
.gallery-filter button:focus-visible,
.lightbox-close:focus-visible,
.lightbox-navigation:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

@media (max-width: 960px) {
  .gallery-context-grid,
  .document-notice { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .gallery-grid,
  .certificate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .gallery-controls { align-items: flex-start; flex-direction: column; gap: 15px; }
  .gallery-filter { width: 100%; justify-content: flex-start; }
  .gallery-hero-art,
  .certificate-hero-art { min-height: 300px; }
}

@media (max-width: 560px) {
  .gallery-grid,
  .certificate-grid { grid-template-columns: minmax(0, 1fr); }
  .gallery-filter { flex-wrap: nowrap; margin-right: -20px; padding-right: 20px; overflow-x: auto; scrollbar-width: thin; }
  .gallery-filter button { flex: 0 0 auto; }
  .gallery-hero-art,
  .certificate-hero-art { min-height: 270px; }
  .gallery-frame--three { display: none; }
  .gallery-frame { width: 130px; height: 92px; }
  .document-mark { width: 182px; padding: 19px; }
  .gallery-lightbox,
  .document-lightbox { padding: 14px; }
  .gallery-lightbox__dialog,
  .document-lightbox__dialog { max-height: calc(100dvh - 28px); }
  .gallery-lightbox__dialog img,
  .document-lightbox__dialog img { max-height: calc(100dvh - 125px); }
  .lightbox-navigation { display: none; }
}

@media (hover: none) {
  .gallery-card:hover,
  .certificate-card:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-card.is-gallery-entering { animation: none; }
}
