* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #f8f3ea;
  color: #3b2f2f;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.8;
}

.hero {
  min-height: 92vh;
  padding: 80px 10%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  background:
    linear-gradient(
      rgba(248, 243, 234, 0.18),
      rgba(248, 243, 234, 0.62)
    ),
    url("images/photo22.png") center/cover no-repeat;
}

.hero-content {
  max-width: 720px;
  padding: 0;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
}

.eyebrow {
  color: #a87533;
  letter-spacing: 5px;
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 18px;
  text-transform: uppercase;
}

h1 {
  font-size: 58px;
  line-height: 1.15;
  margin-bottom: 24px;
  color: #2f251f;
}

.hero-text {
  font-size: 21px;
  color: #4f4037;
  max-width: 680px;
}

.intro,
.letter {
  max-width: 820px;
  margin: 96px auto;
  padding: 0 24px;
  text-align: center;
}

h2 {
  font-size: 34px;
  margin-bottom: 22px;
  color: #352820;
}

.intro p,
.letter p {
  font-size: 18px;
  color: #62544b;
  margin-bottom: 18px;
}

.gallery {
  width: 82%;
  max-width: 1180px;
  margin: 100px auto;
  display: flex;
  flex-direction: column;
  gap: 86px;
}

.photo-card {
  display: flex;
  align-items: center;
  gap: 56px;
  padding: 42px;
  border-radius: 34px;
  background: rgba(255, 250, 243, 0.94);
  box-shadow: 0 24px 70px rgba(80, 55, 30, 0.10);
}

.photo-card.reverse {
  flex-direction: row-reverse;
}

/* 多图和宽图：保持上下结构 */
.photo-card.single.layout-wide-single,
.photo-card.multi,
.photo-card.multi.reverse {
  flex-direction: column-reverse;
  align-items: stretch;
  gap: 30px;
}

.photo-images {
  width: 46%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.photo-frame {
  width: 100%;
  break-inside: avoid;
}

.photo-images img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 26px;
  background: #f3eadf;
  box-shadow: 0 14px 38px rgba(72, 48, 28, 0.10);
}

.photo-card.multi .photo-images {
  width: 100%;
  display: grid;
  gap: 18px;
}

/* wide-single：大横图，文字居中，大图居中 */
.photo-card.layout-wide-single .photo-images {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
}

