/* CSS 변수 설정 (home_styles.css와 동일) */
:root {
  --brand-main: #28468f;
  --brand-sub: #f7a007;
  --primary-blue: #28468f;
  --light-blue: #2e4f9c;
  --lighter-blue: #3f63b2;
  --primary-green: #34d399;
  --white: #ffffff;
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #eeeeee;
  --gray-300: #e0e0e0;
  --gray-400: #bdbdbd;
  --gray-500: #9e9e9e;
  --gray-600: #757575;
  --gray-700: #616161;
  --gray-800: #424242;
  --gray-900: #212121;
  --font-primary: "Noto Sans KR", "Heebo", sans-serif;
  --font-heading: "Noto Sans KR", "Heebo", sans-serif;
}

/* 기본 스타일 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  background: var(--brand-main);
  min-height: 100vh;
  color: var(--gray-900);
  line-height: 1.6;
}

/* Container (로드맵 스타일) */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  gap: 2rem;
  min-height: calc(100vh - 80px);
  box-sizing: border-box;
}

/* 로드맵 메뉴 */
.roadmap-menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  font-family: var(--font-primary);
}

.menu-item:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.menu-item.active {
  background: var(--brand-main);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
}

.menu-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: auto;
}

.menu-item.disabled:hover {
  background: transparent;
  color: var(--gray-700);
}

.menu-item .menu-icon {
  font-size: 1.2rem;
}

/* Home으로 돌아가기 버튼 */
.back-home-section {
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-200);
}

.back-home-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  background: var(--brand-sub);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(247, 160, 7, 0.28);
  text-decoration: none;
}

.back-home-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(247, 160, 7, 0.36);
}

.back-home-btn .btn-icon {
  font-size: 1.1rem;
}

/* Main Content (탐구보고서 프로젝트와 동일 - 카드 형태) */
.main-content {
  flex: 1;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 2rem 3rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow-y: auto;
  min-width: 0;
}

.content-header {
  margin-bottom: 2rem;
  padding-left: 2rem;
}

.page-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.page-subtitle {
  font-size: 1.1rem;
  color: var(--gray-600);
  font-weight: 500;
  text-align: left;
}

/* Content Sections */
.content-section {
  display: none;
}

.content-section.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 핵심 가치 섹션 */
.intro-card {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1rem;
}

.intro-text {
  font-size: 1.05rem;
  color: var(--gray-700);
  line-height: 1.8;
  margin-bottom: 0.5rem;
}

.intro-subtext {
  font-size: 0.9rem;
  color: var(--gray-500);
  font-style: italic;
  margin-bottom: 2rem;
}

.subsection-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gray-800);
  margin: 2rem 0 1rem 0;
}

/* 페르소나 카드 */
.persona-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.persona-card {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 2px solid #bae6fd;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s;
}

.persona-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(66, 133, 244, 0.15);
}

.persona-badge {
  display: inline-block;
  background: var(--primary-blue);
  color: var(--white);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.persona-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
}

.persona-quote {
  font-size: 0.9rem;
  color: var(--gray-600);
  font-style: italic;
}

/* 전략 테이블 */
.strategy-table {
  overflow-x: auto;
  margin-bottom: 2rem;
}

.strategy-table table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.strategy-table thead {
  background: linear-gradient(135deg, var(--brand-main) 0%, #7bb3f0 100%);
  color: var(--white);
}

.strategy-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.95rem;
}

.strategy-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--gray-200);
  font-size: 0.9rem;
}

.strategy-table tr:last-child td {
  border-bottom: none;
}

.strategy-table tr:hover {
  background: var(--gray-50);
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.badge-blue {
  background: #dbeafe;
  color: #1e40af;
}

.badge-purple {
  background: #ede9fe;
  color: #6b21a8;
}

.badge-green {
  background: #d1fae5;
  color: #065f46;
}

/* CTA 섹션 */
.cta-section {
  text-align: center;
  margin-top: 2rem;
}

.btn-primary-large {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--brand-main) 0%, #34d399 100%);
  color: var(--white);
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(66, 133, 244, 0.3);
  font-family: var(--font-primary);
}

.btn-primary-large:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(66, 133, 244, 0.4);
}

.btn-primary-large:active {
  transform: translateY(0);
}

.btn-primary-large:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-primary-large .btn-icon {
  font-size: 1.3rem;
}

