/* Solution Mall Design System - Strict Implementation */

/* ========== Color Palette ========== */
:root {
  --primary-blue: #0D6EFD;
  --secondary-green: #198754;
  --bg-white: #FFFFFF;
  --text-dark: #212529;
  --text-gray: #6C757D;
  --bg-light-gray: #F8F9FA;
  --border-gray: #DEE2E6;
  --hero-gradient-start: #0D6EFD;
  --hero-gradient-end: #5DADE2;
}

/* ========== Global Reset ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-white);
}

/* ========== Typography ========== */
h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-blue);
  margin-top: 2rem;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-blue);
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-blue);
  margin-top: 1rem;
  margin-bottom: 0.75rem;
}

p {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-dark);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

a {
  color: var(--primary-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ========== Layout: Two-Column Fixed Sidebar ========== */
.container {
  display: flex;
  min-height: 100vh;
}

/* ========== Left Sidebar (Fixed 250px) ========== */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 250px;
  height: 100vh;
  background-color: var(--bg-light-gray);
  overflow-y: auto;
  border-right: 1px solid var(--border-gray);
  z-index: 1000;
}

.logo-container {
  padding: 1.5rem;
  text-align: center;
  background-color: var(--bg-white);
  border-bottom: 1px solid var(--border-gray);
}

.logo-container img {
  max-width: 100%;
  height: auto;
}

.logo-container a {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--primary-blue);
}

/* Navigation Menu - STRICT 80px height per item */
.nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-menu li {
  height: 80px; /* STRICT REQUIREMENT */
  display: flex;
  align-items: center;
  padding: 0 1rem;
  border-left: 4px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s;
}

.nav-menu li:hover {
  background-color: var(--bg-light-gray);
}

.nav-menu li.active {
  background-color: var(--bg-light-gray);
  border-left-color: var(--primary-blue);
}

.nav-menu li a {
  display: flex;
  align-items: center;
  width: 100%;
  color: var(--text-dark);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 400;
}

.nav-menu li a .icon {
  margin-right: 0.75rem;
  font-size: 1.2rem;
  color: var(--primary-blue);
}

/* ========== Main Content Area ========== */
.main-content {
  margin-left: 250px;
  width: calc(100% - 250px);
  padding: 0;
}

.content-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 3rem;
}

/* ========== Hero Section (Homepage ONLY) ========== */
.hero-section {
  background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
  border-radius: 1rem; /* STRICT: 16px rounded corners */
  padding: 60px 50px;
  margin-bottom: 3rem;
  max-width: 1000px; /* STRICT: not exceed 1035px */
  color: white;
}

.hero-section .version-tag {
  font-size: 0.875rem;
  color: white;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.hero-section h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #FFFFFF; /* STRICT: white on blue background */
  margin-bottom: 1rem;
}

.hero-section p {
  font-size: 1rem;
  color: white;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.hero-section .cta-buttons {
  display: flex;
  gap: 1rem;
}

.hero-section .btn {
  padding: 0.5rem 1.5rem;
  border-radius: 0.375rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.hero-section .btn-primary {
  background-color: white;
  color: var(--primary-blue);
  border: none;
}

.hero-section .btn-secondary {
  background-color: transparent;
  color: white;
  border: 1px solid white;
}

.hero-section .btn:hover {
  transform: scale(1.05);
  text-decoration: none;
}

/* ========== Chapter Navigation Cards (Homepage ONLY) ========== */
.chapter-cards-section {
  background-color: var(--bg-light-gray);
  padding: 40px;
  border-radius: 0.5rem;
  max-width: 1000px; /* STRICT: fixed 1000px */
  margin: 0 auto 3rem;
}

.chapter-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.chapter-card {
  background-color: white;
  border: 2px dashed var(--secondary-green); /* STRICT: green dashed border */
  border-radius: 0.5rem;
  padding: 15px;
  height: 130px; /* STRICT: fixed 130px */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  cursor: pointer;
  transition: all 0.2s;
}

.chapter-card:hover {
  background-color: var(--bg-light-gray);
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

.chapter-card .card-icon {
  font-size: 2.5rem;
  color: var(--primary-blue);
  margin-bottom: 0.5rem;
}

.chapter-card .card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
}

.chapter-card .card-number {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: var(--secondary-green);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

/* ========== Tables ========== */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background-color: var(--bg-white);
  border: 1px solid var(--border-gray);
}

thead {
  background-color: var(--bg-light-gray);
}

thead th {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-dark);
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-gray);
}

tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-gray);
  font-size: 1rem;
  color: var(--text-dark);
}

tbody tr:hover {
  background-color: var(--bg-light-gray);
}

/* ========== Lists ========== */
ul, ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* ========== Buttons ========== */
.btn {
  padding: 0.5rem 1.5rem;
  border-radius: 0.375rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background-color: var(--primary-blue);
  color: white;
}

.btn-primary:hover {
  background-color: #0b5ed7;
  transform: scale(1.05);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-blue);
  border: 1px solid var(--primary-blue);
}

.btn-secondary:hover {
  background-color: var(--bg-light-gray);
}

/* ========== Cards ========== */
.card {
  background-color: white;
  border: 1px solid var(--border-gray);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card:hover {
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

/* ========== Calculator Components ========== */
.calculator-container {
  background-color: var(--bg-light-gray);
  border: 1px solid var(--border-gray);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin: 2rem 0;
}

.calculator-container h4 {
  color: var(--primary-blue);
  margin-bottom: 1rem;
}

.calculator-input-group {
  margin-bottom: 1rem;
}

.calculator-input-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.calculator-input-group input,
.calculator-input-group select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border-gray);
  border-radius: 0.25rem;
  font-size: 1rem;
}

.calculator-output {
  background-color: white;
  padding: 1rem;
  border-radius: 0.25rem;
  margin-top: 1rem;
  border-left: 4px solid var(--primary-blue);
}

/* ========== Utility Classes ========== */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ========== Responsive (Optional) ========== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-250px);
  }
  
  .main-content {
    margin-left: 0;
    width: 100%;
  }
  
  .chapter-cards-grid {
    grid-template-columns: 1fr;
  }
}
