/* =============================================================================
   LF GRID — REUSABLE COLUMN LAYOUT
   ============================================================================= */

.lf-grid {
    display: grid;
    gap: 2.25rem;
    align-items: stretch;
    /* MAKES ALL CELLS THE SAME HEIGHT */
    /* align-items: start; */
    /* EACH CARD IS ITS OWN NATURAL HEIGHT */
}

.lf-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.lf-grid--4 {
    grid-template-columns: repeat(4, 1fr);
}

.lf-grid--5 {
    grid-template-columns: repeat(5, 1fr);
}

/* =============================================================================
   LF CARD — REUSABLE GRID CARD (USED BY POSTS, PEOPLE, PROJECTS, ETC.)
   ============================================================================= */

.lf-card {
    border: 1px solid #DEDEDE;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.lf-card__image {
    display: block;
    overflow: hidden;
}

.lf-card__image img {
    width: 100%;
    display: block;
    object-fit: contain;
    margin-bottom: 0 !important;
}

.lf-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

.lf-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 1rem 0 !important;
}

.lf-card__title a {
    color: #000;
    text-decoration: none;
}

.lf-card__title:hover a {
    color: #0000EE !important;
}

.lf-card__excerpt {
    font-size: 0.875rem;
    color: #000;
    line-height: 1.6;
    margin: 0;
    padding-bottom: 1rem;
}

.lf-card__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.lf-card__footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #000;
    color: #fff;
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
}

.lf-card__footer-date {
    color: #fff;
}

.lf-card__footer-sep {
    color: #fff;
    opacity: 0.5;
}

.lf-card__footer-author {
    color: #fff;
    text-decoration: none;
}

.lf-card__footer-author:hover {
    color: #fff;
}

/* =============================================================================
   LF LIST — REUSABLE LIST LAYOUT (tag.php, category.php, AND SHORTCODE)
   ============================================================================= */

.lf-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.lf-list__item {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: stretch;
}

.lf-list__item--no-image {
    grid-template-columns: 1fr;
}

/* FEATURED — FIRST ITEM ONLY, IMAGE 2/3 + CONTENT 1/3 */
.lf-list__item--featured {
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: stretch;
}

.lf-list__item--featured .lf-list__title {
    font-size: 1.75rem;
}

.lf-list__item--featured .lf-list__excerpt {
    font-size: 1rem;
}

.lf-list__image {
    display: block;
    overflow: hidden;
    height: 100%;
}

.lf-list__image a {
    display: block;
    height: 100%;
}

.lf-list__image img {
    width: 100%;
    height: 100% !important;
    object-fit: contain !important;
    display: block;
    margin-bottom: 0 !important;
}

.lf-list__content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0;
}

/* BYLINE — DATE AND AUTHOR, PLAIN BLACK TEXT */
.lf-list__byline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #000;
    margin: 0;
    padding: 0;
}

.lf-list__byline-date {
    color: #000;
}

.lf-list__byline-sep {
    color: #000;
    opacity: 0.4;
}

.lf-list__byline-author {
    color: #000;
    text-decoration: none;
}

.lf-list__byline-author:hover {
    text-decoration: underline;
}

.lf-list__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.lf-list__title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 !important;
}

.lf-list__title a {
    color: #000;
    text-decoration: none;
}

.lf-list__title:hover a {
    color: #0000EE !important;
}

.lf-list__excerpt {
    font-size: 0.875rem;
    color: #000;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* =============================================================================
   LF PILL — REUSABLE TAXONOMY PILL (CATEGORIES AND TAGS)
   ============================================================================= */

.lf-pill {
    display: inline-block;
    background-color: #000;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
}

.lf-pill:hover {
    background-color: #333;
    color: #fff;
}

.lf-pill--tag {
    background-color: #000;
}

.lf-pill--tag:hover {
    background-color: #333;
}

/* =============================================================================
   LF PAGINATION — PLAIN TEXT, NO BACKGROUNDS, CURRENT PAGE BOLD
   ============================================================================= */

.lf-pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.lf-pagination .page-numbers {
    display: inline-block;
    background: none;
    color: #000;
    padding: 0.4rem 0.6rem;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 400;
    margin: 0 0.1rem;
    border: none;
}

.lf-pagination .page-numbers.current {
    background: none;
    color: #000;
    font-weight: 700;
    font-size: 1rem;
}

.lf-pagination .page-numbers:hover {
    background: none;
    color: #000;
    text-decoration: underline;
}

.nav-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 2rem;
}

.nav-links .page-numbers {
    display: inline-block;
    background: none;
    color: #000;
    padding: 0.4rem 0.6rem;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 400;
    border: none;
}

.nav-links .page-numbers.current {
    background: none;
    color: #000;
    font-weight: 700;
    font-size: 1rem;
}

.nav-links .page-numbers:hover {
    background: none;
    color: #000;
    text-decoration: underline;
}

/* =============================================================================
   LF SEE ALL BAR — SHORTCODE SPECIFIC, LINKS TO TAG/CATEGORY ARCHIVES
   ============================================================================= */

.lf-see-all-bar {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.lf-see-all-bar__btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: 3px;
    background-color: #000;
    color: #fff;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
}

.lf-see-all-bar__btn:hover {
    background-color: #333;
    color: #fff;
}

/* =============================================================================
   LF ARCHIVE HEADER — USED BY tag.php AND category.php
   ============================================================================= */

.lf-archive-header {}

.lf-archive-title {
    margin-bottom: 0.75rem;
    font-size: 34px;
    line-height: 44px;
    padding-top: 35px;
}

.lf-archive-terms {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 2rem;
}

.lf-archive-term-pill {
    display: inline-block;
    background-color: #000;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.85rem;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
}

