/* =============================================================================
   LF GRID — REUSABLE COLUMN LAYOUT
   ============================================================================= */

.lf-grid {
    display: grid;
    gap: 1.5rem;
    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.)
   ============================================================================= */

/* CARD — FLEX COLUMN SO FOOTER ALWAYS PINS TO BOTTOM */
.lf-card {
    border: 1px solid #DEDEDE;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* FILLS FULL GRID CELL HEIGHT */
}

/* IMAGE */
.lf-card__image {
    display: block;
    overflow: hidden;
}

.lf-card__image img {
    width: 100%;
    display: block;
    max-height: 250px;
    object-fit: cover;
    /* KEEPS IMAGES UNIFORM WITHOUT STRETCHING */
    margin-bottom: 0 !important;
}

/* BODY — FLEX COLUMN, GROWS TO FILL SPACE ABOVE FOOTER */
.lf-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

/* TITLE */
.lf-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 1rem 0 !important;
}

.lf-card__title a {
    color: #000;
    text-decoration: none;
}

.lf-card__title:hover a {
    color: #0000EE !important;
    /* TITLE TURNS BLUE ONLY WHEN HOVERING THE TITLE ITSELF */
}

/* EXCERPT */
.lf-card__excerpt {
    font-size: 0.875rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
    padding-bottom: 1rem;
}

/* PILLS WRAPPER — PUSHES TO BOTTOM OF BODY ABOVE FOOTER */
.lf-card__pills {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding-top: 0.5rem;
}

/* FOOTER BAR — ALWAYS PINNED TO BOTTOM OF CARD */
.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;
    /* SUBTLE PIPE SEPARATOR */
}

.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: 1.5rem;
}

/* LIST ITEM — IMAGE LEFT, CONTENT + FOOTER RIGHT */
.lf-list__item {
    display: grid;
    grid-template-columns: 1fr 2fr;
    /* IMAGE TAKES 1/3, CONTENT TAKES 2/3 */
    grid-template-rows: 1fr auto;
    /* CONTENT ROW GROWS, FOOTER ROW HUGS BOTTOM */
    align-items: stretch;
    border: 1px solid #DEDEDE;
    overflow: hidden;
}

/* NO IMAGE — CONTENT AND FOOTER SPAN FULL WIDTH */
.lf-list__item--no-image {
    grid-template-columns: 1fr;
}

/* IMAGE — SPANS BOTH ROWS TO FILL FULL LEFT COLUMN HEIGHT */
.lf-list__image {
    grid-row: 1 / -1;
    /* SPANS ALL ROWS SO IMAGE FILLS FULL HEIGHT INCLUDING FOOTER ROW */
    display: block;
    overflow: hidden;
}

.lf-list__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin-bottom: 0 !important;
}

/* CONTENT COLUMN — PADDING ON CHILDREN, NOT HERE, SO FOOTER BLEEDS TO EDGES */
.lf-list__content {
    display: flex;
    flex-direction: column;
    padding: 0;
}

/* TITLE */
.lf-list__title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 !important;
    padding: 1rem 1rem 0 1rem;
}

.lf-list__title a {
    color: #000;
    text-decoration: none;
}

.lf-list__title:hover a {
    color: #0000EE !important;
    /* TITLE TURNS BLUE ONLY WHEN HOVERING THE TITLE ITSELF */
}

/* EXCERPT */
.lf-list__excerpt {
    font-size: 0.875rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
    padding: 1rem 1rem 0 1rem;
}

/* PILLS WRAPPER — PUSHES TO BOTTOM OF CONTENT COLUMN ABOVE FOOTER */
.lf-list__pills {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 1rem 1rem 0 1rem;
}

/* FOOTER BAR — SITS IN ITS OWN GRID ROW, BLEEDS TO LEFT/RIGHT/BOTTOM EDGES */
.lf-list__footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #000;
    color: #fff;
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
    margin-top: 1rem;
}

.lf-list__footer-date {
    color: #fff;
}

.lf-list__footer-sep {
    color: #fff;
    opacity: 0.5;
    /* SUBTLE PIPE SEPARATOR */
}

.lf-list__footer-author {
    color: #fff;
    text-decoration: none;
}

.lf-list__footer-author:hover {
    color: #fff;
}

/* =============================================================================
   LF PILL — REUSABLE TAXONOMY PILL (CATEGORIES AND TAGS)
   ============================================================================= */

.lf-pill {
    display: inline-block;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    /* FULL PILL SHAPE */
    text-decoration: none;
    white-space: nowrap;
}

.lf-pill:hover {
    color: #fff;
}

/* CATEGORY PILL — BLACK BACKGROUND */
.lf-pill--category {
    background-color: #000;
}

.lf-pill--category:hover {
    background-color: #333;
}

/* TAG PILL — SLIGHTLY SOFTER TO DIFFERENTIATE FROM CATEGORIES */
.lf-pill--tag {
    background-color: #444;
}

.lf-pill--tag:hover {
    background-color: #666;
}

/* =============================================================================
   LF SEE ALL BAR — SHORTCODE SPECIFIC, LINKS TO TAG/CATEGORY ARCHIVES
   ============================================================================= */

.lf-see-all-bar {
    display: flex;
    justify-content: flex-end;
    /* PINS BUTTONS TO THE TOP RIGHT */
    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 PAGINATION — REUSABLE PAGINATION
   ============================================================================= */

.lf-pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.lf-pagination .page-numbers {
    display: inline-block;
    background-color: #000;
    color: #fff;
    padding: 0.4rem 0.75rem;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0.2rem;
}

.lf-pagination .page-numbers.current {
    background-color: #333;
    /* SLIGHTLY LIGHTER FOR ACTIVE PAGE */
}

.lf-pagination .page-numbers:hover {
    background-color: #333;
    color: #fff;
}

/* =============================================================================
   LF ARCHIVE HEADER — USED BY tag.php AND category.php
   ============================================================================= */

.lf-archive-header {
    margin-bottom: 2rem;
}

.lf-archive-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.lf-archive-description {
    color: #666;
}

/* =============================================================================
   LF EMPTY STATE — REUSABLE NO RESULTS MESSAGE
   ============================================================================= */

.lf-none {
    text-align: center;
    color: #666;
}