/* ==========================================================================
   SAF-T NARUCHNIK - Index + Rechnik shared styles (hero, chapter grid, CTA)
   Hero reuses home.css's scanline-texture + layered-glow technique, scaled
   down for a guide-page header rather than the homepage's big centered logo.
   ========================================================================== */

@import url("variables.e2ca4fec03f7.css");
@import url("../how-magi-works/components/images.a2dd47bb1340.css");
@import url("../how-magi-works/components/step-flow.9464fc1df71a.css");
@import url("../how-magi-works/components/callouts.041d71b3026f.css");
@import url("../how-magi-works/sections.ef3ed98a7458.css");

/* ── Hero ────────────────────────────────────────────────────────────────── */
.nar-hero {
    position: relative;
    overflow: hidden;
    padding: 3.5rem 0 3rem;
    background: linear-gradient(160deg, var(--hmw-blue-deep) 0%, var(--hmw-blue-dark) 55%, var(--hmw-blue-mid) 100%);
    color: white;
}
.nar-hero::before {
    content: ''; position: absolute; inset: 0;
    background-image: repeating-linear-gradient(0deg, transparent, transparent 4px, rgba(255,255,255,0.02) 4px, rgba(255,255,255,0.02) 5px);
    z-index: 0; pointer-events: none;
}
.nar-hero::after {
    content: ''; position: absolute; inset: -20% 0 auto 0; height: 140%;
    background:
        radial-gradient(ellipse 500px 420px at 50% 12%, var(--nar-glow-1) 0%, transparent 65%),
        radial-gradient(ellipse 650px 540px at 50% 8%, var(--nar-glow-2) 0%, transparent 70%),
        radial-gradient(ellipse 850px 700px at 50% 4%, var(--nar-glow-3) 0%, transparent 75%);
    z-index: 0; pointer-events: none;
}
.nar-hero-content { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; text-align: center; }

/* ── Logo mark + breathing glow (same technique as home.css's hero, scaled
   down for a guide-page header rather than the homepage's larger centerpiece) ── */
.nar-logo-container { display: flex; justify-content: center; margin-bottom: 1.25rem; }
.nar-logo-wrapper {
    display: inline-block; padding: 1.1rem; border-radius: 50%; position: relative;
    background: radial-gradient(circle, rgba(255,255,255,0.98) 0%, rgba(245,250,255,0.95) 100%);
    box-shadow: 0 0 0 2px rgba(120,200,220,0.4), 0 0 30px 10px rgba(255,255,255,0.4), 0 0 60px 20px rgba(93,188,210,0.3);
}
.nar-logo-wrapper::before {
    content: ''; position: absolute; inset: -12px; border-radius: 50%; z-index: -1; filter: blur(14px);
    background: radial-gradient(circle, rgba(255,255,255,0.7) 0%, rgba(200,235,255,0.5) 30%, rgba(120,200,220,0.32) 55%, transparent 85%);
    animation: nar-logo-breathe 4s ease-in-out infinite;
}
.nar-logo { width: 48px; height: auto; display: block; }
@keyframes nar-logo-breathe { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.12); opacity: 0.88; } }

.nar-hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px; border-radius: 999px;
    background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2);
    font-size: 0.8rem; font-weight: 700; margin-bottom: 1.1rem;
}
.nar-hero-title { font-size: 2.1rem; font-weight: 800; color: white; margin-bottom: 0.9rem; line-height: 1.2; }
.nar-hero-subtitle { color: rgba(255,255,255,0.8); font-size: 1.02rem; line-height: 1.65; margin: 0 auto 1.5rem; }
.nar-hero-ctas { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-bottom: 2rem; justify-content: center; }
.nar-hero-ctas .hmw-cta-secondary { background: rgba(255,255,255,0.08); color: white; border-color: rgba(255,255,255,0.35); }
.nar-hero-ctas .hmw-cta-secondary:hover { background: rgba(255,255,255,0.16); color: white; }

