/* DiplomaStudy - Content Page Styles v2 (Modern) */

/* ═══════════════════════════════════════════
   CONTENT HERO
   ═══════════════════════════════════════════ */
.content-hero {
  position: relative;
  padding: 20px;
  background: linear-gradient(135deg, var(--color-forest-soft), transparent);
  border-left: 4px solid var(--color-forest);
  border-radius: 18px;
  margin-bottom: 18px;
}

.content-hero-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--color-forest);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  border-radius: 999px;
  letter-spacing: 0.4px;
  margin-bottom: 8px;
}

.content-hero-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--color-forest);
  letter-spacing: -0.4px;
  margin-bottom: 4px;
  line-height: 1.2;
}

.content-hero-en {
  font-size: 12px;
  color: var(--color-text-muted);
  font-style: italic;
  margin-bottom: 8px;
}

.content-hero-subject {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-text);
}

/* ═══════════════════════════════════════════
   CONTENT TABS (Modern pill scroll)
   ═══════════════════════════════════════════ */
.content-tabs-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  margin-bottom: 14px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

.content-tabs-scroll::-webkit-scrollbar {
  display: none;
}

.content-tab {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text-muted);
  font-size: 12.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  scroll-snap-align: start;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.content-tab:active {
  transform: scale(0.94);
}

.content-tab:hover {
  border-color: var(--color-sage);
  color: var(--color-forest);
}

.content-tab.active {
  background: var(--grad-forest);
  color: #FFFFFF;
  border-color: var(--color-forest);
  box-shadow: 0 4px 14px rgba(28, 62, 44, 0.25);
  transform: translateY(-1px);
}

.content-tab-icon {
  font-size: 15px;
  line-height: 1;
}

.content-tab-label {
  letter-spacing: -0.1px;
}

.content-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: rgba(28, 62, 44, 0.12);
  color: var(--color-forest);
  font-size: 10.5px;
  font-weight: 800;
  border-radius: 999px;
  margin-left: 2px;
}

.content-tab.active .content-tab-count {
  background: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
}

/* ═══════════════════════════════════════════
   CONTENT AREA
   ═══════════════════════════════════════════ */
.content-area {
  min-height: 300px;
}

/* ═══════════════════════════════════════════
   PDF LIST
   ═══════════════════════════════════════════ */
.pdf-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pdf-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 1px 3px rgba(28, 62, 44, 0.03);
  -webkit-tap-highlight-color: transparent;
}

.pdf-card:hover {
  border-color: var(--color-sage);
  box-shadow: 0 6px 20px rgba(28, 62, 44, 0.1);
  transform: translateY(-2px);
}

.pdf-card:active {
  transform: scale(0.98);
}

.pdf-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--color-danger-bg), #FED7D7);
  color: var(--color-danger);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pdf-card-body {
  flex: 1;
  min-width: 0;
}

.pdf-card-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--color-forest);
  margin-bottom: 3px;
  line-height: 1.3;
  letter-spacing: -0.2px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.pdf-card-meta {
  font-size: 11px;
  color: var(--color-text-muted);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-card-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-forest-soft);
  color: var(--color-forest);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.pdf-card:hover .pdf-card-arrow {
  transform: translateX(3px);
  background: var(--color-forest);
  color: #FFFFFF;
}

/* ═══════════════════════════════════════════
   QUESTION LIST
   ═══════════════════════════════════════════ */
.question-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.question-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(28, 62, 44, 0.03);
  transition: all 0.2s ease;
}

.question-card:hover {
  box-shadow: 0 4px 14px rgba(28, 62, 44, 0.08);
  border-color: var(--color-sage);
}

.question-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
}

.question-card-number {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-forest), var(--color-forest-light));
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
  letter-spacing: -0.3px;
}

.question-card-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.question-card-text {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.55;
  margin-bottom: 14px;
  letter-spacing: -0.1px;
}

/* MCQ Options */
.mcq-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mcq-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: var(--color-surface-hover);
  border: 1.5px solid var(--color-border);
  border-radius: 12px;
  transition: all 0.15s ease;
}

.mcq-option.correct {
  background: linear-gradient(135deg, var(--color-success-bg), #C6F6D5);
  border-color: var(--color-success);
  box-shadow: 0 2px 8px rgba(21, 128, 61, 0.15);
}

.mcq-letter {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-mono);
}

