/* CRIS Gallery public frontend */

.cris-gallery-public,
.cris-gallery-public * {
  box-sizing: border-box;
}

.cris-gallery-public {
  --cg-blue: #0c6196;
  --cg-light-blue: #268dc7;
  --cg-green: #0c9a52;
  --cg-text: #173044;
  --cg-muted: #607789;
  --cg-bg: #f5fafc;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--cg-text);
  background: #fff;
}

.cris-gallery-public-container {
  width: min(1280px, calc(100% - 64px));
  margin: 0 auto;
}

.cris-gallery-public-hero {
  padding: 110px 0 88px;
  color: #fff;
  background:
    radial-gradient(
      circle at 78% 18%,
      rgba(12, 154, 82, 0.28),
      transparent 28%
    ),
    linear-gradient(135deg, #0c6196 0%, #268dc7 65%, #0c9a52 125%);
}

.cris-gallery-public-hero h1 {
  max-width: 900px;
  margin: 8px 0 18px;
  color: #fff;
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.96;
  letter-spacing: -3px;
}

.cris-gallery-public-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 19px;
  line-height: 1.65;
}

.cris-gallery-public-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #bcebd1;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

.cris-gallery-public-section {
  padding: 84px 0;
}

.cris-gallery-public-section.is-soft {
  background: var(--cg-bg);
}

.cris-gallery-public-heading {
  margin-bottom: 30px;
}

.cris-gallery-public-heading h2 {
  margin: 8px 0 0;
  color: var(--cg-blue);
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1;
  letter-spacing: -1.5px;
}

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

.cris-gallery-category-public-card {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 26px;
  border-radius: 24px;
  background: linear-gradient(
    135deg,
    rgba(38, 141, 199, 0.65),
    rgba(12, 97, 150, 0.95)
  );
  background-size: cover;
  background-position: center;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 18px 45px rgba(12, 97, 150, 0.15);
  transition: 0.25s ease;
}

.cris-gallery-category-public-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 26px 58px rgba(12, 97, 150, 0.22);
}

.cris-gallery-category-public-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(12, 97, 150, 0.08) 0%,
    rgba(12, 97, 150, 0.9) 100%
  );
}

.cris-gallery-category-public-icon {
  position: absolute;
  top: 22px;
  left: 22px;
  z-index: 2;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 24px;
  backdrop-filter: blur(8px);
}

.cris-gallery-category-public-content {
  position: relative;
  z-index: 2;
}

.cris-gallery-category-public-content strong {
  display: block;
  margin-bottom: 7px;
  font-size: 26px;
}

.cris-gallery-category-public-content small {
  color: rgba(255, 255, 255, 0.84);
  font-weight: 800;
}

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

.cris-gallery-album-public-card {
  overflow: hidden;
  border: 1px solid rgba(12, 97, 150, 0.12);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(12, 97, 150, 0.11);
  transition: 0.24s ease;
}

.cris-gallery-album-public-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 54px rgba(12, 97, 150, 0.18);
}

.cris-gallery-album-public-image {
  position: relative;
  height: 245px;
  display: block;
  overflow: hidden;
  background: #edf5f9;
}

.cris-gallery-album-public-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.cris-gallery-album-public-card:hover img {
  transform: scale(1.035);
}

.cris-gallery-public-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--cg-blue);
  font-size: 54px;
}

