/* ===== Case Study Detail Page ===== */

.page-project-detail {
  background: #fff;
}

.pd-main {
  overflow-x: hidden;
}

/* Hero band */
.pd-hero {
  position: relative;
  height: min(372px, calc(100vh - 80px));
  margin-top: 80px;
  overflow: hidden;
  color: #fff;
}

.pd-hero__bg {
  position: absolute;
  inset: 0;
}

.pd-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: heroZoom 14s ease-out forwards;
}

.pd-hero__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.08) 0%,
    rgba(0, 0, 0, 0.5) 100%
  );
}

.pd-hero__content {
  position: relative;
  z-index: 2;
  height: 100%;
  max-width: 1300px;
}

.pd-hero__content .p-breadcrumb {
  position: absolute;
  top: 92px;
  left: 20px;
  right: 20px;
  margin: 0;
}

.pd-hero__content .p-breadcrumb a.is-current {
  color: #fff;
}

/* White overlapping panel */
.pd-panel {
  position: relative;
  z-index: 3;
  margin-top: -150px;
  margin-bottom: 80px;
  background: #fff;
  max-width: 1300px;
  padding: 48px 50px 0;
}

.pd-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 33px;
  margin-bottom: 48px;
  border-bottom: 1px solid rgba(193, 199, 208, 0.3);
}

.pd-tag {
  display: inline-flex;
  align-self: flex-start;
  background: #effff6;
  color: #11a84e;
  font-family: var(--font-inter);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.7px;
  line-height: 20px;
  padding: 4px 12px;
  border-radius: 2px;
}

.pd-header__title {
  font-family: var(--font-inter);
  font-size: 32px;
  font-weight: 600;
  line-height: 40px;
  letter-spacing: -0.32px;
  color: #333;
  margin: 0;
}

.pd-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 32px;
  padding-top: 8px;
}

.pd-meta__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-inter);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0.7px;
  color: #41474f;
}

.pd-meta__item img {
  flex-shrink: 0;
}

/* Article body */
.pd-article {
  display: flex;
  flex-direction: column;
  gap: 32px;
  font-family: var(--font-inter);
  font-size: 16px;
  line-height: 26px;
  color: #41474f;
  padding-bottom: 24px;
}

.pd-article h3 {
  font-family: var(--font-inter);
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
  color: #333;
  margin: 0;
}

.pd-article p {
  margin: 0;
}

.pd-article img {
  height: auto;
}

.pd-article .aligncenter,
.pd-article img.aligncenter,
.pd-article .wp-caption.aligncenter,
.pd-article figure.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.pd-article .alignleft,
.pd-article img.alignleft,
.pd-article .wp-caption.alignleft,
.pd-article figure.alignleft {
  display: block;
  margin-right: auto;
  margin-left: 0;
}

.pd-article .alignright,
.pd-article img.alignright,
.pd-article .wp-caption.alignright,
.pd-article figure.alignright {
  display: block;
  margin-left: auto;
  margin-right: 0;
}

.pd-article p[style*="text-align: center"] img,
.pd-article p[style*="text-align:center"] img,
.pd-article div[style*="text-align: center"] img,
.pd-article div[style*="text-align:center"] img {
  margin-left: auto;
  margin-right: auto;
}

.pd-article figure {
  margin: 0;
}

.pd-article .wp-caption {
  max-width: 100%;
}

.pd-article .wp-caption-text {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 22px;
  color: #6b7280;
  text-align: center;
}

.pd-quote-block {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.pd-quote-label {
  margin: 0;
  color: #41474f;
}

.pd-quote {
  margin: 0;
  padding: 8px 0 8px 28px;
  border-left: 4px solid var(--green);
  background: #fff;
}

.pd-quote p {
  font-style: italic;
  color: #41474f;
  margin: 0;
}

/* Key outcomes box */
.pd-outcomes {
  background: #f4f3f5;
  border-radius: 8px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pd-outcomes h4 {
  font-family: var(--font-inter);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  line-height: 20px;
  color: #333;
  margin: 0;
}

.pd-outcomes__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pd-outcomes__list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 16px;
  line-height: 26px;
  color: #41474f;
}

.pd-outcomes__list li img {
  flex-shrink: 0;
  width: 16.667px;
  height: 18.667px;
  margin-top: 3px;
}

/* Related cases */
.pd-related {
  padding: 0 0 96px;
  background: #fff;
}

.pd-related__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}

