/* =========================================================
   P2M Academy LP - Custom Styles
   Tailwind を補完する最小限のカスタム CSS のみ
   ========================================================= */

html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main > section {
  scroll-margin-top: 5rem;
}

@media (min-width: 1024px) {
  main > section {
    scroll-margin-top: 6rem;
  }
}

/* Community カルーセル：hover で一時停止 */
#community .animate-scroll-x:hover {
  animation-play-state: paused;
}

/* モバイルメニュー：max-height トランジションで滑らかに開閉 */
#mobile-menu {
  transition: max-height 340ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: max-height;
}
#mobile-menu nav > a {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 280ms ease, transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}
#mobile-menu[data-open="true"] nav > a {
  opacity: 1;
  transform: translateY(0);
}
#mobile-menu[data-open="true"] nav > a:nth-child(1) { transition-delay: 60ms; }
#mobile-menu[data-open="true"] nav > a:nth-child(2) { transition-delay: 90ms; }
#mobile-menu[data-open="true"] nav > a:nth-child(3) { transition-delay: 120ms; }
#mobile-menu[data-open="true"] nav > a:nth-child(4) { transition-delay: 150ms; }
#mobile-menu[data-open="true"] nav > a:nth-child(5) { transition-delay: 180ms; }
#mobile-menu[data-open="true"] nav > a:nth-child(6) { transition-delay: 210ms; }
#mobile-menu[data-open="true"] nav > a:nth-child(7) { transition-delay: 240ms; }
#mobile-menu[data-open="true"] nav > a:nth-child(8) { transition-delay: 280ms; }
#hamburger svg {
  transition: opacity 200ms ease;
}

/* モバイル時のカルーセル速度を少し速く（要素サイズが小さいため） */
@media (max-width: 640px) {
  #community .animate-scroll-x {
    animation-duration: 30s;
  }
}

/* FAQ details マーカー非表示（Safari対応） */
details > summary::-webkit-details-marker {
  display: none;
}
details > summary {
  list-style: none;
}

/* フォーカスリング（アクセシビリティ） */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid #F58220;
  outline-offset: 2px;
  border-radius: 4px;
}

/* スクロールバーを細く */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #0B1730;
}
::-webkit-scrollbar-thumb {
  background: #26396B;
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: #4A6FA5;
}

/* Other Courses のロゴ画像（透過PNG）を映えさせるダーク背景 */
.course-logo-wrap {
  background: linear-gradient(135deg, #0B1730 0%, #142348 60%, #1A2B4D 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.course-logo-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(245, 130, 32, 0.18), transparent 55%);
  pointer-events: none;
}
.course-logo-wrap img {
  max-height: 100%;
  max-width: 90%;
  object-fit: contain;
  position: relative;
  z-index: 1;
  transform: scale(var(--logo-scale, 1));
  transform-origin: center center;
  transition: transform 0.5s ease, filter 0.3s ease;
}
.course-logo-wrap .play-badge {
  position: absolute;
  bottom: 0.85rem;
  right: 0.85rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  background: rgba(245, 130, 32, 0.95);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, background 0.3s ease;
  z-index: 2;
  pointer-events: none;
}
.course-logo-wrap .play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 23, 48, 0.55);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: white;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 3;
  pointer-events: none;
}
.course-card-link:hover .course-logo-wrap .play-overlay,
.course-card-link:focus-visible .course-logo-wrap .play-overlay {
  opacity: 1;
}
.course-card-link:hover .course-logo-wrap .play-badge {
  transform: scale(1.12);
}
.course-card-link:hover .course-logo-wrap img {
  transform: scale(calc(var(--logo-scale, 1) * 1.04));
}

/* アーカイブ動画サムネイル */
.archive-thumb {
  aspect-ratio: 1 / 1;
  background: #f3f4f6;
  overflow: hidden;
}
.archive-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.archive-card:hover .archive-thumb img {
  transform: scale(1.04);
}

/* 6/14 セミナーサムネ（横長） */
.seminar-thumb {
  aspect-ratio: 16 / 9;
  background: #f3f4f6;
  overflow: hidden;
}
.seminar-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 動きを抑える設定の人向けにアニメーションを停止 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* MBT カードのステータスバッジ */
.mbt-card .status-badge {
  display: inline-flex;
  align-items: center;
  font-family: 'Outfit', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  color: white;
}
.mbt-card .status-badge.is-live {
  background: #F58220;
}
.mbt-card .status-badge.is-coming {
  background: #4A6FA5;
}

/* MBT カードの画像エリア（5:3 横長で表示） */
.mbt-card-image {
  aspect-ratio: 5 / 3;
}
.mbt-card-image img {
  /* 正方形画像を上寄りに表示し、下端の P2M Academy ロゴをトリミング */
  object-position: center 32%;
  transition: transform 0.5s ease;
}
.mbt-card:hover .mbt-card-image img {
  transform: scale(1.04);
}
