/* --- Work Detail Page Styles (Full Set / Cleaned) --- */

/* Project Hero */
.cf-work-hero {
  padding-top: 120px;
  padding-bottom: 48px;
}
@media (min-width: 768px) {
  .cf-work-hero { padding-top: 160px; padding-bottom: 96px; }
}

/* Containers (New) */
.cf-work-container-xl { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.cf-work-container-lg { max-width: 1150px; margin: 0 auto; padding: 0 24px; }
.cf-work-container-md { max-width: 900px; margin: 0 auto; padding: 0 24px; }

.cf-work-back-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; color: var(--cf-color-secondary);
  text-decoration: none; margin-bottom: 24px; transition: color 0.3s;
}
.cf-work-back-link:hover { color: var(--cf-color-brand-orange); }

/* Tag List (New) */
.cf-work-tag-list {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px;
}

.cf-work-tag-badge {
  display: inline-block; padding: 6px 16px; border-radius: 999px;
  border: 1px solid #e5e7eb; background-color: white;
  font-size: 14px; font-weight: 700;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.cf-work-tag-navy { color: var(--cf-color-brand-navy); }
.cf-work-tag-gray { color: var(--cf-color-secondary); }

h1.cf-work-title {
  font-size: 40px; font-weight: 700; color: var(--cf-color-primary);
  line-height: 1.1; margin-top: 24px; margin-bottom: 32px;
}
@media (min-width: 768px) { h1.cf-work-title { font-size: 72px; } }

.cf-work-hero-img-wrap {
  position: relative;
  /* height: 50vh;  <-- これを削除 */
  aspect-ratio: 16 / 9; /* 新追加: モバイルで16:9の横長比率にする */
  border-radius: 40px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

@media (min-width: 768px) {
  .cf-work-hero-img-wrap {
    aspect-ratio: auto; /* 新追加: デスクトップでは比率指定を解除 */
    height: 70vh;       /* 元の高さ指定に戻す */
  }
}

img.cf-work-hero-img {
  width: 100%; height: 100%; object-fit: cover;
}
.cf-work-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.2), transparent);
}

