/* =====================================================================
   AXEL PRO Tudástár – nyilvános felület (Bootstrap 5.3 kiegészítés)
   Tudástár oldalak + nyilvános AI webchat közös stílusai.
   ===================================================================== */

:root {
    --tv-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    --tv-navy-950: #071330;
    --tv-navy-900: #0b1d45;
    --tv-navy-800: #132b63;
    --tv-blue-700: #1d4ed8;
    --tv-blue-600: #2563eb;
    --tv-blue-500: #3b82f6;
    --tv-blue-100: #dbeafe;
    --tv-blue-50: #eff6ff;
    --tv-cyan-400: #22d3ee;
    --tv-violet-500: #7c3aed;

    --tv-ink: #0f172a;
    --tv-text: #334155;
    --tv-muted: #64748b;
    --tv-line: #e2e8f0;
    --tv-line-soft: #eef2f7;
    --tv-bg: #f4f7fb;
    --tv-surface: #ffffff;

    --tv-radius: 16px;
    --tv-radius-sm: 10px;
    --tv-shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .06);
    --tv-shadow: 0 4px 6px -2px rgba(15, 23, 42, .05), 0 12px 24px -6px rgba(15, 23, 42, .10);
    --tv-shadow-lg: 0 24px 48px -12px rgba(11, 29, 69, .28);

    --tv-hero-gradient: radial-gradient(1200px 400px at 85% -10%, rgba(34, 211, 238, .28), transparent 60%),
                        radial-gradient(900px 500px at -10% 120%, rgba(124, 58, 237, .30), transparent 60%),
                        linear-gradient(135deg, var(--tv-navy-950) 0%, var(--tv-navy-800) 55%, var(--tv-blue-700) 100%);

    --bs-primary: var(--tv-blue-600);
    --bs-primary-rgb: 37, 99, 235;
    --bs-link-color: var(--tv-blue-600);
    --bs-link-color-rgb: 37, 99, 235;
    --bs-link-hover-color: var(--tv-blue-700);
    --bs-link-hover-color-rgb: 29, 78, 216;
    --bs-body-font-family: var(--tv-font);
    --bs-body-color: var(--tv-text);
    --bs-border-color: var(--tv-line);
}

html { scroll-behavior: smooth; }

