/* projects.css — Magazine Blog Listing */
/* Monk of Colne: Projects & Insights page */

/* Prevent author-stylesheet display values overriding the hidden attribute */
.featured-post[hidden],
.post-card[hidden] {
    display: none !important;
}

/* ── Navbar: solid background (no transparent overlay) ── */
#logo-overlay {
    display: none;
}

.navbar {
    background-color: var(--primary-color);
}

/* ── Page wrapper ── */
.projects-page {
    width: 100%;
    box-sizing: border-box;
}

/* ─────────────────────────────────────────────────
   LISTING HEADER
───────────────────────────────────────────────── */
.listing-header {
    width: 100%;
    background-color: var(--light-color);
    border-bottom: 1px solid rgba(148, 117, 85, 0.2);
    text-align: center;
    padding: 130px 24px 40px;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .listing-header {
        padding: 190px 40px 52px;
    }
}

.listing-header h1 {
    font-size: 2rem;
    color: rgb(92, 60, 27);
    font-weight: 700;
    margin: 0 0 10px;
    letter-spacing: -0.01em;
}

@media (min-width: 768px) {
    .listing-header h1 {
        font-size: 2.75rem;
    }
}

.listing-header p {
    font-size: 1rem;
    color: rgb(92, 60, 27);
    opacity: 0.75;
    margin: 0 auto;
    max-width: 520px;
    line-height: 1.6;
}

/* ─────────────────────────────────────────────────
   FILTER BAR
───────────────────────────────────────────────── */
.filter-bar {
    width: 100%;
    background-color: var(--cream-color);
    border-bottom: 1px solid var(--light-color);
    box-sizing: border-box;
}

.filter-bar__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 768px) {
    .filter-bar__inner {
        padding: 18px 40px;
        flex-direction: row;
        align-items: center;
        gap: 16px;
    }
}

/* Search */
.filter-bar__search {
    display: flex;
    align-items: center;
    gap: 9px;
    background: #fff;
    border: 1.5px solid var(--light-color);
    padding: 8px 14px;
    transition: border-color 0.2s ease;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .filter-bar__search {
        width: 240px;
    }
}

.filter-bar__search:focus-within {
    border-color: var(--accent-color);
}

.search-icon {
    color: var(--accent-color);
    flex-shrink: 0;
    opacity: 0.65;
    display: block;
}

.filter-bar__search input {
    border: none;
    outline: none;
    background: transparent;
    font-family: Calibri, sans-serif;
    font-size: 14px;
    color: rgb(92, 60, 27);
    width: 100%;
    min-width: 0;
}

.filter-bar__search input::placeholder {
    color: rgba(92, 60, 27, 0.4);
}

/* Filter pills */
.filter-bar__pills {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2px;
}

.filter-bar__pills::-webkit-scrollbar {
    display: none;
}

@media (min-width: 768px) {
    .filter-bar__pills {
        flex-wrap: wrap;
        overflow-x: visible;
        padding-bottom: 0;
    }
}

.filter-pill {
    background: none;
    border: 1.5px solid var(--accent-color);
    color: var(--accent-color);
    font-family: Calibri, sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 16px;
    border-radius: 30px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.02em;
    transition: background-color 0.2s ease, color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.filter-pill:hover,
.filter-pill.active {
    background-color: var(--accent-color);
    color: #fff;
}

/* ─────────────────────────────────────────────────
   RESULT COUNT
───────────────────────────────────────────────── */
.result-count-bar {
    width: 100%;
    background-color: var(--cream-color);
    box-sizing: border-box;
}

.result-count-bar__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 8px 24px 14px;
    font-size: 13px;
    color: rgb(92, 60, 27);
    opacity: 0.55;
    letter-spacing: 0.03em;
}

@media (min-width: 768px) {
    .result-count-bar__inner {
        padding: 8px 40px 14px;
    }
}

/* ─────────────────────────────────────────────────
   MAIN CONTENT CONTAINER
───────────────────────────────────────────────── */
.projects-content {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 24px 56px;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .projects-content {
        padding: 40px 40px 64px;
    }
}

/* ─────────────────────────────────────────────────
   FEATURED SECTION
───────────────────────────────────────────────── */
.featured-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

/* Single featured post */
.featured-post {
    display: grid;
    grid-template-columns: 1fr;
    background: #fff;
    border: 1px solid rgba(148, 117, 85, 0.15);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

@media (min-width: 768px) {
    .featured-post {
        grid-template-columns: 1fr 1fr;
        min-height: 340px;
    }
}

.featured-post:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Image */
.featured-post__img {
    position: relative;
    background-color: var(--light-color);
    background-size: cover;
    background-position: center;
    min-height: 240px;
}

.featured-badge {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--accent-color);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 8px 18px;
}

@media (min-width: 768px) {
    .featured-post__img {
        min-height: 0;
    }
}

/* Text body */
.featured-post__body {
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 13px;
}

@media (min-width: 768px) {
    .featured-post__body {
        padding: 40px 40px 40px 36px;
    }
}

.featured-post__body .label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-color);
}

.featured-post__body h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: rgb(92, 60, 27);
    line-height: 1.25;
    margin: 0;
}

@media (min-width: 768px) {
    .featured-post__body h2 {
        font-size: 1.7rem;
    }
}

.featured-post__body p {
    font-size: 14px;
    color: rgb(92, 60, 27);
    opacity: 0.7;
    line-height: 1.65;
    margin: 0;
}

.featured-post__meta {
    font-size: 12px;
    color: rgb(92, 60, 27);
    opacity: 0.5;
    letter-spacing: 0.03em;
}

.featured-post__read {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 0.03em;
}

/* ─────────────────────────────────────────────────
   POSTS GRID
───────────────────────────────────────────────── */
.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 36px;
}

@media (min-width: 768px) {
    .posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Post card */
.post-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid rgba(148, 117, 85, 0.15);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.post-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.post-card__img {
    height: 180px;
    background-color: var(--light-color);
    background-size: cover;
    background-position: center;
    position: relative;
    flex-shrink: 0;
}

.card-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary-color);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 10px;
}

.post-card__body {
    padding: 18px 18px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.post-card__meta {
    font-size: 12px;
    color: var(--accent-color);
    letter-spacing: 0.03em;
    opacity: 0.85;
}

.post-card__title {
    font-size: 16px;
    font-weight: 700;
    color: rgb(92, 60, 27);
    line-height: 1.3;
}

.post-card__excerpt {
    font-size: 13px;
    color: rgb(92, 60, 27);
    opacity: 0.65;
    line-height: 1.55;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card__footer {
    padding: 10px 18px 14px;
    border-top: 1px solid var(--light-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 12px;
    color: var(--accent-color);
}

.post-card__read-more {
    font-weight: 700;
    letter-spacing: 0.03em;
}

/* ─────────────────────────────────────────────────
   LOAD MORE
───────────────────────────────────────────────── */
.load-more-wrap {
    text-align: center;
    padding: 8px 0 0;
}

.load-more-btn {
    border: 2px solid var(--accent-color);
    background: none;
    color: var(--accent-color);
    font-family: Calibri, sans-serif;
    font-size: 15px;
    font-weight: 700;
    padding: 12px 38px;
    cursor: pointer;
    letter-spacing: 0.04em;
    transition: background-color 0.2s ease, color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.load-more-btn:hover {
    background-color: var(--accent-color);
    color: #fff;
}
