/**
 * taliki Custom Post Types & Single / Archive Templates Style
 */

.cpt-container {
  max-width: 1160px;
  margin: 40px auto 80px;
  padding: 0 20px;
  box-sizing: border-box;
  font-size: 16px;
  line-height: 1.7;
}

.cpt-archive-header {
  margin-bottom: 40px;
  text-align: center;
}

.cpt-archive-header__sub {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #0284c7;
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
}

.cpt-archive-header__title {
  font-size: 2rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
}

/* Taxonomy filter badges */
.cpt-tax-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.cpt-tax-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  border-radius: 4px;
  padding: 2px 8px;
  text-decoration: none;
}

.cpt-tax-badge--sub {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #bae6fd;
}

.cpt-tax-badge--phase {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}

/* Card Grid */
.cpt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.cpt-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.cpt-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.cpt-card__thumb {
  position: relative;
  width: 100%;
  height: 200px;
  background: #f1f5f9;
  overflow: hidden;
}

.cpt-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.cpt-card:hover .cpt-card__thumb img {
  transform: scale(1.03);
}

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

.cpt-card__date {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 8px;
}

.cpt-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.45;
  color: #1e293b;
  margin: 0 0 12px;
}

.cpt-card__title a {
  color: inherit;
  text-decoration: none;
}

.cpt-card__title a:hover {
  color: #0284c7;
}

.cpt-card__desc {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 16px;
}

.cpt-card__footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cpt-card__link {
  font-size: 0.85rem;
  font-weight: 600;
  color: #0284c7;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Status Badge */
.cpt-status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

.cpt-status-badge--open {
  background: #dcfce7;
  color: #15803d;
}

.cpt-status-badge--closed {
  background: #f1f5f9;
  color: #64748b;
}

.cpt-status-badge--upcoming {
  background: #fef3c7;
  color: #92400e;
}

/* News List style */
.cpt-news-list {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.cpt-news-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  border-bottom: 1px solid #f1f5f9;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

.cpt-news-item:last-child {
  border-bottom: none;
}

.cpt-news-item:hover {
  background: #f8fafc;
}

.cpt-news-item__thumb {
  width: 100px;
  height: 68px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f1f5f9;
}

.cpt-news-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cpt-news-item__content {
  flex-grow: 1;
}

.cpt-news-item__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.cpt-news-item__title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

/* Portfolio Card */
.cpt-portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.cpt-portfolio-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 28px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

.cpt-portfolio-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
}

.cpt-portfolio-card__logo {
  width: 140px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: #f8fafc;
  border-radius: 8px;
  padding: 8px;
}

.cpt-portfolio-card__logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.cpt-portfolio-card__name {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 12px;
}

/* Member Card */
.cpt-member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}

.cpt-member-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.cpt-member-card__photo {
  width: 100%;
  height: 300px;
  background: #e2e8f0;
  overflow: hidden;
}

.cpt-member-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.cpt-member-card__body {
  padding: 20px;
}

.cpt-member-card__position {
  font-size: 0.8rem;
  font-weight: 600;
  color: #0284c7;
  margin-bottom: 4px;
}

.cpt-member-card__name {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 8px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.cpt-member-card__name-en {
  font-size: 0.82rem;
  color: #94a3b8;
  font-weight: 400;
}

.cpt-member-card__career {
  font-size: 0.84rem;
  color: #475569;
  line-height: 1.6;
  white-space: pre-line;
}

/* Job List */
.cpt-job-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cpt-job-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 30px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.cpt-job-card__title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 8px 0 12px;
}

.cpt-job-card__summary {
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.6;
}

/* ==========================================
   Single Page Styles
   ========================================== */
.cpt-single {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  padding: 40px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.cpt-single__header {
  margin-bottom: 28px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 24px;
}

.cpt-single__title {
  font-size: 2.1rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
  margin: 12px 0;
}

.cpt-single__lead {
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.8;
  color: #334155;
  background: #f8fafc;
  padding: 20px 24px;
  border-left: 4px solid #0284c7;
  border-radius: 0 8px 8px 0;
  margin-bottom: 30px;
}

.cpt-single__lead p {
  margin: 0 0 1em;
}

.cpt-single__lead p:last-child {
  margin-bottom: 0;
}

.cpt-single__thumb {
  width: 100%;
  max-height: 460px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 36px;
}

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

.cpt-single__content {
  font-size: 1.6rem;
  line-height: 1.9;
  color: #334155;
  margin-bottom: 40px;
}

.cpt-single__content p {
  margin-bottom: 1.5em;
}

.cpt-single__content h2,
.cpt-single__content h3 {
  font-size: 2.4rem;
  font-weight: 700;
  margin: 2em 0 0.8em;
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
}

/* Related links (works) */
.cpt-related-links {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 24px 28px;
  margin-top: 36px;
}

.cpt-related-links__title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 16px;
}

.cpt-related-links__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cpt-related-links__list a {
  color: #0284c7;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cpt-related-links__list a:hover {
  text-decoration: underline;
}

/* Tables (Program specs & Job details) */
.cpt-table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.cpt-table th {
  width: 26%;
  background: #f8fafc;
  padding: 16px 20px;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}

.cpt-table td {
  padding: 16px 20px;
  font-size: 0.95rem;
  color: #1e293b;
  border-bottom: 1px solid #e2e8f0;
  line-height: 1.7;
}

.cpt-table tr:last-child th,
.cpt-table tr:last-child td {
  border-bottom: none;
}

/* CTA Box */
.cpt-cta-box {
  background: linear-gradient(135deg, #f0fdfa, #e0f2fe);
  border: 1px solid #99f6e4;
  border-radius: 16px;
  padding: 36px 24px;
  text-align: center;
  margin-top: 40px;
}

.cpt-cta-box__title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 10px;
}

.cpt-cta-box__text {
  font-size: 0.92rem;
  color: #475569;
  margin: 0 0 20px;
}

.cpt-btn-primary {
  background: #0284c7;
  color: #ffffff !important;
  padding: 12px 32px;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
  transition: all 0.2s ease;
}

.cpt-btn-primary:hover {
  background: #0369a1;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.4);
}

.cpt-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
  margin-bottom: 24px;
}

.cpt-back-link:hover {
  color: #0284c7;
}

@media (max-width: 768px) {
  .cpt-single {
    padding: 24px 16px;
  }
  .cpt-single__title {
    font-size: 1.6rem;
  }
  .cpt-table th,
  .cpt-table td {
    display: block;
    width: 100%;
  }
  .cpt-table th {
    padding-bottom: 6px;
    background: #f1f5f9;
  }
  .cpt-news-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .cpt-job-card {
    flex-direction: column;
  }
}
