/* Wireless Network Security Design Guide - Shared Styles */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f8f9fa;
  color: #212529;
  line-height: 1.6;
}

/* ===== LEFT SIDEBAR ===== */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: 280px;
  height: 100vh;
  background: #ffffff;
  border-right: 1px solid #dee2e6;
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow: hidden;
}

.sidebar-logo {
  padding: 12px 16px;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  flex-shrink: 0;
  text-align: center;
}

.sidebar-logo img {
  max-width: 160px;
  height: auto;
}

.sidebar-logo a.site-url {
  display: block;
  margin-top: 6px;
  color: #0d6efd;
  font-size: 0.8rem;
  text-decoration: none;
}

.sidebar-logo a.site-url:hover { text-decoration: underline; }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  height: 80px;
  padding: 12px 16px;
  cursor: pointer;
  text-decoration: none;
  color: #212529;
  border-left: 4px solid transparent;
  transition: background 0.2s;
  position: relative;
}

.nav-item:hover { background: #f8f9fa; }

.nav-item.active {
  border-left-color: #0d6efd;
  background: #f8f9fa;
}

.nav-item svg {
  width: 24px; height: 24px;
  color: #0d6efd;
  flex-shrink: 0;
  margin-right: 16px;
}

.nav-item-text {
  font-size: 0.875rem;
  line-height: 1.3;
  color: #212529;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  margin-left: 280px;
  min-height: 100vh;
  background: #ffffff;
  padding: 40px 50px;
}

.content-wrapper {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

/* ===== HERO SECTION ===== */
.hero {
  background: linear-gradient(135deg, #0d6efd 0%, #5dade2 100%);
  border-radius: 16px;
  padding: 60px 50px;
  margin-bottom: 40px;
  max-width: 1000px;
}

.hero-tag {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  color: #ffffff;
  font-size: 0.875rem;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.hero h1 {
  color: #ffffff !important;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
}

.hero p {
  color: rgba(255,255,255,0.9);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 28px;
  max-width: 700px;
}

.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-primary-hero {
  background: #ffffff;
  color: #0d6efd;
  border: none;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s;
}
.btn-primary-hero:hover { background: #f0f0f0; transform: translateY(-1px); }

.btn-secondary-hero {
  background: transparent;
  color: #ffffff;
  border: 2px solid rgba(255,255,255,0.8);
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s;
}
.btn-secondary-hero:hover { background: rgba(255,255,255,0.1); }

/* ===== TYPOGRAPHY ===== */
h1 { font-size: 2.5rem; font-weight: 700; color: #0d6efd; margin-bottom: 1rem; }
h2 { font-size: 2rem; font-weight: 700; color: #0d6efd; margin-bottom: 1rem; margin-top: 2rem; }
h3 { font-size: 1.5rem; font-weight: 600; color: #0d6efd; margin-bottom: 0.75rem; margin-top: 1.5rem; }
h4 { font-size: 1.25rem; font-weight: 600; color: #0d6efd; margin-bottom: 0.5rem; margin-top: 1.25rem; }

p { font-size: 1rem; color: #212529; line-height: 1.6; margin-bottom: 1.5rem; }

.subtitle { font-size: 0.875rem; color: #6c757d; margin-bottom: 1rem; }

hr.section-divider { border: none; border-top: 1px solid #dee2e6; margin: 1.5rem 0; }

/* ===== PAGE TITLE ===== */
.page-title-area { margin-bottom: 2rem; }
.page-title-area h1 { margin-bottom: 0.5rem; }
.page-title-area .subtitle { margin-bottom: 0; }

/* ===== CARDS ===== */
.card {
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.075);
  padding: 24px;
  margin-bottom: 24px;
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.12); }

/* ===== CHAPTER NAV GRID ===== */
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 32px 0;
}

.chapter-card {
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
  height: 130px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  position: relative;
  box-shadow: 0 2px 4px rgba(0,0,0,0.075);
  transition: all 0.2s;
  overflow: hidden;
}
.chapter-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.12); transform: translateY(-2px); }

.chapter-card-icon {
  width: 40px; height: 40px;
  color: #0d6efd;
  flex-shrink: 0;
}

.chapter-card-title {
  font-size: 1rem;
  font-weight: 500;
  color: #333333;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.chapter-badge {
  position: absolute;
  top: 8px; right: 8px;
  background: #0d6efd;
  color: #ffffff;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ===== IMAGES ===== */
.figure-container {
  margin: 24px 0;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  overflow: hidden;
  background: #f8f9fa;
}

.figure-container img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 3/2;
  object-fit: cover;
}

.figure-caption {
  padding: 10px 16px;
  font-size: 0.875rem;
  color: #6c757d;
  background: #f8f9fa;
  border-top: 1px solid #dee2e6;
  text-align: center;
}

/* ===== TABLES ===== */
.table-container {
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid #dee2e6;
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  font-size: 0.875rem;
}

thead th {
  background: #f8f9fa;
  color: #212529;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 12px 16px;
  border-bottom: 2px solid #dee2e6;
  text-align: left;
}

tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid #dee2e6;
  color: #212529;
  line-height: 1.5;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) { background: #f8f9fa; }

/* ===== LISTS ===== */
ul.bullet-list, ol.numbered-list {
  margin: 0 0 1.5rem 0;
  padding-left: 1.5rem;
}

ul.bullet-list li, ol.numbered-list li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
  color: #212529;
}

/* ===== HIGHLIGHT BOXES ===== */
.highlight-box {
  background: #e7f1ff;
  border-left: 4px solid #0d6efd;
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 20px 0;
}

.warning-box {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 20px 0;
}

.success-box {
  background: #d1e7dd;
  border-left: 4px solid #198754;
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 20px 0;
}

/* ===== METRIC CARDS ===== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.metric-card {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0d6efd;
  display: block;
}

.metric-label {
  font-size: 0.8rem;
  color: #6c757d;
  margin-top: 4px;
}

/* ===== SCROLLBAR ===== */
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: #dee2e6; border-radius: 2px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-280px); }
  .main-content { margin-left: 0; padding: 20px; }
  .chapter-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 40px 24px; }
  .hero h1 { font-size: 1.75rem; }
}
