/* W2W page surfaces: archive/search/phim lists and future timeline/profile pages */

.w2w-page-section,
.w2w-category-page,
.w2w-tag-page,
.w2w-search-content,
.w2w-phim-page {
  padding-top: 40px;
  padding-bottom: 40px;
}

.w2w-post-grid,
.PostGridWrapper {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
}

#PostListWrapper {
  display: flex;
  flex-direction: column;
}

.w2w-movie-app .post-list,
.w2w-movie-component .post-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
  position: relative;
}

.w2w-movie-app .post-list .post-card,
.w2w-movie-component .post-list .post-card {
  position: relative;
}

.w2w-movie-app .post-list .post-card::after,
.w2w-movie-component .post-list .post-card::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--w2w-color-border);
}

.w2w-movie-app .post-list .post-card:last-child::after,
.w2w-movie-component .post-list .post-card:last-child::after {
  display: none;
}

.load-more-container {
  text-align: center;
  margin-top: 32px;
}

#loadMorePostBtn,
.load-more-container button {
  background: #000000;
  color: #ffffff;
  border: 2px solid #000000;
  border-radius: var(--w2w-radius-sm);
  padding: 8px 24px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}

#loadMorePostBtn:hover,
.load-more-container button:hover {
  background: #ffffff;
  color: #000000;
}

.no-more-posts {
  font-size: 14px;
  font-weight: 500;
  color: #999999;
  margin-top: 24px;
  text-align: center;
}

.post-ads-placeholder {
  background: #f4f4f4;
  border: 1px dashed #cccccc;
  padding: 24px;
  text-align: center;
  font-size: 14px;
  color: #999999;
  height: fit-content;
  border-radius: 6px;
}

.w2w-search-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.w2w-search-content .search-heading {
  font-family: var(--w2w-font-heading);
  font-size: 28px;
  font-weight: 700;
  line-height: 38px;
  margin-bottom: 40px;
}

.w2w-search-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.load-more-wrapper {
  text-align: center;
  margin: 24px 0 60px;
}

.load-more-wrapper button {
  background: transparent;
  border: 2px solid var(--w2w-color-text);
  padding: 10px 20px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.load-more-wrapper button:hover {
  background: var(--w2w-color-text);
  color: #ffffff;
}

.w2w-phim-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.PhimSectionWrapper {
  width: 100%;
}

.w2w-mobile-phim-index {
  display: block;
  width: 100%;
}

.w2w-mobile-phim-tabs {
  display: flex;
  align-items: flex-end;
  gap: 28px;
  margin-bottom: 14px;
}

.w2w-mobile-phim-tabs a {
  position: relative;
  display: inline-flex;
  min-height: 32px;
  align-items: flex-start;
  color: #68635f;
  font-family: var(--w2w-font-heading);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.12;
  text-decoration: none;
  white-space: nowrap;
}

.w2w-mobile-phim-tabs a.is-active {
  color: #5e5955;
}

.w2w-mobile-phim-tabs a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: #FF8A00;
}

.w2w-mobile-phim-week {
  margin-top: 12px;
}

.w2w-mobile-phim-week + .w2w-mobile-phim-week {
  margin-top: 28px;
}

.w2w-mobile-phim-week__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 30px;
  margin-bottom: 14px;
}

.w2w-mobile-phim-week__head h2 {
  color: #6a6662;
  font-family: var(--w2w-font-body);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  margin: 0;
  letter-spacing: 0;
}

.w2w-mobile-phim-week__head label {
  position: relative;
  flex: 0 0 auto;
}

.w2w-mobile-phim-week__head select {
  appearance: none;
  border: 0;
  background: transparent;
  color: #5f5a56;
  font-family: var(--w2w-font-body);
  font-size: 13px;
  line-height: 1;
  padding: 2px 18px 4px 2px;
}

.w2w-mobile-phim-week__head label::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 2px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid #222;
  transform: translateY(-35%);
  pointer-events: none;
}

.w2w-mobile-phim-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

.w2w-mobile-phim-card {
  display: block;
  min-width: 0;
  color: #6a6662;
  text-align: center;
  text-decoration: none;
}

.w2w-mobile-phim-card__poster {
  display: block;
  aspect-ratio: 210 / 274;
  overflow: hidden;
  border-radius: 5px;
  background: #ddd8d3;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.25);
}

.w2w-mobile-phim-card__poster img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.w2w-mobile-phim-card__rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 7px;
  color: #6b6661;
  font-size: 15px;
  line-height: 1;
}

.w2w-mobile-phim-card__stars {
  position: relative;
  display: inline-block;
  color: #ddd7d1;
  font-size: 18px;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.w2w-mobile-phim-card__stars > span:first-child {
  display: block;
}

.w2w-mobile-phim-card__stars > span:last-child {
  position: absolute;
  inset: 0 auto 0 0;
  overflow: hidden;
  color: #FF8A00;
  white-space: nowrap;
}

.w2w-mobile-phim-card__date {
  display: block;
  margin-top: 8px;
  color: #6b6661;
  font-size: 14px;
  line-height: 1.2;
}

.w2w-mobile-phim-empty {
  color: #6a6662;
  font-family: var(--w2w-font-body);
  font-size: 16px;
  margin: 18px 0 0;
}

#loadMoreWrapper {
  text-align: center;
  margin-top: 20px;
}