.nar-hero-stats { display: flex; gap: 2.5rem; flex-wrap: wrap; justify-content: center; }
.nar-hstat-num { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.nar-hstat-lbl { font-size: 0.72rem; color: rgba(255,255,255,0.65); margin-top: 0.3rem; text-transform: uppercase; letter-spacing: 0.04em; }

/* Smaller variant for the rechnik (glossary) page - no stats/CTAs needed there */
.nar-hero--sm { padding: 2.75rem 0; }

@media (max-width: 640px) {
    .nar-hero { padding: 2.5rem 0 2rem; }
    .nar-hero-title { font-size: 1.6rem; }
}

/* ── Why section (between hero and body) ────────────────────────────────── */
.nar-why-section {
    background: var(--hmw-bg-soft);
    border-top: 1px solid var(--hmw-border-blue);
    border-bottom: 1px solid var(--hmw-border-blue);
    padding: 3rem 0;
}
.nar-why-inner {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.25rem;
    max-width: 900px; margin: 0 auto; padding: 0 20px;
}
.nar-why-card {
    background: white; border: 1px solid var(--hmw-border-soft); border-radius: 14px;
    padding: 1.5rem 1.4rem; display: flex; flex-direction: column; gap: 0.7rem;
    box-shadow: 0 2px 10px rgba(10,37,64,0.05);
}
.nar-why-icon {
    width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
    background: var(--hmw-bg-soft); border: 1px solid var(--hmw-border-blue);
    display: flex; align-items: center; justify-content: center;
    color: var(--hmw-blue-mid);
}
.nar-why-icon svg { width: 19px; height: 19px; }
.nar-why-card h3 { font-size: 0.96rem; font-weight: 700; color: var(--hmw-text-dark); margin: 0; line-height: 1.3; }
.nar-why-card p { font-size: 0.84rem; color: var(--hmw-text-muted); line-height: 1.65; margin: 0; }

@media (max-width: 768px) {
    .nar-why-inner { grid-template-columns: 1fr; }
    .nar-why-section { padding: 2rem 0; }
}

/* ── Index body ──────────────────────────────────────────────────────────── */
/* Specificity bumped to `.container.nar-index-body` on purpose - base.css's
   `main .container` rule (0,1,1) otherwise beats a bare `.nar-index-body` (0,1,0)
   and zeroes out this vertical padding, which is what made the glossary page's
   back-link sit flush against the hero above it. */
.container.nar-index-body { max-width: 900px; margin: 0 auto; padding: 3.5rem 20px 2.25rem; }

/* ── Back link (chapter/glossary/error-lookup "← SAF-T наръчник") ──────────── */
.nar-back-link {
    display: inline-flex; align-items: center; gap: 0.4rem;
    color: var(--hmw-text-muted); text-decoration: none;
    font-size: 0.85rem; font-weight: 600;
    margin-bottom: 1.5rem;
    transition: color 0.15s ease;
}
.nar-back-link:hover { color: var(--hmw-blue-mid); }

.nar-section-eyebrow {
    display: block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--hmw-blue-mid); margin-bottom: 0.6rem;
}

/* ── Chapter section header ──────────────────────────────────────────────── */
.nar-chapter-section-header { margin-bottom: 0.85rem; }
.nar-chapter-section-title {
    font-size: 1.1rem; font-weight: 800; color: var(--hmw-text-dark);
    margin: 0.25rem 0 0; line-height: 1.3;
}

