/* ===================================
   Guide Page Styles
   สไตล์เพิ่มเติมสำหรับหน้า User Guide
   =================================== */

/* Hero Section สำหรับ Guide */
.guide-section {
  padding: 140px 0 60px;
  background: linear-gradient(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.4)), url('../images/hero_cloud_bg.png');
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
}

/* Content Section */
.guide-content {
  padding: 60px 0;
}

/* Sidebar */
.guide-sidebar {
  position: sticky;
  top: 100px;
}

/* Menu Box */
.guide-menu {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  padding: 25px;
}

.guide-menu h5 {
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f0f0f0;
}

/* Menu Items */
.guide-menu-item {
  display: block;
  padding: 12px 15px;
  margin-bottom: 8px;
  border-radius: 10px;
  color: #495057;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
}

.guide-menu-item:hover,
.guide-menu-item.active {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  transform: translateX(5px);
}

.guide-menu-item i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

/* Guide Card */
.guide-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 30px;
  overflow: hidden;
}

.guide-card-header {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  padding: 20px 25px;
}

.guide-card-header h4 {
  margin: 0;
  font-weight: 700;
}

.guide-card-header i {
  font-size: 1.5rem;
  margin-right: 12px;
}

.guide-card-body {
  padding: 25px;
}

/* Step Items */
.step-item {
  display: flex;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.step-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.step-number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-right: 15px;
}

.step-content h5 {
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-dark);
}

.step-content p {
  margin: 0;
  color: #6c757d;
}

/* Tip Box */
.tip-box {
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.08), rgba(56, 182, 255, 0.08));
  border-left: 4px solid var(--primary-color);
  border-radius: 0 12px 12px 0;
  padding: 15px 20px;
  margin-top: 15px;
}

.tip-box i {
  color: var(--primary-color);
  margin-right: 8px;
}

/* Warning Box */
.warning-box {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 193, 7, 0.05));
  border-left: 4px solid #ffc107;
  border-radius: 0 12px 12px 0;
  padding: 15px 20px;
  margin-top: 15px;
}

.warning-box i {
  color: #ffc107;
  margin-right: 8px;
}

/* Code Block */
.code-block {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 15px 20px;
  border-radius: 10px;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  overflow-x: auto;
  margin: 15px 0;
}

/* Example Box */
.example-box {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  margin: 15px 0;
}

.example-box h6 {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 12px;
}

/* ===================================
   Dark Mode Support - prefers-color-scheme
   =================================== */
@media (prefers-color-scheme: dark) {

  .guide-menu,
  .guide-card {
    background: #1e1e1e;
  }

  .guide-menu h5 {
    border-bottom-color: #333;
  }

  .guide-menu-item {
    color: #cfcfcf;
  }

  .step-content h5 {
    color: #e0e0e0;
  }

  .step-content p,
  .step-content li {
    color: #9aa0a6;
  }

  .step-item {
    border-bottom-color: #333;
  }

  .example-box {
    background: #252525;
  }

  .example-box h6 {
    color: #4dabf7;
  }

  .code-block {
    background: #0d0d0d;
  }

  /* สีสำหรับข้อความใน card body */
  .guide-card-body>p {
    color: #cfcfcf;
  }

  /* สีสำหรับ tip-box */
  .tip-box {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.15), rgba(56, 182, 255, 0.15));
    color: #e0e0e0;
  }

  .tip-box strong {
    color: #4dabf7;
  }

  /* สีสำหรับ warning-box */
  .warning-box {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2), rgba(255, 193, 7, 0.1));
    color: #e0e0e0;
  }

  .warning-box strong {
    color: #ffc107;
  }

  /* สีสำหรับ example-box content */
  .example-box p,
  .example-box li {
    color: #cfcfcf;
  }

  /* สีสำหรับ h5 หัวข้อย่อยใน card body */
  .guide-card-body>h5 {
    color: #e0e0e0;
  }

  .guide-card-body>h5 i.text-primary {
    color: #4dabf7 !important;
  }
}

/* ===================================
   Dark Mode Support - .dark-mode class
   =================================== */
html.dark-mode .guide-menu,
html.dark-mode .guide-card {
  background: #1e1e1e;
}

html.dark-mode .guide-menu h5 {
  border-bottom-color: #333;
}

html.dark-mode .guide-menu-item {
  color: #cfcfcf;
}

html.dark-mode .step-content h5 {
  color: #e0e0e0;
}

html.dark-mode .step-content p,
html.dark-mode .step-content li {
  color: #9aa0a6;
}

html.dark-mode .step-item {
  border-bottom-color: #333;
}

html.dark-mode .example-box {
  background: #252525;
}

html.dark-mode .example-box h6 {
  color: #4dabf7;
}

html.dark-mode .code-block {
  background: #0d0d0d;
}

/* สีสำหรับข้อความใน card body - dark-mode class */
html.dark-mode .guide-card-body>p {
  color: #cfcfcf;
}

/* สีสำหรับ tip-box - dark-mode class */
html.dark-mode .tip-box {
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.15), rgba(56, 182, 255, 0.15));
  color: #e0e0e0;
}

html.dark-mode .tip-box strong {
  color: #4dabf7;
}

/* สีสำหรับ warning-box - dark-mode class */
html.dark-mode .warning-box {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.2), rgba(255, 193, 7, 0.1));
  color: #e0e0e0;
}

html.dark-mode .warning-box strong {
  color: #ffc107;
}

/* สีสำหรับ example-box content - dark-mode class */
html.dark-mode .example-box p,
html.dark-mode .example-box li {
  color: #cfcfcf;
}

/* สีสำหรับ h5 หัวข้อย่อยใน card body - dark-mode class */
html.dark-mode .guide-card-body>h5 {
  color: #e0e0e0;
}

html.dark-mode .guide-card-body>h5 i.text-primary {
  color: #4dabf7 !important;
}

/* ===================================
   Responsive
   =================================== */
@media (max-width: 991px) {
  .guide-sidebar {
    position: relative;
    top: 0;
    margin-bottom: 30px;
  }
}
