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

/**
 * News Detail Page Styles
 * ======================
 *
 * Structure:
 * 1. Variables & Base Styles
 * 2. Layout Components
 * 3. Content Elements
 * 4. Interactive Elements
 * 5. 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. BASE STYLES
   ====================== */

/* Main Container */
.news-detail {
  background-color: #000;
  min-height: 100vh;
}

/* ======================
   2. LAYOUT COMPONENTS
   ====================== */

/* Hero Section */
.hero-news {
  position: relative;
  width: 100%;
  height: 50vh;
  min-height: 400px;
  min-height: calc(400 * 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.36, 0.48, 0.02, 0.98);
}

.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.3s 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.3s cubic-bezier(0.36, 0.48, 0.02, 0.98) 0.3s;
}

.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);
}

/* Content Section */
.news-detail__content {
  background-color: #000;
  padding: 80px 0;
  padding: calc(80 * var(--vw-with-scrollbar) / 1920) 0;
  color: #fff;
}

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

/* ======================
   3. CONTENT ELEMENTS
   ====================== */

/* Article Meta */
.news-detail__meta {
  display: flex;
  align-items: center;
  gap: 20px;
  gap: calc(20 * var(--vw-with-scrollbar) / 1920);
  margin-bottom: 30px;
  margin-bottom: calc(30 * var(--vw-with-scrollbar) / 1920);
}

.news-detail__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-detail__category {
  background-color: transparent;
  color: #fff;
  padding: 6px 16px;
  padding: calc(6 * var(--vw-with-scrollbar) / 1920)
    calc(16 * 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;
}

/* Article Title */
.news-detail__title {
  font-size: 26px;
  font-size: clamp(18px, calc(26 * var(--vw-with-scrollbar) / 1920), 26px);
  font-weight: 400;
  line-height: 1.6;
  color: #fff;
  margin-bottom: 40px;
  margin-bottom: calc(40 * var(--vw-with-scrollbar) / 1920);
  font-family: var(--font-japanese);
}

/* Featured Image */
.news-detail__image {
  width: 100%;
  margin-bottom: 40px;
  margin-bottom: calc(40 * var(--vw-with-scrollbar) / 1920);
}

.news-detail__image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

/* Article Body */
.news-detail__body {
  color: #fff;
  font-size: 16px;
  font-size: clamp(14px, calc(16 * var(--vw-with-scrollbar) / 1920), 16px);
  line-height: 1.8;
  font-family: var(--font-japanese);
  margin-bottom: 60px;
  margin-bottom: calc(60 * var(--vw-with-scrollbar) / 1920);
}

.news-detail__body p {
  margin-bottom: 1.5em;
  word-wrap: break-word;
}

.news-detail__body img {
  max-width: 100%;
  height: auto;
  margin: 20px 0;
  margin: calc(20 * var(--vw-with-scrollbar) / 1920) 0;
}

.news-detail__body h2,
.news-detail__body h3,
.news-detail__body h4 {
  color: #fff;
  margin-top: 2em;
  margin-bottom: 1em;
  font-family: var(--font-japanese);
}

/* ======================
   4. INTERACTIVE ELEMENTS
   ====================== */

/* Back Button */
.news-detail__back {
  margin-bottom: 80px;
  margin-bottom: calc(80 * var(--vw-with-scrollbar) / 1920);
}

.news-detail__back-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  gap: calc(10 * var(--vw-with-scrollbar) / 1920);
  padding: 12px 24px;
  padding: calc(12 * var(--vw-with-scrollbar) / 1920)
    calc(24 * var(--vw-with-scrollbar) / 1920);
  border: 2px solid #fff;
  border: calc(2 * var(--vw-with-scrollbar) / 1920) solid #fff;
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  font-size: clamp(14px, calc(18 * var(--vw-with-scrollbar) / 1920), 18px);
  font-weight: 400;
  font-family: var(--font-japanese);
  transition: all 0.3s ease;
  letter-spacing: 0.05em;
}

.news-detail__back-btn:hover {
  background-color: transparent;
  color: #ffdd57;
  border-color: #ffdd57;
}

.news-detail__back-btn img {
  transition: all 0.3s ease;
  filter: brightness(0) invert(1);
}

.news-detail__back-icon {
  width: 24px;
  width: calc(24 * var(--vw-with-scrollbar) / 1920);
  height: 24px;
  height: calc(24 * var(--vw-with-scrollbar) / 1920);
}