/* ── Chapter grid ────────────────────────────────────────────────────────── */
.nar-chapter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 1.5rem; }
.nar-chapter-card {
    display: flex; flex-direction: column; gap: 8px;
    padding: 1.1rem 1.25rem; border-radius: 14px;
    background: white; border: 1px solid var(--hmw-border-soft);
    border-top: 3px solid var(--nar-accent, var(--hmw-blue-mid));
    color: var(--hmw-text-dark); text-decoration: none;
    box-shadow: 0 2px 12px rgba(10,37,64,0.05);
    transition: transform 0.15s, box-shadow 0.15s;
}
.nar-chapter-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(10,37,64,0.12); color: var(--hmw-text-dark); }
.nar-chapter-card-top { display: flex; align-items: center; gap: 0.6rem; }
.nar-chapter-num, .nar-chapter-icon {
    flex-shrink: 0; width: 26px; height: 26px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--nar-accent, var(--hmw-blue-mid)) 15%, transparent);
    color: var(--nar-accent, var(--hmw-blue-mid)); font-weight: 800; font-size: 0.8rem;
}
.nar-chapter-chip {
    margin-left: auto; font-size: 0.66rem; font-weight: 700;
    padding: 3px 9px; border-radius: 20px; background: var(--hmw-bg-page); color: var(--hmw-text-muted);
}
.nar-chapter-title { font-weight: 700; font-size: 1rem; line-height: 1.3; }
.nar-chapter-dek { font-size: 0.82rem; color: var(--hmw-text-muted); line-height: 1.5; flex: 1; }
.nar-chapter-arrow-row { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; font-weight: 700; color: var(--nar-accent, var(--hmw-blue-mid)); margin-top: 0.25rem; }

@media (max-width: 700px) { .nar-chapter-grid { grid-template-columns: 1fr; } }

/* ── Glossary CTA ────────────────────────────────────────────────────────── */
.nar-glossary-cta {
    display: flex; align-items: center; gap: 12px;
    padding: 1.1rem 1.25rem; border-radius: 14px; margin: 0 0 1.5rem;
    background: var(--hmw-bg-soft); border: 1px solid var(--hmw-border-blue);
    color: var(--hmw-text-dark); text-decoration: none; font-weight: 700; font-size: 0.92rem;
}
.nar-glossary-cta i:first-child { color: var(--hmw-blue-mid); flex-shrink: 0; }
.nar-glossary-cta i:last-child { margin-left: auto; color: var(--hmw-text-muted); font-size: 0.85rem; flex-shrink: 0; }

/* ── In-product CTA (see _cta_strip.html) ───────────────────────────────── */
.nar-cta {
    margin: 0.5rem 0 0;
    background: linear-gradient(135deg, var(--hmw-blue-deep) 0%, var(--hmw-blue-dark) 60%, #0e4a6e 100%);
    border-radius: 18px; padding: 2rem 2.25rem 2.25rem; color: white;
    position: relative; overflow: hidden;
}
.nar-cta-header { display: flex; align-items: center; gap: 12px; margin-bottom: 0.9rem; }
.nar-cta-icon {
    flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.22);
    color: white;
}
.nar-cta-icon svg { width: 23px; height: 23px; }
.nar-cta-eyebrow { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--hmw-blue-light); }
.nar-cta-title { font-size: 1.3rem; font-weight: 800; color: white; margin: 0 0 1rem; line-height: 1.3; }
.nar-cta-features { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.35rem; }
.nar-cta-feature {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: 999px;
    background: rgba(255,255,255,0.09); border: 1px solid rgba(255,255,255,0.15);
    font-size: 0.77rem; font-weight: 600; color: rgba(255,255,255,0.88);
}
.nar-cta-feature i { color: var(--hmw-blue-light); font-size: 0.7rem; }
.nar-cta-body { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.nar-cta-sub { flex: 1; min-width: 200px; color: rgba(255,255,255,0.72); font-size: 0.88rem; line-height: 1.65; margin: 0; }
.nar-cta-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 0.55rem; flex-shrink: 0; }
.nar-cta-btn {
    background: white; color: var(--hmw-blue-deep); padding: 0.68rem 1.4rem;
    border-radius: 10px; font-weight: 800; text-decoration: none; font-size: 0.86rem;
    white-space: nowrap; transition: transform 0.16s, box-shadow 0.16s;
}
.nar-cta-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,0.22); color: var(--hmw-blue-deep); }
.nar-cta-about { font-size: 0.78rem; color: rgba(255,255,255,0.5); text-decoration: none; white-space: nowrap; display: flex; align-items: center; gap: 4px; transition: color 0.14s; }
.nar-cta-about:hover { color: rgba(255,255,255,0.82); }
.nar-cta-about i { font-size: 0.7rem; }