.cris-gallery-photo-count {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(12, 97, 150, 0.9);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.cris-gallery-album-public-content {
  padding: 22px;
}

.cris-gallery-album-public-category {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--cg-green);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.cris-gallery-album-public-content h2,
.cris-gallery-album-public-content h3 {
  margin: 0 0 12px;
  color: var(--cg-blue);
  font-size: 24px;
  line-height: 1.2;
}

.cris-gallery-album-public-content h2 a,
.cris-gallery-album-public-content h3 a {
  color: inherit;
  text-decoration: none;
}

.cris-gallery-album-public-content p {
  margin: 0 0 18px;
  color: var(--cg-muted);
  line-height: 1.65;
}

.cris-gallery-public-link {
  color: var(--cg-green);
  text-decoration: none;
  font-weight: 900;
}

.cris-gallery-public-empty {
  padding: 60px 30px;
  border: 1px dashed rgba(12, 97, 150, 0.25);
  border-radius: 20px;
  background: var(--cg-bg);
  color: var(--cg-muted);
  text-align: center;
  font-weight: 800;
}

.cris-gallery-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.cris-gallery-breadcrumbs a {
  color: #fff;
  text-decoration: none;
}

.cris-gallery-album-meta-public {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.cris-gallery-album-meta-public span {
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.cris-gallery-album-description {
  max-width: 900px;
  margin: 0 auto 42px;
  color: var(--cg-muted);
  font-size: 17px;
  line-height: 1.75;
}

.cris-gallery-photo-public-grid {
  columns: 4 260px;
  column-gap: 16px;
}

.cris-gallery-photo-public-item {
  position: relative;
  width: 100%;
  display: block;
  break-inside: avoid;
  overflow: hidden;
  margin: 0 0 16px;
  padding: 0;
  border: 0 !important;
  border-radius: 16px;
  background: #edf5f9 !important;
  cursor: zoom-in;
  box-shadow: 0 10px 28px rgba(12, 97, 150, 0.11);
}

.cris-gallery-photo-public-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.cris-gallery-photo-public-item:hover img {
  transform: scale(1.025);
}

.cris-gallery-photo-public-item span {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(12, 97, 150, 0.88);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
}

.cris-gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px 80px;
  background: rgba(4, 21, 32, 0.92);
  backdrop-filter: blur(8px);
}

.cris-gallery-lightbox.is-open {
  display: flex;
}

.cris-gallery-lightbox figure {
  max-width: min(1200px, 100%);
  max-height: 90vh;
  margin: 0;
  text-align: center;
}

.cris-gallery-lightbox figure img {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  border-radius: 14px;
  background: #fff;
}

.cris-gallery-lightbox figcaption {
  padding-top: 13px;
  color: #fff;
}

.cris-gallery-lightbox figcaption strong {
  display: block;
  font-size: 18px;
}

.cris-gallery-lightbox figcaption p {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.78);
}

.cris-gallery-lightbox-close,
.cris-gallery-lightbox-nav {
  position: absolute;
  border: 0 !important;
  background: #fff !important;
  color: var(--cg-blue) !important;
  cursor: pointer;
}

.cris-gallery-lightbox-close {
  top: 20px;
  right: 20px;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  font-size: 28px;
}

.cris-gallery-lightbox-nav {
  top: 50%;
  width: 50px;
  height: 50px;
  border-radius: 999px;
  font-size: 34px;
  transform: translateY(-50%);
}

.cris-gallery-lightbox-nav.is-prev {
  left: 18px;
}

.cris-gallery-lightbox-nav.is-next {
  right: 18px;
}

body.cris-gallery-lightbox-open {
  overflow: hidden;
}

@media (max-width: 950px) {
  .cris-gallery-category-public-grid,
  .cris-gallery-album-public-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .cris-gallery-public-container {
    width: min(100% - 34px, 1280px);
  }

  .cris-gallery-public-hero {
    padding: 88px 0 64px;
  }

  .cris-gallery-public-hero h1 {
    letter-spacing: -1.8px;
  }

  .cris-gallery-category-public-grid,
  .cris-gallery-album-public-grid {
    grid-template-columns: 1fr;
  }

  .cris-gallery-category-public-card {
    min-height: 250px;
  }

  .cris-gallery-public-section {
    padding: 64px 0;
  }

  .cris-gallery-lightbox {
    padding: 70px 14px 24px;
  }

  .cris-gallery-lightbox-nav {
    top: auto;
    bottom: 16px;
    transform: none;
  }
}

/* =========================================================
   Albums per row
   ========================================================= */

.cris-gallery-album-public-grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cris-gallery-album-public-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cris-gallery-album-public-grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 950px) {
  .cris-gallery-album-public-grid.cols-2,
  .cris-gallery-album-public-grid.cols-3,
  .cris-gallery-album-public-grid.cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .cris-gallery-album-public-grid.cols-2,
  .cris-gallery-album-public-grid.cols-3,
  .cris-gallery-album-public-grid.cols-4 {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Pagination
   ========================================================= */

.cris-gallery-pagination {
  margin-top: 42px;
}

.cris-gallery-pagination .page-numbers {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cris-gallery-pagination .page-numbers li {
  display: inline-block;
  margin: 4px;
}

.cris-gallery-pagination .page-numbers a,
.cris-gallery-pagination .page-numbers span {
  min-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border: 1px solid rgba(12, 97, 150, 0.16);
  border-radius: 10px;
  background: #fff;
  color: #0c6196;
  text-decoration: none;
  font-weight: 800;
  transition: 0.2s ease;
}

.cris-gallery-pagination .page-numbers a:hover {
  background: #268dc7;
  color: #fff;
  border-color: #268dc7;
}

.cris-gallery-pagination .page-numbers .current {
  background: #0c6196;
  color: #fff;
  border-color: #0c6196;
}

@media (max-width: 650px) {
  .cris-gallery-pagination {
    margin-top: 30px;
    text-align: center;
  }

  .cris-gallery-pagination .page-numbers a,
  .cris-gallery-pagination .page-numbers span {
    min-width: 38px;
    min-height: 38px;
    padding: 7px 10px;
  }
}
