/* ═══════════════════════════════════════════════════════════════
   KoPeOn — Mintafájlok (Templates) oldal stílusok
   ═══════════════════════════════════════════════════════════════ */

/* ── Szekciók ─ */
.wiki-section {
    padding: 32px 0;
    border-bottom: 2px solid var(--ink);
    scroll-margin-top: 100px;
}

.wiki-section:first-child { padding-top: 16px; }
.wiki-section:last-child { border-bottom: none; }

.wiki-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.wiki-section-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    border: 2.5px solid var(--ink);
    box-shadow: 2px 2px 0 var(--ink);
}

.wiki-section-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    letter-spacing: -0.01em;
}

/* Panel intro (eszköz leírás) */
.wiki-panel-intro {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px;
    background: var(--card-bg);
    border: 2.5px solid var(--ink);
    border-radius: var(--radius-md);
    box-shadow: 3px 3px 0 var(--ink);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.wiki-panel-intro-body { flex: 1 1 320px; min-width: 0; }

.wiki-panel-intro-body h3 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
}

.wiki-panel-intro-body p {
    margin: 0;
    font-size: 13.5px;
    color: var(--text-light);
    line-height: 1.65;
}

/* ── Alszekciók (faq-section) a wiki-section-ökön belül ─ */
.faq-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--ink);
}

.faq-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.faq-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.faq-section-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background: var(--primary-color);
    color: var(--primary-on);
    border: 2px solid var(--ink);
    box-shadow: 2px 2px 0 var(--ink);
}

.faq-section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
}

.faq-section-body { padding-left: 42px; }

.faq-list--ordered {
    margin: 0;
    padding-left: 20px;
}

.faq-list--ordered li {
    font-size: 13.5px;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 8px;
}

.faq-list--ordered li::marker {
    color: var(--primary-color);
    font-weight: 700;
}

/* ── Info boxok ── */
.faq-info-box {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: var(--faq-subtle);
    border: 2px solid var(--ink);
    border-left: 3px solid var(--faq-primary);
    margin: 14px 0;
    align-items: flex-start;
}

.faq-info-box:last-child { margin-bottom: 0; }

.faq-info-box > i {
    font-size: 1rem;
    color: var(--faq-primary);
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.faq-info-box div { color: var(--text-light); font-size: 13.5px; line-height: 1.6; }
.faq-info-box strong { color: var(--text-main); }

.faq-info-tip { background: var(--faq-tip-bg); border-left-color: var(--faq-tip); }
.faq-info-tip > i { color: var(--faq-tip); }

/* ═══════════════════════════════════════════════════════════════
   MINTAFÁJLOK (TEMPLATES)
   ═══════════════════════════════════════════════════════════════ */
.tpl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 16px 0; }

