/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Malgun Gothic", "맑은 고딕", helvetica, "Apple SD Gothic Neo",
    sans-serif;
  background-color: #f8f9fa;
  color: #333;
  line-height: 1.6;
}

.container-fluid {
  padding: 0;
  max-width: 1400px;
  margin: 0 auto;
}

/* Sidebar Styles */
.sidebar {
  background-color: #fff;
  border-right: 1px solid #e9ecef;
  min-height: 100vh;
  padding: 20px 0;
}

.sidebar-menu {
  padding: 0 20px;
}

.menu-title {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #007bff;
}

.menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-item {
  margin-bottom: 5px;
}

.menu-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  color: #666;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-size: 14px;
}

.menu-link:hover {
  background-color: #f8f9fa;
  color: #333;
}

.menu-item.active .menu-link {
  background-color: #dc3545;
  color: white;
  font-weight: 600;
}

.menu-link i {
  font-size: 12px;
  opacity: 0.7;
}

/* Main Content Styles */
.main-content {
  background-color: #fff;
  min-height: 100vh;
  padding: 30px;
}

.page-header {
  margin-bottom: 40px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e9ecef;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  margin: 0;
}

/* FAQ TOP5 Section */
.faq-top-section {
  margin-bottom: 40px;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin-bottom: 25px;
}

/* Category Tabs */
.category-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 30px;
  border-bottom: 1px solid #e9ecef;
}

.category-tab {
  background: none;
  border: none;
  padding: 12px 20px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.category-tab:hover {
  color: #333;
  background-color: #f8f9fa;
}

.category-tab.active {
  color: #dc3545;
  border-bottom-color: #dc3545;
  font-weight: 600;
  background-color: #fff;
}

/* FAQ Accordion */
.faq-content {
  margin-bottom: 50px;
}

.faq-accordion {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  overflow: hidden;
}

.faq-item {
  border-bottom: 1px solid #e9ecef;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  display: flex;
  align-items: center;
  padding: 20px;
  background-color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border: none;
  width: 100%;
  text-align: left;
}

.faq-question:hover {
  background-color: #f8f9fa;
}

.faq-question.active {
  background-color: #f8f9fa;
}

.question-icon {
  width: 24px;
  height: 24px;
  background-color: #6c757d;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  margin-right: 15px;
  flex-shrink: 0;
}

.question-text {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  color: #333;
}

.toggle-icon {
  font-size: 14px;
  color: #666;
  transition: transform 0.2s ease;
}

.faq-question.active .toggle-icon {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 20px 20px 59px;
  background-color: #f8f9fa;
}

.faq-answer.show {
  display: block;
  animation: slideDown 0.3s ease;
}

.answer-icon {
  width: 24px;
  height: 24px;
  background-color: #dc3545;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 15px;
}

.answer-content {
  font-size: 14px;
  line-height: 1.8;
  color: #333;
  margin-left: 39px;
  margin-top: -39px;
  padding-left: 0;
}

/* FAQ Search Section */
.faq-search-section {
  background-color: #f8f9fa;
  padding: 40px;
  border-radius: 8px;
  text-align: center;
}

.search-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 25px;
}

.search-form {
  margin-bottom: 20px;
}

.search-input-group {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  gap: 10px;
}

.search-input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 12px 15px;
  font-size: 14px;
}

.search-input:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.btn-search {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-search:hover {
  background-color: #0056b3;
}

.help-links {
  margin-top: 20px;
}

.help-links p {
  font-size: 14px;
  color: #666;
  margin: 0;
}

.help-link {
  color: #007bff;
  text-decoration: none;
  font-weight: 600;
}

.help-link:hover {
  text-decoration: underline;
}

/* Animations */
@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 200px;
  }
}

/* Search Results */
.search-results {
  margin-top: 30px;
  padding: 20px;
  background-color: #fff;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.search-results-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 15px;
}

.search-result-item {
  padding: 15px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.search-result-item:hover {
  background-color: #f8f9fa;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-question {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-bottom: 5px;
}

.search-result-category {
  font-size: 12px;
  color: #666;
  background-color: #e9ecef;
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-block;
}

.no-results {
  text-align: center;
  padding: 40px;
  color: #666;
}

.no-results i {
  font-size: 48px;
  color: #ddd;
  margin-bottom: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container-fluid {
    padding: 0;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    z-index: 1050;
    transition: left 0.3s ease;
  }

  .sidebar.show {
    left: 0;
  }

  .main-content {
    padding: 20px 15px;
  }

  .category-tabs {
    flex-wrap: wrap;
    gap: 5px;
  }

  .category-tab {
    padding: 10px 15px;
    font-size: 13px;
  }

  .faq-question {
    padding: 15px;
  }

  .question-text {
    font-size: 14px;
  }

  .faq-answer {
    padding: 0 15px 15px 50px;
  }

  .search-input-group {
    flex-direction: column;
    gap: 10px;
  }

  .faq-search-section {
    padding: 30px 20px;
  }
}

@media (max-width: 576px) {
  .page-title {
    font-size: 20px;
  }

  .section-title {
    font-size: 18px;
  }

  .category-tabs {
    justify-content: center;
  }

  .category-tab {
    padding: 8px 12px;
    font-size: 12px;
  }

  .faq-question {
    padding: 12px;
  }

  .question-icon {
    width: 20px;
    height: 20px;
    font-size: 10px;
    margin-right: 10px;
  }

  .question-text {
    font-size: 13px;
  }

  .faq-answer {
    padding: 0 12px 12px 42px;
  }

  .answer-content {
    margin-left: 30px;
    margin-top: -30px;
    font-size: 13px;
  }
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

/* Focus States */
.faq-question:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

.category-tab:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .sidebar,
  .faq-search-section {
    display: none;
  }

  .main-content {
    padding: 0;
  }

  .faq-answer {
    display: block !important;
  }

  .toggle-icon {
    display: none;
  }
}
