/* ================================================================
   KiboBlog — post.css
   All values reference variables defined in variables.css.
   No hardcoded colours, radii, shadows, or font stacks.
   ================================================================ */


/* ── Category badges ── */
.news-cat {
    display: inline-block;
    font-size: var(--font-size-xs);
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: .25rem .7rem;
    border-radius: var(--border-radius-sm);
}

/* Default fallback — overridden inline via $category->color */
.news-cat:not([style]) {
    background: var(--hover-bg);
    color: var(--secondary-color);
}


/* ── News card (listing + related grid) ── */
.news-card {
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    transition: var(--transition-normal);
    background: var(--bg-white);
}

.news-card:hover {
    box-shadow: var(--shadow-medium);
    transform: var(--hover-transform);
}

/* height:100% only inside the grid — not on the standalone featured card */
#articleGrid .news-card {
    height: 100%;
}


/* ── Gradient thumbnail band ── */
.news-thumb {
    height: 180px;
    display: flex;
    align-items: flex-end;
    padding: var(--padding-md);
    position: relative;
    overflow: hidden;
    /* Default gradient — overridden inline per card */
    background: var(--primary-gradient);
}

.news-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13, 31, 66, .45) 0%, transparent 60%);
    z-index: 0;
}

.news-thumb-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    font-size: 2.8rem;
    opacity: .22;
    color: var(--white-color);
}

/* Featured card gets a taller thumb */
.news-featured .news-thumb {
    height: 280px;
}

/* Featured image — fills the thumb container absolutely */
.news-thumb-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* Overlay wrapper — sits above image and gradient */
.news-thumb-overlay {
    position: relative;
    z-index: 1;
}


/* ── Filter tabs (news listing) ── */
.filter-tab {
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius-xl);
    background: var(--bg-white);
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    font-weight: 600;
    padding: .4rem 1.1rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-tab:hover,
.filter-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white-color);
}


/* ── Sidebar card ── */
.sidebar-card {
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: var(--padding-lg);
    background: var(--bg-white);
    margin-bottom: var(--margin-lg);
}

.sidebar-card > h6,
.sidebar-card .sidebar-title {
    font-family: var(--font-family-serif);
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: var(--margin-md);
}


/* ── Recent article row ── */
.recent-item {
    display: flex;
    gap: .85rem;
    padding: .85rem 0;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

.recent-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.recent-item:hover h6 {
    color: var(--secondary-color);
}

.recent-thumb {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius-sm);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    background: var(--primary-gradient);
    color: var(--white-color);
}

.recent-item h6 {
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.4;
    margin-bottom: .25rem;
    transition: var(--transition-fast);
}

.recent-item span {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}


/* ── Category tag links (sidebar) ── */
.category-tag {
    display: inline-block;
    font-size: var(--font-size-sm);
    color: var(--text-dark);
    text-decoration: none;
    padding: .25rem 0;
    transition: var(--transition-fast);
}

.category-tag:hover {
    color: var(--secondary-color);
}

.category-tag .post-count {
    color: var(--text-muted);
    font-size: var(--font-size-xs);
    margin-left: .25rem;
}


/* ── Pagination ── */
.page-link {
    color: var(--primary-color);
    border-color: var(--border-color);
    transition: var(--transition-fast);
}

.page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white-color);
}

.page-link:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}


/* ── Search input ── */
.form-control {
    border-color: var(--border-color);
    font-family: var(--font-family);
    border-radius: var(--border-radius-sm);
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(26, 79, 214, .1);
}


/* ── Article hero banner (show page) ── */
.article-hero {
    height: 360px;
    display: flex;
    align-items: flex-end;
    padding: var(--padding-xl);
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    background: var(--primary-gradient);
}

.article-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13, 31, 66, .8) 0%, transparent 55%);
    z-index: 0;
}

.article-hero-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    font-size: 6rem;
    opacity: .15;
    color: var(--white-color);
}


/* ── Article body typography (show page) ── */
.article-body {
    font-size: var(--font-size-base);
    line-height: 1.9;
    color: var(--text-dark);
}

.article-body h2 {
    font-family: var(--font-family-serif);
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--primary-color);
    margin: var(--margin-xl) 0 .75rem;
}

.article-body h3 {
    font-family: var(--font-family-serif);
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--primary-color);
    margin: var(--margin-lg) 0 .5rem;
}

.article-body p {
    margin-bottom: var(--margin-md);
}

.article-body ul,
.article-body ol {
    padding-left: 1.4rem;
    margin-bottom: var(--margin-md);
}

.article-body li {
    margin-bottom: var(--spacing-sm);
}

.article-body blockquote {
    border-left: 3px solid var(--accent-color);
    padding: var(--padding-md) var(--padding-lg);
    background: var(--bg-light);
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    margin: var(--margin-lg) 0;
    font-style: italic;
    color: var(--primary-color);
}


/* ── Author chip (show page) ── */
.author-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: var(--bg-light);
    border-radius: var(--border-radius-xl);
    padding: .4rem 1rem .4rem .4rem;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--secondary-color);
    color: var(--white-color);
    font-size: var(--font-size-sm);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* ── Share buttons (show page) ── */
.share-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--border-color);
    background: var(--bg-white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    text-decoration: none;
    transition: var(--transition-fast);
    cursor: pointer;
}

.share-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white-color);
}


/* ── Tag chips (show page) ── */
.tag,
.tag-chip {
    display: inline-block;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--text-muted);
    padding: .25rem .7rem;
    text-decoration: none;
    transition: var(--transition-fast);
}

.tag:hover,
.tag-chip:hover {
    background: var(--primary-color);
    color: var(--white-color);
    border-color: var(--primary-color);
}
