/* Public project detail page */

.pd-admin-banner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 12px 24px;
  background: rgba(201, 168, 76, 0.2);
  border-bottom: 1px solid rgba(201, 168, 76, 0.45);
  font-size: 14px;
  color: var(--navy);
}

.pd-admin-banner a {
  margin-left: 12px;
  font-weight: 600;
}

.pd-page {
  background: #f4f6fa;
  min-height: 60vh;
}

.pd-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 32px 24px 48px;
  position: relative;
  overflow: hidden;
}

.pd-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--pd-banner, none);
  background-size: cover;
  background-position: center;
  opacity: 0.22;
  z-index: 0;
}

.pd-hero--has-cover::before {
  opacity: 0.5;
}

.pd-hero--has-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 22, 40, 0.45) 0%,
    rgba(10, 22, 40, 0.72) 100%
  );
  z-index: 0;
}

.pd-hero-inner {
  position: relative;
  max-width: 1140px;
  margin: 0 auto;
  z-index: 1;
}

.pd-hero-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.pd-hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(10, 22, 40, 0.88);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
  text-decoration: none;
  max-width: 100%;
}

a.pd-hero-chip:hover {
  background: rgba(10, 22, 40, 0.96);
  color: var(--gold);
}

.pd-hero-chip--category {
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 10px;
}

.pd-hero-chip--title {
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 600;
  padding: 10px 16px;
  margin: 0 0 10px;
  border-radius: 10px;
  line-height: 1.2;
  max-width: min(720px, 100%);
}

.pd-hero-chip--tagline {
  font-size: 15px;
  color: #e8ecf4;
  margin: 0;
  max-width: min(560px, 100%);
  flex-wrap: wrap;
}

.pd-hero-chip--accent {
  margin-top: 6px;
  font-size: 12px;
  background: rgba(201, 168, 76, 0.28);
  border-color: rgba(201, 168, 76, 0.45);
  color: #fff8e8;
}

.pd-body {
  padding: 32px 24px 56px;
}

.pd-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  margin-bottom: 24px;
}

.pd-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(10, 22, 40, 0.06);
}

.pd-panel h2 {
  margin: 0 0 16px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pd-panel-icon {
  font-size: 20px;
}

.pd-prose p {
  margin: 0 0 14px;
  line-height: 1.65;
  color: var(--navy);
}

.pd-cta-card {
  text-align: center;
  padding: 8px 0;
}

.pd-cta-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin: 0 0 14px;
}

.pd-cta-btn {
  width: 100%;
  margin-bottom: 10px;
}

.pd-cta-secondary {
  font-size: 14px;
}

.pd-cta-note {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.5;
}