.tpl-card {
    background: var(--card-bg);
    border: 2.5px solid var(--ink);
    border-top: 3px solid transparent;
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 3px 3px 0 var(--ink);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tpl-card:hover { transform: translate(-2px, -4px); box-shadow: 5px 7px 0 var(--ink); }

.tpl-card--label     { border-top-color: #facc15; }
.tpl-card--barcode   { border-top-color: #facc15; }
.tpl-card--pricelist { border-top-color: #facc15; }
.tpl-card--sale      { border-top-color: #facc15; }
.tpl-card--warranty  { border-top-color: #facc15; }

.tpl-card-icon { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 16px; color: var(--primary-on); }

.tpl-card--label .tpl-card-icon     { background: var(--primary-color); }
.tpl-card--barcode .tpl-card-icon   { background: var(--primary-color); }
.tpl-card--pricelist .tpl-card-icon { background: var(--primary-color); }
.tpl-card--sale .tpl-card-icon      { background: var(--primary-color); }
.tpl-card--warranty .tpl-card-icon  { background: var(--primary-color); }

.tpl-card h3 { font-family: 'Outfit', sans-serif; font-size: 15px; font-weight: 800; color: var(--text-main); margin: 0; }
.tpl-card > p { font-size: 13px; color: var(--text-light); line-height: 1.6; margin: 0; }

.tpl-cols { display: flex; flex-wrap: wrap; gap: 6px; }
.tpl-col { font-size: 11px; font-weight: 600; color: var(--text-light); background: var(--bg-secondary); border: 2px solid var(--ink); border-radius: 6px; padding: 3px 9px; }

/* ── Eszköz-csoportok (25 kártya áttekinthetően) ── */
.tpl-group { margin: 28px 0; }

.tpl-group-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 2.5px solid var(--ink);
    border-radius: var(--radius-md);
    box-shadow: 3px 3px 0 var(--ink);
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.tpl-group-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    background: #facc15;
    color: var(--primary-on);
    border: 2px solid var(--ink);
}

.tpl-group-text { flex: 1 1 260px; min-width: 0; }

.tpl-group-text h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 3px;
}

.tpl-group-text p { margin: 0; font-size: 12.5px; color: var(--text-light); line-height: 1.55; }

.tpl-group-count {
    margin-left: auto;
    align-self: center;
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-main);
    background: #facc15;
    border: 2px solid var(--ink);
    border-radius: 999px;
    padding: 3px 12px;
    white-space: nowrap;
}

/* ── Kártya fejléc: ikon + formátum jelvények ── */
.tpl-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.tpl-card-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.tpl-badge {
    font-family: 'Outfit', sans-serif;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    background: var(--bg-secondary);
    border: 2px solid var(--ink);
    border-radius: 6px;
    padding: 2px 8px;
    white-space: nowrap;
}

.tpl-badge--xlsx { background: #bbf7d0; color: #14532d; }
.tpl-badge--csv  { background: #bfdbfe; color: #1e3a8a; }

/* ── „Miért fontos?” doboz a kártyákon ── */
.tpl-why {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 8px 10px;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--text-light);
    background: var(--faq-tip-bg);
    border: 2px solid var(--ink);
    border-left: 3px solid var(--faq-tip);
    border-radius: var(--radius-sm);
}

.tpl-why i { color: var(--faq-tip); margin-top: 2px; flex-shrink: 0; }

/* ── Aranyszabályok lista ── */
.tpl-rules { margin: 8px 0 0; padding-left: 20px; }
.tpl-rules li { margin-bottom: 5px; line-height: 1.6; }
.tpl-rules li:last-child { margin-bottom: 0; }

/* ── Oszlopszótár táblázat ── */
.tpl-dict-lead { margin: 0 0 14px; font-size: 13.5px; color: var(--text-light); line-height: 1.65; }

.tpl-dict-wrap {
    overflow-x: auto;
    border: 2.5px solid var(--ink);
    border-radius: var(--radius-md);
    box-shadow: 3px 3px 0 var(--ink);
    background: var(--card-bg);
}

.tpl-dict { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 13px; }

.tpl-dict th {
    text-align: left;
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-main);
    background: var(--bg-secondary);
    padding: 10px 14px;
    border-bottom: 2.5px solid var(--ink);
}

.tpl-dict td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-light);
    line-height: 1.6;
    vertical-align: top;
}

.tpl-dict tbody tr:last-child td { border-bottom: none; }
.tpl-dict td:first-child { white-space: nowrap; }
.tpl-dict .tpl-col { display: inline-block; }

.tpl-btn {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    border: 2.5px solid var(--ink);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 12.5px;
    color: var(--primary-on);
    cursor: pointer;
    transition: all 0.25s ease;
    width: 100%;
    box-shadow: 2px 2px 0 var(--ink);
}

.tpl-btn i { font-size: 13px; }

.tpl-btn--label     { background: var(--primary-color); box-shadow: 2px 2px 0 var(--ink); }
.tpl-btn--barcode   { background: var(--primary-color); box-shadow: 2px 2px 0 var(--ink); }
.tpl-btn--pricelist { background: var(--primary-color); box-shadow: 2px 2px 0 var(--ink); }
.tpl-btn--sale      { background: var(--primary-color); box-shadow: 2px 2px 0 var(--ink); }
.tpl-btn--warranty  { background: var(--primary-color); box-shadow: 2px 2px 0 var(--ink); }

.tpl-btn--label:hover, .tpl-btn--barcode:hover, .tpl-btn--pricelist:hover,
.tpl-btn--sale:hover, .tpl-btn--warranty:hover {
    background: var(--nb-yellow, #facc15);
    color: var(--ink);
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 var(--ink);
}

/* ── Dark mode overrides ── */
[data-theme="dark"] .faq-info-box { border-color: var(--border-color); }
[data-theme="dark"] .faq-section-icon { background: var(--nb-yellow, #facc15); color: var(--ink); }
[data-theme="dark"] .faq-list--ordered li::marker { color: var(--nb-yellow, #facc15); }
[data-theme="dark"] .faq-list--ordered li { color: var(--text-light); }
[data-theme="dark"] .faq-info-box div { color: var(--text-light); }
[data-theme="dark"] .faq-info-box strong { color: var(--text-main); }

/* ── Responsive ── */
@media (max-width: 768px) {
    .tpl-grid { grid-template-columns: 1fr; }
    .wiki-section-header h2 { font-size: 18px; }
    .faq-section-body { padding-left: 0; }
    .tpl-hero-stats { flex-wrap: wrap; gap: 12px; }
    .tpl-hero-stat { min-width: calc(50% - 12px); }
    .tpl-group-header { padding: 12px; }
    .tpl-group-count { margin-left: 48px; }
}

/* ─ Hero stats ── */
.tpl-hero-stats {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.tpl-hero-stat {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.tpl-hero-stat b {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: var(--primary-text);
}

.tpl-hero-stat span {
    font-size: 13px;
    color: var(--text-light);
    font-family: 'Outfit', sans-serif;
}