.mcq-option.correct .mcq-letter {
  background: var(--color-success);
  color: #FFFFFF;
}

.mcq-text {
  flex: 1;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
}

.mcq-check {
  color: var(--color-success);
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0;
}

/* Question Answer */
.question-answer-block {
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--color-forest-soft), transparent);
  border-left: 3px solid var(--color-forest);
  border-radius: 12px;
}

.qab-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--color-forest);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}

.qab-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.6;
  white-space: pre-wrap;
}

/* ═══════════════════════════════════════════
   SUGGESTION LIST
   ═══════════════════════════════════════════ */
.suggestion-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.suggestion-card {
  background: linear-gradient(135deg, #FFFBEB, var(--color-surface));
  border: 1px solid #FCD34D;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(200, 122, 30, 0.08);
  transition: all 0.2s ease;
}

.suggestion-card:hover {
  box-shadow: 0 6px 18px rgba(200, 122, 30, 0.15);
  transform: translateY(-1px);
}

.suggestion-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.suggestion-cat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #FFFFFF;
  font-size: 10.5px;
  font-weight: 800;
  border-radius: 999px;
  letter-spacing: 0.3px;
}

.suggestion-title {
  font-size: 15px;
  font-weight: 800;
  color: #78350F;
  margin-bottom: 8px;
  line-height: 1.35;
  letter-spacing: -0.2px;
}

.suggestion-summary {
  font-size: 13.5px;
  color: #78350F;
  line-height: 1.6;
  margin-bottom: 12px;
  white-space: pre-wrap;
}

.suggestion-tip {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  border: 1px dashed #FCD34D;
}

.suggestion-tip-icon {
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1;
}

.suggestion-tip-label {
  font-size: 10px;
  font-weight: 800;
  color: #92400E;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}

.suggestion-tip-text {
  font-size: 12.5px;
  color: #78350F;
  line-height: 1.5;
  font-weight: 500;
}

/* ═══════════════════════════════════════════
   FORMULA LIST
   ═══════════════════════════════════════════ */
.formula-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.formula-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(28, 62, 44, 0.03);
  transition: all 0.2s ease;
}

.formula-card:hover {
  box-shadow: 0 4px 14px rgba(8, 145, 178, 0.1);
  border-color: #67E8F9;
}

.formula-name {
  font-size: 15px;
  font-weight: 800;
  color: #0E7490;
  margin-bottom: 12px;
  letter-spacing: -0.2px;
}

.formula-equation {
  padding: 14px 16px;
  background: linear-gradient(135deg, #ECFEFF, #CFFAFE);
  border-left: 4px solid #0891B2;
  border-radius: 10px;
  margin-bottom: 12px;
  text-align: center;
}

.formula-equation code {
  font-family: "SF Mono", Monaco, monospace;
  font-size: 16px;
  font-weight: 800;
  color: #0E7490;
  letter-spacing: 0.5px;
}

.formula-explanation {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 10px;
}

.formula-example {
  padding: 10px 12px;
  background: var(--color-surface-hover);
  border-radius: 10px;
  border-left: 3px solid var(--color-border);
}

.formula-example-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--color-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.formula-example-text {
  font-size: 12.5px;
  color: var(--color-text);
  line-height: 1.5;
  font-weight: 500;
}

/* ═══════════════════════════════════════════
   DARK MODE
   ═══════════════════════════════════════════ */
[data-theme="dark"] .content-hero {
  background: linear-gradient(135deg, rgba(82, 148, 112, 0.12), transparent);
}

[data-theme="dark"] .pdf-card-icon {
  background: linear-gradient(135deg, #450A0A, #7F1D1D);
}

[data-theme="dark"] .mcq-option.correct {
  background: linear-gradient(135deg, #064E3B, #065F46);
  border-color: #34D399;
}

[data-theme="dark"] .suggestion-card {
  background: linear-gradient(135deg, #302410, var(--color-surface));
  border-color: #4A3A1C;
}

[data-theme="dark"] .suggestion-title,
[data-theme="dark"] .suggestion-summary {
  color: #FDE68A;
}

[data-theme="dark"] .suggestion-tip {
  background: rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .formula-card:hover {
  border-color: #0E7490;
}

[data-theme="dark"] .formula-equation {
  background: linear-gradient(135deg, #172554, #1E3A8A);
}

[data-theme="dark"] .formula-equation code {
  color: #93C5FD;
}