/* Room photos gallery page */
.room-photos-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 56px;
}

.room-photos-page__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 22px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  color: inherit;
  opacity: 0.85;
}

.room-photos-page__back:hover {
  opacity: 1;
  text-decoration: underline;
}

.room-photos-page__heading {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 36px;
}

#room-photos-groups {
  display: grid;
  gap: 56px;
}

.rpg-group {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  column-gap: 36px;
  align-items: flex-start;
  padding-top: 32px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.rpg-group:first-child {
  padding-top: 0;
  border-top: none;
}

.rpg-group__title {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
  padding-top: 2px;
}

.rpg-group__media {
  min-width: 0;
}

.rpg-layout {
  display: grid;
  gap: 12px;
  width: 100%;
  overflow: hidden;
}

.rpg-photo {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 10px;
  background: #f4f4f4;
}

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

/* 单图通栏 */
.rpg-layout--single {
  grid-template-columns: 1fr;
  grid-auto-rows: 420px;
  height: auto;
}

/* 左右两图 */
.rpg-layout--pair {
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 320px;
  height: auto;
}

/* 左 1 大图 + 右 2 小图 */
.rpg-layout--hero-two {
  grid-template-columns: 1.2fr 1fr;
  grid-template-rows: 204px 204px;
  height: 420px;
}

.rpg-layout--hero-two .rpg-photo:first-child {
  grid-row: span 2;
}

.dark .rpg-group {
  border-top-color: rgba(255, 255, 255, 0.12);
}

@media (max-width: 768px) {
  .room-photos-page {
    padding: 20px 16px 40px;
  }

  .room-photos-page__heading {
    font-size: 1.625rem;
    margin-bottom: 28px;
  }

  #room-photos-groups {
    gap: 40px;
  }

  .rpg-group {
    grid-template-columns: 1fr;
    row-gap: 14px;
    padding-top: 28px;
  }

  .rpg-group__title {
    padding-top: 0;
  }

  .rpg-layout--hero-two {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-rows: 220px;
    height: auto;
  }

  .rpg-layout--hero-two .rpg-photo:first-child {
    grid-row: auto;
  }

  .rpg-layout--pair {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
  }

  .rpg-layout--single {
    grid-auto-rows: 240px;
  }

  .rpg-photo {
    height: 100%;
  }
}