.load-more-button {
  background-color: #ffc107;
  color: #000000;
  padding: 10px 24px;
  border: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--w2w-font-body);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.load-more-button:hover {
  background-color: #ffb300;
}

.w2w-not-found {
  padding: 100px;
  text-align: center;
}

@media (max-width: 1024px) {
  .w2w-post-grid,
  .PostGridWrapper {
    grid-template-columns: 1fr;
  }

  .post-ads-placeholder {
    display: none;
  }
}

@media (max-width: 768px) {
  .w2w-page-section,
  .w2w-category-page,
  .w2w-tag-page,
  .w2w-search-content,
  .w2w-phim-page {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .w2w-movie-app .post-list,
  .w2w-movie-component .post-list {
    gap: 28px;
  }

  .w2w-movie-app .post-list .post-card::after,
  .w2w-movie-component .post-list .post-card::after {
    bottom: -14px;
  }

  .w2w-phim-page {
    padding-top: 18px;
    padding-bottom: 32px;
  }

  .w2w-phim-page .PhimSectionWrapper {
    display: none;
  }

  .w2w-mobile-phim-index {
    display: block;
    width: 100%;
  }

  .w2w-mobile-phim-tabs {
    display: flex;
    align-items: flex-end;
    gap: 22px;
    margin-bottom: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .w2w-mobile-phim-tabs a {
    position: relative;
    display: inline-flex;
    min-height: 34px;
    align-items: flex-start;
    color: #68635f;
    font-family: var(--w2w-font-heading);
    font-size: clamp(18px, 5.2vw, 24px);
    font-weight: 800;
    line-height: 1.12;
    text-decoration: none;
    white-space: nowrap;
  }

  .w2w-mobile-phim-tabs a.is-active {
    color: #5e5955;
  }

  .w2w-mobile-phim-tabs a.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: #FF8A00;
  }

  .w2w-mobile-phim-week {
    margin-top: 14px;
  }

  .w2w-mobile-phim-week + .w2w-mobile-phim-week {
    margin-top: 24px;
  }

  .w2w-mobile-phim-week__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 34px;
    border-bottom: 1px solid #ddd7d1;
    margin-bottom: 12px;
  }

  .w2w-mobile-phim-week__head h2 {
    color: #6a6662;
    font-family: var(--w2w-font-body);
    font-size: clamp(16px, 4.4vw, 21px);
    font-weight: 500;
    line-height: 1.2;
    margin: 0;
    letter-spacing: 0;
  }

  .w2w-mobile-phim-week__head label {
    position: relative;
    flex: 0 0 auto;
  }

  .w2w-mobile-phim-week__head select {
    appearance: none;
    border: 0;
    background: transparent;
    color: #5f5a56;
    font-family: var(--w2w-font-body);
    font-size: clamp(15px, 4vw, 18px);
    line-height: 1;
    padding: 2px 20px 4px 2px;
  }

  .w2w-mobile-phim-week__head label::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 2px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #222;
    transform: translateY(-35%);
    pointer-events: none;
  }

  .w2w-mobile-phim-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 22px;
  }

  .w2w-mobile-phim-card {
    display: block;
    min-width: 0;
    color: #6a6662;
    text-align: center;
    text-decoration: none;
  }

  .w2w-mobile-phim-card__poster {
    display: block;
    aspect-ratio: 210 / 274;
    overflow: hidden;
    border-radius: 5px;
    background: #ddd8d3;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.25);
  }

  .w2w-mobile-phim-card__poster img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
  }

  .w2w-mobile-phim-card__rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 7px;
    color: #6b6661;
    font-size: clamp(15px, 4vw, 20px);
    line-height: 1;
  }

  .w2w-mobile-phim-card__stars {
    position: relative;
    display: inline-block;
    color: #ddd7d1;
    font-size: clamp(18px, 4.6vw, 22px);
    letter-spacing: 0;
    line-height: 1;
    white-space: nowrap;
  }

  .w2w-mobile-phim-card__stars > span:first-child {
    display: block;
  }

  .w2w-mobile-phim-card__stars > span:last-child {
    position: absolute;
    inset: 0 auto 0 0;
    overflow: hidden;
    color: #FF8A00;
    white-space: nowrap;
  }

  .w2w-mobile-phim-card__date {
    display: block;
    margin-top: 8px;
    color: #6b6661;
    font-size: clamp(13px, 3.7vw, 16px);
    line-height: 1.2;
  }

  .w2w-mobile-phim-empty {
    color: #6a6662;
    font-family: var(--w2w-font-body);
    font-size: 16px;
    margin: 18px 0 0;
  }
}

@media (max-width: 430px) {
  .w2w-mobile-phim-tabs {
    gap: 18px;
  }

  .w2w-mobile-phim-grid {
    gap: 10px 10px;
  }
}
