/* =============================================================================
   Gallery Page
   -----------------------------------------------------------------------------
   .gallery-section       — page wrapper (white background)
     .gallery-intro       — title + description block
     .gallery-grid        — 3-column responsive card grid
   ============================================================================= */

/* --- Page wrapper ----------------------------------------------------------- */
.gallery-section {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xxxxl);
  padding: var(--spacing-xxxl) var(--spacing-page-margins-lg) var(--spacing-page-margins);
  background-color: var(--background-default);
}

/* --- Intro block ------------------------------------------------------------ */
.gallery-intro {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
}

.gallery-intro__title {
  font-family: var(--font-family);
  font-size: 48px;
  font-weight: 600;
  line-height: 68px;
  letter-spacing: 0;
  color: var(--text-default);
  margin: 0;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
  text-box: trim-both cap alphabetic;
}

.gallery-intro__desc {
  font-family: var(--font-family);
  font-size: var(--type-body-size);
  font-weight: var(--type-body-weight);
  line-height: var(--type-body-line-height);
  letter-spacing: var(--type-body-tracking);
  color: var(--text-default);
  margin: 0;
  max-width: 500px;
}

/* --- Card grid -------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: var(--spacing-xxxl);
  row-gap: var(--spacing-xxxxl);
}

#gallery-container {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xxxxl);
}

/* --- Responsive ------------------------------------------------------------- */
@media (max-width: 1200px) {
  .gallery-section {
    padding-inline: var(--spacing-xl);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .gallery-section {
    padding-inline: var(--spacing-l);
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Module sections --------------------------------------------------- */
.gallery-module {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
}

.gallery-module__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--surface-neutral-border);
  padding-bottom: var(--spacing-s);
}

.gallery-module__title {
  font-family: var(--font-family);
  font-size: 28px;
  font-weight: 600;
  color: var(--text-default);
  margin: 0;
}

.gallery-module__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-default);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.gallery-module.is-collapsed .gallery-module__toggle {
  transform: rotate(-90deg);
}

.gallery-grid.is-collapsed {
  display: none;
}

/* =============================================================================
   Gallery Card
   -----------------------------------------------------------------------------
   .gallery-card                  — card container (flex column)
     .gallery-card__image         — 3:2 thumbnail wrapper
     .gallery-card__title         — 20px semi-bold asset title
     .gallery-card__type          — 16px italic asset type label
     .gallery-card__actions       — row of Download + See in module buttons
   ============================================================================= */

/* --- Card container --------------------------------------------------------- */
.gallery-card {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-m);
  min-width: 0;
  height:100%;
}

/* --- Thumbnail -------------------------------------------------------------- */
.gallery-card__image {
  aspect-ratio: 3 / 2;
  border-radius: var(--corner-s-radius);
  background-color: white;
  overflow: hidden;
  width: 100%;
  flex-shrink: 0;
}

.gallery-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Title ------------------------------------------------------------------ */
.gallery-card__title {
  font-family: var(--font-family);
  font-size: 20px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: 0;
  color: var(--text-default);
  margin: 0;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
  text-box: trim-both cap alphabetic;
}

/* --- Type label ------------------------------------------------------------- */
.gallery-card__type {
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 400;
  font-style: italic;
  line-height: 24px;
  letter-spacing: 0;
  color: var(--text-default);
  margin: 0;
}

/* --- Actions row ------------------------------------------------------------ */
.gallery-card__actions {
  display: flex;
  gap: var(--spacing-s);
  align-items: center;
  margin-top:auto;
}

/* Tighter icon–text gap and horizontal padding than the default btn */
.gallery-card__actions .btn {
  gap: 6px;
  padding-inline: var(--spacing-xs);
}