@media (max-width: 640px) {
    .nar-cta { padding: 1.75rem 1.5rem; }
    .nar-cta-title { font-size: 1.1rem; }
    .nar-cta-body { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .nar-cta-actions { flex-direction: row; align-items: center; }
}

/* ── Gildiyata crosspromo section ────────────────────────────────────────── */
.nar-gldpromo {
    padding: 2.25rem 0 4.5rem;
    background: linear-gradient(180deg, #0a1929 0%, #0d2540 100%);
}
.nar-gldpromo .nar-cta { margin: 0 0 1.25rem; }
.nar-gldpromo-card {
    display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(201,162,39,.22);
    border-left: 3px solid #c9a227;
    border-radius: 14px; padding: 40px 44px;
    box-shadow: 0 4px 32px rgba(0,0,0,.35), inset 0 1px 0 rgba(201,162,39,.08);
}
.nar-gldpromo-eyebrow {
    display: flex; align-items: center; gap: 9px; margin-bottom: 14px;
    font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #c9a227;
}
.nar-gldpromo-logo { width: 22px; height: 22px; object-fit: contain; filter: drop-shadow(0 0 5px rgba(201,162,39,.45)); }
.nar-gldpromo-title { font-size: 1.65rem; font-weight: 800; color: #fff; line-height: 1.25; margin: 0 0 14px; letter-spacing: -.01em; }
.nar-gldpromo-body { font-size: .9rem; color: rgba(255,255,255,.65); line-height: 1.65; margin: 0 0 24px; }
.nar-gldpromo-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.nar-gldpromo-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 20px; border-radius: 22px; font-size: .82rem; font-weight: 700;
    text-decoration: none; transition: all .22s ease; white-space: nowrap;
}
.nar-gldpromo-btn--quiz {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white; border: none; box-shadow: 0 3px 12px rgba(16,185,129,.3);
}
.nar-gldpromo-btn--quiz:hover {
    background: linear-gradient(135deg, #34d399, #10b981); color: white;
    transform: translateY(-1px); box-shadow: 0 5px 18px rgba(16,185,129,.4); text-decoration: none;
}
.nar-gldpromo-btn--gold {
    background: linear-gradient(135deg, #c9a227, #a87e1a);
    color: #0a1929; border: none; box-shadow: 0 3px 12px rgba(201,162,39,.3);
}
.nar-gldpromo-btn--gold:hover {
    background: linear-gradient(135deg, #dbb935, #c9a227); color: #0a1929;
    transform: translateY(-1px); box-shadow: 0 5px 18px rgba(201,162,39,.4); text-decoration: none;
}
.nar-gldpromo-btn--ghost {
    background: rgba(255,255,255,.06); color: rgba(255,255,255,.6);
    border: 1px solid rgba(255,255,255,.15);
}
.nar-gldpromo-btn--ghost:hover {
    background: rgba(255,255,255,.1); color: rgba(255,255,255,.85);
    transform: translateY(-1px); text-decoration: none;
}
.nar-gldpromo-features { display: flex; flex-direction: column; gap: 16px; }
.nar-gldpromo-feat { display: flex; align-items: flex-start; gap: 14px; }
.nar-gldpromo-feat > i {
    font-size: .95rem; color: #c9a227; margin-top: 2px; flex-shrink: 0;
    width: 18px; text-align: center; filter: drop-shadow(0 0 4px rgba(201,162,39,.3));
}
.nar-gldpromo-feat--green > i {
    color: #10b981; filter: drop-shadow(0 0 4px rgba(16,185,129,.35));
}
.nar-gldpromo-feat > div { display: flex; flex-direction: column; gap: 2px; }
.nar-gldpromo-feat strong { font-size: .84rem; font-weight: 700; color: rgba(255,255,255,.9); line-height: 1.3; }
.nar-gldpromo-feat span { font-size: .77rem; color: rgba(255,255,255,.48); line-height: 1.4; }

@media (max-width: 860px) {
    .nar-gldpromo-card { grid-template-columns: 1fr; gap: 28px; padding: 28px 24px; }
    .nar-gldpromo-title { font-size: 1.35rem; }
    .nar-gldpromo { padding: 2.5rem 0 3.5rem; }
}
