body {
  font-family:
    -apple-system, BlinkMacSystemFont,
    "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Meiryo", "Roboto", "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  padding: 0;
  color: #333;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "palt";
}

/* ============================================
   Header
   ============================================ */
header {
  background: #fff;
  border-bottom: 2px solid #a0caec;
}

header .header-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 12px 16px;
}

header h1 {
  margin: 0;
}

header h1 img {
  display: block;
  width: 140px;
  height: auto;
}

header nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

header .nav-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

header .nav-label {
  font-size: 11px;
  font-weight: bold;
  margin: 0;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px 4px 0 0;
}

header .nav-group:first-child .nav-label {
  background: #0258ab;
}

header .nav-group:last-child .nav-label {
  background: #48739d;
}

header .nav-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

header .nav-group li a {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #003276;
  color: #fff;
  font-size: 13px;
  line-height: 1.4;
  padding: 10px 12px;
  border-radius: 4px;
  text-decoration: none;
}

header .nav-group li a img {
  width: 20px;
  height: 20px;
  margin-left: auto;
  flex-shrink: 0;
}

/* ============================================
   Main
   ============================================ */
main {
  background: linear-gradient(268deg, rgb(254, 255, 255) 31.9%, rgb(244, 244, 244) 98.6%);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* ============================================
   Section Header
   ============================================ */
.course-section .section-header {
  background: #0258ab;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
}

.course-section.type-acquisition .section-header {
  background: #48739d;
}

.section-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.category-label {
  font-size: 11px;
  color: #fff;
  font-weight: bold;
  line-height: 1;
}

.section-header h2 {
  font-size: 18px;
  color: #fff;
  margin: 0;
  line-height: 1.3;
  font-weight: bold;
  font-feature-settings: "pwid" 1, "palt" 1, "pkna" 1;
}

.btn-instructor {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fbfbfc;
  color: #333;
  font-size: 13px;
  font-weight: bold;
  padding: 6px 14px;
  border-radius: 44px;
  text-decoration: none;
  white-space: nowrap;
  align-self: flex-start;
  border: none;
  cursor: pointer;
}

.section-instructor {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.section-instructor .instructor-photo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.section-instructor .instructor-name {
  font-size: 13px;
  font-weight: bold;
  color: #fff;
  white-space: nowrap;
  line-height: 1;
}

.section-instructor .instructor-name small {
  font-size: 10px;
  font-weight: normal;
  margin-left: 2px;
}

/* ============================================
   Subsection Title
   ============================================ */
.subsection-title {
  font-size: 18px;
  color: #0258ab;
  font-weight: bold;
  margin: 20px 0 0;
  line-height: 1;
  font-feature-settings: "pwid" 1, "palt" 1, "pkna" 1;
}

/* ============================================
   Card Grid
   ============================================ */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 16px;
}

/* ============================================
   Card
   ============================================ */
.card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.05);
  text-decoration: none;
}

/* Thumbnail */
.card-thumbnail {
  position: relative;
  aspect-ratio: 355 / 201;
  overflow: hidden;
}

.card-thumbnail > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Overlay */
.card-thumbnail .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.5) 100%);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
}

.overlay .badges {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.badge-duration {
  background: #000;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  padding: 3px 4px;
  border-radius: 2px;
  line-height: 1;
}

.badge-status {
  background: #636363;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  padding: 3px 4px;
  border-radius: 2px;
  line-height: 1;
}

.badge-published {
  background: #0258ab;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  padding: 3px 4px;
  border-radius: 2px;
  line-height: 1;
}

.overlay-title {
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  line-height: 1.3;
  margin: 0;
  flex: 1;
  display: flex;
  align-items: center;
}

/* Instructor info on card (has-instructor) */
.card .instructor-info {
  display: none;
  align-items: center;
  gap: 8px;
}

.card.has-instructor .instructor-info {
  display: flex;
}

.card .instructor-info .instructor-photo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.card .instructor-info .instructor-name {
  font-size: 12px;
  font-weight: bold;
  color: #fff;
  line-height: 1;
}

.card .instructor-info .instructor-name small {
  font-size: 10px;
  font-weight: normal;
  margin-left: 2px;
}

/* Card Body */
.card-body {
  padding: 12px;
}

.card-body h3,
.card-body h4 {
  font-size: 14px;
  font-weight: bold;
  color: #000;
  margin: 0;
  line-height: 1.3;
  font-feature-settings: "pkna" 1;
}

.card-body p {
  font-size: 12px;
  color: #757575;
  margin: 8px 0 0;
  line-height: 1.2;
  white-space: pre-wrap;
}

.card-body ul {
  list-style: disc;
  padding-left: 20px;
  margin: 8px 0 0;
}

.card-body ul li {
  font-size: 12px;
  color: #757575;
  line-height: 1.2;
  margin-top: 4px;
}

.card-body ul li:first-child {
  margin-top: 0;
}

/* ============================================
   Modal
   ============================================ */
#modal-instructor {
  border: none;
  border-radius: 8px;
  padding: 0;
  width: 90vw;
  max-height: 80vh;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

#modal-instructor::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

#modal-instructor .modal-inner {
  padding: 24px;
  overflow-y: auto;
  max-height: 80vh;
  box-sizing: border-box;
}

#modal-instructor .modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #757575;
  line-height: 1;
  padding: 4px 8px;
}

#modal-instructor h2 {
  font-size: 16px;
  color: #333;
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
}

#modal-instructor .modal-profile {
  margin-top: 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

#modal-instructor .modal-profile:first-of-type {
  margin-top: 0;
}

#modal-instructor .modal-profile .instructor-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

#modal-instructor .modal-profile-body {
  flex: 1;
  min-width: 0;
}

#modal-instructor .modal-profile h3 {
  font-size: 15px;
  color: #333;
  margin: 0;
}

#modal-instructor .modal-profile p {
  font-size: 13px;
  color: #555;
  line-height: 1.8;
  margin: 8px 0 0;
  white-space: pre-wrap;
}

/* ============================================
   Detail Page
   ============================================ */
.detail-main {
  align-items: center;
  padding: 32px 16px 20px;
}

.detail-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
}

.detail-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.detail-video iframe,
.detail-video video {
  width: 100%;
  height: 100%;
  display: block;
}

.detail-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.detail-title {
  font-size: 15px;
  font-weight: bold;
  color: #000;
  margin: 0;
  line-height: 1.3;
  font-feature-settings: "pkna" 1;
}

.detail-description {
  font-size: 12px;
  color: #757575;
  margin: 0;
  line-height: 1.2;
  white-space: pre-wrap;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #003595;
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  padding: 6px 14px;
  border-radius: 2px;
  text-decoration: none;
  line-height: 1.6;
}

/* ============================================
   Footer
   ============================================ */
footer {
  padding: 20px 16px;
  background: linear-gradient(268deg, rgb(254, 255, 255) 31.9%, rgb(244, 244, 244) 98.6%);
}

footer p {
  font-size: 11px;
  color: #757575;
  margin: 0;
  line-height: 1.8;
}

footer a {
  color: #0258ab;
  text-decoration: none;
}

footer .veeva {
  margin-top: 12px;
  font-size: 11px;
  color: #757575;
  text-align: right;
}
