/* =============================================================
   TRILOGIX INSTITUTE WEBSITE
   Phase 20.4 — Simple unified Blog search/filter bar
   ============================================================= */

.blog-page-hero .about-hero-slide { background-position: center; }

.blog-archive-section {
    padding: 5rem 0;
    background: #fff;
}

.blog-archive-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.blog-archive-head-copy { max-width: 760px; }
.blog-archive-head .section-subtitle { margin-bottom: 0; }

.blog-source-chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    white-space: nowrap;
    color: #0d55c7;
    font-size: .8rem;
    font-weight: 800;
    text-decoration: none;
}

.blog-source-chip i { transition: transform .2s ease; }
.blog-source-chip:hover i { transform: translate(2px, -2px); }

/* One clean control bar: search + optional category dropdown. */
.blog-toolbar {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 54px;
    margin-bottom: 1rem;
    border: 1px solid #d6e1ee;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .045);
    overflow: hidden;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.blog-toolbar:focus-within {
    border-color: #b7cceb;
    box-shadow: 0 0 0 3px rgba(13, 85, 199, .06);
}

.blog-search {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 52px;
    padding: 0 16px;
    margin: 0;
}

.blog-search > i {
    flex: 0 0 auto;
    margin-right: 10px;
    color: #718096;
    font-size: .95rem;
}

.blog-search input {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #183252;
    font: inherit;
    font-size: .88rem;
}

.blog-search input::placeholder { color: #98a2b3; }

.blog-category-select-wrap {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 0 225px;
    min-height: 52px;
    margin: 0;
    padding-left: 15px;
    border-left: 1px solid #e3eaf3;
    background: #fbfcfe;
}

.blog-category-select-wrap > i:first-child {
    flex: 0 0 auto;
    margin-right: 8px;
    color: #0d55c7;
    font-size: .85rem;
}

.blog-category-select {
    width: 100%;
    min-width: 0;
    height: 52px;
    padding: 0 34px 0 0;
    border: 0;
    outline: 0;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    color: #344054;
    font: inherit;
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
}

.blog-select-chevron {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #7b8798;
    font-size: .72rem;
    pointer-events: none;
}

.blog-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1rem;
    margin: 0 0 1.25rem;
    padding: 0 .1rem;
    color: #667085;
    font-size: .77rem;
}

.blog-results-bar strong { color: #183252; }

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.blog-card { min-width: 0; }
.blog-card[hidden] { display: none !important; }

.blog-load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.blog-empty {
    padding: 3rem 1.25rem;
    border: 1px dashed #d8e1ec;
    border-radius: 16px;
    text-align: center;
    color: #667085;
}

.blog-empty i {
    display: block;
    margin-bottom: .75rem;
    color: #0d55c7;
    font-size: 1.5rem;
}

.blog-cache-status {
    margin-top: 1rem;
    color: #7a5b13;
    font-size: .76rem;
    text-align: center;
}

@media (max-width: 991.98px) {
    .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
    .blog-archive-section { padding: 4rem 0; }

    .blog-archive-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 1rem;
    }

    .blog-toolbar {
        align-items: stretch;
        flex-direction: column;
        border-radius: 13px;
        overflow: visible;
    }

    .blog-search {
        min-height: 50px;
        padding: 0 14px;
    }

    .blog-category-select-wrap {
        flex: 0 0 auto;
        width: 100%;
        min-height: 48px;
        padding-left: 14px;
        border-top: 1px solid #e3eaf3;
        border-left: 0;
        border-radius: 0 0 13px 13px;
    }

    .blog-category-select { height: 48px; }

    .blog-results-bar {
        align-items: flex-start;
        flex-direction: column;
        gap: .25rem;
    }
}

@media (max-width: 575.98px) {
    .blog-grid { grid-template-columns: 1fr; }
    .blog-search input { font-size: .82rem; }
    .blog-category-select { font-size: .78rem; }
}
