/*
 * top-page.css
 * トップページ固有スタイル
 *
 * Scoolinaryのようなダークでリッチなデザインをベースに構成。
 */

/* ============================================================
   Hero セクション (Dark Theme & Course Grid)
   ============================================================ */
.tp-hero-scool .tp-fade-in {
  animation: tp-hero-fadein 0.8s ease forwards;
  opacity: 0;
  transform: none;
  transition: none;
}
.tp-hero-scool .tp-fade-in--delay1 { animation-delay: 0.2s; }
.tp-hero-scool .tp-fade-in--delay2 { animation-delay: 0.4s; }
.tp-hero-scool .tp-fade-in--delay3 { animation-delay: 0.6s; }

@keyframes tp-hero-fadein {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.tp-hero-scool {
  position: relative;
  background-color: #0f1011;
  background-image: url('https://images.unsplash.com/photo-1555939594-58d7cb561ad1?auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  color: #ffffff;
  padding-block: calc(var(--top-header-h) + 60px) 80px;
  text-align: center;
  overflow: hidden;
}

.tp-hero-scool::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15, 16, 17, 0.82);
  z-index: 1;
}

.tp-hero-scool__content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 20px;
}

.tp-hero-scool__title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.tp-hero-scool__subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: #a0a5aa;
  max-width: 700px;
  margin-inline: auto;
  margin-bottom: 48px;
  line-height: 1.6;
}

/* ヒーロー内のコースサムネイルグリッド */
.tp-hero-scool__thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}

.tp-hero-scool__thumb {
  position: relative;
  display: block;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/5;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
}

.tp-hero-scool__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 60%);
  z-index: 1;
}

.tp-hero-scool__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.tp-hero-scool__thumb:hover {
  transform: translateY(-8px);
}

.tp-hero-scool__thumb:hover img {
  transform: scale(1.05);
}

.tp-hero-scool__thumb span {
  position: absolute;
  bottom: 16px;
  left: 12px;
  right: 12px;
  z-index: 2;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  line-height: 1.3;
}

.tp-hero-scool__cta {
  margin-top: 32px;
}


/* ============================================================
   自動ループスライダー (彩り追加 Photo Ticker)
   ============================================================ */
.tp-photo-ticker {
  background-color: #0f1011;
  padding-block: 40px;
  overflow: hidden;
  white-space: nowrap;
}

.tp-photo-ticker__track {
  display: flex;
  width: max-content;
  animation: tp-scroll-left 40s linear infinite;
}

.tp-photo-ticker:hover .tp-photo-ticker__track {
  animation-play-state: paused;
}

.tp-photo-ticker__set {
  display: flex;
  gap: 20px;
  padding-right: 20px; /* gap と同じ幅をセット間にあける */
}

.tp-photo-ticker__item {
  width: 280px;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  position: relative;
  display: block;
}

.tp-photo-ticker__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 60%);
  z-index: 1;
}

.tp-photo-ticker__item-text {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  z-index: 2;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.tp-photo-ticker__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.tp-photo-ticker__item:hover img {
  transform: scale(1.08);
}

@keyframes tp-scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); } /* 2セットあるので、-50%でちょうど1周分 */
}


/* ============================================================
   メンバーシップの魅力 (What's in your Membership)
   ============================================================ */
.tp-membership {
  background-color: #fcfcfc;
}

.tp-membership__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: 1000px;
  margin-inline: auto;
}

.tp-membership__card {
  background-color: #f4ede4; /* 少し温かみのあるグレー/ベージュ */
  border-radius: 12px;
  padding: 40px;
  position: relative;
}

.tp-membership__card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--top-text);
  display: flex;
  align-items: center;
}

.tp-membership__card p {
  color: var(--top-text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
}


/* ============================================================
   注目の資格講座 (Pathways)
   ============================================================ */
.tp-pathways {
  background-color: #ffffff;
}

.tp-pathways__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.tp-pathway-card {
  display: block;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--top-text);
  text-decoration: none;
}

.tp-pathway-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.1);
  color: var(--top-text);
}