.pd-related__head h2 {
  font-family: var(--font-inter);
  font-size: 40px;
  font-weight: 700;
  line-height: 40px;
  color: #333;
  margin: 0;
}

.pd-related__more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-noto);
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  color: var(--green);
  border-bottom: 2px solid var(--green);
  padding-bottom: 6px;
  white-space: nowrap;
  transition: gap 0.25s ease;
}

.pd-related__more:hover {
  gap: 12px;
}

.pd-related__swiper {
  --swiper-theme-color: var(--green);
  overflow: hidden;
  padding-bottom: 0;
}

.pd-related__swiper .swiper-wrapper {
  align-items: stretch;
}

.pd-related__swiper .swiper-slide {
  height: auto;
  box-sizing: border-box;
}

.pd-related__pagination.swiper-pagination-progressbar {
  position: relative;
  top: auto;
  left: auto;
  width: min(639px, 100%);
  height: 2px;
  margin: 56px auto 0;
  background: #bec9c1;
  border-radius: 0;
  overflow: hidden;
}

.pd-related__pagination .swiper-pagination-progressbar-fill {
  background: var(--green);
  box-shadow: 6px 0 10px rgba(17, 168, 78, 0.35);
  border-radius: 0;
  transform-origin: left center;
}

.pd-card {
  position: relative;
  height: 100%;
  border: 1px solid #c1c7d0;
  border-radius: 2px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.pd-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  width: 96px;
  height: 6px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.pd-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.1);
  border-color: rgba(17, 168, 78, 0.35);
}

.pd-card:hover::before {
  transform: scaleX(1);
}

.pd-card__media {
  position: relative;
  height: 256px;
  overflow: hidden;
}

.pd-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.pd-card:hover .pd-card__media img {
  transform: scale(1.03);
}

.pd-card__tag {
  position: absolute;
  top: 18px;
  left: 16px;
  display: inline-flex;
  background: var(--green);
  color: #fff;
  font-family: var(--font-inter);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  padding: 3.5px 12px;
  border-radius: 2px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

.pd-card__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.pd-card__date {
  font-family: var(--font-inter);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  color: #41474f;
  margin-bottom: 12px;
}

.pd-card__title {
  font-family: var(--font-inter);
  font-size: 24px;
  font-weight: 600;
  line-height: 30px;
  color: #333;
  margin: 0 0 16px;
  transition: color 0.25s ease;
}

.pd-card:hover .pd-card__title {
  color: var(--green);
}

.pd-card__excerpt {
  font-family: var(--font-inter);
  font-size: 16px;
  line-height: 24px;
  color: #41474f;
  margin: 0 0 24px;
  flex: 1;
}

.pd-card__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-inter);
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  letter-spacing: 0.7px;
  color: var(--green);
  margin-top: auto;
  transition: gap 0.25s ease;
}

.pd-card:hover .pd-card__link,
.pd-card__link:hover {
  gap: 8px;
}

.pd-card__link img {
  width: 12px;
  height: 12px;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .pd-related__head h2 {
    font-size: 32px;
  }
}

@media (max-width: 900px) {
  .pd-panel {
    margin-top: -80px;
    padding: 32px 28px 0;
  }

  .pd-header__title {
    font-size: 26px;
    line-height: 34px;
  }

  .pd-article h3 {
    font-size: 22px;
  }

  .pd-hero__content .p-breadcrumb {
    top: 48px;
  }
}

@media (max-width: 768px) {
  .pd-hero {
    height: 280px;
  }

  .pd-panel {
    margin-top: -48px;
    padding: 28px 20px 0;
  }

  .pd-header__title {
    font-size: 22px;
    line-height: 30px;
  }

  .pd-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .pd-outcomes {
    padding: 24px 20px;
  }

  .pd-related__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .pd-related__head h2 {
    font-size: 28px;
    line-height: 34px;
  }

  .pd-related__pagination.swiper-pagination-progressbar {
    margin-top: 40px;
  }

  .pd-card__media {
    height: 200px;
  }

  .pd-card__title {
    font-size: 20px;
    line-height: 26px;
  }
}

@media (max-width: 480px) {
  .pd-hero {
    height: 220px;
  }

  .pd-hero__content .p-breadcrumb {
    top: 28px;
  }

  .pd-quote {
    padding-left: 16px;
  }
}