.news-detail__back-btn:hover img {
  transform: translateX(-3px);
  filter: brightness(0) saturate(100%) invert(89%) sepia(85%) saturate(413%)
    hue-rotate(333deg) brightness(108%) contrast(102%);
}

/* Related Posts Section */
.news-detail__related {
  background-color: #000;
  padding: 60px 0 80px 0;
  padding: calc(60 * var(--vw-with-scrollbar) / 1920) 0
    calc(80 * var(--vw-with-scrollbar) / 1920) 0;
  position: relative;
}

.news-detail__related::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 920px;
  width: calc(920 * var(--vw-with-scrollbar) / 1920);
  height: 1px;
  background-color: #fff;
}

.news-detail__related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: 30px;
  gap: calc(30 * var(--vw-with-scrollbar) / 1920);
  max-width: 1000px;
  max-width: calc(1000 * var(--vw-with-scrollbar) / 1920);
}

.news-detail__related-item {
  background-color: #000;
  overflow: hidden;
  transition: transform 0.3s ease;
}

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

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

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

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

.news-detail__related-item:hover .news-detail__related-image img {
  transform: scale(1.02);
}

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

.news-detail__related-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-detail__related-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-detail__related-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;
}

.news-detail__related-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-detail__related-title-text {
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

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

.news-detail__related-arrow-icon {
  width: 24px;
  width: calc(24 * var(--vw-with-scrollbar) / 1920);
  height: 24px;
  height: calc(24 * var(--vw-with-scrollbar) / 1920);
}

.news-detail__related-item:hover .news-detail__related-arrow {
  transform: translateX(3px);
}

/* ======================
   5. RESPONSIVE DESIGN
   ====================== */

/* Mobile */
@media (max-width: 1024px) {
  .hero-news {
    height: 20vh;
    min-height: 200px;
    min-height: calc(200 * 100vw / 400);
    max-height: 400px;
    max-height: calc(400 * 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 detail 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;
    bottom: calc(10 * 100vw / 400);
    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;
  }

  main {
    padding-top: 50px;
    padding-top: calc(50 * 100vw / 400);
  }

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

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

  .news-detail__meta {
    flex-direction: row;
    align-items: center;
    gap: 20px;
    gap: calc(20 * 100vw / 400);
    margin-bottom: 20px;
    margin-bottom: calc(20 * 100vw / 400);
  }

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

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

  .news-detail__title {
    font-size: 18px;
    font-size: calc(18 * 100vw / 400);
    margin-bottom: 25px;
    margin-bottom: calc(25 * 100vw / 400);
    line-height: 1.5;
  }

  .news-detail__image {
    margin-bottom: 30px;
    margin-bottom: calc(30 * 100vw / 400);
  }

  .news-detail__body {
    font-size: 13px;
    font-size: calc(13 * 100vw / 400);
    line-height: 1.7;
    margin-bottom: 40px;
    margin-bottom: calc(40 * 100vw / 400);
  }

  .news-detail__body img {
    margin: 20px 0;
    margin: calc(20 * 100vw / 400) 0;
  }

  .news-detail__back {
    margin-bottom: 50px;
    margin-bottom: calc(50 * 100vw / 400);
  }

  .news-detail__back-btn {
    padding: 8px 16px;
    padding: calc(8 * 100vw / 400) calc(16 * 100vw / 400);
    font-size: 13px;
    font-size: calc(13 * 100vw / 400);
    gap: 8px;
    gap: calc(8 * 100vw / 400);
  }

  .news-detail__back-icon {
    width: 16px;
    width: calc(16 * 100vw / 400);
    height: 16px;
    height: calc(16 * 100vw / 400);
  }

  .news-detail__related {
    padding: 40px 0 50px 0;
    padding: calc(40 * 100vw / 400) 0 calc(50 * 100vw / 400) 0;
  }

  .news-detail__related::before {
    width: 100%;
    max-width: calc(920 * 100vw / 400);
  }

  /* Related Grid - Horizontal Layout for Mobile */
  .news-detail__related-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 40px;
    gap: calc(40 * 100vw / 400);
    max-width: 100%;
  }

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

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

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

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

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

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

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

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

  .news-detail__related-arrow-icon {
    width: 16px;
    width: calc(16 * 100vw / 400);
    height: 16px;
    height: calc(16 * 100vw / 400);
  }
}

/* ======================
   6. CASE STUDY STYLES
   ====================== */

/* Case Detail - Use same base styles as news-detail */
.case-detail {
  background-color: #000;
  min-height: 100vh;
}

.case-detail__content {
  background-color: #000;
  padding: 80px 0;
  padding: calc(80 * var(--vw-with-scrollbar) / 1920) 0;
  color: #fff;
}

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

/* Case Detail Meta */
.case-detail__meta {
  display: flex;
  align-items: center;
  gap: 20px;
  gap: calc(20 * var(--vw-with-scrollbar) / 1920);
  margin-bottom: 30px;
  margin-bottom: calc(30 * var(--vw-with-scrollbar) / 1920);
}

.case-detail__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);
}

