:root {
    --primary: #1565c0;
    --primary-dark: #0d47a1;
    --primary-light: #e3f2fd;
    --accent: #00bcd4;
    --text: #263238;
    --text-light: #546e7a;
    --bg: #f5f7fa;
    --white: #ffffff;
    --border: #e0e0e0;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 6px 24px rgba(0,0,0,0.12);
    --radius: 12px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    line-height: 1.6;
}

/* ── NAVBAR ───────────────────────────── */
.navbar-help {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-help .navbar-brand {
    font-weight: 800;
    font-size: 1.3rem;
    color: #fff !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-help .navbar-brand img {
    height: 32px;
}

.navbar-help .nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
    padding: 12px 16px !important;
    transition: all 0.2s;
}

.navbar-help .nav-link:hover,
.navbar-help .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,0.1);
}

/* ── HERO / SEARCH ────────────────────── */
.hero-search {
    background: linear-gradient(135deg, var(--primary) 0%, #1976d2 50%, var(--accent) 100%);
    padding: 60px 0 50px;
    text-align: center;
    color: #fff;
}

.hero-search h1 {
    font-weight: 800;
    font-size: 2.2rem;
    margin-bottom: 8px;
}

.hero-search p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: none;
    border-radius: 50px;
    font-size: 1.05rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    outline: none;
    transition: box-shadow 0.3s;
}

.search-box input:focus {
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

.search-box .search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.1rem;
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    margin-top: 8px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 100;
    text-align: left;
}

.search-results-dropdown.show { display: block; }

.search-result-item {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
    color: var(--text);
    text-decoration: none;
    display: block;
}

.search-result-item:hover {
    background: var(--primary-light);
    color: var(--text);
    text-decoration: none;
}

.search-result-item .result-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.search-result-item .result-category {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ── SYSTEMS GRID ────────────────────── */
.systems-section {
    padding: 50px 0;
}

.system-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
    display: block;
    height: 100%;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.system-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--sys-color, var(--primary));
}

.system-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    color: var(--text);
    text-decoration: none;
    border-color: var(--sys-color, var(--primary-light));
}

.system-card .sys-icon {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 1.8rem;
    color: #fff;
}

.system-card h4 {
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.system-card p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 14px;
}

.system-card .sys-stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 0.78rem;
    color: var(--text-light);
    font-weight: 500;
}

.system-card .sys-stats i {
    margin-right: 4px;
}

/* ── SYSTEM HERO ─────────────────────── */
.system-hero {
    padding: 30px 0 40px;
    color: #fff;
}

/* ── VIDEO CONTAINERS ────────────────── */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius);
    margin: 20px 0;
    box-shadow: var(--shadow);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: var(--radius);
}

.video-container-local {
    margin: 20px 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.video-container-local video {
    width: 100%;
    display: block;
    border-radius: var(--radius);
}

/* ── CATEGORIES GRID ──────────────────── */
.categories-section {
    padding: 50px 0;
}

.section-title {
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--text);
}

.category-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
    display: block;
    height: 100%;
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    color: var(--text);
    text-decoration: none;
    border-color: var(--primary-light);
}

.category-card .cat-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.5rem;
    color: #fff;
}

.category-card h5 {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 8px;
}

.category-card p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

.category-card .article-count {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
}

/* ── ARTICLE LIST ─────────────────────── */
.article-list-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: var(--text);
}

.article-list-item:hover {
    box-shadow: var(--shadow-hover);
    transform: translateX(4px);
    color: var(--text);
    text-decoration: none;
}

.article-list-item .article-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.article-list-item .article-info h6 {
    font-weight: 600;
    margin-bottom: 2px;
}

.article-list-item .article-info p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
}

/* ── ARTICLE PAGE ─────────────────────── */
.article-content {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.article-content h1 {
    font-weight: 800;
    font-size: 1.8rem;
    margin-bottom: 16px;
    color: var(--text);
}

.article-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.article-body {
    font-size: 1rem;
    line-height: 1.8;
}

.article-body img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin: 16px 0;
}

/* ── STEPS ────────────────────────────── */
.step-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
    position: relative;
}

.step-card .step-number {
    position: absolute;
    top: -12px;
    left: -12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(21,101,192,0.3);
}

.step-card h5 {
    font-weight: 700;
    margin-bottom: 10px;
    padding-left: 20px;
}

.step-card .step-description {
    color: var(--text);
    line-height: 1.7;
}

.step-card .step-image {
    margin-top: 16px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.3s;
}

.step-card .step-image:hover {
    transform: scale(1.01);
}

.step-card .step-image img {
    width: 100%;
    display: block;
}

.step-card .step-tip {
    margin-top: 14px;
    background: #fff8e1;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.9rem;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.step-card .step-tip i {
    color: #f57c00;
    margin-top: 3px;
}

/* ── BREADCRUMB ───────────────────────── */
.breadcrumb-help {
    padding: 16px 0;
}

.breadcrumb-help .breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
}

.breadcrumb-help .breadcrumb-item a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb-help .breadcrumb-item.active {
    color: var(--text-light);
}

/* ── SIDEBAR ──────────────────────────── */
.sidebar-related {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.sidebar-related h6 {
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
}

.sidebar-related a {
    display: block;
    padding: 8px 0;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-related a:last-child { border: none; }
.sidebar-related a:hover { color: var(--primary-dark); }

/* ── IMAGE LIGHTBOX ───────────────────── */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.lightbox-overlay.show { display: flex; }

.lightbox-overlay img {
    max-width: 95%;
    max-height: 95%;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10000;
}

/* ── FOOTER ───────────────────────────── */
.footer-help {
    background: var(--text);
    color: rgba(255,255,255,0.7);
    padding: 30px 0;
    text-align: center;
    font-size: 0.85rem;
    margin-top: 60px;
}

.footer-help a {
    color: var(--accent);
    text-decoration: none;
}

/* ── RESPONSIVE ───────────────────────── */
@media (max-width: 768px) {
    .hero-search { padding: 40px 15px 30px; }
    .hero-search h1 { font-size: 1.6rem; }
    .article-content { padding: 24px 18px; }
    .step-card { padding: 20px 16px; }
}

/* ── ADMIN ────────────────────────────── */
.admin-sidebar {
    background: var(--text);
    min-height: 100vh;
    padding: 20px 0;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 10px 20px;
    font-size: 0.9rem;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.admin-header {
    background: var(--white);
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