.lf-archive-term-pill:hover {
    background-color: #333;
    color: #fff;
}

/* =============================================================================
   LF EMPTY STATE — REUSABLE NO RESULTS MESSAGE
   ============================================================================= */

.lf-none {
    text-align: center;
    color: #000;
}

/* =============================================================================
   RESPONSIVE — TABLET (MAX 1000px, SALIENT BREAKPOINT)
   ============================================================================= */

@media only screen and (max-width: 1000px) {

    /* GRID — ALL COLUMN VARIANTS DROP TO 2 COLUMNS ON TABLET */
    .lf-grid--3,
    .lf-grid--4,
    .lf-grid--5 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* LIST — REDUCE GAP AND ADD SEPARATOR BETWEEN ITEMS */
    .lf-list {
        gap: 0;
        /* GAP REMOVED — PADDING + BORDER HANDLES SPACING INSTEAD */
    }

    /* LIST ITEM — KEEP IMAGE LEFT, SHRINK COLUMNS, ADD BORDER SEPARATOR */
    .lf-list__item {
        grid-template-columns: 1fr 1.5fr;
        gap: 1.25rem;
        padding-bottom: 2rem;
        padding-top: 2rem;
        border-bottom: 1px solid #DEDEDE;
        /* THIN SEPARATOR BETWEEN ITEMS ON TABLET */
    }

    /* REMOVE TOP PADDING ON FIRST ITEM — NO BORDER ABOVE IT */
    .lf-list__item:first-child {
        padding-top: 0;
    }

    /* REMOVE BORDER AND BOTTOM PADDING ON LAST ITEM */
    .lf-list__item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    /* FEATURED ITEM — SAME SEPARATOR TREATMENT */
    .lf-list__item--featured {
        grid-template-columns: 1.5fr 1fr;
        gap: 1.25rem;
        padding-bottom: 2rem;
        padding-top: 2rem;
        border-bottom: 1px solid #DEDEDE;
    }

    .lf-list__item--featured:first-child {
        padding-top: 0;
    }

    .lf-list__item--featured:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    /* SHRINK TITLE AND EXCERPT SO TEXT DOESN'T OVERPOWER THE IMAGE */
    .lf-list__title {
        font-size: 1rem;
    }

    .lf-list__item--featured .lf-list__title {
        font-size: 1.2rem;
    }

    .lf-list__excerpt {
        font-size: 0.8rem;
    }

    .lf-list__byline {
        font-size: 0.75rem;
    }

    .lf-pill {
        font-size: 0.7rem;
        padding: 0.15rem 0.6rem;
    }

    /* SEE ALL BAR — ALLOW WRAPPING ON TABLET */
    .lf-see-all-bar {
        flex-wrap: wrap;
    }

    /* ARCHIVE TITLE — SLIGHTLY SMALLER ON TABLET */
    .lf-archive-title {
        font-size: 28px;
        line-height: 36px;
        padding-top: 20px;
    }
}

/* =============================================================================
   RESPONSIVE — MOBILE (MAX 690px, SALIENT BREAKPOINT)
   ============================================================================= */

@media only screen and (max-width: 690px) {

    /* GRID — ALL COLUMN VARIANTS DROP TO 1 COLUMN ON MOBILE */
    .lf-grid--3,
    .lf-grid--4,
    .lf-grid--5 {
        grid-template-columns: 1fr;
    }

    /* GRID — TIGHTEN GAP ON MOBILE */
    .lf-grid {
        gap: 1.5rem;
    }

    /* LIST ITEM — STACK IMAGE ABOVE CONTENT ON MOBILE */
    .lf-list__item {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding-bottom: 2rem;
        padding-top: 2rem;
        border-bottom: 1px solid #DEDEDE;
    }

    .lf-list__item:first-child {
        padding-top: 0;
    }

    .lf-list__item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    /* IMAGE — FIXED HEIGHT WHEN STACKED SO IT DOESN'T DOMINATE */
    .lf-list__image {
        height: 220px;
    }

    .lf-list__image a {
        height: 220px;
    }

    /* FEATURED ITEM — ALSO STACKS ON MOBILE */
    .lf-list__item--featured {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding-bottom: 2rem;
        padding-top: 2rem;
        border-bottom: 1px solid #DEDEDE;
    }

    .lf-list__item--featured:first-child {
        padding-top: 0;
    }

    .lf-list__item--featured:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .lf-list__item--featured .lf-list__title {
        font-size: 1.1rem;
    }

    .lf-list__item--featured .lf-list__excerpt {
        font-size: 0.875rem;
    }

    /* RESET TABLET FONT OVERRIDES — RESTORE NORMAL MOBILE SIZES */
    .lf-list__title {
        font-size: 1.1rem;
    }

    .lf-list__excerpt {
        font-size: 0.875rem;
    }

    .lf-list__byline {
        font-size: 0.8rem;
    }

    .lf-pill {
        font-size: 0.75rem;
        padding: 0.2rem 0.75rem;
    }

    /* CARD TITLE — SLIGHTLY SMALLER ON MOBILE */
    .lf-card__title {
        font-size: 1.1rem;
    }

    /* ARCHIVE TITLE — SMALLER ON MOBILE */
    .lf-archive-title {
        font-size: 22px;
        line-height: 30px;
        padding-top: 15px;
    }

    /* SEE ALL BAR — STACK BUTTONS ON MOBILE */
    .lf-see-all-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    /* PAGINATION — TIGHTEN ON MOBILE */
    .lf-pagination .page-numbers,
    .nav-links .page-numbers {
        padding: 0.3rem 0.4rem;
        font-size: 0.8rem;
    }
}