/* Responsive Enhancement Added — Non-destructive scaling version (vw-based) */

/**
 * News Page Styles
 * ================
 *
 * Structure:
 * 1. Hero Section
 * 2. News List Section
 * 3. Category Filters
 * 4. News Grid
 * 5. Pagination
 * 6. Responsive Design
 */

/* Responsive Variables */
:root {
  --vw-with-scrollbar: 100vw;
  --header-height-pc: calc(88 * var(--vw-with-scrollbar) / 1920);
  --header-height-sp: calc(64 * var(--vw-with-scrollbar) / 400);
}

/* ======================
   1. HERO SECTION
   ====================== */

.hero-news {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 450px;
  min-height: calc(450 * var(--vw-with-scrollbar) / 1920);
  max-height: 600px;
  max-height: calc(600 * var(--vw-with-scrollbar) / 1920);
  background-color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-news__container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  max-width: calc(1200 * var(--vw-with-scrollbar) / 1920);
  margin: 0 auto;
  padding: 0 20px;
  padding: 0 calc(20 * var(--vw-with-scrollbar) / 1920);
}

.hero-news__content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Line Parts Base Styles */
.line-parts {
  display: inline-block;
  overflow: hidden;
}

.line-bg-black {
  background-color: #000;
  padding-right: 30px;
  padding-right: calc(30 * var(--vw-with-scrollbar) / 1920);
}

/* Line Parts Animation for News */
.hero-news__content .line-parts {
  width: fit-content;
  display: inline-block;
  overflow: hidden;
  position: relative;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.075, 0.82, 0.165, 1);
}

.hero-news__content .line-parts.is-active {
  transform: scale(1);
}

.hero-news__content .line-parts:before,
.hero-news__content .line-parts:after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.36, 0.48, 0.02, 0.98);
}

.hero-news__content .line-parts:before {
  transform: translateX(-100%);
}

.hero-news__content .line-parts:after {
  transform: translateX(0);
}

.hero-news__content .line-parts.is-active:before {
  transform: translateX(0);
}

.hero-news__content .line-parts.is-active:after {
  transform: translateX(100%);
  transition: transform 0.6s ease 0.4s;
}

.hero-news__content .line-parts.line-bg-black:before,
.hero-news__content .line-parts.line-bg-black:after {
  background-color: #000;
}

.hero-news__content .line-parts:before {
  z-index: 1;
}

.hero-news__content .line-parts:after {
  z-index: 5;
}

.hero-news__content .line-parts .hero-news__title,
.hero-news__content .line-parts .hero-news__subtitle {
  position: relative;
  z-index: 2;
}

.hero-news__title {
  font-size: 150px;
  font-size: clamp(60px, calc(150 * var(--vw-with-scrollbar) / 1920), 150px);
  font-weight: 900;
  margin: 0;
  line-height: 0.9;
  font-family: var(--font-english);
  font-style: italic;
  text-decoration: underline;
  text-decoration-color: #fff;
  text-decoration-thickness: 2px;
  text-decoration-thickness: calc(2 * var(--vw-with-scrollbar) / 1920);
  text-underline-offset: 2px;
  text-underline-offset: calc(2 * var(--vw-with-scrollbar) / 1920);
  color: #fff;
  text-align: center;
  background: transparent;
  display: inline-block;
  width: fit-content;
}

.hero-news__subtitle {
  font-size: 40px;
  font-size: clamp(24px, calc(40 * var(--vw-with-scrollbar) / 1920), 40px);
  color: #fff;
  font-weight: bold;
  text-align: center;
  background: transparent;
  display: block;
  width: fit-content;
  margin: 0;
  margin-top: -10px;
  margin-top: calc(-10 * var(--vw-with-scrollbar) / 1920);
}

/* ======================
   2. NEWS LIST SECTION
   ====================== */

.news-list {
  padding: 0 80px;
  padding: 0 calc(80 * var(--vw-with-scrollbar) / 1920);
  background-color: #000;
  min-height: 100vh;
}

.news-list__container {
  max-width: 1000px;
  max-width: calc(1000 * var(--vw-with-scrollbar) / 1920);
  margin: 0 auto 80px auto;
  margin: 0 auto calc(80 * var(--vw-with-scrollbar) / 1920) auto;
  padding: 0 40px;
  padding: 0 calc(40 * var(--vw-with-scrollbar) / 1920);
}

/* ======================
   3. CATEGORY FILTERS
   ====================== */

.news-list__filters {
  display: flex;
  justify-content: center;
  gap: 15px;
  gap: calc(15 * var(--vw-with-scrollbar) / 1920);
  margin-bottom: 60px;
  margin-bottom: calc(60 * var(--vw-with-scrollbar) / 1920);
  flex-wrap: wrap;
}

