/* ============================================================
   Sastena — Project detail (Fairatmos layout, Sastena theme)
   ============================================================ */

.pd-page {
  --pd-bg: #f4efe3;
  --pd-heading: #0f1a12;
  --pd-body: #243328;
  --pd-muted: #4a6356;
  --pd-rule: rgba(15, 26, 18, 0.14);
  --pd-accent: #2f5740;
  --pd-accent-hover: #3a6b50;
  --pd-card: #fffef9;
  --pd-card-border: rgba(15, 26, 18, 0.1);
  --pd-badge: #fde68a;
  --pd-badge-text: #3f2f00;
  --pd-status-bg: rgba(93, 204, 93, 0.18);
  --pd-status-text: #1a4d2e;
  --pd-sticky-top: 108px;
}

/* overflow-x:hidden on .s-home breaks position:sticky — use clip instead */
body.s-home.pd-page {
  background: var(--pd-bg);
  color: var(--pd-body);
  overflow-x: clip;
}

body.pd-page .s-nav-shell {
  background: rgba(13, 23, 16, 0.92);
  border-color: rgba(255, 255, 255, 0.16);
}

.pd-page .s-pop-item.is-current .s-pop-title {
  color: var(--leaf);
}

.pd-main {
  padding: clamp(7rem, 12vw, 9rem) 0 clamp(4rem, 8vw, 6rem);
}

.pd-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: clamp(32px, 4.5vw, 64px);
  align-items: start;
}

/* ---------- Left content ---------- */
.pd-title {
  margin: 0 0 clamp(2rem, 4vw, 2.75rem);
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--pd-heading);
  max-width: 22ch;
}

.pd-section-title {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--pd-accent);
}

.pd-prose {
  font-size: 0.96rem;
  line-height: 1.72;
  color: var(--pd-body);
}

.pd-prose p {
  margin: 0 0 1.1em;
}

.pd-prose p:last-child {
  margin-bottom: 0;
}

.pd-section {
  margin-bottom: clamp(2rem, 4vw, 2.75rem);
}

.pd-meta-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.pd-meta-item {
  margin: 0;
  padding: clamp(1.25rem, 2.5vw, 1.75rem) 0;
  border-top: 1px solid var(--pd-rule);
}

.pd-meta-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.pd-meta-item dt {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--pd-heading);
}

.pd-meta-item dd {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.62;
  color: var(--pd-body);
}

.pd-meta-item dd ul {
  margin: 0;
  padding-left: 1.15em;
}

.pd-meta-item dd li + li {
  margin-top: 6px;
}

.pd-cert-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pd-cert-badge {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--pd-card-border);
  border-radius: 8px;
  background: #fffef9;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pd-accent);
}

.pd-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1.25rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--pd-muted);
  transition: color 0.2s ease;
}

.pd-back:hover {
  color: var(--pd-accent);
}

.pd-back svg {
  width: 16px;
  height: 16px;
}

.pd-additional-media {
  margin: clamp(2rem, 4vw, 2.75rem) 0 0;
  max-width: min(100%, 280px);
  overflow: hidden;
  border: 1px solid var(--pd-card-border);
  border-radius: 14px;
  background: var(--pd-card);
  box-shadow: 0 12px 32px rgba(15, 26, 18, 0.08);
}

.pd-additional-media__img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: rgba(15, 26, 18, 0.06);
}

.pd-additional-media__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.pd-additional-media__caption {
  margin: 0;
  padding: 12px 14px 14px;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--pd-muted);
}

.pd-additional-media__caption em {
  font-style: italic;
  color: var(--pd-body);
}

/* ---------- Sticky sidebar card ---------- */
.pd-sidebar {
  align-self: start;
}

.pd-side-card {
  position: sticky;
  top: var(--pd-sticky-top);
  overflow: hidden;
  border: 1px solid var(--pd-card-border);
  border-radius: 14px;
  background: var(--pd-card);
  box-shadow: 0 16px 40px rgba(15, 26, 18, 0.1);
}

.pd-side-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
}

.pd-side-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 10px;
  border-radius: var(--pill, 999px);
  background: var(--pd-badge);
  color: var(--pd-badge-text);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
}

.pd-side-badge-icon {
  flex-shrink: 0;
  border-radius: 4px;
}

.pd-side-body {
  padding: 20px 22px 24px;
  background: var(--pd-card);
}

.pd-side-stats {
  display: grid;
  gap: 18px;
  margin: 0 0 22px;
  padding: 0;
}

.pd-side-stat {
  margin: 0;
}

.pd-side-stat dt {
  margin: 0 0 5px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--pd-muted);
}

.pd-side-stat dd {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--pd-heading);
}

.pd-side-stat--status dd {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--pill, 999px);
  background: var(--pd-status-bg);
  color: var(--pd-status-text);
  font-size: 0.78rem;
  font-weight: 700;
}

.pd-side-cta {
  display: flex;
  width: 100%;
  justify-content: center;
  padding-top: 14px;
  padding-bottom: 14px;
  background: var(--pd-accent);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(47, 87, 64, 0.22);
}

.pd-side-cta:hover {
  background: var(--pd-accent-hover);
  color: #fff;
}

@media (max-width: 960px) {
  .pd-layout {
    grid-template-columns: 1fr;
  }

  .pd-side-card {
    position: static;
    top: auto;
  }

  .pd-sidebar {
    max-width: 440px;
  }

  .pd-title {
    max-width: none;
  }
}