.case-detail__category {
  background-color: transparent;
  color: #fff;
  padding: 6px 16px;
  padding: calc(6 * var(--vw-with-scrollbar) / 1920)
    calc(16 * 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;
}

/* Case Detail Title */
.case-detail__title {
  font-size: 26px;
  font-size: clamp(18px, calc(26 * var(--vw-with-scrollbar) / 1920), 26px);
  font-weight: 400;
  line-height: 1.6;
  color: #fff;
  margin-bottom: 20px;
  margin-bottom: calc(20 * var(--vw-with-scrollbar) / 1920);
  font-family: var(--font-japanese);
}

/* Request Section */
.case-detail__request {
  display: flex;
  align-items: flex-start;
  gap: 30px;
  gap: calc(30 * var(--vw-with-scrollbar) / 1920);
  margin-bottom: 50px;
  margin-bottom: calc(50 * var(--vw-with-scrollbar) / 1920);
  padding-top: 0px;
  padding-top: calc(0 * var(--vw-with-scrollbar) / 1920);
  padding-bottom: 0px;
  padding-bottom: calc(0 * var(--vw-with-scrollbar) / 1920);
  border-top: 1px solid #fff;
  border-bottom: 1px solid #fff;
}

.case-detail__request-label {
  width: 171px;
  width: calc(171 * var(--vw-with-scrollbar) / 1920);
  font-size: 18px;
  font-size: calc(18 * var(--vw-with-scrollbar) / 1920);
  font-weight: bold;
  color: #000;
  font-family: var(--font-japanese);
  background-color: #fff;
  padding: 20px 0px;
  padding: calc(20 * var(--vw-with-scrollbar) / 1920)
    calc(0 * var(--vw-with-scrollbar) / 1920);
  display: inline-block;
  text-align: center;
  box-sizing: border-box;
}

.case-detail__request-content {
  flex: 1;
  font-size: 18px;
  font-size: calc(18 * var(--vw-with-scrollbar) / 1920);
  line-height: 1.8;
  color: #fff;
  font-family: var(--font-japanese);
  padding: 18px 0px;
  padding: calc(18 * var(--vw-with-scrollbar) / 1920)
    calc(0 * var(--vw-with-scrollbar) / 1920);
}

/* Construction Data Section */
.case-detail__construction {
  margin-bottom: 50px;
  margin-bottom: calc(50 * var(--vw-with-scrollbar) / 1920);
}

.case-detail__construction-label {
  font-size: 20px;
  font-size: calc(20 * var(--vw-with-scrollbar) / 1920);
  font-weight: bold;
  color: #fff;
  margin-bottom: 20px;
  margin-bottom: calc(20 * var(--vw-with-scrollbar) / 1920);
  font-family: var(--font-japanese);
  display: inline-block;
}

.case-detail__construction-item {
  display: flex;
  align-items: center;
  gap: 30px;
  gap: calc(30 * var(--vw-with-scrollbar) / 1920);
  margin-bottom: 25px;
  margin-bottom: calc(25 * var(--vw-with-scrollbar) / 1920);
  border-top: 1px solid #fff;
  border-bottom: 1px solid #fff;
}

.case-detail__construction-item-label {
  width: 171px;
  width: calc(171 * var(--vw-with-scrollbar) / 1920);
  font-size: 16px;
  font-size: clamp(14px, calc(16 * var(--vw-with-scrollbar) / 1920), 16px);
  font-weight: bold;
  color: #000;
  font-family: var(--font-japanese);
  background-color: #fff;
  padding: 20px 0px;
  padding: calc(20 * var(--vw-with-scrollbar) / 1920)
    calc(0 * var(--vw-with-scrollbar) / 1920);
  display: inline-block;
  text-align: center;
  box-sizing: border-box;
}

.case-detail__construction-item-content {
  flex: 1;
  font-size: 18px;
  font-size: calc(18 * var(--vw-with-scrollbar) / 1920);
  line-height: 1.8;
  color: #fff;
  font-family: var(--font-japanese);
}

/* Before & After Images */
.case-detail__before-after {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  gap: calc(30 * var(--vw-with-scrollbar) / 1920);
  margin-bottom: 50px;
  margin-bottom: calc(50 * var(--vw-with-scrollbar) / 1920);
}

.case-detail__before-after-item {
  position: relative;
}

.case-detail__before-after-label {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 30px;
  font-size: calc(30 * var(--vw-with-scrollbar) / 1920);
  font-weight: bold;
  color: #000;
  background-color: #fff;
  padding: 8px 20px;
  padding: calc(8 * var(--vw-with-scrollbar) / 1920)
    calc(20 * var(--vw-with-scrollbar) / 1920);
  font-family: var(--font-english);
  display: inline-block;
  z-index: 10;
}

.case-detail__before-after-item:nth-child(2) .case-detail__before-after-label {
  background-color: #ffdd57;
}

.case-detail__before-after-image {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.case-detail__before-after-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

/* Case Detail Body */
.case-detail__body {
  color: #fff;
  font-size: 16px;
  font-size: clamp(14px, calc(16 * var(--vw-with-scrollbar) / 1920), 16px);
  line-height: 1.8;
  font-family: var(--font-japanese);
  margin-bottom: 60px;
  margin-bottom: calc(60 * var(--vw-with-scrollbar) / 1920);
}

.case-detail__body p {
  margin-bottom: 1.5em;
  word-wrap: break-word;
}

/* Case Detail Back Button */
.case-detail__back {
  margin-bottom: 80px;
  margin-bottom: calc(80 * var(--vw-with-scrollbar) / 1920);
}

.case-detail__back-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  gap: calc(10 * var(--vw-with-scrollbar) / 1920);
  padding: 12px 24px;
  padding: calc(12 * var(--vw-with-scrollbar) / 1920)
    calc(24 * var(--vw-with-scrollbar) / 1920);
  border: 4px solid #fff;
  border: calc(4 * var(--vw-with-scrollbar) / 1920) solid #fff;
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  font-size: clamp(14px, calc(18 * var(--vw-with-scrollbar) / 1920), 18px);
  font-weight: 400;
  font-family: var(--font-japanese);
  transition: all 0.3s ease;
  letter-spacing: 0.05em;
}

.case-detail__back-btn:hover {
  background-color: transparent;
  color: #ffdd57;
  border-color: #ffdd57;
}

.case-detail__back-btn img {
  transition: all 0.3s ease;
  filter: brightness(0) invert(1);
}

.case-detail__back-icon {
  width: 16px;
  height: 16px;
}

.case-detail__back-btn:hover img {
  transform: translateX(-3px);
  filter: brightness(0) saturate(100%) invert(88%) sepia(100%) saturate(413%)
    hue-rotate(333deg) brightness(108%) contrast(102%);
}

/* Case Detail Related Posts */
.case-detail__related {
  background-color: #000;
  padding: 60px 0 80px 0;
  padding: calc(60 * var(--vw-with-scrollbar) / 1920) 0
    calc(80 * var(--vw-with-scrollbar) / 1920) 0;
  position: relative;
}

.case-detail__related::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 920px;
  width: calc(920 * var(--vw-with-scrollbar) / 1920);
  height: 1px;
  background-color: #fff;
}

