/* PC端样式 */
.isPc .headerMain ul {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: 380px 480px 380px 480px 380px 480px 380px 480px;
  gap: 30px;
  width: 1200px;
  height: auto;
  margin: 0 auto 30px;
  padding: 0;
  list-style: none;
}

.isPc .headerMain ul li {
  position: relative;
  overflow: hidden;
}

.isPc .headerMain ul li img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
}

/* 第1行 (380px高) - p1.png大图左侧, p2.png右侧 */
.isPc .headerMain ul li:nth-child(1) {
  grid-column: span 8;
  grid-row: 1;
}

.isPc .headerMain ul li:nth-child(2) {
  grid-column: span 4;
  grid-row: 1;
}

/* 第2行 (480px高) - p3.png, p4.png, p5.png三列小图 */
.isPc .headerMain ul li:nth-child(3) {
  grid-column: span 4;
  grid-row: 2;
}

.isPc .headerMain ul li:nth-child(4) {
  grid-column: span 4;
  grid-row: 2;
}

.isPc .headerMain ul li:nth-child(5) {
  grid-column: span 4;
  grid-row: 2;
}

/* 第3行 (380px高) - p6.png左侧, p7.png大图右侧 */
.isPc .headerMain ul li:nth-child(6) {
  grid-column: span 4;
  grid-row: 3;
}

.isPc .headerMain ul li:nth-child(7) {
  grid-column: span 8;
  grid-row: 3;
}

/* 第4行 (480px高) - p8.png, p9.png, p10.png三列小图 */
.isPc .headerMain ul li:nth-child(8) {
  grid-column: span 4;
  grid-row: 4;
}

.isPc .headerMain ul li:nth-child(9) {
  grid-column: span 4;
  grid-row: 4;
}

.isPc .headerMain ul li:nth-child(10) {
  grid-column: span 4;
  grid-row: 4;
}

/* 第5行 (380px高) - p11.png全宽大图 */
.isPc .headerMain ul li:nth-child(11) {
  grid-column: span 12;
  grid-row: 5;
}

/* 第6行 (480px高) - p12.png, p13.png, p14.png三列小图 */
.isPc .headerMain ul li:nth-child(12) {
  grid-column: span 4;
  grid-row: 6;
}

.isPc .headerMain ul li:nth-child(13) {
  grid-column: span 4;
  grid-row: 6;
}

.isPc .headerMain ul li:nth-child(14) {
  grid-column: span 4;
  grid-row: 6;
}

/* 第7行 (380px高) - p15.png左侧, p16.png大图右侧 */
.isPc .headerMain ul li:nth-child(15) {
  grid-column: span 4;
  grid-row: 7;
}

.isPc .headerMain ul li:nth-child(16) {
  grid-column: span 8;
  grid-row: 7;
}

/* 第8行 (480px高) - p17.png, p18.png, p19.png三列小图 */
.isPc .headerMain ul li:nth-child(17) {
  grid-column: span 4;
  grid-row: 8;
}

.isPc .headerMain ul li:nth-child(18) {
  grid-column: span 4;
  grid-row: 8;
}

.isPc .headerMain ul li:nth-child(19) {
  grid-column: span 4;
  grid-row: 8;
}

/* 悬停效果 */
.isPc .headerMain ul li i {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 49, 53, 0.8);
  border-radius: 5px;
  color: #fff;
  font-style: normal;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  text-align: center;
}

.isPc .headerMain ul li:hover i {
  opacity: 1;
}

/* 移动端样式 */
.isWap .headerMain ul {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto;
  gap: 0.2rem;
  width: 90%;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  height: auto;
}

.isWap .headerMain ul li {
  position: relative;
  overflow: hidden;
}

.isWap .headerMain ul li img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
}

/* 移动端布局 - 与PC端完全一致的排列 */
/* 第1行 (3.8rem高) - p1.png大图左侧, p2.png右侧 */
.isWap .headerMain ul li:nth-child(1) {
  grid-column: span 8;
  grid-row: 1;
}

.isWap .headerMain ul li:nth-child(2) {
  grid-column: span 4;
  grid-row: 1;
}

/* 第2行 (4.8rem高) - p3.png, p4.png, p5.png三列小图 */
.isWap .headerMain ul li:nth-child(3) {
  grid-column: span 4;
  grid-row: 2;
}

.isWap .headerMain ul li:nth-child(4) {
  grid-column: span 4;
  grid-row: 2;
}

.isWap .headerMain ul li:nth-child(5) {
  grid-column: span 4;
  grid-row: 2;
}

/* 第3行 (3.8rem高) - p6.png左侧, p7.png大图右侧 */
.isWap .headerMain ul li:nth-child(6) {
  grid-column: span 4;
  grid-row: 3;
}

.isWap .headerMain ul li:nth-child(7) {
  grid-column: span 8;
  grid-row: 3;
}

/* 第4行 (4.8rem高) - p8.png, p9.png, p10.png三列小图 */
.isWap .headerMain ul li:nth-child(8) {
  grid-column: span 4;
  grid-row: 4;
}

.isWap .headerMain ul li:nth-child(9) {
  grid-column: span 4;
  grid-row: 4;
}

.isWap .headerMain ul li:nth-child(10) {
  grid-column: span 4;
  grid-row: 4;
}

/* 第5行 (3.8rem高) - p11.png全宽大图 */
.isWap .headerMain ul li:nth-child(11) {
  grid-column: span 12;
  grid-row: 5;
}

/* 第6行 (4.8rem高) - p12.png, p13.png, p14.png三列小图 */
.isWap .headerMain ul li:nth-child(12) {
  grid-column: span 4;
  grid-row: 6;
}

.isWap .headerMain ul li:nth-child(13) {
  grid-column: span 4;
  grid-row: 6;
}

.isWap .headerMain ul li:nth-child(14) {
  grid-column: span 4;
  grid-row: 6;
}

/* 第7行 (3.8rem高) - p15.png左侧, p16.png大图右侧 */
.isWap .headerMain ul li:nth-child(15) {
  grid-column: span 4;
  grid-row: 7;
}

.isWap .headerMain ul li:nth-child(16) {
  grid-column: span 8;
  grid-row: 7;
}

/* 第8行 (4.8rem高) - p17.png, p18.png, p19.png三列小图 */
.isWap .headerMain ul li:nth-child(17) {
  grid-column: span 4;
  grid-row: 8;
}

.isWap .headerMain ul li:nth-child(18) {
  grid-column: span 4;
  grid-row: 8;
}

.isWap .headerMain ul li:nth-child(19) {
  grid-column: span 4;
  grid-row: 8;
}

/* 移动端悬停效果 */
.isWap .headerMain ul li i {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 49, 53, 0.8);
  border-radius: 5px;
  color: #fff;
  font-style: normal;
  font-size: 0.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  text-align: center;
}

.isWap .headerMain ul li:hover i {
  opacity: 1;
}

/* 针对移动端触摸设备的优化 */
@media (hover: none) and (pointer: coarse) {
  .isWap .headerMain ul li i {
    opacity: 0;
  }

  .isWap .headerMain ul li:active i {
    opacity: 1;
  }
}
