/* ═══════════════════════════════════════════════════
   dokumentasi.indotek.id — Main Stylesheet
   EMS by Indotek | CV Indo Berkah Teknologi
   ═══════════════════════════════════════════════════ */

/* ─── Custom Properties ─────────────────────────── */
:root {
  --brand-primary:   #0a3d91;
  --brand-secondary: #1565c0;
  --brand-accent:    #f57c00;
  --brand-light:     #e8f0fe;
  --text-main:       #1a1a2e;
  --text-muted:      #6c757d;
  --border-color:    #e4e8ef;
  --card-shadow:     0 2px 12px rgba(10,61,145,.08);
  --card-shadow-hover: 0 8px 32px rgba(10,61,145,.15);
  --radius-card:     14px;
  --radius-sm:       8px;
  --transition:      .22s ease;
}

/* ─── Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background: #f7f9fc;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--brand-secondary); text-decoration: none; }
a:hover { color: var(--brand-primary); }

/* ─── Top Bar ────────────────────────────────────── */
.topbar {
  background: var(--brand-primary);
  color: #fff;
  font-size: .78rem;
  padding: 5px 0;
}
.topbar-wa {
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  opacity: .9;
  transition: var(--transition);
}
.topbar-wa:hover { color: #fff; opacity: 1; text-decoration: underline; }

/* ─── Navbar ─────────────────────────────────────── */
#mainNav {
  background: #fff;
  border-bottom: 2px solid var(--brand-light);
  padding: 10px 0;
}

/* Brand */
.brand-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.brand-icon-sm { width: 34px; height: 34px; font-size: .95rem; }

.brand-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--brand-primary);
  line-height: 1.1;
}
.brand-sub {
  font-size: .7rem;
  color: var(--text-muted);
  line-height: 1;
}

/* Nav links */
.navbar-nav .nav-link {
  color: var(--text-main) !important;
  font-size: .88rem;
  font-weight: 500;
  padding: 7px 12px !important;
  border-radius: 7px;
  transition: var(--transition);
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  background: var(--brand-light);
  color: var(--brand-primary) !important;
}

/* Dropdown */
.dropdown-menu-docs {
  min-width: 260px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 8px;
  margin-top: 6px;
}
.dropdown-menu-docs .dropdown-item {
  border-radius: var(--radius-sm);
  font-size: .88rem;
  padding: 7px 12px;
  color: var(--text-main);
  transition: var(--transition);
}
.dropdown-menu-docs .dropdown-item:hover {
  background: var(--brand-light);
  color: var(--brand-primary);
}

/* Search form */
.search-form .form-control {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  border-color: var(--border-color);
  font-size: .88rem;
  width: 220px;
  transition: var(--transition);
}
.search-form .form-control:focus {
  border-color: var(--brand-secondary);
  box-shadow: 0 0 0 3px rgba(21,101,192,.1);
  width: 260px;
}
.btn-search {
  background: var(--brand-secondary);
  color: #fff;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  border: none;
  padding: 6px 14px;
  transition: var(--transition);
}
.btn-search:hover { background: var(--brand-primary); color: #fff; }

/* ─── Hero Section ───────────────────────────────── */
.hero-section {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 60%, #1e88e5 100%);
  color: #fff;
  padding: 64px 0 48px;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: -60px; right: -80px;
  width: 400px; height: 400px;
  background: rgba(255,255,255,.05);
  border-radius: 50%;
}
.hero-section::after {
  content: '';
  position: absolute;
  bottom: -100px; left: -50px;
  width: 300px; height: 300px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: .82rem;
  margin-bottom: 18px;
}
.hero-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 14px;
}
.hero-title span { color: #ffd54f; }
.hero-desc {
  font-size: 1rem;
  opacity: .85;
  max-width: 540px;
  margin-bottom: 28px;
}

/* Hero Search */
.hero-search-wrap {
  max-width: 520px;
}
.hero-search-wrap .input-group .form-control {
  height: 50px;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important;
  border: none;
  font-size: .95rem;
  padding-left: 18px;
}
.hero-search-wrap .form-control:focus { box-shadow: none; outline: none; }
.hero-search-wrap .btn {
  height: 50px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
  background: var(--brand-accent);
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 0 22px;
  font-size: .92rem;
  transition: var(--transition);
}
.hero-search-wrap .btn:hover { background: #e65100; }

/* Hero stats */
.hero-stats {
  display: flex;
  gap: 28px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.hero-stat {
  text-align: center;
}
.hero-stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
}
.hero-stat-label {
  font-size: .75rem;
  opacity: .7;
  margin-top: 2px;
}

/* ─── Section titles ─────────────────────────────── */
.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--brand-primary);
  margin-bottom: 4px;
}
.section-subtitle {
  font-size: .88rem;
  color: var(--text-muted);
}

/* ─── Category Cards ─────────────────────────────── */
.cat-card {
  background: #fff;
  border-radius: var(--radius-card);
  padding: 28px 24px;
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
  border-color: transparent;
  color: inherit;
  text-decoration: none;
}
.cat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--cat-color, var(--brand-primary));
  opacity: 0;
  transition: var(--transition);
}
.cat-card:hover::after { opacity: 1; }

.cat-icon-wrap {
  width: 52px; height: 52px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 14px;
  flex-shrink: 0;
}
.cat-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}
.cat-desc {
  font-size: .83rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}
.cat-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}
.cat-count {
  font-size: .8rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}
