/* =========================================================
   SJGPOA Gallery Collage Styles
   Save as: assets/css/gallery-collage.css
   Load after assets/css/style.css on gallery pages.
   ========================================================= */

.gallery-hero {
  margin-bottom: 22px;
}

.gallery-sidebar-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.gallery-sidebar-header h2,
.gallery-sidebar-header p {
  margin-top: 0;
}

.gallery-toolbar-card {
  margin-bottom: 0;
}

.gallery-section-spacer {
  height: 18px;
}

.gallery-filter-actions {
  align-items: center;
}

/* Landing page event cards */
.gallery-event-card {
  overflow: hidden;
  padding: 0 !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.gallery-event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(43, 64, 84, 0.12);
}

.gallery-event-card-image-link {
  display: block;
  overflow: hidden;
  background: #dfe8ef;
}

.gallery-event-card img,
.gallery-event-card-cover {
  width: 100%;
  height: 230px;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f7fbfe 0%, #e4edf4 100%);
  border-bottom: 1px solid var(--border);
  font-size: 3rem;
  transition: transform 0.22s ease, filter 0.22s ease;
}

.gallery-event-card:hover img {
  transform: scale(1.035);
  filter: brightness(0.92);
}

.gallery-event-card-body {
  padding: 18px;
}

.gallery-event-card-body h3 {
  margin: 0 0 8px;
}

/* Main collage album */
.gallery-album {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 6px !important;
  grid-auto-flow: dense;
}

/* Remove heavy card styling from gallery photos */
.gallery-photo-card {
  position: relative;
  overflow: hidden;
  border: 0 !important;
  border-radius: 10px !important;
  background: #111;
  box-shadow: none !important;
  min-height: 220px;
  margin: 0;
}

/* Collage sizing */
.gallery-photo-card.small {
  grid-column: span 4;
}

.gallery-photo-card.medium {
  grid-column: span 6;
}

.gallery-photo-card.wide {
  grid-column: span 8;
}

.gallery-photo-card.feature {
  grid-column: span 12;
}

.gallery-photo-card.tall {
  grid-column: span 4;
  grid-row: span 2;
}

.gallery-photo-link {
  display: block;
  height: 100%;
}

/* Image behavior */
.gallery-photo-card img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  display: block;
  object-fit: cover;
  background: #dfe8ef;
  transition: transform 0.25s ease, filter 0.25s ease;
}

/* Specific image heights */
.gallery-photo-card.small img {
  height: 260px;
}

.gallery-photo-card.medium img {
  height: 300px;
}

.gallery-photo-card.wide img {
  height: 300px;
}

.gallery-photo-card.feature img {
  height: 420px;
}

.gallery-photo-card.tall img {
  height: 610px;
}

/* Hover zoom */
.gallery-photo-card:hover img {
  transform: scale(1.035);
  filter: brightness(0.88);
}

/* Caption overlay */
.gallery-photo-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 46px;
  padding: 10px 14px;

  color: #fff;
  text-align: center;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.25;

  background: linear-gradient(
    180deg,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0.70) 70%,
    rgba(0,0,0,0.85) 100%
  );

  text-shadow: 0 1px 3px rgba(0,0,0,0.55);
  pointer-events: none;
}

/* Keep sidebar folder tree readable */
.gallery-event-link.is-active {
  box-shadow: inset 4px 0 0 var(--primary);
}

/* Responsive layout */
@media (max-width: 1000px) {
  .gallery-photo-card.small,
  .gallery-photo-card.medium,
  .gallery-photo-card.wide,
  .gallery-photo-card.feature,
  .gallery-photo-card.tall {
    grid-column: span 6;
    grid-row: auto;
  }

  .gallery-photo-card img,
  .gallery-photo-card.small img,
  .gallery-photo-card.medium img,
  .gallery-photo-card.wide img,
  .gallery-photo-card.feature img,
  .gallery-photo-card.tall img {
    height: 300px;
    min-height: 300px;
  }
}

@media (max-width: 700px) {
  .gallery-album {
    gap: 8px !important;
  }

  .gallery-photo-card.small,
  .gallery-photo-card.medium,
  .gallery-photo-card.wide,
  .gallery-photo-card.feature,
  .gallery-photo-card.tall {
    grid-column: span 12;
  }

  .gallery-photo-card img,
  .gallery-photo-card.small img,
  .gallery-photo-card.medium img,
  .gallery-photo-card.wide img,
  .gallery-photo-card.feature img,
  .gallery-photo-card.tall img {
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .gallery-photo-caption {
    position: static;
    color: var(--text);
    background: #fff;
    text-shadow: none;
    border-top: 1px solid var(--border);
    pointer-events: auto;
  }
}