.case-detail__related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: 30px;
  gap: calc(30 * var(--vw-with-scrollbar) / 1920);
  max-width: 1000px;
  max-width: calc(1000 * var(--vw-with-scrollbar) / 1920);
}

.case-detail__related-item {
  background-color: #000;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.case-detail__related-item:hover {
  transform: translateY(-3px);
}

.case-detail__related-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

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

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

.case-detail__related-item:hover .case-detail__related-image img {
  transform: scale(1.02);
}

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

.case-detail__related-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);
}

.case-detail__related-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);
}

.case-detail__related-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;
}

.case-detail__related-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);
}

.case-detail__related-title-text {
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

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

.case-detail__related-arrow-icon {
  width: 24px;
  width: calc(24 * var(--vw-with-scrollbar) / 1920);
  height: 24px;
  height: calc(24 * var(--vw-with-scrollbar) / 1920);
}

.case-detail__related-item:hover .case-detail__related-arrow {
  transform: translateX(3px);
}

/* Case Study Mobile Responsive */
@media (max-width: 1024px) {
  .case-detail__content {
    padding: 50px 0;
    padding: calc(50 * 100vw / 400) 0;
  }

  .case-detail__container {
    padding: 0 20px;
    max-width: 100%;
  }

  .case-detail__meta {
    flex-direction: row;
    align-items: center;
    gap: 20px;
    gap: calc(20 * 100vw / 400);
    margin-bottom: 20px;
    margin-bottom: calc(20 * 100vw / 400);
  }

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

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

  .case-detail__title {
    font-size: 18px;
    font-size: calc(18 * 100vw / 400);
    margin-bottom: 25px;
    margin-bottom: calc(25 * 100vw / 400);
    padding-bottom: 20px;
    padding-bottom: calc(20 * 100vw / 400);
    line-height: 1.5;
  }

  .case-detail__request {
    gap: 15px;
    gap: calc(15 * 100vw / 400);
    margin-bottom: 40px;
    margin-bottom: calc(40 * 100vw / 400);
  }

  .case-detail__request-label {
    width: 100px;
    width: calc(100 * 100vw / 400);
    font-size: 14px;
    font-size: calc(14 * 100vw / 400);
    padding: 15px 5px;
    padding: calc(15 * 100vw / 400) calc(5 * 100vw / 400);
  }

  .case-detail__request-content {
    font-size: 14px;
    font-size: calc(14 * 100vw / 400);
    line-height: 1.7;
    padding: 14px 0px;
    padding: calc(14 * 100vw / 400) calc(0 * 100vw / 400);
  }

  .case-detail__construction {
    margin-bottom: 40px;
    margin-bottom: calc(40 * 100vw / 400);
  }

  .case-detail__construction-label {
    font-size: 16px;
    font-size: calc(16 * 100vw / 400);
    margin-bottom: 20px;
    margin-bottom: calc(20 * 100vw / 400);
  }

  .case-detail__construction-item {
    gap: 15px;
    gap: calc(15 * 100vw / 400);
    margin-bottom: 20px;
    margin-bottom: calc(20 * 100vw / 400);
  }

  .case-detail__construction-item-label {
    width: 100px;
    width: calc(100 * 100vw / 400);
    font-size: 13px;
    font-size: calc(13 * 100vw / 400);
    padding: 15px 5px;
    padding: calc(15 * 100vw / 400) calc(5 * 100vw / 400);
  }

  .case-detail__construction-item-content {
    font-size: 14px;
    font-size: calc(14 * 100vw / 400);
    line-height: 1.7;
  }

  .case-detail__before-after {
    grid-template-columns: 1fr;
    gap: 30px;
    gap: calc(30 * 100vw / 400);
    margin-bottom: 40px;
    margin-bottom: calc(40 * 100vw / 400);
  }

  .case-detail__before-after-label {
    font-size: 16px;
    font-size: calc(16 * 100vw / 400);
    padding: 6px 15px;
    padding: calc(6 * 100vw / 400) calc(15 * 100vw / 400);
  }

  .case-detail__body {
    font-size: 13px;
    font-size: calc(13 * 100vw / 400);
    line-height: 1.7;
    margin-bottom: 40px;
    margin-bottom: calc(40 * 100vw / 400);
  }

  .case-detail__back {
    margin-bottom: 50px;
    margin-bottom: calc(50 * 100vw / 400);
  }

  .case-detail__back-btn {
    padding: 8px 16px;
    padding: calc(8 * 100vw / 400) calc(16 * 100vw / 400);
    font-size: 13px;
    font-size: calc(13 * 100vw / 400);
    gap: 8px;
    gap: calc(8 * 100vw / 400);
  }

  .case-detail__back-icon {
    width: 16px;
    width: calc(16 * 100vw / 400);
    height: 16px;
    height: calc(16 * 100vw / 400);
  }

  .case-detail__related {
    padding: 40px 0 50px 0;
    padding: calc(40 * 100vw / 400) 0 calc(50 * 100vw / 400) 0;
  }

  .case-detail__related::before {
    width: 100%;
    max-width: calc(920 * 100vw / 400);
  }

  .case-detail__related-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 40px;
    gap: calc(40 * 100vw / 400);
    max-width: 100%;
  }

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

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

  .case-detail__related-content {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
  }

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

  .case-detail__related-date {
    font-size: 18px;
    font-size: calc(18 * 100vw / 400);
  }

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

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

  .case-detail__related-title-text {
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .case-detail__related-arrow-icon {
    width: 16px;
    width: calc(16 * 100vw / 400);
    height: 16px;
    height: calc(16 * 100vw / 400);
  }
}
