/* ============================================================================
   EvalQA — assets/blog.css
   The blog's own styles. These were an inline <style> block inside
   blog/tools/header.php: uncacheable, unlintable, and carrying a dark-theme
   override appended at the end, which is why the blog was still dark after
   every other page had gone light. That override is gone; the palette now
   comes from assets/theme.css and nothing here defines its own colours.
   ========================================================================== */

:root {
    --primary-color: var(--accent);
    --primary-gradient: linear-gradient(135deg, var(--accent) 0%, var(--accent3) 100%);
}
body {
    background: var(--bg);
    min-height: 100vh;
}
/* White Header (matching main EventSail) */
.blog-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(88,28,135,0.05);
}
.blog-header .navbar {
    padding: 0;
}
.blog-header .navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text) !important;
}
.blog-header .nav-link {
    color: var(--dim) !important;
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem !important;
}
.blog-header .nav-link:hover {
    color: var(--primary-color) !important;
}
.blog-header .btn-new-post {
    background: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0.4rem 1rem;
    border-radius: 6px;
}
.blog-header .btn-new-post:hover {
    background: white;
    color: var(--primary-color);
}
.blog-header .btn-login {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    border-radius: 6px;
}
.blog-header .btn-login:hover {
    background: var(--primary-color);
    color: white;
}
/* Search Section - Separate Block */
.search-section {
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 0;
}
.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}
.search-box input {
    width: 100%;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    padding: 0.75rem 1rem;
    padding-right: 50px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-box input::placeholder {
    color: var(--muted);
}
.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.10);
}
.search-box .btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
}
.search-box .btn:hover {
    background: var(--accent3);
}
/* Autocomplete Dropdown */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(88,28,135,0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}
.autocomplete-dropdown.show {
    display: block;
}
.autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--surface2);
}
.autocomplete-item:last-child {
    border-bottom: none;
}
.autocomplete-item:hover,
.autocomplete-item.active {
    background: var(--surface2);
}
.autocomplete-item .keyword {
    font-weight: 600;
    color: var(--text);
}
.autocomplete-item .count {
    font-size: 0.9375rem;
    color: var(--muted);
    margin-left: auto;
}
.autocomplete-item .type-badge {
    font-size: 0.8125rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    text-transform: uppercase;
}
.autocomplete-item .type-badge.category {
    background: var(--surface2);
    color: var(--accent3);
}
.autocomplete-item .type-badge.tag {
    background: rgba(138,98,18,.12);
    color: #8a4f04;
}
/* Common Styles */
.blog-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(88,28,135,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}
.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(88,28,135,0.15);
}
.blog-card .card-img-top {
    height: 200px;
    object-fit: cover;
}
.blog-card .card-body {
    padding: 1.5rem;
}
.blog-card .card-title {
    font-weight: 700;
    color: var(--text);
}
.blog-card .card-title a {
    text-decoration: none;
    color: inherit;
}
.blog-card .card-title a:hover {
    color: var(--primary-color);
}
.blog-card .card-text {
    color: var(--muted);
    font-size: 1rem;
}
.blog-meta {
    font-size: 0.9375rem;
    color: var(--muted);
}
.category-badge {
    background: var(--primary-gradient);
    color: white;
    font-size: 0.9375rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    text-decoration: none;
}
.category-badge:hover {
    color: white;
    opacity: 0.9;
}
.tag-badge {
    background: var(--surface2);
    color: var(--muted);
    font-size: 0.9375rem;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    text-decoration: none;
}
.tag-badge:hover {
    background: var(--border);
    color: var(--text);
}
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(88,28,135,0.08);
}
.empty-state i {
    font-size: 4rem;
    color: var(--border);
    margin-bottom: 1rem;
}
.btn-primary {
    background: var(--primary-gradient);
    border: none;
}
.btn-primary:hover {
    opacity: 0.9;
}
.pagination .page-link {
    color: var(--primary-color);
}
.pagination .page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
}
.placeholder-img {
    height: 200px;
    background: linear-gradient(135deg, var(--surface2) 0%, var(--border) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 3rem;
}
.content-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(88,28,135,0.08);
    padding: 2rem;
}
.page-header {
    margin-bottom: 1.5rem;
}
.page-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text);
}

/* ── Footer ──────────────────────────────────────────────────────────────────
   Was style="background:#333;color:#aaa" on the <footer> in tools/footer.php,
   which is why it stayed dark after the rest of the blog went light. */
footer {
  background: var(--surface2);
  color: var(--muted);
  border-top: 1px solid var(--border);
}
footer a { color: var(--accent2); text-decoration: underline; }
footer a:hover { color: var(--accent); }

/* Bootstrap ships .visually-hidden, but the blog loads only the CSS bundle and
   a future move off Bootstrap should not silently un-hide this heading. */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