.pd-deliverables {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.pd-deliverables li {
  padding: 12px 14px 12px 36px;
  background: rgba(201, 168, 76, 0.08);
  border-radius: 8px;
  position: relative;
  line-height: 1.45;
}

.pd-deliverables li::before {
  content: "✓";
  position: absolute;
  left: 12px;
  color: var(--gold);
  font-weight: 700;
}

.pd-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.pd-gallery-item {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
}

.pd-gallery-item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.pd-gallery-item--video {
  grid-column: span 1;
}

.pd-gallery-video {
  width: 100%;
  max-height: 220px;
  display: block;
  background: #0a1628;
}

.pd-gallery-dl {
  margin: 0;
  padding: 6px 10px 0;
  font-size: 12px;
}

.pd-gallery-item figcaption {
  padding: 8px 10px;
  font-size: 13px;
}

.pd-gallery-cheer-link {
  margin-top: 16px;
  display: inline-block;
  width: auto;
}

.pd-video-grid {
  display: grid;
  gap: 16px;
}

.pd-video-wrap {
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

.pd-video-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Milestones trail — colourful stepped journey */
.pd-milestones-panel {
  overflow: hidden;
  background: linear-gradient(165deg, rgba(26, 58, 107, 0.04) 0%, #fff 45%, rgba(201, 168, 76, 0.06) 100%);
  border: 1px solid rgba(26, 58, 107, 0.1);
}

.pd-ms-header {
  position: relative;
  z-index: 1;
}

.pd-ms-compass {
  display: inline-block;
  animation: pdCompassWobble 4s ease-in-out infinite;
}

@keyframes pdCompassWobble {
  0%, 100% { transform: rotate(-6deg) scale(1); }
  50% { transform: rotate(8deg) scale(1.08); }
}

.pd-milestones-intro {
  color: var(--muted);
  margin: -4px 0 0;
  font-size: 14px;
  max-width: 52ch;
}

.pd-milestones-trail {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 16px;
  position: relative;
}

.pd-milestone-card {
  position: relative;
  margin: 0;
  opacity: 0;
  transform: translateY(18px) scale(0.97);
}

.pd-milestones-trail.pd-ms--visible .pd-milestone-card {
  animation: pdMsEnter 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--pd-ms-delay, 0s);
}

@keyframes pdMsEnter {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.pd-ms-card-inner {
  position: relative;
  height: 100%;
  padding: 18px 16px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: linear-gradient(145deg, #fff 0%, #f8fafc 100%);
  box-shadow: 0 8px 24px rgba(26, 58, 107, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  overflow: hidden;
}

.pd-ms-card-inner::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  border-radius: 14px 14px 0 0;
  background: var(--pd-ms-accent, var(--gold));
}

.pd-ms-card-inner::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -30%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--pd-ms-glow, rgba(201, 168, 76, 0.15));
  pointer-events: none;
  transition: transform 0.4s ease;
}

.pd-milestone-card:hover .pd-ms-card-inner {
  transform: translateY(-4px) rotate(-0.4deg);
  box-shadow: 0 14px 32px rgba(26, 58, 107, 0.14);
}

.pd-milestone-card:hover .pd-ms-card-inner::after {
  transform: scale(1.2);
}

.pd-ms-emoji {
  display: block;
  font-size: 26px;
  line-height: 1;
  margin-bottom: 8px;
  animation: pdMsEmojiFloat 3s ease-in-out infinite;
  animation-delay: calc(var(--pd-ms-delay, 0s) + 0.3s);
}

@keyframes pdMsEmojiFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.pd-ms-num {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  background: var(--pd-ms-accent, var(--navy));
  color: #fff;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.pd-milestone-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  padding-right: 36px;
}

.pd-milestone-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

.pd-ms--violet { --pd-ms-accent: #7c3aed; --pd-ms-glow: rgba(124, 58, 237, 0.18); }
.pd-ms--gold { --pd-ms-accent: #c9a84c; --pd-ms-glow: rgba(201, 168, 76, 0.22); }
.pd-ms--teal { --pd-ms-accent: #0d9488; --pd-ms-glow: rgba(13, 148, 136, 0.18); }
.pd-ms--coral { --pd-ms-accent: #ea580c; --pd-ms-glow: rgba(234, 88, 12, 0.18); }
.pd-ms--pink { --pd-ms-accent: #db2777; --pd-ms-glow: rgba(219, 39, 119, 0.16); }
.pd-ms--green { --pd-ms-accent: #16a34a; --pd-ms-glow: rgba(22, 163, 74, 0.18); }

.pd-ms-connector {
  display: none;
}

@media (max-width: 800px) {
  .pd-grid {
    grid-template-columns: 1fr;
  }

  .pd-panel-cta {
    order: -1;
  }

  .pd-hero {
    padding: 24px 16px 36px;
  }

  .pd-body {
    padding: 24px 16px 40px;
  }

  .pd-milestones-trail {
    grid-template-columns: 1fr;
    gap: 14px;
    overflow-x: auto;
    display: flex;
    flex-direction: row;
    scroll-snap-type: x mandatory;
    padding-bottom: 10px;
    margin-top: 20px;
  }

  .pd-milestone-card {
    flex: 0 0 82%;
    max-width: 320px;
    scroll-snap-align: center;
  }
}

@media (max-width: 480px) {
  .pd-milestones-trail {
    display: flex;
    flex-direction: column;
    overflow-x: visible;
    scroll-snap-type: none;
    gap: 12px;
  }

  .pd-milestone-card {
    flex: 1 1 auto;
    max-width: none;
    width: 100%;
    scroll-snap-align: none;
  }

  .pd-ms-card-inner {
    padding: 16px 14px 14px;
  }

  .pd-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
  }

  .pd-gallery-item img {
    height: 110px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pd-ms-compass,
  .pd-ms-emoji {
    animation: none !important;
  }

  .pd-milestone-card,
  .pd-milestones-trail.pd-ms--visible .pd-milestone-card {
    animation: none !important;
    opacity: 1;
    transform: none;
  }

  .pd-milestone-card:hover .pd-ms-card-inner {
    transform: none;
  }
}

.pd-hero-badge {
  display: inline-flex;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(201, 168, 76, 0.28);
  border: 1px solid rgba(201, 168, 76, 0.45);
  color: #fff8e8;
}

.pd-collab-requests {
  margin-bottom: 24px;
  padding: 16px 20px;
  border: 2px solid var(--gold, #c9a84c);
  border-radius: 10px;
  background: rgba(201, 168, 76, 0.08);
}

.pd-collab-requests h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.pd-collab-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.pd-collab-item {
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pd-collab-item:first-child {
  border-top: none;
  padding-top: 0;
}

/* Explore overview: cover banner + focused preview */
.pd-explore-hero {
  position: relative;
  color: #fff;
  overflow: hidden;
}

.pd-explore-banner {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.pd-explore-banner.ex-cover-navy-gold,
.pd-explore-banner.ex-cover-science,
.pd-explore-banner.ex-cover-tech,
.pd-explore-banner.ex-cover-creative,
.pd-explore-banner.ex-cover-business {
  background-size: cover;
}

.pd-explore-hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(10, 22, 40, 0.25) 0%,
    rgba(10, 22, 40, 0.55) 45%,
    rgba(10, 22, 40, 0.88) 100%
  );
  pointer-events: none;
}

.pd-explore-hero .pd-hero-inner {
  position: relative;
  z-index: 2;
  min-height: 220px;
  padding: 20px 24px 36px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-sizing: border-box;
}

.pd-page--explore {
  background: #f4f6fa;
}

.pd-page--explore .pd-body {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 32px;
}

.pd-explore-stats {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.pd-explore-stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 2px 12px rgba(26, 58, 107, 0.06);
}

.pd-explore-stat-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.pd-explore-stat-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.pd-explore-stat-title {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
}

.pd-explore-stat-sub {
  margin: 0;
  font-size: 13px;
}

.pd-explore-progress {
  height: 10px;
  background: #e8edf4;
  border-radius: 999px;
  overflow: hidden;
}

.pd-explore-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #34d399);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.pd-explore-team {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pd-explore-team-member {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}

button.pd-explore-team-name {
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: inherit;
  cursor: pointer;
}

button.pd-explore-team-name:hover {
  color: #92400e;
  text-decoration: underline;
}

.pd-explore-team-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.pd-explore-leader {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(201, 168, 76, 0.2);
  color: #92400e;
  border-radius: 999px;
}

.pd-explore-clap-btn,
.ex-clap-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 2px solid #c9a84c;
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}

.pd-explore-clap-btn:hover:not(:disabled),
.ex-clap-btn:hover:not(:disabled) {
  background: #fffbeb;
  transform: scale(1.02);
}

.ex-clap-btn.is-clapped,
.ex-clap-btn:disabled {
  opacity: 0.72;
  cursor: default;
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.ex-clap-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(26, 58, 107, 0.08);
  font-size: 12px;
  font-weight: 700;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pd-explore-cheer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.pd-explore-gift-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pd-explore-gift-input {
  width: 52px;
  padding: 8px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  color: var(--navy);
}

.pd-explore-gift-input:focus {
  outline: 2px solid rgba(201, 168, 76, 0.5);
  border-color: #c9a84c;
}

.pd-explore-gift-btn {
  padding: 10px 14px;
  border: 2px solid #c9a84c;
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.pd-explore-gift-btn:hover:not(:disabled) {
  background: #fffbeb;
}

.pd-explore-wallet-note {
  margin: 10px 0 0;
  font-size: 12px;
}

.pd-explore-clap-total {
  margin: 8px 0 0;
  font-size: 14px;
}

.ex-coin-burst {
  position: fixed;
  z-index: 3000;
  pointer-events: none;
  font-size: 20px;
  animation: exCoinBurst 0.85s ease forwards;
}

@keyframes exCoinBurst {
  0% { opacity: 1; transform: translateY(0) scale(0.6); }
  100% { opacity: 0; transform: translateY(-42px) scale(1.1); }
}

.pd-back-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-bottom: 16px;
}

.pd-back-nav .pd-back {
  margin-bottom: 0;
}

.pd-back-nav .pd-back-secondary {
  margin-left: 0;
}

.pd-explore-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 0;
}

.pd-page--explore .pd-panel {
  margin-bottom: 0;
  padding: 20px;
}

.pd-page--explore .pd-panel h2 {
  font-size: 16px;
}

.pd-page--explore .pd-prose p {
  font-size: 15px;
  line-height: 1.7;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.pd-explore-cta {
  border: 2px solid rgba(201, 168, 76, 0.45);
  background: linear-gradient(180deg, #fff 0%, #faf8f2 100%);
}

.pd-page--explore .pd-cta-label {
  font-size: 14px;
  letter-spacing: 0.5px;
  color: var(--navy);
  font-weight: 600;
}

.pd-page--explore .pd-cta-note {
  text-align: left;
}

.pd-page--explore .pd-explore-hero .pd-hero-inner {
  min-height: 200px;
  padding: 16px 16px 28px;
}

.pd-page--explore .pd-hero-chip--title {
  font-size: clamp(20px, 6vw, 30px);
}

.pd-page--explore .pd-hero-chip--tagline {
  font-size: 14px;
}

@media (max-width: 800px) {
  .pd-page--explore .pd-body {
    padding: 16px 12px 28px;
  }

  .pd-page--explore .pd-panel {
    padding: 16px;
    border-radius: 10px;
  }

  .pd-page--explore .pd-explore-stack {
    gap: 12px;
  }

  .pd-page--explore .pd-panel-cta {
    order: unset;
  }
}