/* 전략 섹션 */
.strategy-card {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 입력 폼 */
.input-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--gray-300);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: var(--font-primary);
  color: var(--gray-900);
  transition: all 0.2s;
  background: var(--white);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* 과목 체크박스 컨테이너 */
.subjects-checkbox-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
  padding: 1rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.subjects-loading {
  text-align: center;
  padding: 2rem;
  color: var(--gray-600);
  font-size: 0.9rem;
}

.subjects-checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.subjects-checkbox-item:hover {
  background: var(--gray-100);
  border-color: var(--primary-blue);
}

.subjects-checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary-blue);
}

.subjects-checkbox-item input[type="checkbox"]:checked + label {
  color: var(--primary-blue);
  font-weight: 600;
}

.subjects-checkbox-item label {
  flex: 1;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--gray-700);
  user-select: none;
}

.subjects-checkbox-item:has(input[type="checkbox"]:checked) {
  background: #e3f2fd;
  border-color: var(--primary-blue);
}

.form-hint {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-top: 0.5rem;
}

/* 로드맵 결과 */
.roadmap-result {
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 2px solid var(--gray-200);
}

.roadmap-result.hidden {
  display: none;
}

.result-header {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  gap: 1rem;
  border-bottom: 2px solid var(--gray-200);
  padding-bottom: 1rem;
}

.result-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
  margin-right: auto;
}

.tab-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  background: transparent;
  color: var(--gray-600);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  transition: all 0.3s ease;
  position: relative;
  border-bottom: 3px solid transparent;
}

.tab-button:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.tab-button.active {
  color: var(--primary-blue);
  background: rgba(59, 130, 246, 0.05);
  border-bottom-color: var(--primary-blue);
}

.tab-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.tab-text {
  font-weight: 600;
}

/* 로딩 상태 */
.loading-state {
  text-align: center;
  padding: 3rem 0;
}

.loading-state.hidden {
  display: none;
}

.spinner {
  width: 50px;
  height: 50px;
  margin: 0 auto 1rem;
  border: 4px solid var(--gray-200);
  border-top-color: var(--primary-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-state p {
  color: var(--gray-600);
  font-size: 1rem;
}

/* 결과 콘텐츠 */
.result-content {
  animation: fadeIn 0.5s ease-out;
}

.result-content.hidden {
  display: none;
}

/* 과목별 로드맵 카드 */
.subject-roadmap {
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s;
}

.subject-roadmap:hover {
  border-color: var(--primary-blue);
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.15);
}

.subject-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--gray-100);
}

.subject-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gray-900);
}

.relevance-badge {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.relevance-high {
  background: #dcfce7;
  color: #166534;
}

.relevance-medium {
  background: #fef3c7;
  color: #92400e;
}

.relevance-low {
  background: #f3f4f6;
  color: #4b5563;
}

.topic-suggestion {
  margin-bottom: 1rem;
}

.topic-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-blue);
  margin-bottom: 0.5rem;
}

.topic-description {
  font-size: 0.95rem;
  color: var(--gray-700);
  line-height: 1.6;
}

.competency-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.competency-tag {
  padding: 0.4rem 0.8rem;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 16px;
  font-size: 0.85rem;
  color: #0369a1;
  font-weight: 500;
}

.comment-section {
  background: var(--gray-50);
  border-left: 4px solid var(--primary-blue);
  padding: 1rem;
  margin-top: 1rem;
  border-radius: 4px;
}

.comment-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 0.5rem;
}

.comment-text {
  font-size: 0.95rem;
  color: var(--gray-700);
  line-height: 1.6;
}

/* Overall Strategy */
.overall-strategy {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-left: 4px solid var(--primary-blue);
  border-radius: 8px;
}

/* Footer */
.site-footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 2rem 0;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
}

.footer-company-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.footer-details {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  font-size: 0.85rem;
}

.footer-details span {
  padding: 0 0.5rem;
  border-right: 1px solid var(--gray-700);
}

.footer-details span:last-child {
  border-right: none;
}

/* 반응형 */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--gray-200);
  }

  .roadmap-menu {
    flex-direction: row;
    overflow-x: auto;
  }

  .persona-cards {
    grid-template-columns: 1fr;
  }

  .strategy-table {
    font-size: 0.85rem;
  }

  .main-content {
    padding: 1rem;
  }

  .page-title {
    font-size: 1.5rem;
  }
}

