/* AIKA Blog — Dark Theme (deep purple/indigo) */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-primary: #0f0a1a;
    --bg-secondary: #1a1035;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(99, 102, 241, 0.08);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(99, 102, 241, 0.3);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #6366f1;
    --accent-light: #a5b4fc;
    --accent-dark: #4338ca;
    --max-width: 900px;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--accent-light); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Header --- */
.header {
    position: sticky;
    top: 0;
    background: rgba(15, 10, 26, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}

.logo-img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.nav { display: flex; gap: 1.25rem; }

.nav a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav a:hover { color: #fff; text-decoration: none; }

/* --- Hero --- */
.hero {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 1.5rem 1.5rem;
    text-align: center;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.hero p { color: var(--text-secondary); font-size: 1.05rem; }

/* --- Szurok --- */
.filters {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem 1rem;
}

.filters-inner { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 0.6rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text-muted); }

.tag-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.tag-btn {
    padding: 0.3rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.tag-btn:hover, .tag-btn.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent);
    color: var(--accent-light);
}

/* --- Poszt kartya grid --- */
.posts-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.25s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.1);
}

.post-card .category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.post-card h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.post-card .excerpt {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.post-card .meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.post-card .tags { display: flex; gap: 0.35rem; flex-wrap: wrap; }

.post-card .tag {
    padding: 0.15rem 0.5rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    font-size: 0.7rem;
    color: var(--accent-light);
}

/* --- Lapozas --- */
.pagination {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.page-btn {
    padding: 0.5rem 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.page-btn:hover, .page-btn.active {
    background: var(--accent-dark);
    border-color: var(--accent);
    color: #fff;
}

/* --- Egyedi poszt nezet --- */
.post-view {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 1.5rem;
    color: var(--accent-light);
    font-size: 0.9rem;
}

.post-view h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.post-view .post-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.post-view .post-body {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.post-view .post-body h2 { margin: 2rem 0 0.75rem; font-size: 1.4rem; color: #fff; }
.post-view .post-body h3 { margin: 1.5rem 0 0.5rem; font-size: 1.15rem; color: #fff; }
.post-view .post-body p { margin-bottom: 1rem; }

.post-view .post-body pre {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
    font-size: 0.85rem;
}

.post-view .post-body code {
    font-family: 'Fira Code', 'Consolas', monospace;
    background: rgba(99, 102, 241, 0.1);
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    font-size: 0.85em;
}

.post-view .post-body pre code { background: none; padding: 0; }

.post-view .post-body ul, .post-view .post-body ol {
    margin: 0.75rem 0 1rem 1.5rem;
}

.post-view .post-body li { margin-bottom: 0.35rem; }

.post-view .post-body blockquote {
    border-left: 3px solid var(--accent);
    padding: 0.5rem 1rem;
    margin: 1rem 0;
    color: var(--text-secondary);
    background: var(--bg-card);
    border-radius: 0 8px 8px 0;
}

/* --- Betoltes jelzo --- */
.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- Ures allapot --- */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
}

.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state p { font-size: 0.95rem; }

/* --- Lablec --- */
.footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem;
    text-align: center;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer a { color: var(--accent-light); }

/* --- Reszponziv --- */
@media (max-width: 640px) {
    .hero h1 { font-size: 1.5rem; }
    .posts-grid { grid-template-columns: 1fr; }
    .header-inner { flex-direction: column; gap: 0.5rem; }
    .post-view h1 { font-size: 1.5rem; }
}