/* Project Info Sidebar */
.cf-work-info-section {
  background-color: white; border-radius: 48px;
  margin: 0 16px; padding: 64px 0;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
@media (min-width: 768px) { .cf-work-info-section { margin: 0 32px; padding: 96px 0; } }

.cf-work-info-grid {
  display: grid; grid-template-columns: 1fr; gap: 48px;
}
@media (min-width: 768px) {
  .cf-work-info-grid { grid-template-columns: 4fr 8fr; gap: 80px; }
}

.cf-work-sidebar {
  background-color: var(--cf-color-bg-surface);
  border-radius: 24px; padding: 32px;
  position: sticky; top: 120px;
}

.cf-work-meta-item { margin-bottom: 32px; }
.cf-work-meta-item:last-child { margin-bottom: 0; }
.cf-work-meta-label {
  font-size: 12px; font-weight: 700; color: var(--cf-color-secondary);
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px;
}
.cf-work-meta-value {
  font-size: 18px; font-weight: 700; color: var(--cf-color-primary);
}
a.cf-work-site-link {
  color: var(--cf-color-brand-orange); text-decoration: none;
  display: flex; align-items: center; gap: 8px;
}
a.cf-work-site-link:hover { text-decoration: underline; }

/* Project Content */
.cf-work-intro-block { margin-bottom: 48px; } /* New */

h2.cf-work-content-title {
  font-size: 24px; font-weight: 700; color: var(--cf-color-primary);
  margin-bottom: 32px; line-height: 1.4;
}

@media (min-width: 768px) {
  h2.cf-work-content-title {
    ont-size: 32px;
  }
}
.cf-work-content-lead {
  font-size: 16px; color: var(--cf-color-secondary);
  line-height: 2; margin-bottom: 48px;
}
@media (min-width: 768px) {
  .cf-work-content-lead {
    font-size: 18px;
  }
}

.cf-work-details-col { display: flex; flex-direction: column; gap: 48px; } /* New */

/*.cf-work-challenge-block { margin-bottom: 48px; }*/
h3.cf-work-challenge-title {
  font-size: 24px; font-weight: 700; color: var(--cf-color-brand-navy);
  margin-bottom: 16px; padding-left: 16px;
  border-left: 4px solid var(--cf-color-brand-orange);
}
.cf-work-challenge-text {
  font-size: 14px !important; color: var(--cf-color-secondary); line-height: 2;
}
@media (min-width: 768px) {
  .cf-work-challenge-text {
    font-size: 16px !important;
  }
}

/* Rich Text List Override */
.cf-solution-rich-text ul {
  list-style: none !important; padding-left: 0 !important; margin: 0 !important;
}
.cf-solution-rich-text li {
  position: relative; padding-left: 40px; margin-bottom: 16px;
  font-weight: 500; color: var(--cf-color-primary); line-height: 1.6;
}
.cf-solution-rich-text li::before {
  content: '\f00c'; font-family: "Font Awesome 6 Free"; font-weight: 900;
  position: absolute; left: 0; top: 2px; width: 24px; height: 24px;
  background-color: #eff6ff; color: #0E3A59; border-radius: 50%;
  font-size: 10px; display: flex; align-items: center; justify-content: center;
}

/* Gallery */
.cf-work-gallery-section {
  padding: 96px 0;
  background-color: var(--cf-color-bg-surface);
}

h2.cf-work-gallery-heading { margin-bottom: 64px; } /* New */

.cf-work-gallery-wrapper {
  display: flex; flex-direction: column; gap: 32px;
}

img.cf-work-gallery-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

.cf-work-gallery-full {
  width: 100%; border-radius: 40px; overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.cf-work-gallery-cols {
  display: grid; grid-template-columns: 1fr; gap: 32px;
}
@media (min-width: 768px) {
  .cf-work-gallery-cols { grid-template-columns: 1fr 1fr; }
}

.cf-work-gallery-half {
  border-radius: 40px; overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.5);
  aspect-ratio: 16/10;
}

/* Tech Stack */
.cf-work-tech-section {
  padding: 96px 0; background-color: white;
  border-radius: 48px; margin: 0 16px 48px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
@media (min-width: 768px) { .cf-work-tech-section { margin: 0 32px 48px; } }

h2.cf-work-tech-heading { font-size: 24px; margin-bottom: 48px; } /* New */

.cf-work-tech-list {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 16px;
}
.cf-work-tech-badge {
  padding: 12px 24px; border-radius: 999px;
  border: 1px solid #e5e7eb; background-color: white;
  font-size: 14px; font-weight: 700; color: var(--cf-color-primary);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Pagination */
.cf-work-pagination {
  padding: 48px 0; border-top: 1px solid rgba(229, 231, 235, 0.6);
}

.cf-work-pagination-inner {
  display: flex; justify-content: space-between; align-items: center;
}

.cf-work-nav-link {
  display: flex; align-items: center; gap: 16px; text-decoration: none;
  color: var(--cf-color-primary); transition: color 0.3s;
}
.cf-work-nav-link-right { text-align: right; } /* New */

.cf-work-nav-link:hover { color: var(--cf-color-brand-orange); }

.cf-work-nav-icon {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid #e5e7eb;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s;
}
.cf-work-nav-link:hover .cf-work-nav-icon {
  background-color: var(--cf-color-brand-orange); border-color: var(--cf-color-brand-orange); color: white;
}

.cf-work-grid-link {
  padding: 16px; color: var(--cf-color-secondary); font-size: 24px;
}

/* Pagination Text Visibility (Replaces embedded style) */
.cf-work-nav-text { display: none; }
@media (min-width: 768px) {
  .cf-work-nav-text { display: block; }
}

.cf-work-nav-label {
  margin-bottom: 0; color: var(--cf-color-secondary);
}
.cf-work-nav-title { font-weight: 700; margin: 0; }
