/* ==========================================
   Case Study Detail Page — Mobile First
   ========================================== */

.tai-case-detail-page {
  --case-red: #c50018;
  --case-text: #222;
  --case-muted: #737373;
  overflow: hidden;
  background: #fff;
  color: var(--case-text);
  font-family: var(--font-ja);
}

.tai-case-detail-page *,
.tai-case-detail-page *::before,
.tai-case-detail-page *::after {
  box-sizing: border-box;
}

.tai-case-detail-page a {
  color: inherit;
  text-decoration: none;
}

.tai-case-detail-page h1,
.tai-case-detail-page h2,
.tai-case-detail-page h3,
.tai-case-detail-page p,
.tai-case-detail-page ul,
.tai-case-detail-page figure {
  margin: 0;
}

.tai-case-detail-page img {
  display: block;
  width: 100%;
  height: auto;
}

.case-detail {
  padding: 111px 0 80px;
}

.case-detail-container {
  width: auto;
  margin: 0;
  padding: 0 8%;
}

.case-detail-header {
  margin-top: 30px;
}

.case-detail-header time {
  display: block;
  color: var(--case-red);
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: normal;
  line-height: 1.35;
}

.case-detail-header h1 {
  margin-top: 6px;
  font-size: 23px;
  font-weight: 500 !important;
  line-height: 1.55 !important;
  letter-spacing: 0.01em;
}

.case-detail-kv {
  margin-top: 21px;
}

.case-detail-kv img {
  aspect-ratio: 318 / 136;
  object-fit: cover;
  border-radius: 8px;
}

.case-detail-tags {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.case-detail-tag-row {
  display: flex;
  align-items: center;
  gap: 13px;
}

.case-detail-tag-row p {
  min-width: 67px;
  color: var(--case-text);
  font-size: 9px;
  font-weight: 500;
  line-height: 1;
}

.case-detail-tag-row span,
.case-related-label span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 21px;
  padding: 4px 8px 5px;
  border: 1px solid var(--case-red);
  border-radius: 5px;
  background: #fff;
  color: var(--case-red);
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
}

.case-client-card {
  display: grid;
  grid-template-columns: 85px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-top: 34px;
  padding: 25px 22px;
  border-radius: 8px;
  background: #fbf4f4;
}

.case-client-logo {
  color: var(--case-text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.case-client-text h2 {
  font-size: 12px;
  font-weight: 700 !important;
  line-height: 1.4 !important;
}

.case-client-text p {
  margin-top: 8px;
  color: var(--case-muted);
  font-size: 8px;
  font-weight: 700 !important;
  line-height: 1.8 !important;
}

.case-detail-section {
  margin-top: 45px;
}

.case-detail-section h2 {
  position: relative;
  padding-left: 13px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(197, 0, 24, 0.35);
  font-size: 16px;
  font-weight: 500 !important;
  line-height: 1.55 !important;
}

.case-detail-section h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.48em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--case-red);
}

.case-detail-section p {
  margin-top: 19px;
  color: var(--case-text);
  font-size: 12px;
  font-weight: normal !important;
  line-height: 2.05 !important;
  letter-spacing: 0.01em;
}

.case-detail-section p + p {
  margin-top: 17px;
}

.case-detail-section figure {
  margin-top: 24px;
}

.case-detail-section figure img {
  border-radius: 8px;
}

.case-detail-section figcaption {
  margin-top: 12px;
  color: var(--case-muted);
  font-size: 8px;
  font-weight: 500;
  line-height: 1.6;
}

.case-detail-note {
  margin-top: 20px;
}

.case-detail-note h3 {
  font-size: 11px;
  font-weight: normal !important;
  border-bottom: 1px solid #000;
  display: inline-block;
  line-height: 1.7 !important;
}

.case-detail-note ul {
  margin-top: 6px;
  padding-left: 16px;
  font-size: 10px;
  font-weight: normal;
  line-height: 1.9;
}

.case-detail-flow img,
.case-detail-adobe img {
  border-radius: 0 !important;
}

.tai-case-detail-page .tai-pdf-file {
  width: 100%;
  max-width: 390px;
  margin-top: 24px;
}

.tai-case-detail-page .tai-pdf-file-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  min-height: 56px;
  padding: 13px 20px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  background: #fff;
  color: var(--case-text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.tai-case-detail-page .tai-pdf-file-link:hover {
  border-color: var(--case-red);
}

.tai-case-detail-page .tai-pdf-file-title {
  min-width: 0;
  overflow-wrap: anywhere;
}

.tai-case-detail-page .tai-pdf-file-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 47px;
  min-height: 19px;
  padding: 3px 9px;
  background: #e5051e;
  color: #fff;
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.tai-case-detail-page .tai-pdf-file-size {
  color: var(--case-text);
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}

.case-related {
  padding: 41px 0 60px;
  background: var(--case-red);
  color: #fff;
}

.case-related-container {
  margin: 0;
  padding: 0 0 0 8%;
}

.case-related h2 {
  font-size: 18px;
  font-weight: 700 !important;
  line-height: 1.45 !important;
}

.case-related-group {
  margin-top: 35px;
  padding-top: 31px;
  border-top: 1px solid rgba(255, 255, 255, 0.32);
}

.case-related-group:first-of-type {
  margin-top: 25px;
}

.case-related-label {
  display: flex;
  align-items: center;
  gap: 14px;
}

.case-related-label p {
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.case-related-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 228px;
  gap: 20px;
  margin-top: 19px;
  overflow-x: auto;
  padding-right: 8%;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.case-related-grid::-webkit-scrollbar {
  display: none;
}

.case-related-card img {
  aspect-ratio: 228 / 142;
  object-fit: cover;
  border-radius: 8px;
  filter: grayscale(100%);
}

.case-related-card time {
  display: block;
  margin-top: 19px;
  color: #fff;
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: normal;
  line-height: 1.35;
}

.case-related-card h3 {
  margin-top: 3px;
  color: #fff;
  font-size: 14px;
  font-weight: 700 !important;
  line-height: 1.45 !important;
}

.case-related-card p {
  margin-top: 12px;
  color: #fff;
  font-size: 11px;
  font-weight: normal !important;
  line-height: 1.85 !important;
}