.photo-card.layout-wide-single .photo-text,
.photo-card.multi .photo-text {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

/* 竖图单张 */
.photo-card.layout-portrait-single .photo-images {
  width: 420px;
  margin: 0;
}

.photo-card.layout-pair .photo-images {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.photo-card.layout-panorama-pair .photo-images {
  max-width: 1040px;
  margin: 0 auto;
  grid-template-columns: 1fr;
  gap: 20px;
}

.photo-card.layout-triptych .photo-images {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.photo-card.layout-triptych .photo-frame:nth-child(2) {
  margin-top: 28px;
}

/* 三张图：上面两张，下面一张 */
.photo-card.layout-two-top-one-bottom .photo-images {
  max-width: 1040px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.photo-card.layout-two-top-one-bottom .photo-frame:nth-child(3) {
  grid-column: 1 / -1;
  max-width: 680px;
  margin: 0 auto;
}

.photo-card.layout-quad .photo-images,
.photo-card.layout-mountain-mix .photo-images {
  max-width: 1060px;
  margin: 0 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

/* quad 四宫格：统一大小 */
.photo-card.layout-quad .photo-frame {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 24px;
}

.photo-card.layout-quad .photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.photo-text {
  flex: 1;
}

.photo-text .date {
  color: #b88945;
  font-size: 14px;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.photo-text h3 {
  font-size: 30px;
  margin-bottom: 16px;
  color: #3a2c25;
}

.photo-text p {
  font-size: 17px;
  color: #68584f;
}

.sign {
  margin-top: 30px;
  color: #b88945 !important;
}

footer {
  padding: 52px 20px;
  text-align: center;
  color: #9a8b7f;
}

/* 只调整普通单图和竖图单图，不影响 wide-single */
.photo-card.single:not(.layout-wide-single) {
  max-width: 980px;
  margin: 0 auto;
  gap: 36px;
}

.photo-card.single:not(.layout-wide-single) .photo-text {
  flex: 0 0 320px;
}

.photo-card.single:not(.layout-wide-single) .photo-images {
  flex: 0 0 460px;
  width: 460px;
}

.photo-card.single.layout-portrait-single .photo-images {
  flex: 0 0 420px;
  width: 420px;
}

/* wide-single 单独恢复为大图展示 */
.photo-card.single.layout-wide-single {
  max-width: 1180px;
  flex-direction: column-reverse;
  align-items: stretch;
  gap: 30px;
}

.photo-card.single.layout-wide-single .photo-images {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
}

.photo-card.single.layout-wide-single .photo-text {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

@media (max-width: 768px) {
  .hero {
    min-height: 84vh;
    padding: 58px 22px;
    background-position: center;
  }

  .hero-content {
    padding: 0;
  }

  h1 {
    font-size: 40px;
  }

  .hero-text {
    font-size: 18px;
  }

  .intro,
  .letter {
    margin: 72px auto;
  }

  .gallery {
    width: 90%;
    gap: 52px;
    margin: 72px auto;
  }

  .photo-card,
  .photo-card.reverse {
    flex-direction: column;
    padding: 24px;
    gap: 24px;
  }

  .photo-card.single.layout-wide-single,
  .photo-card.multi,
  .photo-card.multi.reverse {
    flex-direction: column-reverse;
    gap: 22px;
  }

  .photo-images {
    width: 100%;
  }

  .photo-images img {
    width: 100%;
    height: auto;
    border-radius: 20px;
  }

  .photo-card.layout-portrait-single .photo-images,
  .photo-card.layout-wide-single .photo-images {
    width: 100%;
  }

  .photo-card.layout-pair .photo-images,
  .photo-card.layout-triptych .photo-images,
  .photo-card.layout-two-top-one-bottom .photo-images,
  .photo-card.layout-quad .photo-images,
  .photo-card.layout-mountain-mix .photo-images {
    grid-template-columns: 1fr;
  }

  .photo-card.layout-two-top-one-bottom .photo-frame:nth-child(3) {
    grid-column: auto;
    max-width: none;
  }

  .photo-card.multi .photo-images,
  .photo-card.multi.count-2 .photo-images,
  .photo-card.multi.count-3 .photo-images,
  .photo-card.multi.count-4 .photo-images {
    gap: 14px;
  }

  .photo-column {
    gap: 14px;
  }

  .photo-card.layout-triptych .photo-frame:nth-child(2),
  .photo-card.layout-mountain-mix .photo-column:last-child {
    margin-top: 0;
  }

  .photo-text h3 {
    font-size: 25px;
  }

  .photo-text p {
    font-size: 16px;
  }

  .photo-card.single:not(.layout-wide-single) {
    max-width: none;
    gap: 22px;
  }

  .photo-card.single:not(.layout-wide-single) .photo-text,
  .photo-card.single:not(.layout-wide-single) .photo-images,
  .photo-card.single.layout-portrait-single .photo-images {
    flex: none;
    width: 100%;
  }

  .photo-card.single.layout-wide-single {
    max-width: none;
    gap: 22px;
  }

  .photo-card.single.layout-wide-single .photo-images,
  .photo-card.single.layout-wide-single .photo-text {
    width: 100%;
    max-width: none;
  }

  /* 手机端不强制四宫格裁剪，避免图片被裁得太厉害 */
  .photo-card.layout-quad .photo-frame {
    aspect-ratio: auto;
    overflow: visible;
  }

  .photo-card.layout-quad .photo-frame img {
    height: auto;
    object-fit: initial;
  }
}

@media (max-width: 520px) {
  .gallery {
    width: 92%;
  }

  .photo-card.multi .photo-images,
  .photo-card.multi.count-2 .photo-images,
  .photo-card.multi.count-3 .photo-images,
  .photo-card.multi.count-4 .photo-images {
    grid-template-columns: 1fr;
  }
}