.news-list__filter {
  padding: 15px 40px;
  padding: calc(15 * var(--vw-with-scrollbar) / 1920)
    calc(40 * var(--vw-with-scrollbar) / 1920);
  border: 2px solid #fff;
  border: calc(2 * var(--vw-with-scrollbar) / 1920) solid #fff;
  background-color: transparent;
  color: #fff;
  font-size: 20px;
  font-size: clamp(16px, calc(20 * var(--vw-with-scrollbar) / 1920), 20px);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 0;
  font-family: var(--font-japanese);
  letter-spacing: 0.05em;
}

.news-list__filter:hover,
.news-list__filter--active {
  background-color: #ffdd57;
  color: #000;
  border-color: #ffdd57;
}

/* ======================
   4. NEWS GRID
   ====================== */

.news-list__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  gap: calc(30 * var(--vw-with-scrollbar) / 1920);
  margin-bottom: 40px;
  margin-bottom: calc(40 * var(--vw-with-scrollbar) / 1920);
}

.news-list__item {
  background-color: #000;
  overflow: hidden;
  transition: transform 0.3s ease;
  border: none;
}

.news-list__item:hover {
  transform: translateY(-3px);
}

.news-list__link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.news-list__image {
  width: 100%;
  height: 250px;
  height: calc(250 * var(--vw-with-scrollbar) / 1920);
  overflow: hidden;
  position: relative;
  background-color: #ccc;
}

.news-list__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.news-list__item:hover .news-list__image img {
  transform: scale(1.02);
}

.news-list__content {
  padding: 20px 0;
  padding: calc(20 * var(--vw-with-scrollbar) / 1920) 0;
  position: relative;
}

/* Content Meta */
.news-list__meta {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 12px;
  margin-bottom: calc(12 * var(--vw-with-scrollbar) / 1920);
  font-size: 14px;
  gap: 15px;
  gap: calc(15 * var(--vw-with-scrollbar) / 1920);
}

.news-list__date {
  color: #fff;
  font-size: 26px;
  font-size: clamp(18px, calc(26 * var(--vw-with-scrollbar) / 1920), 26px);
  font-weight: bold;
  font-family: var(--font-english);
}

.news-list__category {
  background-color: transparent;
  color: #fff;
  padding: 3px 12px;
  padding: calc(3 * var(--vw-with-scrollbar) / 1920)
    calc(12 * var(--vw-with-scrollbar) / 1920);
  font-size: 16px;
  font-size: clamp(12px, calc(16 * var(--vw-with-scrollbar) / 1920), 16px);
  font-weight: 400;
  letter-spacing: 0.02em;
  font-family: var(--font-japanese);
  border: 1px solid #fff;
}

/* Content Title */
.news-list__title {
  font-size: 14px;
  font-size: clamp(13px, calc(14 * var(--vw-with-scrollbar) / 1920), 14px);
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: 0;
  color: #fff;
  font-family: var(--font-japanese);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
  gap: calc(15 * var(--vw-with-scrollbar) / 1920);
}

.news-list__title-text {
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

.news-list__arrow {
  flex-shrink: 0;
  color: #fff;
  transition: transform 0.3s ease;
  margin-top: 2px;
  margin-top: calc(2 * var(--vw-with-scrollbar) / 1920);
}

.news-list__item:hover .news-list__arrow {
  transform: translateX(3px);
}

/* No Posts Message */
.news-list__no-posts {
  text-align: center;
  padding: 60px 20px;
  padding: calc(60 * var(--vw-with-scrollbar) / 1920)
    calc(20 * var(--vw-with-scrollbar) / 1920);
  color: #fff;
  font-size: 16px;
  font-size: clamp(14px, calc(16 * var(--vw-with-scrollbar) / 1920), 16px);
}

/* ======================
   5. PAGINATION
   ====================== */

.news-list__pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  gap: calc(5 * var(--vw-with-scrollbar) / 1920);
  flex-wrap: wrap;
}

.news-list__page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  width: calc(35 * var(--vw-with-scrollbar) / 1920);
  height: 35px;
  height: calc(35 * var(--vw-with-scrollbar) / 1920);
  background-color: #333;
  color: #fff;
  text-decoration: none;
  font-weight: 400;
  font-size: 14px;
  font-size: clamp(12px, calc(14 * var(--vw-with-scrollbar) / 1920), 14px);
  transition: all 0.3s ease;
  border: none;
  font-family: var(--font-japanese);
}

.news-list__page:hover {
  background-color: #555;
}

.news-list__page--current {
  background-color: #ffdd57;
  color: #000;
}

