@import "init.css";

.container {
   width: 1230px;
   margin: 0 auto;
}

/*列表*/
.list-container {
   display: grid;
   grid-template-columns: repeat(3, 1fr);
   /* 3列布局 */
   grid-column-gap: 26px;
   /* 控制列间距 */
   grid-row-gap: 120px;
   /* 控制行间距 */
   width: 100%;
}

.list-item {
   position: relative;
   overflow: hidden;
   display: block;
   text-decoration: none;
   border-top: 1px solid #a09d9c;
   padding-top: 20px;
}

.list-item img {
   width: 100%;
   height: 100%;
   object-fit: cover;
   filter: brightness(80%);
   /* 图片变暗10% */
   transition: all 0.5s;
}

.list-item:hover img {
   filter: brightness(100%);
   /* 悬停时恢复正常亮度 */
   scale: 1.1;
}

.list-info {
   color: white;
   display: flex;
   margin-bottom: 42px;
}

.list-info i {
   font-size: 18px;
}

.list-info .casename {
    font-size: 20px;
    color: #fff;
    width: 80%;
    padding-right: 7%;
    max-height: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    font-weight: 300;
}

.list-info .catename {
   font-size: 42px;
   line-height: 42px;
   color: #948885;
   width: 20%;
   text-align: right;
}

.cover {
   aspect-ratio: 1.42 / 1;
   overflow: hidden;
   margin-top: 14px;
}

.year {
   font-size: 18px;
   line-height: 18px;
   margin-top: 10px;
}

.view-more {
   display: flex;
   align-items: center;
   cursor: pointer;
   justify-content: space-between;
}

.view-more .view-text {
   font-size: 12px;
   color: #948885;
}


.viewall-btn {
   display: block;
   width: 240px;
   height: 52px;
   line-height: 52px;
   border-radius: 52px;
   background-color: #bcb09d;
   color: #fff;
   font-size: 16px;
   text-align: center;
   margin: 116px auto 168px;
   transition: background-color 0.4s;
}

.viewall-btn a:hover {
   text-decoration: underline;
}

/* 响应式布局 */
@media (max-width: 1280px) {

   .container {
      width: 87.2%;
   }

   .list-container {
      grid-template-columns: repeat(2, 1fr);
   }
}

@media (max-width: 960px) {
   .container {
      width: 87.2%;
   }

   .list-container {
      grid-row-gap: 0.73rem;
      grid-template-columns: repeat(1, 1fr);
   }

   .list-item {
      padding-top: 0.24rem;
   }

   .list-info {
      margin-bottom: 0.8rem;
   }

   .list-info .casename {
      font-size: 0.375rem;
      line-height: 1.3;
      max-height: fit-content;
   }

   .list-info .catename {
      font-size: 0.42rem;
      line-height: 0.42rem;
   }

   .year {
      font-size: 0.21rem;
      line-height: 0.21rem;

   }

   .cover {
      aspect-ratio: 1.86 / 1;
      margin-top: 0.23rem;
   }

   .viewall-btn {
      display: block;
      width: 100%;
      height: 0.94rem;
      line-height: 0.94rem;
      border-radius: 52px;
      background-color: #bcb09d;
      color: #fff;
      font-size: 0.29rem;
      text-align: center;
      margin: 1.28rem auto 1.18rem;

   }
}