body.tv {
    font-family: var(--tv-font);
    background: var(--tv-bg);
    color: var(--tv-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.tv h1, .tv h2, .tv h3, .tv h4, .tv h5, .tv h6 { color: var(--tv-ink); letter-spacing: -.015em; }
.tv a { text-decoration: none; }
.tv a:hover { text-decoration: none; }
.tv ::selection { background: var(--tv-blue-100); }

/* ---------- Gombok ---------- */
.tv .btn { font-weight: 600; border-radius: 10px; }
.tv .btn-primary {
    --bs-btn-bg: var(--tv-blue-600); --bs-btn-border-color: var(--tv-blue-600);
    --bs-btn-hover-bg: var(--tv-blue-700); --bs-btn-hover-border-color: var(--tv-blue-700);
    --bs-btn-active-bg: var(--tv-navy-800); --bs-btn-active-border-color: var(--tv-navy-800);
    --bs-btn-disabled-bg: var(--tv-blue-500); --bs-btn-disabled-border-color: var(--tv-blue-500);
}
.tv .btn-soft {
    background: var(--tv-blue-50); color: var(--tv-blue-700); border: 1px solid var(--tv-blue-100);
}
.tv .btn-soft:hover { background: var(--tv-blue-100); color: var(--tv-navy-800); }
.tv .btn-ai {
    color: #fff; border: 0;
    background: linear-gradient(135deg, var(--tv-violet-500), var(--tv-blue-600));
    box-shadow: 0 6px 16px -6px rgba(124, 58, 237, .6);
}
.tv .btn-ai:hover, .tv .btn-ai:focus { color: #fff; filter: brightness(1.08); }

/* ---------- Felső navigáció ---------- */
.tv-navbar {
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--tv-line);
    min-height: 64px;
}
.tv-brand { display: flex; align-items: center; gap: .65rem; color: var(--tv-ink); }
.tv-brand:hover { color: var(--tv-ink); }
.tv-brand img { width: 36px; height: 36px; object-fit: contain; }
.tv-brand-title { font-weight: 800; font-size: 1.05rem; line-height: 1.1; letter-spacing: -.02em; }
.tv-brand-sub { display: block; font-size: .75rem; font-weight: 500; color: var(--tv-muted); letter-spacing: 0; }
.tv-navbar .nav-link {
    color: var(--tv-text); font-weight: 600; font-size: .95rem;
    padding: .5rem .85rem !important; border-radius: 10px;
}
.tv-navbar .nav-link:hover { color: var(--tv-ink); background: var(--tv-line-soft); }
.tv-navbar .nav-link.active { color: var(--tv-blue-700); background: var(--tv-blue-50); }
.tv-navbar .navbar-toggler { border: 0; padding: .4rem .55rem; border-radius: 10px; }
.tv-navbar .navbar-toggler:focus { box-shadow: 0 0 0 3px var(--tv-blue-100); }
.tv-nav-search { max-width: 280px; }
.tv-nav-search .form-control { border-radius: 10px 0 0 10px; background: var(--tv-bg); border-color: var(--tv-line); }
.tv-nav-search .btn { border-radius: 0 10px 10px 0; }
@media (max-width: 991.98px) {
    .tv-navbar .navbar-collapse { padding: .75rem 0 1rem; }
    .tv-navbar .navbar-nav { gap: .15rem; }
    .tv-navbar .btn-ai { width: 100%; margin-top: .5rem; }
}

/* ---------- Hero / keresés ---------- */
.tv-hero {
    position: relative;
    background: var(--tv-hero-gradient);
    color: #fff;
    overflow: hidden;
}
.tv-hero::after {
    /* finom rácsminta a mélységért */
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
            mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
}
.tv-hero > .container { position: relative; z-index: 1; }
.tv-hero-lg { padding: 4.5rem 0 5.5rem; }
.tv-hero-sm { padding: 2.25rem 0 2.75rem; }
.tv-eyebrow {
    display: inline-flex; align-items: center; gap: .45rem;
    font-size: .8rem; font-weight: 600; letter-spacing: .02em;
    padding: .35rem .8rem; border-radius: 999px;
    background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18);
    color: #e0ecff;
}
.tv-hero h1 { color: #fff; font-weight: 800; letter-spacing: -.03em; }
.tv-hero-lg h1 { font-size: clamp(2rem, 4.4vw, 3.25rem); margin: 1rem 0 .75rem; }
.tv-hero-lg .lead { color: #c7d7f5; font-size: clamp(1rem, 1.6vw, 1.2rem); max-width: 640px; margin: 0 auto; }

.tv-search {
    display: flex; align-items: center; gap: .5rem;
    background: #fff; border-radius: 18px; padding: .45rem;
    box-shadow: var(--tv-shadow-lg);
    max-width: 760px; margin: 0 auto;
    transition: box-shadow .2s ease;
}
.tv-search:focus-within { box-shadow: var(--tv-shadow-lg), 0 0 0 4px rgba(59, 130, 246, .35); }
.tv-search .tv-search-icon { color: var(--tv-muted); font-size: 1.25rem; padding-left: .85rem; }
.tv-search input {
    flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent;
    font-size: 1.15rem; color: var(--tv-ink); padding: .7rem .25rem;
}
.tv-search input::placeholder { color: #94a3b8; }
.tv-search .btn { padding: .8rem 1.5rem; border-radius: 13px; font-size: 1rem; white-space: nowrap; }
.tv-hero-sm .tv-search { max-width: 100%; border-radius: 14px; padding: .35rem; }
.tv-hero-sm .tv-search input { font-size: 1.05rem; padding: .55rem .25rem; }
.tv-hero-sm .tv-search .btn { padding: .6rem 1.2rem; border-radius: 10px; }
@media (max-width: 575.98px) {
    .tv-hero-lg { padding: 2.75rem 0 3.5rem; }
    .tv-search input { font-size: 1rem; }
    .tv-search .btn { padding: .7rem 1rem; }
    .tv-search .btn .tv-btn-label { display: none; }
}

.tv-quick { margin-top: 1.5rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; align-items: center; }
.tv-quick-label { color: #a9bde3; font-size: .85rem; font-weight: 500; margin-right: .25rem; }
.tv-chip-glass {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .35rem .8rem; border-radius: 999px; font-size: .85rem; font-weight: 500;
    color: #fff; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2);
    transition: background .15s ease, transform .15s ease;
}
.tv-chip-glass:hover { color: #fff; background: rgba(255, 255, 255, .2); transform: translateY(-1px); }
.tv-hero-ai {
    margin-top: 1.75rem; color: #c7d7f5; font-size: .95rem;
}
.tv-hero-ai a { color: #fff; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,.4); display: inline-block; white-space: nowrap; }
.tv-hero-ai a:hover { border-bottom-color: #fff; }

/* oldalfejléc a belső oldalakon */
.tv-page-title { color: #fff; font-weight: 800; font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0; }
.tv-page-sub { color: #b8c9ea; margin: .35rem 0 0; font-size: .95rem; }
.tv-hero .breadcrumb { --bs-breadcrumb-divider-color: rgba(255,255,255,.45); --bs-breadcrumb-item-active-color: #dbe7ff; font-size: .85rem; margin-bottom: .75rem; }
.tv-hero .breadcrumb a { color: #a9c3f5; }
.tv-hero .breadcrumb a:hover { color: #fff; }

/* ---------- Tartalom ---------- */
.tv-main { padding: 2.5rem 0 3.5rem; }
.tv-main-overlap { margin-top: -2.5rem; position: relative; z-index: 2; padding-top: 0; }

.tv-card {
    background: var(--tv-surface); border: 1px solid var(--tv-line);
    border-radius: var(--tv-radius); box-shadow: var(--tv-shadow-sm);
}
.tv-section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.tv-section-title { font-size: 1.35rem; font-weight: 800; margin: 0; }
.tv-section-sub { color: var(--tv-muted); font-size: .92rem; margin: .2rem 0 0; }

/* témakör kártyák */
.tv-cat {
    height: 100%; display: flex; flex-direction: column; padding: 1.35rem 1.35rem 1rem;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.tv-cat:hover { transform: translateY(-3px); box-shadow: var(--tv-shadow); border-color: #cddcf5; }
.tv-cat-head { display: flex; align-items: flex-start; gap: .9rem; margin-bottom: .9rem; }
.tv-cat-icon {
    flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px;
    display: grid; place-items: center; font-size: 1.25rem;
    color: var(--tv-blue-700); background: linear-gradient(135deg, var(--tv-blue-50), var(--tv-blue-100));
}
.tv-cat-title { font-size: 1.05rem; font-weight: 700; margin: 0; line-height: 1.3; }
.tv-cat-title a { color: var(--tv-ink); }
.tv-cat-title a:hover { color: var(--tv-blue-700); }
.tv-cat-count { font-size: .8rem; color: var(--tv-muted); font-weight: 500; margin-top: .15rem; }
.tv-cat-list { list-style: none; padding: 0; margin: 0 0 .75rem; flex: 1 1 auto; }
.tv-cat-list li + li { border-top: 1px dashed var(--tv-line-soft); }
.tv-cat-list a {
    display: flex; gap: .55rem; align-items: baseline; padding: .45rem 0;
    color: var(--tv-text); font-size: .93rem; line-height: 1.4;
}
.tv-cat-list a i { color: #94a3b8; font-size: .85rem; }
.tv-cat-list a:hover { color: var(--tv-blue-700); }
.tv-cat-list a:hover i { color: var(--tv-blue-600); }
.tv-cat-more { font-size: .88rem; font-weight: 600; color: var(--tv-blue-600); display: inline-flex; align-items: center; gap: .3rem; }
.tv-cat-more:hover { gap: .5rem; color: var(--tv-blue-700); }
.tv-cat-more { transition: gap .15s ease; }

/* cikk listaelemek */
.tv-article-item {
    display: block; padding: 1.25rem 1.35rem; color: inherit;
    transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}
.tv-article-item + .tv-article-item { margin-top: .85rem; }
.tv-article-item:hover { color: inherit; box-shadow: var(--tv-shadow); border-color: #cddcf5; transform: translateY(-2px); }
.tv-article-item h3 { font-size: 1.08rem; font-weight: 700; margin: 0 0 .35rem; line-height: 1.35; }
.tv-article-item:hover h3 { color: var(--tv-blue-700); }
.tv-article-item p {
    color: var(--tv-muted); font-size: .93rem; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.tv-article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.tv-badge-cat {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .75rem; font-weight: 600; color: var(--tv-blue-700);
    background: var(--tv-blue-50); border-radius: 999px; padding: .2rem .6rem;
}
.tv-article-go { font-size: .85rem; font-weight: 600; color: var(--tv-blue-600); margin-top: .65rem; display: inline-flex; gap: .3rem; align-items: center; }

.hilite { background: #fef08a; color: var(--tv-ink); border-radius: 3px; padding: 0 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* cikk oldal */
.tv-article { padding: clamp(1.25rem, 3vw, 2.5rem); }
.tv-article-title { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; line-height: 1.2; margin: .5rem 0 1rem; }
.tv-article-lead {
    font-size: 1.05rem; color: var(--tv-text); background: var(--tv-blue-50);
    border-left: 4px solid var(--tv-blue-500); border-radius: 0 12px 12px 0; padding: 1rem 1.25rem; margin-bottom: 1.5rem;
}
.tv-prose { font-size: 1.02rem; line-height: 1.75; color: #1e293b; overflow-wrap: anywhere; }
.tv-prose h1, .tv-prose h2, .tv-prose h3, .tv-prose h4 { margin: 1.75rem 0 .75rem; font-weight: 700; line-height: 1.3; }
.tv-prose h1 { font-size: 1.6rem; } .tv-prose h2 { font-size: 1.4rem; } .tv-prose h3 { font-size: 1.2rem; } .tv-prose h4 { font-size: 1.05rem; }
.tv-prose p { margin-bottom: 1rem; }
.tv-prose a { color: var(--tv-blue-600); text-decoration: underline; text-decoration-color: rgba(37, 99, 235, .35); text-underline-offset: 3px; }
.tv-prose a:hover { text-decoration-color: currentColor; }
.tv-prose img { max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--tv-line); box-shadow: var(--tv-shadow-sm); }
.tv-prose figure { margin: 1.5rem 0; max-width: 100%; }
.tv-prose figure.image { display: table; margin-left: auto; margin-right: auto; }
.tv-prose figcaption { font-size: .85rem; color: var(--tv-muted); text-align: center; margin-top: .5rem; }
.tv-prose ul, .tv-prose ol { padding-left: 1.4rem; margin-bottom: 1rem; }
.tv-prose li { margin-bottom: .35rem; }
.tv-prose table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: .95rem; display: block; overflow-x: auto; }
.tv-prose table td, .tv-prose table th { border: 1px solid var(--tv-line); padding: .55rem .75rem; vertical-align: top; }
.tv-prose table th, .tv-prose table thead td { background: var(--tv-bg); font-weight: 600; }
.tv-prose blockquote { border-left: 4px solid var(--tv-line); padding: .25rem 0 .25rem 1rem; color: var(--tv-muted); margin: 1.25rem 0; }
.tv-prose code { background: var(--tv-line-soft); color: #be185d; padding: .1rem .35rem; border-radius: 5px; font-size: .9em; }
.tv-prose iframe, .tv-prose video { max-width: 100%; border-radius: 10px; }
.tv-prose .media, .tv-prose figure.media { position: relative; }

.tv-article-footer { border-top: 1px solid var(--tv-line); margin-top: 2rem; padding-top: 1.5rem; }
.tv-footer-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--tv-muted); margin-bottom: .75rem; }
.tv-related { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.tv-related a {
    display: flex; gap: .65rem; align-items: center; padding: .7rem .9rem; border-radius: 12px;
    background: var(--tv-bg); color: var(--tv-ink); font-weight: 500; font-size: .95rem; border: 1px solid transparent;
}
.tv-related a:hover { background: #fff; border-color: #cddcf5; color: var(--tv-blue-700); box-shadow: var(--tv-shadow-sm); }
.tv-related a i { color: var(--tv-blue-600); }

/* címkék */
.tv-tags { display: flex; flex-wrap: wrap; gap: .45rem; }
.tv-tag {
    display: inline-flex; align-items: center; gap: .25rem;
    font-size: .82rem; font-weight: 500; padding: .3rem .7rem; border-radius: 999px;
    background: var(--tv-surface); color: var(--tv-text); border: 1px solid var(--tv-line);
    transition: all .15s ease;
}
.tv-tag::before { content: "#"; color: #94a3b8; font-weight: 600; }
.tv-tag:hover { color: var(--tv-blue-700); border-color: var(--tv-blue-500); background: var(--tv-blue-50); }

/* oldalsáv */
.tv-sidebar { display: grid; gap: 1.25rem; }
@media (min-width: 992px) { .tv-sidebar { position: sticky; top: 88px; } }
.tv-side-card { padding: 1.25rem 1.35rem; }
.tv-side-title { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--tv-muted); margin: 0 0 .85rem; display: flex; align-items: center; gap: .45rem; }
.tv-side-list { list-style: none; padding: 0; margin: 0; counter-reset: tvpop; }
.tv-side-list li { counter-increment: tvpop; }
.tv-side-list a {
    display: flex; gap: .7rem; align-items: baseline; padding: .5rem 0; color: var(--tv-text); font-size: .92rem; line-height: 1.4;
    border-bottom: 1px solid var(--tv-line-soft);
}
.tv-side-list li:last-child a { border-bottom: 0; }
.tv-side-list a::before { content: counter(tvpop); flex: 0 0 1.4rem; font-weight: 700; font-size: .8rem; color: var(--tv-blue-500); }
.tv-side-list a:hover { color: var(--tv-blue-700); }

.tv-ai-card {
    position: relative; overflow: hidden; color: #dbe7ff; padding: 1.5rem;
    border-radius: var(--tv-radius); background: var(--tv-hero-gradient); box-shadow: var(--tv-shadow);
}
.tv-ai-card h3 { color: #fff; font-size: 1.15rem; font-weight: 700; margin: .75rem 0 .4rem; }
.tv-ai-card p { font-size: .9rem; margin-bottom: 1rem; color: #c7d7f5; }
.tv-ai-card .tv-ai-badge {
    width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.35rem; color: #fff;
    background: linear-gradient(135deg, var(--tv-violet-500), var(--tv-cyan-400));
    box-shadow: 0 8px 20px -6px rgba(34, 211, 238, .5);
}
.tv-ai-card .btn-light { color: var(--tv-navy-800); }
.tv-ai-card .tv-ai-contact { font-size: .82rem; color: #a9bde3; margin-top: .85rem; display: block; }
.tv-ai-card .tv-ai-contact a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }

/* üres állapot */
.tv-empty { padding: 2.5rem 1.5rem; text-align: center; }
.tv-empty-icon {
    width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 1rem; display: grid; place-items: center;
    font-size: 1.8rem; color: var(--tv-blue-600); background: var(--tv-blue-50);
}
.tv-empty h2 { font-size: 1.3rem; font-weight: 700; }
.tv-tips { text-align: left; display: grid; gap: .85rem; margin-top: 1.5rem; }
.tv-tip { display: flex; gap: .9rem; padding: 1rem 1.1rem; border-radius: 12px; background: var(--tv-bg); }
.tv-tip i { font-size: 1.25rem; color: var(--tv-blue-600); }
.tv-tip strong { color: var(--tv-ink); display: block; margin-bottom: .15rem; }
.tv-tip span { font-size: .9rem; color: var(--tv-muted); }

/* lapozó */
.tv .pagination { --bs-pagination-border-radius: 10px; --bs-pagination-color: var(--tv-text); --bs-pagination-hover-color: var(--tv-blue-700); --bs-pagination-active-bg: var(--tv-blue-600); --bs-pagination-active-border-color: var(--tv-blue-600); gap: .3rem; }
.tv .pagination .page-link { border-radius: 10px !important; min-width: 40px; text-align: center; font-weight: 500; }

/* GYIK */
.tv-faq-group + .tv-faq-group { margin-top: 2rem; }
.tv-faq-group-title { font-size: 1.1rem; font-weight: 700; margin-bottom: .85rem; display: flex; align-items: center; gap: .6rem; }
.tv-faq-group-title .tv-cat-icon { width: 34px; height: 34px; font-size: 1rem; border-radius: 10px; }
.tv .accordion { --bs-accordion-border-color: var(--tv-line); --bs-accordion-border-radius: 14px; --bs-accordion-inner-border-radius: 13px; --bs-accordion-active-bg: var(--tv-blue-50); --bs-accordion-active-color: var(--tv-navy-800); --bs-accordion-btn-focus-box-shadow: 0 0 0 3px var(--tv-blue-100); }
.tv .accordion-button { font-weight: 600; color: var(--tv-ink); padding: 1rem 1.25rem; }
.tv .accordion-body { line-height: 1.7; }
.tv .accordion-item { background: #fff; }

/* lábléc */
.tv-footer { background: var(--tv-navy-950); color: #94a3b8; padding: 3.5rem 0 0; font-size: .92rem; }
.tv-footer h2 { color: #fff; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.tv-footer p { line-height: 1.7; }
.tv-footer a { color: #cbd5e1; }
.tv-footer a:hover { color: #fff; }
.tv-footer-cats { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 1.5rem; }
.tv-footer-cats li { break-inside: avoid; padding: .2rem 0; }
.tv-footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 2.5rem; padding: 1.25rem 0; font-size: .85rem; }
.tv-footer-social a { width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center; background: rgba(255,255,255,.06); }
.tv-footer-social a:hover { background: rgba(255,255,255,.14); }
@media (max-width: 575.98px) { .tv-footer-cats { columns: 1; } }


/* =====================================================================
   AI webchat
   ===================================================================== */
body.tv-chat-page { height: 100%; overflow: hidden; }
html:has(body.tv-chat-page) { height: 100%; }

.tv-chat-app {
    /* fixen a látható területhez igazítva; mobilon a JS a visualViewport mérete szerint finomít */
    position: fixed; top: 0; left: 0; right: 0;
    height: 100vh; height: 100dvh;
    display: flex; flex-direction: column;
    background:
        radial-gradient(900px 500px at 100% 0%, rgba(59, 130, 246, .10), transparent 60%),
        radial-gradient(700px 500px at 0% 100%, rgba(124, 58, 237, .08), transparent 60%),
        var(--tv-bg);
}
.tv-chat-app > .tv-navbar { flex: 0 0 auto; }
.tv-chat-body { flex: 1 1 auto; min-height: 0; display: flex; }
.tv-chat-shell {
    flex: 1 1 auto; min-height: 0; display: flex; gap: 1.25rem;
    width: 100%; max-width: 1240px; margin: 0 auto; padding: 1.25rem 1rem 1rem;
}

/* fő beszélgetés panel */
.tv-chat-panel {
    flex: 1 1 auto; min-width: 0; min-height: 0; display: flex; flex-direction: column;
    background: var(--tv-surface); border: 1px solid var(--tv-line); border-radius: 20px; box-shadow: var(--tv-shadow);
    overflow: hidden;
}
.tv-chat-head {
    flex: 0 0 auto; display: flex; align-items: center; gap: .85rem;
    padding: .9rem 1.25rem; border-bottom: 1px solid var(--tv-line);
}
.tv-avatar {
    flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-size: 1.15rem;
    background: linear-gradient(135deg, var(--tv-violet-500), var(--tv-blue-600));
    box-shadow: 0 6px 14px -6px rgba(124, 58, 237, .55);
}
.tv-avatar-sm { width: 32px; height: 32px; border-radius: 10px; font-size: .95rem; }
.tv-chat-head-title { font-weight: 700; color: var(--tv-ink); line-height: 1.2; font-size: 1rem; }
.tv-chat-head-sub { font-size: .8rem; color: var(--tv-muted); display: flex; align-items: center; gap: .35rem; }
.tv-online { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); }
.tv-icon-btn {
    width: 38px; height: 38px; border-radius: 10px; display: inline-grid; place-items: center;
    border: 1px solid var(--tv-line); background: #fff; color: var(--tv-text); font-size: 1.05rem; transition: all .15s ease;
}
.tv-icon-btn:hover { background: var(--tv-bg); color: var(--tv-ink); border-color: #cbd5e1; }
.tv-icon-btn.is-off { color: #94a3b8; }

/* üzenetlista */
.tv-chat-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; }
.tv-chat-history { max-width: 820px; margin: 0 auto; padding: 1.5rem 1.25rem .5rem; display: flex; flex-direction: column; gap: 1.25rem; }

.tv-msg { display: flex; gap: .75rem; align-items: flex-start; animation: tvMsgIn .25s ease both; }
@keyframes tvMsgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tv-msg-body { min-width: 0; max-width: 100%; flex: 1 1 auto; }
.tv-msg-user { justify-content: flex-end; }
.tv-msg-user .tv-msg-body { flex: 0 1 auto; max-width: min(85%, 640px); }

.tv-bubble { line-height: 1.65; font-size: 1rem; overflow-wrap: anywhere; }
.tv-msg-user .tv-bubble {
    background: linear-gradient(135deg, var(--tv-blue-600), var(--tv-blue-700)); color: #fff;
    padding: .7rem 1rem; border-radius: 18px 18px 6px 18px; white-space: pre-line; box-shadow: 0 6px 16px -8px rgba(37, 99, 235, .6);
}
.tv-msg-ai .tv-bubble {
    color: #1e293b; background: var(--tv-bg); border: 1px solid var(--tv-line-soft);
    padding: .85rem 1.1rem; border-radius: 6px 18px 18px 18px;
}
.tv-msg-ai .tv-bubble > :last-child { margin-bottom: 0; }
.tv-msg-ai .tv-bubble p { margin-bottom: .65rem; }
.tv-msg-ai .tv-bubble ul, .tv-msg-ai .tv-bubble ol { padding-left: 1.25rem; margin-bottom: .65rem; }
.tv-msg-ai .tv-bubble li { margin-bottom: .25rem; }
.tv-msg-ai .tv-bubble strong { color: var(--tv-ink); }
.tv-msg-ai .tv-bubble a { text-decoration: underline; text-underline-offset: 2px; }
.tv-msg-ai .tv-bubble table { display: block; overflow-x: auto; border-collapse: collapse; font-size: .92rem; margin: .5rem 0; }
.tv-msg-ai .tv-bubble td, .tv-msg-ai .tv-bubble th { border: 1px solid var(--tv-line); padding: .35rem .6rem; }
.tv-msg-ai .tv-bubble h1, .tv-msg-ai .tv-bubble h2, .tv-msg-ai .tv-bubble h3, .tv-msg-ai .tv-bubble h4 { font-size: 1.05rem; font-weight: 700; margin: .75rem 0 .4rem; }
.tv-msg-ai.is-liked .tv-bubble { border-color: #86efac; background: #f0fdf4; }
.tv-msg-ai.is-disliked .tv-bubble { border-color: #fca5a5; background: #fef2f2; }

.tv-msg-info .tv-bubble { background: #ecfeff; border-color: #a5f3fc; color: #155e75; font-size: .93rem; }
.tv-msg-error .tv-bubble { background: #fff7ed; border-color: #fed7aa; color: #9a3412; font-size: .93rem; }
.tv-msg-info .tv-avatar, .tv-msg-error .tv-avatar { background: #fff; color: var(--tv-muted); border: 1px solid var(--tv-line); box-shadow: none; }

/* üzenet alatti sáv: értékelés + kapcsolódó cikkek */
.tv-msg-tools { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; margin-top: .45rem; min-height: 30px; }
.tv-tool-btn {
    display: inline-flex; align-items: center; gap: .3rem; height: 30px; padding: 0 .55rem; border-radius: 8px;
    border: 1px solid transparent; background: transparent; color: var(--tv-muted); font-size: .82rem; font-weight: 500;
    transition: all .15s ease;
}
.tv-tool-btn:hover { background: var(--tv-bg); color: var(--tv-ink); border-color: var(--tv-line); }
.tv-tool-btn.is-active { color: var(--tv-blue-700); background: var(--tv-blue-50); border-color: var(--tv-blue-100); }
.tv-tool-btn[data-action="like"].is-active { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }
.tv-tool-btn[data-action="dislike"].is-active { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.tv-tool-sep { width: 1px; height: 18px; background: var(--tv-line); margin: 0 .2rem; }
@media (hover: hover) and (min-width: 992px) {
    .tv-msg-ai .tv-rate { opacity: 0; transition: opacity .15s ease; }
    .tv-msg-ai:hover .tv-rate, .tv-msg-ai:last-child .tv-rate, .tv-rate.is-active { opacity: 1; }
}

.tv-sources { margin-top: .5rem; }
.tv-sources-list { display: flex; flex-wrap: wrap; gap: .4rem; padding-top: .35rem; }
.tv-source {
    display: inline-flex; align-items: center; gap: .4rem; max-width: 100%;
    font-size: .82rem; font-weight: 500; color: var(--tv-text);
    background: #fff; border: 1px solid var(--tv-line); border-radius: 999px; padding: .3rem .75rem .3rem .55rem;
    transition: all .15s ease;
}
.tv-source span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-source i { color: var(--tv-blue-500); flex: 0 0 auto; }
.tv-source .bi-check-circle-fill { color: #16a34a; }
.tv-source:hover { color: var(--tv-blue-700); border-color: var(--tv-blue-500); background: var(--tv-blue-50); }
.tv-keywords { font-size: .78rem; color: var(--tv-muted); margin-top: .4rem; }

/* gépelés jelző */
.tv-typing { display: inline-flex; align-items: center; gap: .75rem; }
.tv-dots { display: inline-flex; gap: 4px; }
.tv-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--tv-blue-500); animation: tvDot 1.2s infinite ease-in-out; }
.tv-dots i:nth-child(2) { animation-delay: .15s; } .tv-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes tvDot { 0%, 80%, 100% { transform: translateY(0); opacity: .35; } 40% { transform: translateY(-4px); opacity: 1; } }
.tv-typing-text { font-size: .88rem; color: var(--tv-muted); }
.tv-typing-bar { height: 3px; border-radius: 3px; background: var(--tv-line); overflow: hidden; margin-top: .6rem; width: 220px; max-width: 100%; }
.tv-typing-bar > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--tv-violet-500), var(--tv-blue-500)); transition: width .2s linear; }

/* üzenetíró */
.tv-composer-wrap { flex: 0 0 auto; padding: .75rem 1.25rem 1rem; border-top: 1px solid var(--tv-line-soft); background: #fff; }
.tv-composer {
    max-width: 820px; margin: 0 auto; display: flex; align-items: flex-end; gap: .5rem;
    background: var(--tv-bg); border: 1px solid var(--tv-line); border-radius: 18px; padding: .4rem;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.tv-composer:focus-within { background: #fff; border-color: var(--tv-blue-500); box-shadow: 0 0 0 4px rgba(59, 130, 246, .15); }
.tv-composer textarea {
    flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent; resize: none;
    font-size: 1rem; line-height: 1.5; padding: .55rem .5rem; color: var(--tv-ink); max-height: 160px; overflow-y: auto;
}
.tv-composer textarea::placeholder { color: #94a3b8; }
.tv-composer .tv-icon-btn { border: 0; background: transparent; width: 42px; height: 42px; }
.tv-composer .tv-icon-btn:hover { background: #e9eef6; }
.tv-send {
    flex: 0 0 auto; width: 42px; height: 42px; border-radius: 13px; border: 0; color: #fff; font-size: 1.15rem;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--tv-violet-500), var(--tv-blue-600));
    box-shadow: 0 6px 14px -6px rgba(37, 99, 235, .7); transition: transform .12s ease, filter .15s ease;
}
.tv-send:hover { filter: brightness(1.08); }
.tv-send:active { transform: scale(.94); }
.tv-send:disabled { filter: grayscale(.4) brightness(1.1); opacity: .7; }
.tv-composer-note { max-width: 820px; margin: .5rem auto 0; text-align: center; font-size: .75rem; color: #94a3b8; }
.tv-composer-note a { color: var(--tv-muted); text-decoration: underline; text-underline-offset: 2px; }

/* Desktop induló állapot: amíg nincs kérdés, a köszönés és az üzenetíró együtt, a panel közepén áll,
   kiemelt üzenetíróval. Az első kérdésnél a JS animálva alulra viszi (a .is-start levételével). */
@media (min-width: 992px) {
    .tv-chat-panel.is-start .tv-chat-scroll { flex: 0 1 auto; margin-top: auto; }
    .tv-chat-panel.is-start .tv-composer-wrap { margin-bottom: auto; border-top-color: transparent; padding-bottom: 2.5rem; }
    .tv-chat-panel.is-start .tv-composer {
        padding: .55rem; border: 2px solid var(--tv-blue-500); background: #fff;
        box-shadow: 0 0 0 5px rgba(59, 130, 246, .12), var(--tv-shadow);
        animation: tvComposerGlow 1.8s ease-out .3s 2;
    }
    .tv-chat-panel.is-start .tv-composer textarea { font-size: 1.1rem; }
    .tv-chat-panel.is-start .tv-send, .tv-chat-panel.is-start .tv-composer .tv-icon-btn { width: 46px; height: 46px; }
}
@keyframes tvComposerGlow {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, .45), var(--tv-shadow); }
    70% { box-shadow: 0 0 0 14px rgba(59, 130, 246, 0), var(--tv-shadow); }
    100% { box-shadow: 0 0 0 5px rgba(59, 130, 246, .12), var(--tv-shadow); }
}
@media (prefers-reduced-motion: reduce) {
    .tv-chat-panel.is-start .tv-composer { animation: none; }
}

/* jobb oldali panel (desktop) */
.tv-chat-aside { flex: 0 0 320px; min-height: 0; display: none; flex-direction: column; gap: 1rem; overflow-y: auto; }
@media (min-width: 1200px) { .tv-chat-aside { display: flex; } }
.tv-aside-card { padding: 1.15rem 1.25rem; }
.tv-aside-sources { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.tv-aside-sources a {
    display: flex; gap: .6rem; align-items: flex-start; padding: .6rem .7rem; border-radius: 10px;
    color: var(--tv-text); font-size: .9rem; line-height: 1.35; background: var(--tv-bg); border: 1px solid transparent;
}
.tv-aside-sources a i { color: var(--tv-blue-500); margin-top: .1rem; }
.tv-aside-sources a:hover { background: #fff; border-color: #cddcf5; color: var(--tv-blue-700); }
.tv-aside-empty { font-size: .88rem; color: var(--tv-muted); margin: 0; }
.tv-aside-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; font-size: .88rem; }
.tv-aside-steps li { display: flex; gap: .65rem; align-items: flex-start; }
.tv-aside-steps i { color: var(--tv-blue-600); font-size: 1rem; margin-top: .05rem; }

/* hangfelvétel overlay */
.tv-voice {
    position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center;
    background: rgba(7, 19, 48, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.tv-voice.is-open { display: flex; }
.tv-voice-box { text-align: center; color: #fff; padding: 2rem; }
.tv-voice-mic {
    width: 112px; height: 112px; border-radius: 50%; border: 0; margin: 0 auto 1.5rem; display: grid; place-items: center;
    font-size: 2.6rem; color: #fff; background: linear-gradient(135deg, var(--tv-violet-500), var(--tv-blue-600));
    box-shadow: 0 0 0 0 rgba(96, 165, 250, .6); animation: tvPulse 1.6s infinite;
}
@keyframes tvPulse { 0% { box-shadow: 0 0 0 0 rgba(96, 165, 250, .55); } 70% { box-shadow: 0 0 0 28px rgba(96, 165, 250, 0); } 100% { box-shadow: 0 0 0 0 rgba(96, 165, 250, 0); } }
.tv-voice-title { font-size: 1.35rem; font-weight: 700; }
.tv-voice-sub { color: #b8c9ea; font-size: .92rem; margin-top: .35rem; }

/* modálok */
.tv .modal-content { border: 0; border-radius: 18px; box-shadow: var(--tv-shadow-lg); }
.tv .modal-header { border-bottom-color: var(--tv-line-soft); padding: 1.1rem 1.35rem; }
.tv .modal-footer { border-top-color: var(--tv-line-soft); padding: .85rem 1.35rem; }
.tv .modal-body { padding: 1.25rem 1.35rem; }
.tv .modal-title { font-weight: 700; font-size: 1.1rem; }

/* mobil finomhangolás */
@media (max-width: 767.98px) {
    .tv-chat-shell { padding: 0; }
    .tv-chat-panel { border-radius: 0; border: 0; box-shadow: none; }
    .tv-chat-head { padding: .7rem 1rem; }
    .tv-chat-history { padding: 1rem .9rem .5rem; gap: 1rem; }
    .tv-msg-ai .tv-avatar { display: none; }
    .tv-msg-user .tv-msg-body { max-width: 88%; }
    .tv-composer-wrap { padding: .6rem .6rem calc(.6rem + env(safe-area-inset-bottom)); }
    .tv-composer textarea { font-size: 16px; } /* iOS ne nagyítson */
    .tv-chat-app .tv-navbar { min-height: 56px; }
}

/* A szerkesztőből jövő sorkizárt szöveg keskeny kijelzőn nagy lyukakat hagy */
@media (max-width: 575.98px) {
    .tv-prose, .tv-prose [style*="justify"] { text-align: left !important; hyphens: auto; }
}

