/*
 * Shared layout for the custom-post-type single pages:
 * mission, service, partner, team, video, gallery.
 * Each type reuses this shell and adds its own small variation.
 */

/* ---------- Shared shell ---------- */
.cpt-shell {
  padding-top: 30px;
}

.cpt-shell #breadcrumb {
  min-height: 250px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  margin-bottom: 40px;
}

.cpt-shell #breadcrumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.35));
}

.cpt-shell #breadcrumb .container {
  position: relative;
  z-index: 1;
  text-align: left;
  padding-top: 40px;
  padding-bottom: 40px;
}

.cpt-shell #breadcrumb .bread-title {
  color: #faf8f8;
  margin-bottom: 15px;
}

.cpt-shell #breadcrumb .breadcrumb-wrapper {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.95rem;
}

.cpt-shell #breadcrumb .breadcrumb-wrapper a,
.cpt-shell #breadcrumb .breadcrumb-wrapper span {
  color: rgba(255, 255, 255, 0.95);
}

.cpt-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 40px;
}

.cpt-hero {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(17, 24, 39, 0.08);
  width: 100%;
}

.cpt-hero img {
  width: 100%;
  height: 100%;
  display: block;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.cpt-body {
  background: var(--whitey);
  border-radius: 18px;
  padding: 28px 24px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.cpt-tagline {
  color: var(--primaryColor);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 16px;
}

.cpt-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.cpt-meta .group {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(39, 115, 166, 0.08);
  border-radius: 999px;
  padding: 8px 14px;
  text-decoration: none;
}

.cpt-meta .group i {
  color: var(--primaryColor);
  font-size: 0.8rem;
}

.cpt-meta .group p {
  margin: 0;
  color: var(--black);
  font-size: 0.82rem;
  font-weight: 600;
}

.cpt-shell .entry-content {
  color: var(--black);
  font-size: 1rem;
  line-height: 1.9;
}

.cpt-shell .entry-content p {
  margin-bottom: 1rem;
}

.cpt-shell .entry-content h2,
.cpt-shell .entry-content h3,
.cpt-shell .entry-content h4,
.cpt-shell .entry-content h5,
.cpt-shell .entry-content h6 {
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
  color: var(--primaryColor);
}

.cpt-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.cpt-actions.center {
  justify-content: center;
}

.cpt-actions .btn {
  padding: 12px 22px;
}

.cpt-empty-note {
  text-align: center;
  color: var(--black);
  opacity: 0.6;
  padding: 40px 0;
}

.cpt-placeholder-icon {
  width: 100%;
  height: 100%;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lgrey);
  color: var(--primaryColor);
  font-size: 3rem;
}

/* ---------- Related items grid (mission / service / video) ---------- */
.cpt-related-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.cpt-related-block {
  flex-basis: calc(33.3333333333% - 20px);
  background: var(--whitey);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
  text-decoration: none;
  display: block;
}

.cpt-related-block .figure {
  width: 100%;
  position: relative;
}

.cpt-related-block .figure img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.cpt-related-block .text {
  padding: 18px 18px 20px;
}

.cpt-related-block .text h6 {
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--black);
  margin: 0;
}

.cpt-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.6rem;
  color: #faf8f8;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

/* ---------- Mission: progress bar + impact gallery ---------- */
.cpt-progress {
  margin-bottom: 20px;
}

.cpt-progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: var(--grey);
  overflow: hidden;
}

.cpt-progress-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primaryColor), var(--secondaryColor));
}

.cpt-progress-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--black);
}

.cpt-progress-labels strong {
  color: var(--primaryColor);
  font-size: 1rem;
}

.cpt-impact {
  margin-bottom: 10px;
}

/* ---------- Team: profile layout + social links ---------- */
.cpt-shell--team .cpt-details.cpt-profile {
  grid-template-columns: 320px 1fr;
}

.cpt-shell--team .cpt-hero img,
.cpt-shell--team .cpt-hero .cpt-placeholder-icon {
  aspect-ratio: 1/1;
  object-fit: cover;
}

.cpt-shell--team .cpt-tagline {
  display: inline-block;
  background: rgba(220, 156, 16, 0.12);
  color: var(--secondaryColor);
  padding: 6px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cpt-social-links {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.cpt-social-links a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primaryColor);
  color: #faf8f8;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0.9rem;
  transition: transform 0.2s ease, background 0.2s ease;
}

.cpt-social-links a:hover {
  background: var(--secondaryColor);
  transform: translateY(-3px);
}

/* ---------- Partner: centered logo card ---------- */
.cpt-partner-card {
  max-width: 560px;
  margin: 0 auto 40px;
  background: var(--whitey);
  border-radius: 20px;
  padding: 40px 32px;
  text-align: center;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.cpt-partner-logo {
  max-width: 260px;
  margin: 0 auto 24px;
}

.cpt-partner-logo img {
  width: 100%;
  height: auto;
  max-height: 160px;
  object-fit: contain;
}

.cpt-partner-logo .cpt-placeholder-icon {
  min-height: 140px;
  border-radius: 14px;
  font-size: 2.4rem;
}

.cpt-partner-card .entry-content {
  text-align: left;
  margin-bottom: 10px;
}

/* ---------- Video: embed player ---------- */
.cpt-video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #0c0c0c;
}

.cpt-video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.cpt-video-embed img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Gallery: image / video grid ---------- */
.cpt-gallery-intro {
  margin-bottom: 24px;
}

.cpt-shell--gallery .gallery-wrapper,
.cpt-impact .gallery-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
}

.cpt-shell--gallery .gallery-wrapper .gallery-image,
.cpt-impact .gallery-wrapper .gallery-image {
  flex-basis: calc(25% - 16px);
  border-radius: 14px;
  overflow: hidden;
  display: block;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.cpt-shell--gallery .gallery-wrapper .gallery-image img,
.cpt-impact .gallery-wrapper .gallery-image img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.cpt-impact .gallery-wrapper .gallery-image img {
  height: 180px;
}

.cpt-shell--gallery .gallery-wrapper .gallery-image:hover img,
.cpt-impact .gallery-wrapper .gallery-image:hover img {
  transform: scale(1.05);
}

.cpt-shell--gallery .gallery-video {
  flex-basis: calc(50% - 16px);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16/9;
}

.cpt-shell--gallery .gallery-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Responsive ---------- */
@media screen and (max-width: 992px) {
  .cpt-details {
    grid-template-columns: 1fr;
  }
  .cpt-shell--team .cpt-details.cpt-profile {
    grid-template-columns: 1fr;
  }
  .cpt-shell--team .cpt-hero {
    max-width: 320px;
    margin: 0 auto;
  }
  .cpt-related-wrapper {
    gap: 24px;
  }
  .cpt-related-block {
    flex-basis: calc(50% - 24px);
  }
  .cpt-shell--gallery .gallery-wrapper .gallery-image,
  .cpt-impact .gallery-wrapper .gallery-image {
    flex-basis: calc(50% - 16px);
  }
}

@media screen and (max-width: 576px) {
  .cpt-body {
    padding: 20px 18px;
  }
  .cpt-meta {
    flex-direction: column;
    align-items: flex-start;
  }
  .cpt-related-wrapper {
    flex-direction: column;
  }
  .cpt-related-block {
    flex-basis: 100%;
  }
  .cpt-shell--gallery .gallery-wrapper .gallery-image,
  .cpt-impact .gallery-wrapper .gallery-image,
  .cpt-shell--gallery .gallery-video {
    flex-basis: 100%;
  }
  .cpt-partner-card {
    padding: 28px 20px;
  }
}
