/* ─────────────────────────────────────────────────────────────────────────
   help.css — статични страници за документация на BlazorSklad
   ───────────────────────────────────────────────────────────────────────── */

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', 'Inter', Roboto, Arial, sans-serif;
    background: #F8FAFC;
    color: #0F172A;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: #0F766E; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ───────────────────────────────────────────────────────────── */
.help-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

/* ── Sidebar ──────────────────────────────────────────────────────────── */
.help-sidebar {
    background: #fff;
    border-right: 1px solid #E2E8F0;
    padding: 24px 0;
    overflow-y: auto;
    position: sticky;
    top: 0;
    height: 100vh;
}

.help-logo {
    padding: 0 24px 20px;
    border-bottom: 1px solid #E2E8F0;
    margin-bottom: 16px;
}

.help-logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0F172A;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
}

.help-logo a:hover { text-decoration: none; }

.help-logo .logo-icon {
    width: 32px;
    height: 32px;
    background: #0F766E;
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.nav-section { margin-bottom: 20px; }

.nav-section-title {
    padding: 0 24px;
    font-size: 11px;
    font-weight: 700;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.help-sidebar nav a {
    display: block;
    padding: 7px 24px;
    color: #475569;
    font-size: 14px;
    border-left: 3px solid transparent;
    transition: background .12s, color .12s, border-color .12s;
    text-decoration: none;
}

.help-sidebar nav a:hover {
    background: #F1F5F9;
    color: #0F172A;
    text-decoration: none;
}

.help-sidebar nav a.active {
    background: #ECFDF5;
    color: #0F766E;
    border-left-color: #0F766E;
    font-weight: 600;
}

/* ── Content ──────────────────────────────────────────────────────────── */
.help-content {
    padding: 40px 60px 80px;
    max-width: 980px;
    margin: 0 auto;
    width: 100%;
}

.breadcrumb {
    font-size: 13px;
    color: #94A3B8;
    margin-bottom: 16px;
}

.breadcrumb a { color: #64748B; }

h1 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #0F172A;
}

.subtitle {
    font-size: 15px;
    color: #64748B;
    margin: 0 0 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid #E2E8F0;
}

h2 {
    font-size: 22px;
    font-weight: 600;
    margin: 36px 0 12px;
    color: #0F172A;
}

h3 {
    font-size: 17px;
    font-weight: 600;
    margin: 24px 0 8px;
    color: #0F172A;
}

p { margin: 0 0 14px; }

.help-content ul, .help-content ol {
    margin: 0 0 14px;
    padding-left: 24px;
}

.help-content li { margin-bottom: 6px; }

strong { color: #0F172A; font-weight: 600; }

code {
    background: #F1F5F9;
    color: #BE185D;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.92em;
    font-family: 'Consolas', 'Cascadia Code', monospace;
}

/* ── Screenshot blocks ────────────────────────────────────────────────── */
.screenshot {
    margin: 24px 0 32px;
    text-align: center;
}

.screenshot-frame {
    display: inline-block;
    position: relative;
    max-width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.12);
    border: 1px solid #E2E8F0;
    background: #fff;
}

.screenshot-frame img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Placeholder, който се показва ако JPG-то липсва (onerror hook) */
.screenshot-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 280px;
    background:
        repeating-linear-gradient(
            45deg,
            #F1F5F9 0,
            #F1F5F9 14px,
            #E2E8F0 14px,
            #E2E8F0 28px
        );
    color: #64748B;
    font-size: 14px;
    text-align: center;
    padding: 24px;
}

.screenshot-placeholder .placeholder-icon {
    font-size: 36px;
    margin-bottom: 8px;
    opacity: 0.5;
}

.screenshot-placeholder code {
    background: #fff;
    color: #0F766E;
    margin-top: 6px;
}

.screenshot-caption {
    margin-top: 10px;
    font-size: 13px;
    color: #94A3B8;
    font-style: italic;
}

/* ── Info/Note блокове ────────────────────────────────────────────────── */
.note {
    background: #EFF6FF;
    border-left: 4px solid #2563EB;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 16px 0;
    color: #1E3A8A;
    font-size: 14px;
}

.note strong { color: #1E3A8A; }

.warn {
    background: #FFFBEB;
    border-left: 4px solid #D97706;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 16px 0;
    color: #78350F;
    font-size: 14px;
}

.tip {
    background: #ECFDF5;
    border-left: 4px solid #0F766E;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 16px 0;
    color: #064E3B;
    font-size: 14px;
}

/* ── Cards (index page) ───────────────────────────────────────────────── */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.card {
    display: block;
    padding: 20px;
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
    transition: transform .12s, box-shadow .12s, border-color .12s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    border-color: #0F766E;
    text-decoration: none;
}

.card .card-icon {
    font-size: 28px;
    margin-bottom: 10px;
}

.card .card-title {
    font-size: 16px;
    font-weight: 600;
    color: #0F172A;
    margin-bottom: 4px;
}

.card .card-desc {
    font-size: 13px;
    color: #64748B;
    line-height: 1.5;
}

/* ── Prev/Next навигация в дъното ─────────────────────────────────────── */
.pager {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid #E2E8F0;
}

.pager a {
    flex: 1;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    color: #0F172A;
    transition: border-color .12s, background .12s;
    text-decoration: none;
}

.pager a:hover {
    border-color: #0F766E;
    background: #F0FDFA;
    text-decoration: none;
}

.pager a small {
    display: block;
    font-size: 11px;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.pager .pager-prev { text-align: left; }
.pager .pager-next { text-align: right; }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .help-layout { grid-template-columns: 1fr; }
    .help-sidebar {
        position: relative;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #E2E8F0;
    }
    .help-content { padding: 24px 20px 60px; }
    h1 { font-size: 26px; }
}