.cat-arrow {
  font-size: .9rem;
  opacity: 0;
  transform: translateX(-4px);
  transition: var(--transition);
}
.cat-card:hover .cat-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ─── Article List (in category) ─────────────────── */
.article-list-item {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 20px 22px;
  transition: var(--transition);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.article-list-item:hover {
  border-color: var(--brand-secondary);
  box-shadow: var(--card-shadow-hover);
  transform: translateX(4px);
}
.article-list-item a {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text-main);
}
.article-list-item a:hover { color: var(--brand-primary); }
.article-num {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--brand-light);
  color: var(--brand-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ─── Single Article ─────────────────────────────── */
.article-wrap {
  background: #fff;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-color);
  padding: 36px 40px;
  box-shadow: var(--card-shadow);
}
@media (max-width: 576px) {
  .article-wrap { padding: 22px 18px; }
}
.article-header {
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 20px;
  margin-bottom: 28px;
}
.article-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.article-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 10px;
}
.article-meta {
  font-size: .82rem;
  color: var(--text-muted);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.article-meta i { opacity: .7; }

/* Article content styling */
.article-content h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--brand-primary);
  margin-top: 28px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--brand-light);
}
.article-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 22px;
  margin-bottom: 10px;
}
.article-content p { line-height: 1.75; margin-bottom: 14px; }
.article-content ul, .article-content ol {
  padding-left: 1.4rem;
  margin-bottom: 16px;
}
.article-content li { line-height: 1.7; margin-bottom: 6px; }
.article-content code {
  background: #f3f5f8;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: .88rem;
  color: #d63384;
}
.article-content table { margin: 16px 0; }
.article-content .alert { border-radius: var(--radius-sm); }

/* ─── Sidebar ────────────────────────────────────── */
.sidebar-card {
  background: #fff;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}
.sidebar-card-header {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  color: #fff;
  padding: 14px 20px;
  font-size: .9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-list { list-style: none; padding: 12px; margin: 0; }
.sidebar-list li { padding: 2px 0; }
.sidebar-list li a {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 7px;
  font-size: .85rem;
  color: var(--text-main);
  transition: var(--transition);
  line-height: 1.35;
}
.sidebar-list li a:hover {
  background: var(--brand-light);
  color: var(--brand-primary);
}
.sidebar-list li a.active {
  background: var(--brand-light);
  color: var(--brand-primary);
  font-weight: 600;
}
.sidebar-list li a i { margin-top: 2px; flex-shrink: 0; font-size: .7rem; }

/* ─── Breadcrumb ─────────────────────────────────── */
.breadcrumb-wrap {
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  padding: 10px 0;
}
.breadcrumb {
  margin: 0;
  font-size: .83rem;
}
.breadcrumb-item a { color: var(--brand-secondary); }
.breadcrumb-item.active { color: var(--text-muted); }

/* ─── Search Results ─────────────────────────────── */
.search-result-item {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 20px 24px;
  margin-bottom: 14px;
  transition: var(--transition);
}
.search-result-item:hover {
  border-color: var(--brand-secondary);
  box-shadow: var(--card-shadow-hover);
}
.search-result-item h5 a { color: var(--text-main); font-weight: 700; }
.search-result-item h5 a:hover { color: var(--brand-primary); }
.search-highlight { background: #fff3cd; font-weight: 600; border-radius: 3px; padding: 0 2px; }

/* ─── Footer ─────────────────────────────────────── */
.site-footer {
  background: linear-gradient(135deg, var(--brand-primary), #0d1b4b);
  color: #fff;
  padding: 52px 0 28px;
  margin-top: 60px;
}
.footer-heading {
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links li a {
  color: rgba(255,255,255,.7);
  font-size: .87rem;
  display: inline-flex;
  align-items: center;
  transition: var(--transition);
}
.footer-links li a:hover { color: #fff; }
.footer-contact { list-style: none; padding: 0; margin: 0; }
.footer-contact li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
  font-size: .87rem;
  color: rgba(255,255,255,.7);
}
.footer-contact li i {
  color: var(--brand-accent);
  margin-top: 2px;
  flex-shrink: 0;
}
.footer-contact li a { color: rgba(255,255,255,.7); }
.footer-contact li a:hover { color: #fff; }

.footer-divider { border-color: rgba(255,255,255,.1); margin: 28px 0 20px; }

.social-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,.1);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem;
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,.15);
}
.social-btn:hover {
  background: var(--brand-accent);
  color: #fff;
  border-color: transparent;
}

/* ─── Misc Utilities ─────────────────────────────── */
.page-container { padding: 36px 0 48px; flex: 1; }

.alert { border-left: 4px solid; border-radius: var(--radius-sm); font-size: .9rem; }
.alert-info    { border-color: #0dcaf0; }
.alert-warning { border-color: #ffc107; }
.alert-success { border-color: #198754; }
.alert-danger  { border-color: #dc3545; }

/* Quick access chips */
.quick-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 500;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  text-decoration: none;
  transition: var(--transition);
}
.quick-chip:hover {
  background: rgba(255,255,255,.28);
  color: #fff;
}

/* Empty-state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}
.empty-state i { font-size: 3rem; opacity: .25; }

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 768px) {
  .hero-title { font-size: 1.6rem; }
  .search-form .form-control { width: 160px; }
  .search-form .form-control:focus { width: 180px; }
  .hero-stats { gap: 18px; }
}

@media (max-width: 576px) {
  .hero-section { padding: 40px 0 32px; }
}