.tp-pathway-card__img {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.tp-pathway-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.tp-pathway-card:hover .tp-pathway-card__img img {
  transform: scale(1.03);
}

.tp-pathway-card__content {
  padding: 32px;
  position: relative;
}

.tp-pathway-card__badge {
  display: inline-block;
  background-color: var(--top-accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.tp-pathway-card__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.tp-pathway-card__desc {
  font-size: 0.95rem;
  color: var(--top-text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.tp-pathway-card__btn {
  font-weight: 700;
  color: var(--top-primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}


/* ============================================================
   コースカタログ (What will you learn today)
   ============================================================ */
.tp-courses {
  background-color: #fafafa;
}

.tp-courses__filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}

.tp-courses__filter {
  background: transparent;
  border: 1px solid #dcdcdc;
  color: var(--top-text-muted);
  padding: 8px 24px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tp-courses__filter:hover,
.tp-courses__filter.is-active {
  background-color: var(--top-primary);
  color: #fff;
  border-color: var(--top-primary);
}

.tp-courses__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  position: relative;
  align-content: start;
}

.tp-courses__grid.is-flipping {
  overflow: hidden;
}

.tp-courses__empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 48px 24px;
  color: var(--top-text-muted);
  font-size: 0.95rem;
  text-align: center;
}

.tp-courses__grid.is-flipping .tp-course-card {
  transition: none;
}

.tp-courses__grid.is-flipping .tp-course-card:hover {
  transform: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.tp-course-card.is-filter-hidden {
  display: none !important;
}

.tp-course-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.tp-course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

.tp-course-card__thumb {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.tp-course-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.tp-course-card:hover .tp-course-card__thumb img {
  transform: scale(1.05);
}

.tp-course-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  gap: 8px;
}

.tp-course-card:hover .tp-course-card__overlay {
  opacity: 1;
}

.tp-course-card__body {
  padding: 20px;
}

.tp-course-card__meta {
  margin-bottom: 8px;
}

.tp-course-card__category {
  font-size: 0.75rem;
  color: var(--top-primary);
  font-weight: 700;
  background: var(--top-primary-light);
  padding: 4px 10px;
  border-radius: 4px;
}

.tp-course-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 16px;
}

.tp-course-card__instructor {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #f0f0f0;
  padding-top: 16px;
}

.tp-course-card__instructor img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.tp-course-card__instructor span {
  font-size: 0.85rem;
  color: var(--top-text-muted);
}

/* ============================================================
   My Page
   ============================================================ */
.tp-mypage-summary {
  display: block;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.tp-mypage .tp-section__lead {
  text-align: center;
}

.tp-mypage-summary__name {
  margin: 0;
  color: var(--top-primary);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
}

.tp-mypage-annual {
  background: #fff;
  padding-block: 56px;
}

.tp-mypage-annual__grid {
  display: grid;
  gap: 18px;
  max-width: 920px;
  margin: 0 auto;
}

.tp-mypage-annual__card {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--top-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.tp-mypage-annual__card.is-inactive {
  border-color: #e4ded8;
  background: #fffdfb;
}

.tp-mypage-annual__certificate {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: #eeeeee;
  color: #6f6f6f;
  font-size: 0.82rem;
  font-weight: 700;
}

.tp-mypage-annual__card.is-active .tp-mypage-annual__certificate {
  background: linear-gradient(135deg, #f4f9f4, #dceedd);
  color: var(--top-primary);
}

.tp-mypage-annual__certificate-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.tp-mypage-annual__body {
  display: grid;
  gap: 16px;
}

.tp-mypage-annual__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.tp-mypage-annual__head h3 {
  margin: 0;
  color: var(--top-text);
  font-size: 1.16rem;
  line-height: 1.45;
}

.tp-mypage-annual__badge {
  flex: 0 0 auto;
  padding: 5px 12px;
  border-radius: 999px;
  background: #f1ebe4;
  color: #7b695a;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.4;
}

.tp-mypage-annual__badge.is-active {
  background: #e5f3e7;
  color: var(--top-primary);
}

.tp-mypage-annual__details {
  display: grid;
  gap: 0;
  margin: 0;
}

.tp-mypage-annual__details div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0;
  align-items: start;
}

.tp-mypage-annual__details dt {
  color: var(--top-text);
  font-size: 1rem;
  font-weight: 700;
}

.tp-mypage-annual__details dt::after {
  content: "：";
}

.tp-mypage-annual__details dd {
  margin: 0;
  color: var(--top-text);
  font-weight: 700;
  line-height: 1.6;
}

.tp-mypage-annual__notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid #e7bd74;
  border-radius: 8px;
  background: #fff7e8;
  color: #5f3d00;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.7;
}

.tp-mypage-annual__notice::before {
  content: "!";
  display: inline-grid;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  place-items: center;
  margin-top: 1px;
  border-radius: 50%;
  background: #d37a00;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
}

.tp-mypage-annual__card.is-active .tp-mypage-annual__notice {
  border-color: #b9ddb9;
  background: #f4f9f4;
  color: var(--top-text);
  font-weight: 600;
}

.tp-mypage-annual__card.is-active .tp-mypage-annual__notice::before {
  content: "✓";
  background: var(--top-primary);
}

.tp-mypage-annual__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.tp-mypage-annual__actions:has(.tp-mypage-annual__external-note) {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.tp-mypage-annual__external-note {
  margin: 0;
  color: #6b7280;
  font-size: 0.82rem;
  line-height: 1.5;
}

.tp-btn--subtle {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  color: #374151 !important;
  box-shadow: none;
}

.tp-btn--subtle:hover,
.tp-btn--subtle:focus-visible {
  background: #e5e7eb;
  color: #111827 !important;
  box-shadow: none;
}

.tp-mypage-qualifications {
  background: #fff;
  padding-block: 56px;
}

.tp-mypage-qualifications__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  max-width: 920px;
  margin: 0 auto;
}

.tp-mypage-qualifications__card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border: 1px solid var(--top-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.tp-mypage-qualifications__name {
  flex: 1 1 auto;
  color: var(--top-text);
  font-size: 1.1rem;
  line-height: 1.5;
}

.tp-mypage-qualifications__date {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: baseline;
  gap: 8px;
  color: #6b7280;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}

.tp-mypage-qualifications__date strong {
  color: var(--top-text);
  font-size: 1rem;
}

.tp-mypage-resources {
  background: #f8fbf8;
  padding-block: 56px;
}

.tp-mypage-resources__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 920px;
  margin: 0 auto;
}

.tp-mypage-resources__group {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--top-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.tp-mypage-resources__group:only-child {
  grid-column: 1 / -1;
}

.tp-mypage-resources__group h3 {
  margin: 0 0 18px;
  color: var(--top-text);
  font-size: 1.12rem;
  line-height: 1.5;
}

.tp-mypage-resources__list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tp-mypage-resources__item {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 14px 0;
  border-top: 1px solid #eef2ee;
}

.tp-mypage-resources__item:first-child {
  border-top: 0;
  padding-top: 0;
}

.tp-mypage-resources__item:last-child {
  padding-bottom: 0;
}

.tp-mypage-resources__text {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.tp-mypage-resources__title {
  color: var(--top-text);
  font-weight: 700;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.tp-mypage-resources__date,
.tp-mypage-resources__meta {
  color: var(--top-text-muted);
  font-size: 0.84rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.tp-mypage-resources__link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--top-primary);
  border-radius: 4px;
  color: var(--top-primary);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.tp-mypage-resources__link:hover,
.tp-mypage-resources__link:focus-visible {
  background: var(--top-primary);
  color: #fff;
}

.tp-mypage-offline-courses__card {
  display: grid;
  gap: 4px;
  align-content: start;
  min-height: calc(1.5em * 3 + 32px);
  padding: 16px 18px;
  border: 1px solid var(--top-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.tp-mypage-offline-courses__title {
  margin: 0;
  color: var(--top-text);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.tp-mypage-offline-courses__meta {
  margin: 0;
  color: var(--top-text-muted);
  font-size: 0.84rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

@media (min-width: 1024px) {
  .tp-mypage-offline-courses__grid:has(> :only-child),
  .tp-mypage-offline-courses__grid:has(> :nth-child(2):last-child),
  .tp-mypage-courses:has(> :only-child),
  .tp-mypage-courses:has(> :nth-child(2):last-child) {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
  }

  .tp-mypage-offline-courses__grid:has(> :only-child) > *,
  .tp-mypage-offline-courses__grid:has(> :nth-child(2):last-child) > *,
  .tp-mypage-courses:has(> :only-child) > *,
  .tp-mypage-courses:has(> :nth-child(2):last-child) > * {
    flex: 0 0 calc((100% - 48px) / 3);
    max-width: calc((100% - 48px) / 3);
  }
}

.tp-mypage-course {
  padding: 0;
  background: #1f1f1f;
}

.tp-mypage-course__link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: inherit;
  color: inherit;
  text-decoration: none;
}

.tp-mypage-course__media {
  position: absolute;
  inset: 0;
}

.tp-mypage-course__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.tp-mypage-course:hover .tp-mypage-course__media img {
  transform: scale(1.05);
}

.tp-mypage-course__media--no-image {
  background: linear-gradient(135deg, #5a5a5a, #2a2a2a);
}

.tp-mypage-course__content {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  display: grid;
  gap: 10px;
  padding: 28px 16px 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.62) 52%, transparent 100%);
}

.tp-mypage-course__title {
  display: block;
  margin: 0;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: left;
  overflow-wrap: anywhere;
}

.tp-mypage-course .tp-mypage-progress {
  display: grid;
  gap: 8px;
  margin: 0;
}

.tp-mypage-course .tp-mypage-progress__head {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.82rem;
}

.tp-mypage-course .tp-mypage-progress__head strong {
  color: #fff;
}

.tp-mypage-course .tp-mypage-progress__bar {
  background: rgba(255, 255, 255, 0.28);
}

.tp-mypage-course .tp-mypage-progress__bar span {
  background: #fff;
}

.tp-mypage-course .tp-mypage-progress__count {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.8rem;
}

.tp-mypage-progress {
  margin-top: 18px;
}

.tp-mypage-progress__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--top-text-muted);
  font-size: 0.86rem;
}

.tp-mypage-progress__head strong {
  color: var(--top-text);
}

.tp-mypage-progress__bar {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #eeeeee;
}

.tp-mypage-progress__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--top-primary);
}

.tp-mypage-progress__count {
  margin: 8px 0 0;
  color: var(--top-text-muted);
  font-size: 0.84rem;
}

.tp-mypage-course__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  margin-top: 18px;
  border-radius: 4px;
  background: var(--top-primary);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
}

.tp-mypage-course__button:hover {
  color: #fff;
  opacity: 0.9;
}

.tp-mypage-course__actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.tp-mypage-course__actions .tp-mypage-course__button {
  margin-top: 0;
}

.tp-mypage-course__button--secondary {
  border: 1px solid var(--top-primary);
  background: #fff;
  color: var(--top-primary);
}

.tp-mypage-course__button--secondary:hover {
  color: var(--top-primary);
}

.tp-mypage-course__status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-left: 8px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef7ee;
  color: var(--top-primary);
  font-size: 0.75rem;
  font-weight: 700;
}

.tp-mypage-empty {
  max-width: 640px;
  margin: 0 auto;
  padding: 42px 28px;
  border: 1px solid var(--top-border);
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.tp-mypage-empty h3 {
  margin: 0 0 12px;
  color: var(--top-text);
  font-size: 1.25rem;
}

.tp-mypage-empty p {
  margin: 0 0 24px;
  color: var(--top-text-muted);
  line-height: 1.8;
}

.tp-mypage-banners {
  padding-block: 40px;
}

.tp-mypage-links {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: none;
  justify-content: stretch;
}

@media (min-width: 768px) {
  .tp-mypage-links:has(> :only-child) {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
  }

  .tp-mypage-links:has(> :only-child) > .tp-mypage-link-card {
    flex: 0 0 calc((100% - 24px) / 2);
    max-width: calc((100% - 24px) / 2);
  }
}

.tp-mypage-link-card {
  display: block;
  color: var(--top-text);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tp-mypage-link-card:hover {
  color: var(--top-text);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.tp-mypage-edit__section {
  background: #fff;
}

.tp-mypage-edit__panel {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px;
  border: 1px solid var(--top-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.tp-mypage-edit__message {
  margin-bottom: 20px;
  padding: 14px 16px;
  border-radius: 8px;
  font-weight: 700;
  line-height: 1.7;
}

.tp-mypage-edit__message p {
  margin: 0;
}

.tp-mypage-edit__message.is-success {
  border: 1px solid #b9ddb9;
  background: #f4f9f4;
  color: var(--top-primary);
}

.tp-mypage-edit__message.is-error {
  border: 1px solid #f1b6b6;
  background: #fff1f1;
  color: #991b1b;
}

.tp-mypage-edit__form {
  display: grid;
  gap: 24px;
}

.tp-mypage-edit__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tp-mypage-edit__grid label {
  display: grid;
  gap: 8px;
  color: var(--top-text);
  font-weight: 700;
}

.tp-mypage-edit__grid label.is-wide {
  grid-column: 1 / -1;
}

.tp-mypage-edit__grid span {
  font-size: 0.92rem;
}

.tp-mypage-edit__grid input,
.tp-mypage-edit__grid select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
  color: var(--top-text);
  font-size: 1rem;
}

.tp-mypage-edit__grid input:focus,
.tp-mypage-edit__grid select:focus {
  border-color: var(--top-primary);
  outline: 2px solid rgba(68, 128, 61, 0.18);
  outline-offset: 1px;
}

.tp-mypage-edit__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.tp-mypage-edit__actions .tp-btn {
  min-height: 44px;
  border-radius: 4px;
}

.tp-mypage-edit__actions button.tp-btn {
  border: 0;
  cursor: pointer;
}


/* ============================================================
   サブスクリプション & Stats バナー (共通背景スタイル)
   ============================================================ */
.tp-subscription-banner,
.tp-stats-banner {
  position: relative;
  background-size: cover;
  background-position: center;
  background-attachment: fixed; /* パララックス風の奥行き */
  color: #ffffff;
  padding-block: 100px;
  text-align: center;
}

.tp-banner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 16, 17, 0.75); /* 背景写真を暗くして文字を読ませる */
  z-index: 1;
}

.tp-subscription-banner .tp-container,
.tp-stats-banner .tp-container {
  position: relative;
  z-index: 2; /* オーバーレイより手前へ */
}

/* サブスクリプションバナー固有 */
.tp-subscription-banner__inner {
  max-width: 700px;
  margin-inline: auto;
}

.tp-subscription-banner__title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 24px;
  color: #ffffff;
}

.tp-subscription-banner__desc {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 32px;
  line-height: 1.6;
}

/* Stats (統計情報) バナー固有 */
.tp-stats-banner__number {
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 700;
  color: var(--top-accent);
  line-height: 1;
  margin-bottom: 16px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.tp-stats-banner__text {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 32px;
  color: #ffffff;
}

.tp-stats-banner__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.9);
}

.tp-stats-banner__list li {
  display: flex;
  align-items: center;
  gap: 12px;
}


/* ============================================================
   受講生の声 (Testimonials) - ダイナミックカード
   ============================================================ */
.tp-testimonials {
  background-color: #fdfaf6; /* Warm light bg */
}

.tp-testimonials__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.tp-testimonial-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tp-testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

.tp-testimonial-card__img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.tp-testimonial-card__img > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.tp-testimonial-card:hover .tp-testimonial-card__img > img {
  transform: scale(1.05);
}

/* 画像下部にグラデーションを敷いて名前と星を重ねる */
.tp-testimonial-card__profile {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 24px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.tp-testimonial-card__name {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
}

.tp-testimonial-card__stars {
  color: #fbc02d;
  font-size: 0.85rem;
}

.tp-testimonial-card__content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tp-testimonial-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--top-text);
}

.tp-testimonial-card__text {
  font-size: 0.95rem;
  color: var(--top-text-muted);
  line-height: 1.7;
}

.tp-subpage-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(220px, 30vw, 360px);
  padding-block: calc(var(--top-header-h) + 42px) 56px;
  overflow: hidden;
  color: #ffffff;
}

.tp-subpage-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(15, 16, 17, 0.82) 0%, rgba(15, 16, 17, 0.58) 52%, rgba(15, 16, 17, 0.24) 100%),
    var(--tp-subpage-hero-image, none);
  background-position: center;
  background-size: cover;
}

.tp-subpage-hero .tp-container {
  position: relative;
  z-index: 1;
  text-align: center;
}

.tp-subpage-hero__title {
  max-width: 920px;
  margin: 0 auto;
  color: #ffffff;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.tp-subpage-content-section {
  background: #fff;
}

.tp-subpage-content {
  max-width: 860px;
  margin: 0 auto;
  color: var(--top-text);
  font-size: 1rem;
  line-height: 2;
}

.tp-subpage-content > *:first-child {
  margin-top: 0;
}

.tp-subpage-content > *:last-child {
  margin-bottom: 0;
}

.tp-subpage-content h2,
.tp-subpage-content h3,
.tp-subpage-content h4 {
  margin: 2.2em 0 0.8em;
  line-height: 1.45;
}

.tp-subpage-content h2 {
  padding-bottom: 0.45em;
  border-bottom: 2px solid var(--top-border);
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.tp-subpage-content h3 {
  font-size: clamp(1.2rem, 2vw, 1.45rem);
}

.tp-subpage-content p,
.tp-subpage-content ul,
.tp-subpage-content ol,
.tp-subpage-content figure {
  margin: 0 0 1.35em;
}

.tp-subpage-content ul,
.tp-subpage-content ol {
  padding-left: 1.5em;
}

.tp-subpage-content li + li {
  margin-top: 0.35em;
}

.tp-subpage-content img {
  height: auto;
  border-radius: 8px;
}

/* LearnDash Course List block (総合サブページ /course-list/ 等) */
.tp-subpage-content:has(.ld-course-list-items) {
  max-width: min(1120px, 100%);
}

/* WooCommerce cart flow (総合サブページ /cart/ 等) */
@media (min-width: 768px) {
  body.woocommerce-cart .tp-subpage-content,
  body.woocommerce-checkout .tp-subpage-content,
  body.woocommerce-order-received .tp-subpage-content {
    max-width: 100%;
  }
}

/* WooCommerce notices (top-page reset fallback) */
body.woocommerce-cart .tp-subpage-content .woocommerce-message,
body.woocommerce-cart .tp-subpage-content .woocommerce-info,
body.woocommerce-cart .tp-subpage-content .woocommerce-error,
body.woocommerce-checkout .tp-subpage-content .woocommerce-message,
body.woocommerce-checkout .tp-subpage-content .woocommerce-info,
body.woocommerce-checkout .tp-subpage-content .woocommerce-error,
body.woocommerce-order-received .tp-subpage-content .woocommerce-message,
body.woocommerce-order-received .tp-subpage-content .woocommerce-info,
body.woocommerce-order-received .tp-subpage-content .woocommerce-error {
  padding: 1em 1.5em 1em 3em;
}

body.woocommerce-cart .tp-subpage-content .woocommerce-message::before,
body.woocommerce-cart .tp-subpage-content .woocommerce-info::before,
body.woocommerce-cart .tp-subpage-content .woocommerce-error::before,
body.woocommerce-checkout .tp-subpage-content .woocommerce-message::before,
body.woocommerce-checkout .tp-subpage-content .woocommerce-info::before,
body.woocommerce-checkout .tp-subpage-content .woocommerce-error::before,
body.woocommerce-order-received .tp-subpage-content .woocommerce-message::before,
body.woocommerce-order-received .tp-subpage-content .woocommerce-info::before,
body.woocommerce-order-received .tp-subpage-content .woocommerce-error::before {
  left: 1em;
  top: 1em;
}

body.woocommerce-cart .tp-subpage-content .woocommerce-message .button.wc-forward,
body.woocommerce-checkout .tp-subpage-content .woocommerce-message .button.wc-forward,
body.woocommerce-order-received .tp-subpage-content .woocommerce-message .button.wc-forward {
  margin-left: 1em;
}

/* WooCommerce cart coupon input width fix */
body.woocommerce-cart .tp-subpage-content .woocommerce-cart-form .coupon .input-text {
  width: clamp(180px, 28vw, 280px);
  min-width: 180px;
}

/* WooCommerce cart totals table column widths */
@media (min-width: 768px) {
  body.woocommerce-cart .tp-subpage-content .cart_totals table.shop_table {
    table-layout: fixed;
  }

  body.woocommerce-cart .tp-subpage-content .cart_totals table.shop_table th {
    width: 5.5em;
    max-width: 7em;
    padding-right: 1.25em;
    vertical-align: top;
    white-space: nowrap;
  }

  body.woocommerce-cart .tp-subpage-content .cart_totals table.shop_table td {
    width: auto;
    vertical-align: top;
  }
}

.tp-subpage-content .ld-course-list-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin: 0;
}

.tp-subpage-content .ld-course-list-items::before,
.tp-subpage-content .ld-course-list-items::after {
  display: none;
  content: none;
}

.tp-subpage-content .ld-course-list-items > .ld_course_grid {
  display: flex;
  flex-direction: column;
  float: none;
  width: 100% !important;
  max-width: 100% !important;
  height: 100%;
  padding: 0 !important;
}

.tp-subpage-content .ld-course-list-items .thumbnail.course,
.tp-subpage-content .ld-course-list-items .ld_course_grid .thumbnail {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: 100%;
  min-height: 100%;
  margin: 0;
  border: 1px solid var(--top-border, #e5e7eb);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  position: relative;
}

.tp-subpage-content .ld-course-list-items .thumbnail.course > a,
.tp-subpage-content .ld-course-list-items .ld_course_grid .thumbnail > a {
  display: block;
  flex: 0 0 auto;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.tp-subpage-content .ld-course-list-items .thumbnail.course > a img,
.tp-subpage-content .ld-course-list-items .ld_course_grid .thumbnail > a img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tp-subpage-content .ld-course-list-items .thumbnail.course .caption,
.tp-subpage-content .ld-course-list-items .ld_course_grid .thumbnail .caption {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 16px 18px 20px;
}

.tp-subpage-content .ld-course-list-items .thumbnail.course .caption .entry-title,
.tp-subpage-content .ld-course-list-items .ld_course_grid .thumbnail .caption .entry-title {
  margin: 0 0 12px;
  color: var(--top-text, #1a1a1a);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  font-weight: 700;
  line-height: 1.45;
}

.tp-subpage-content .ld-course-list-items .thumbnail.course .caption .entry-content,
.tp-subpage-content .ld-course-list-items .ld_course_grid .thumbnail .caption .entry-content {
  flex: 1 1 auto;
  margin-bottom: 16px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.tp-subpage-content .ld-course-list-items .thumbnail.course .caption a.btn,
.tp-subpage-content .ld-course-list-items .thumbnail.course .caption a.btn-primary,
.tp-subpage-content .ld-course-list-items .ld_course_grid .thumbnail .caption a.btn,
.tp-subpage-content .ld-course-list-items .ld_course_grid .thumbnail .caption a.btn-primary {
  align-self: stretch;
  margin-top: auto;
  width: 100%;
  text-align: center;
}


/* ============================================================
   Responsive (Tablet)
   ============================================================ */
@media (max-width: 1023px) {
  .tp-hero-scool__thumbs {
    grid-template-columns: repeat(3, 1fr);
  }
  .tp-hero-scool__thumbs a:nth-child(n+4) {
    display: none; /* Hide last two on smaller screens if crowded */
  }

  .tp-membership__grid {
    gap: 20px;
  }
  .tp-membership__card {
    padding: 24px;
  }

  .tp-pathways__grid,
  .tp-courses__grid,
  .tp-mypage-offline-courses__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tp-testimonials__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  /* 3要素が2カラムになる場合の右下空白防止 */
  .tp-testimonials__grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: 500px;
    margin-inline: auto;
  }
}

/* ============================================================
   Responsive (Mobile)
   ============================================================ */
@media (max-width: 767px) {
  .tp-hero-scool__thumbs {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .tp-hero-scool__thumbs a:nth-child(3) {
    display: none; /* Only show top 2 */
  }

  .tp-membership__grid,
  .tp-pathways__grid,
  .tp-courses__grid,
  .tp-mypage-offline-courses__grid,
  .tp-testimonials__grid {
    grid-template-columns: 1fr;
  }

  .tp-mypage-annual__card,
  .tp-mypage-resources__grid {
    grid-template-columns: 1fr;
  }

  .tp-mypage-qualifications__card {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .tp-mypage-qualifications__date {
    align-self: flex-start;
  }

  .tp-mypage-annual__card {
    gap: 18px;
  }

  .tp-mypage-annual__head {
    flex-direction: column;
    gap: 10px;
  }

  .tp-mypage-annual__badge {
    align-self: flex-start;
  }

  .tp-mypage-resources__item {
    align-items: flex-start;
  }

  .tp-mypage-edit__panel {
    padding: 24px;
  }

  .tp-mypage-edit__grid {
    grid-template-columns: 1fr;
  }

  .tp-mypage-edit__actions {
    display: grid;
  }

  .tp-pathway-card__content {
    padding: 24px;
  }
  
  .tp-subscription-banner,
  .tp-stats-banner {
    padding-block: 80px;
  }
}