.news-list__page--prev,
.news-list__page--next {
  width: auto;
  padding: 0 15px;
  padding: 0 calc(15 * var(--vw-with-scrollbar) / 1920);
  font-size: 14px;
  font-size: clamp(12px, calc(14 * var(--vw-with-scrollbar) / 1920), 14px);
  background-color: #333;
  color: #fff;
}

.news-list__page--prev:hover,
.news-list__page--next:hover {
  background-color: #555;
}

.news-list__page--dots {
  background-color: transparent;
  color: #fff;
  cursor: default;
}

.news-list__page--dots:hover {
  background-color: transparent;
}

/* ======================
   6. RESPONSIVE DESIGN
   ====================== */

/* Mobile */
@media (max-width: 1024px) {
  /* Hero Section */
  .hero-news {
    height: 100%;
    min-height: 200px;
    min-height: calc(200 * 100vw / 400);
    max-height: 400px;
    max-height: calc(400 * 100vw / 400);
    padding-top: 80px;
    padding-top: calc(80 * 100vw / 400);
  }

  .hero-news__title {
    font-size: 50px;
    font-size: calc(50 * 100vw / 400);
  }

  .hero-news__subtitle {
    font-size: 24px;
    font-size: calc(24 * 100vw / 400);
  }

  .line-bg-black {
    padding-right: 0px;
  }

  /* Case hero - match front-page responsive style */
  .hero-news--case .hero-news__container {
    max-width: 100%;
    padding: 0 24px;
    margin: 0;
  }

  .hero-news--case .hero-news__content {
    align-items: flex-start !important;
    text-align: left !important;
  }

  .hero-news--case .hero-news__title {
    font-size: 80px;
    font-size: calc(80 * 100vw / 400);
    text-align: left;
    text-decoration: none;
  }

  .hero-news--case .hero-news__title .case-text {
    text-decoration: none;
    position: relative;
    color: #fff;
  }

  .hero-news--case .hero-news__title .case-text::after {
    content: "";
    position: absolute;
    bottom: 10px;
    left: 0;
    right: -100px;
    right: calc(-100 * 100vw / 400);
    height: 2px;
    background-color: #fff;
  }

  .hero-news--case .hero-news__subtitle {
    font-size: 24px;
    font-size: calc(24 * 100vw / 400);
    text-align: left;
  }

  /* News List */
  .news-list {
    padding: 50px 0;
    padding: calc(50 * 100vw / 400) 0;
  }

  .news-list__container {
    padding: 0 20px;
    max-width: 100%;
  }

  /* Filters - Horizontal Layout */
  .news-list__filters {
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    gap: calc(10 * 100vw / 400);
    flex-wrap: wrap;
    margin-bottom: 40px;
    margin-bottom: calc(40 * 100vw / 400);
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .news-list__filter {
    flex: 1;
    min-width: auto;
    max-width: none;
    padding: 10px 20px;
    padding: calc(10 * 100vw / 400) calc(20 * 100vw / 400);
    font-size: 14px;
    font-size: calc(14 * 100vw / 400);
    text-align: center;
    border: 2px solid #fff;
  }

  /* Grid - Horizontal Layout for Mobile */
  .news-list__grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 40px;
    gap: calc(40 * 100vw / 400);
    margin-bottom: 50px;
    margin-bottom: calc(50 * 100vw / 400);
  }

  .news-list__link {
    display: flex;
    gap: 15px;
    gap: calc(15 * 100vw / 400);
    align-items: flex-start;
  }

  .news-list__image {
    width: 120px;
    width: calc(120 * 100vw / 400);
    height: 80px;
    height: calc(80 * 100vw / 400);
    flex-shrink: 0;
  }

  .news-list__content {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
  }

  .news-list__meta {
    margin-bottom: 8px;
    margin-bottom: calc(8 * 100vw / 400);
    gap: 10px;
    gap: calc(10 * 100vw / 400);
    flex-wrap: wrap;
  }

  .news-list__date {
    font-size: 18px;
    font-size: calc(18 * 100vw / 400);
  }

  .news-list__category {
    font-size: 12px;
    font-size: calc(12 * 100vw / 400);
    padding: 2px 8px;
    padding: calc(2 * 100vw / 400) calc(8 * 100vw / 400);
  }

  .news-list__title {
    font-size: 13px;
    font-size: calc(13 * 100vw / 400);
    gap: 10px;
    gap: calc(10 * 100vw / 400);
  }

  .news-list__title-text {
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  /* Pagination */
  .news-list__pagination {
    gap: 3px;
  }

  .news-list__page {
    width: 35px;
    height: 35px;
    font-size: 13px;
    font-size: calc(13 * 100vw / 400);
  }

  .news-list__page--prev,
  .news-list__page--next {
    padding: 0 12px;
    font-size: 12px;
    font-size: calc(12 * 100vw / 400);
  }
}
