/* Learning page custom styles - unify with JOHTA/Dashboard look and feel */

/* Section titles (align to JOHTA) */
.dashboard-main-content .section-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-color);
  margin: 10px 0 18px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--primary-color);
}

/* Page header */
.page-header .header-content {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.page-header .page-title {
  margin: 0 0 6px;
  font-size: 24px;
  color: var(--primary-color);
  font-weight: 800;
}
.page-header .page-description {
  margin: 0;
  color: var(--light-text);
  font-size: 14px;
}

/* Learning progress */
.learning-progress .progress-stats {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
}
.progress-item {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.progress-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: conic-gradient(var(--primary-color) 78%, var(--secondary-color) 0);
  display: flex;
  align-items: center;
  justify-content: center;
}
.progress-value {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--primary-color);
}
.progress-info h4 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-color);
}
.progress-info p {
  margin: 0;
  font-size: 13px;
  color: var(--light-text);
}
.progress-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.progress-details .detail-item {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.detail-label {
  display: block;
  font-size: 12px;
  color: var(--light-text);
  margin-bottom: 6px;
}
.detail-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-color);
}

/* Featured courses */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.course-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  display: flex;
  flex-direction: column;
}
.course-image {
  position: relative;
  background: var(--secondary-color);
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.course-image img {
  max-width: 100%;
  height: auto;
  display: block;
}
.course-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #FFB300;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
}
.course-content {
  padding: 14px 16px 16px;
}
.course-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-color);
}
.course-description {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--light-text);
  line-height: 1.55;
}
.course-meta {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--light-text);
  margin-bottom: 10px;
}
.course-progress .progress-bar {
  width: 100%;
  height: 10px;
  background: var(--secondary-color);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 6px;
}
.course-progress .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), #008B8B);
  border-radius: 999px;
}
.course-progress .progress-text {
  font-size: 12px;
  color: var(--light-text);
}

/* Categories */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.category-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.category-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 8px;
  border-radius: 12px;
  background: #E8F4F4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.category-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-color);
}
.category-count {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--light-text);
}
.category-link {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 700;
  border: 2px solid var(--primary-color);
  border-radius: 8px;
  padding: 6px 12px;
}
.category-link:hover {
  background: var(--primary-color);
  color: var(--white);
}

/* Recent learning */
.learning-history {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.history-item {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 14px;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.history-icon {
  font-size: 20px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #E8F4F4;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
}
.history-content h4 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-color);
}
.history-content p {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--light-text);
}
.history-time {
  font-size: 12px;
  color: var(--light-text);
}
.history-status {
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--secondary-color);
  color: var(--text-color);
}
.history-status.completed { background: #E3F2FD; color: #1976D2; }
.history-status.passed { background: #E8F5E9; color: #2E7D32; }
.history-status.in-progress { background: #FFF3E0; color: #F57C00; }

/* Beta overlay (Learning) */
.dashboard-main-content,
.dashboard-sidebar-right .sidebar-content {
  position: relative;
}
.beta-overlay {
  position: absolute;
  inset: 0;
  background: rgba(242, 244, 247, 0.85);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto; /* オーバーレイでクリックを遮断 */
}
.beta-overlay .beta-message {
  color: #555;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  padding: 8px 12px;
  /* 必要なら読みやすさ向上のため下記を有効化
  background: rgba(255,255,255,0.9);
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  */
}

/* Responsive */
@media (max-width: 992px) {
  .learning-progress .progress-stats {
    grid-template-columns: 1fr;
  }
  .progress-details {
    grid-template-columns: 1fr;
  }
  .courses-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .categories-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 576px) {
  .courses-grid {
    grid-template-columns: 1fr;
  }
  .categories-grid {
    grid-template-columns: 1fr;
  }
  .history-item {
    grid-template-columns: 32px 1fr;
  }
}
