/* ==========================================================================
   Post Layout Modern Cards – Styles
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── CSS Variables ── */
:root {
    --plm-accent:        #abc855;
    --plm-accent-dark:   #8da83e;
    --plm-accent-light:  #d4e89a;
    --plm-bg:            #f8f8f6;
    --plm-surface:       #ffffff;
    --plm-border:        #e8e8e4;
    --plm-text:          #1a1a1a;
    --plm-text-muted:    #6b6b6b;
    --plm-text-light:    #9a9a9a;
    --plm-radius:        14px;
    --plm-radius-sm:     8px;
    --plm-shadow-sm:     0 2px 8px rgba(0,0,0,.06);
    --plm-shadow-md:     0 6px 24px rgba(0,0,0,.10);
    --plm-shadow-lg:     0 16px 48px rgba(0,0,0,.14);
    --plm-font-display:  'DM Serif Display', Georgia, serif;
    --plm-font-body:     'DM Sans', -apple-system, sans-serif;
    --plm-transition:    all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Wrapper Layout ── */
.plm-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    max-width: 1240px;
    margin: 0 auto;
    padding: 40px 24px;
    font-family: var(--plm-font-body);
    color: var(--plm-text);
    background: var(--plm-bg);
}

@media (max-width: 900px) {
    .plm-wrapper {
        grid-template-columns: 1fr;
        gap: 48px;
        padding: 24px 16px;
    }
}

/* ── Section Titles ── */
.plm-section-title {
    font-family: var(--plm-font-display);
    font-size: 2rem;
    font-weight: 400;
    color: var(--plm-text);
    margin: 0 0 32px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.plm-section-title span {
    position: relative;
}
.plm-section-title span::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--plm-accent);
    border-radius: 2px;
}

/* ── Main Posts Grid ── */
.plm-main {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Card Base ── */
.plm-card {
    background: var(--plm-surface);
    border-radius: var(--plm-radius);
    overflow: hidden;
    box-shadow: var(--plm-shadow-sm);
    border: 1px solid var(--plm-border);
    transition: var(--plm-transition);
    margin-bottom: 28px;
}
.plm-card:hover {
    box-shadow: var(--plm-shadow-md);
    transform: translateY(-3px);
    border-color: var(--plm-accent-light);
}

/* ── Featured Card (first post) ── */
.plm-card--featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 36px;
    border-radius: 20px;
    border: none;
    box-shadow: var(--plm-shadow-md);
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}
.plm-card--featured:hover {
    box-shadow: var(--plm-shadow-lg);
    transform: translateY(-4px);
}
.plm-card--featured .plm-card__thumb {
    /* height:100% fills the grid row on desktop; min-height ensures a
       minimum visible area when content is short */
    height: 100%;
    min-height: 340px;
    /* NOTE: the duplicate definition below (after base block) takes precedence
       on desktop — this one sets desktop defaults before base block loads */
}
.plm-card--featured .plm-card__body {
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: transparent;
}
.plm-card--featured .plm-card__title a {
    color: #ffffff;
    font-size: 1.6rem;
}
.plm-card--featured .plm-card__excerpt {
    color: rgba(255,255,255,0.75);
}
.plm-card--featured .plm-card__meta {
    color: rgba(255,255,255,0.5);
    border-color: rgba(255,255,255,0.12);
}

@media (max-width: 680px) {
    /* Featured card: stack image above body */
    .plm-card--featured {
        grid-template-columns: 1fr;
        grid-template-rows: 240px auto;   /* image row has explicit height */
    }
    .plm-card--featured .plm-card__thumb {
        width: 100%;
        height: 100%;       /* fills the 240px grid row */
        min-height: unset;
    }
    .plm-card--featured .plm-card__thumb img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
}

/* ── Regular Cards ── */
.plm-card--regular {
    display: grid;
    grid-template-columns: 200px 1fr;
}

/* Tablets: shrink image column */
@media (max-width: 680px) {
    .plm-card--regular {
        grid-template-columns: 140px 1fr;
    }
    .plm-card--regular .plm-card__thumb {
        width: 140px;
        height: 100%;
        min-height: 160px;
    }
}

/* Mobile: stack image above body */
@media (max-width: 480px) {
    .plm-card--regular {
        grid-template-columns: 1fr;
        grid-template-rows: 200px auto;   /* image row has explicit height */
    }
    .plm-card--regular .plm-card__thumb {
        width: 100%;
        height: 100%;       /* fills the 200px grid row */
        min-height: unset;
    }
    .plm-card--regular .plm-card__thumb img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
}

/* ── Thumbnail ──
   Rule: every thumb container has a FIXED pixel height.
   The <img> is position:absolute + inset:0, filling 100% of that box.
   object-fit:cover crops tall images; object-position:center keeps the subject.
   Short images scale up to fill — no gaps, no stretching aspect ratio.
   ──────────────────────────────────────────────────────────────────── */
.plm-card__thumb-link {
    display: block;
    overflow: hidden;   /* contains the hover zoom */
    flex-shrink: 0;
}

/* Base thumb — used only when no variant overrides height */
.plm-card__thumb {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 220px;      /* default fixed height for any card that doesn't override */
}

/* Featured card: fills the grid column height, tall side-by-side */
.plm-card--featured .plm-card__thumb {
    height: 100%;
    min-height: 340px;
}

/* Regular horizontal card: fixed height, image column fills the card height */
.plm-card--regular .plm-card__thumb {
    width: 220px;
    height: 100%;
    min-height: 180px;
}

/* Universal image rule — ALL thumbs */
.plm-card__thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.plm-card:hover .plm-card__thumb img {
    transform: scale(1.06);
}

/* ── Category Badge ── */
/* Lives INSIDE .plm-card__thumb (position:relative, overflow:hidden).
   Uses absolute positioning to anchor to the bottom-left of the image.
   z-index keeps it above the <img>. The overflow:hidden on the parent
   correctly clips it to the image boundary — no escapees. */
.plm-card__cats {
    position: absolute;
    bottom: 12px;
    left: 12px;
    top: auto;
    right: auto;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    pointer-events: none;
}
.plm-card__cats .plm-cat {
    pointer-events: auto;
}
.plm-card__cats--nothumbnail {
    position: static;
    margin-bottom: 10px;
    pointer-events: auto;
}
.plm-cat {
    display: inline-block;
    background: var(--plm-accent);
    color: #1a1a1a;
    font-family: var(--plm-font-body);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 100px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.22);
}

/* ── Card Body ── */
.plm-card__body {
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--plm-surface);
}

/* ── Meta ── */
.plm-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    font-size: 0.78rem;
    color: var(--plm-text-muted);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--plm-border);
}
.plm-meta-date,
.plm-meta-author {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.plm-meta-date svg,
.plm-meta-author svg {
    opacity: 0.7;
    flex-shrink: 0;
}

/* ── Card Title ── */
.plm-card__title {
    font-family: var(--plm-font-display);
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.35;
    margin: 0;
}
.plm-card__title a {
    color: var(--plm-text);
    text-decoration: none;
    transition: color 0.2s;
}
.plm-card__title a:hover {
    color: var(--plm-accent-dark);
}
.plm-card--featured .plm-card__title {
    font-size: 1.7rem;
}

/* ── Excerpt ── */
.plm-card__excerpt {
    font-size: 0.88rem;
    line-height: 1.65;
    color: var(--plm-text-muted);
    margin: 0;
    flex: 1;
}

/* ── Read More Button ── */
.plm-btn-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--plm-accent);
    color: #1a1a1a;
    font-family: var(--plm-font-body);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-decoration: none;
    padding: 9px 18px;
    border-radius: 100px;
    align-self: flex-start;
    margin-top: auto;
    transition: var(--plm-transition);
    border: 2px solid transparent;
}
.plm-btn-read-more:hover {
    background: transparent;
    border-color: var(--plm-accent);
    color: var(--plm-accent-dark);
}
.plm-btn-read-more svg {
    transition: transform 0.25s;
}
.plm-btn-read-more:hover svg {
    transform: translateX(3px);
}

/* ── No Posts ── */
.plm-no-posts {
    color: var(--plm-text-muted);
    font-style: italic;
    padding: 20px 0;
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.plm-sidebar {
    position: relative;
}
.plm-sidebar__inner {
    position: sticky;
    top: 32px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.plm-sidebar__title {
    font-family: var(--plm-font-display);
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--plm-text);
    margin: 0 0 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.plm-sidebar__title span {
    position: relative;
}
.plm-sidebar__title span::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--plm-accent);
    border-radius: 2px;
}

/* ── Sidebar List ── */
.plm-sidebar__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.plm-sidebar__item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid var(--plm-border);
    transition: var(--plm-transition);
}
.plm-sidebar__item:last-child {
    border-bottom: none;
}
.plm-sidebar__item:hover {
    padding-left: 4px;
}

.plm-sidebar__thumb-link {
    flex-shrink: 0;
    display: block;
    width: 72px;
    height: 72px;
    border-radius: var(--plm-radius-sm);
    overflow: hidden;   /* contains zoom + crops image */
}
.plm-sidebar__thumb {
    position: relative;
    width: 72px;
    height: 72px;       /* fixed square — always crops to this box */
    overflow: hidden;
    border-radius: var(--plm-radius-sm);
}
.plm-sidebar__thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s;
}
.plm-sidebar__item:hover .plm-sidebar__thumb img {
    transform: scale(1.08);
}

.plm-sidebar__content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.plm-sidebar__cat {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--plm-accent-dark);
}
.plm-sidebar__post-title {
    font-family: var(--plm-font-display);
    font-size: 0.92rem;
    font-weight: 400;
    line-height: 1.4;
    margin: 0;
}
.plm-sidebar__post-title a {
    color: var(--plm-text);
    text-decoration: none;
    transition: color 0.2s;
}
.plm-sidebar__post-title a:hover {
    color: var(--plm-accent-dark);
}
.plm-sidebar__date {
    font-size: 0.72rem;
    color: var(--plm-text-light);
    margin-top: 2px;
}

/* ── Sidebar Widgets ── */
.plm-sidebar__widgets {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 2px solid var(--plm-border);
}
.plm-widget__title {
    font-family: var(--plm-font-display);
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 16px;
    color: var(--plm-text);
}

/* ==========================================================================
   CARD STYLE VARIANTS
   ========================================================================== */

/* Minimal */
.plm-style-minimal .plm-card {
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--plm-border);
    box-shadow: none;
    background: transparent;
}
.plm-style-minimal .plm-card:hover {
    box-shadow: none;
    transform: none;
    border-color: var(--plm-accent);
}
.plm-style-minimal .plm-card__body {
    background: transparent;
}
.plm-style-minimal .plm-card--featured {
    background: var(--plm-text);
    border-radius: var(--plm-radius);
    border: none;
}

/* Bold */
.plm-style-bold .plm-card--regular {
    border-radius: 0;
    border-left: 4px solid var(--plm-accent);
}
.plm-style-bold .plm-card--regular:hover {
    border-left-color: var(--plm-accent-dark);
}
.plm-style-bold .plm-section-title {
    font-size: 2.4rem;
}
.plm-style-bold .plm-cat {
    border-radius: 0;
    font-size: 0.75rem;
}
.plm-style-bold .plm-btn-read-more {
    border-radius: 0;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
    .plm-wrapper {
        grid-template-columns: 1fr 280px;
        gap: 28px;
    }
}
@media (max-width: 900px) {
    .plm-wrapper {
        grid-template-columns: 1fr;
    }
    .plm-sidebar__inner {
        position: static;
    }
    .plm-sidebar__list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 16px;
    }
    .plm-sidebar__item {
        border: 1px solid var(--plm-border);
        border-radius: var(--plm-radius-sm);
        padding: 14px;
        background: var(--plm-surface);
        align-items: flex-start;
    }
    .plm-sidebar__item:hover {
        padding-left: 14px;
        box-shadow: var(--plm-shadow-sm);
    }
    /* Keep sidebar thumbs fixed size on mobile */
    .plm-sidebar__thumb-link,
    .plm-sidebar__thumb {
        width: 72px;
        height: 72px;
        flex-shrink: 0;
    }
    .plm-sidebar__thumb img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
}

/* ==========================================================================
   ENTRANCE ANIMATIONS (driven by JS IntersectionObserver)
   ========================================================================== */
.plm-card--hidden {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.plm-card--visible {
    opacity: 1;
    transform: translateY(0);
}
.plm-sidebar__item--hidden {
    opacity: 0;
    transform: translateX(16px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.plm-sidebar__item--visible {
    opacity: 1;
    transform: translateX(0);
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */
.plm-btn-read-more:focus-visible,
.plm-card__title a:focus-visible,
.plm-sidebar__post-title a:focus-visible,
.plm-sidebar__thumb-link:focus-visible {
    outline: 2px solid var(--plm-accent);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ==========================================================================
   ARCHIVE  [post_archive]
   ========================================================================== */

.plm-archive {
    max-width: 1240px;
    margin: 0 auto;
    padding: 40px 24px;
    font-family: var(--plm-font-body);
    color: var(--plm-text);
    background: var(--plm-bg);
}

/* ── Archive Header ── */
.plm-archive__header {
    margin-bottom: 36px;
    padding-bottom: 32px;
    border-bottom: 2px solid var(--plm-border);
}
.plm-archive__title-wrap {
    margin-bottom: 24px;
}
.plm-archive__title {
    font-family: var(--plm-font-display);
    font-size: 2rem;
    font-weight: 400;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--plm-text);
}
.plm-archive__title svg {
    color: var(--plm-accent);
    flex-shrink: 0;
}
.plm-archive__subtitle {
    font-size: 0.875rem;
    color: var(--plm-text-muted);
    margin: 0;
}
.plm-archive__subtitle strong {
    color: var(--plm-text);
    font-weight: 600;
}

/* ── Filters ── */
.plm-archive__filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
}
.plm-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 160px;
    min-width: 140px;
    max-width: 260px;
}
.plm-filter-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--plm-text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}
.plm-filter-input,
.plm-filter-select {
    height: 40px;
    padding: 0 12px;
    border: 1.5px solid var(--plm-border);
    border-radius: var(--plm-radius-sm);
    background: var(--plm-surface);
    font-family: var(--plm-font-body);
    font-size: 0.85rem;
    color: var(--plm-text);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
}
.plm-filter-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    cursor: pointer;
}
.plm-filter-input:focus,
.plm-filter-select:focus {
    border-color: var(--plm-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--plm-accent) 20%, transparent);
}
.plm-filter-actions {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding-bottom: 0;
    flex-shrink: 0;
}
.plm-filter-btn {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 20px;
    border-radius: var(--plm-radius-sm);
    font-family: var(--plm-font-body);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--plm-transition);
    text-decoration: none;
    border: none;
    white-space: nowrap;
}
.plm-filter-btn--apply {
    background: var(--plm-accent);
    color: #1a1a1a;
}
.plm-filter-btn--apply:hover {
    background: var(--plm-accent-dark);
    color: #fff;
}
.plm-filter-btn--reset {
    background: transparent;
    color: var(--plm-text-muted);
    border: 1.5px solid var(--plm-border);
}
.plm-filter-btn--reset:hover {
    border-color: var(--plm-text-muted);
    color: var(--plm-text);
}

/* ── Active Filter Pills ── */
.plm-archive__active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}
.plm-active-label {
    font-size: 0.78rem;
    color: var(--plm-text-muted);
    font-weight: 500;
}
.plm-active-pill {
    display: inline-flex;
    align-items: center;
    background: color-mix(in srgb, var(--plm-accent) 18%, transparent);
    color: var(--plm-accent-dark);
    border: 1px solid color-mix(in srgb, var(--plm-accent) 35%, transparent);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 100px;
}

/* ── Archive Grid ── */
.plm-archive__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
    margin-bottom: 48px;
}

/* ── Archive Card ── */
.plm-archive-card {
    background: var(--plm-surface);
    border-radius: var(--plm-radius);
    overflow: hidden;
    border: 1px solid var(--plm-border);
    box-shadow: var(--plm-shadow-sm);
    display: flex;
    flex-direction: column;
    transition: var(--plm-transition);
}
.plm-archive-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--plm-shadow-md);
    border-color: var(--plm-accent-light);
}

/* Thumb */
.plm-archive-card__thumb-link {
    display: block;
    overflow: hidden;   /* contains the hover zoom */
}
.plm-archive-card__thumb {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 210px;      /* fixed height — tall images crop, short scale up */
}
.plm-archive-card__thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.plm-archive-card:hover .plm-archive-card__thumb img {
    transform: scale(1.06);
}

/* Body */
.plm-archive-card__body {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}
.plm-archive-card__title {
    font-family: var(--plm-font-display);
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.4;
    margin: 0;
}
.plm-archive-card__title a {
    color: var(--plm-text);
    text-decoration: none;
    transition: color 0.2s;
}
.plm-archive-card__title a:hover {
    color: var(--plm-accent-dark);
}

/* ── Empty State ── */
.plm-archive__empty {
    text-align: center;
    padding: 80px 24px;
    color: var(--plm-text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.plm-archive__empty svg {
    opacity: 0.35;
}
.plm-archive__empty p {
    font-size: 1rem;
    margin: 0;
}

/* ── Pagination ── */
.plm-archive__pagination {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}
.plm-archive__pagination .page-numbers {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.plm-archive__pagination .page-numbers li {
    display: flex;
}
.plm-archive__pagination .page-numbers a,
.plm-archive__pagination .page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--plm-radius-sm);
    font-family: var(--plm-font-body);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--plm-transition);
    border: 1.5px solid var(--plm-border);
    color: var(--plm-text-muted);
    background: var(--plm-surface);
    gap: 4px;
}
.plm-archive__pagination .page-numbers a:hover {
    border-color: var(--plm-accent);
    color: var(--plm-text);
    background: color-mix(in srgb, var(--plm-accent) 10%, transparent);
}
.plm-archive__pagination .page-numbers .current {
    background: var(--plm-accent);
    border-color: var(--plm-accent);
    color: #1a1a1a;
    font-weight: 700;
}
.plm-archive__pagination .page-numbers .dots {
    border-color: transparent;
    background: transparent;
    cursor: default;
}

/* ── Archive entrance animation ──
   Cards are VISIBLE by default. JS adds .plm-archive-card--animate
   to the grid ONLY once it's ready, then triggers per-card reveals.
   This way, if JS fails, all cards remain fully visible. */
.plm-archive__grid.plm-js-ready .plm-archive-card {
    opacity: 0;
    transform: translateY(20px);
}
.plm-archive-card {
    transition: opacity 0.45s ease, transform 0.45s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.plm-archive-card.plm-archive-card--visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Style variants ── */
.plm-style-minimal .plm-archive-card {
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--plm-border);
    box-shadow: none;
}
.plm-style-minimal .plm-archive-card:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--plm-accent);
}
.plm-style-bold .plm-archive-card {
    border-radius: 0;
    border-left: 4px solid var(--plm-accent);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .plm-archive {
        padding: 24px 16px;
    }
    .plm-archive__grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 20px;
    }
    .plm-archive-card__thumb {
        height: 200px;      /* ensure explicit height on all tablet archive cards */
    }
    .plm-filter-group {
        max-width: 100%;
        flex: 1 1 calc(50% - 8px);
    }
    .plm-filter-actions {
        flex: 1 1 100%;
    }
}
@media (max-width: 480px) {
    .plm-archive__grid {
        grid-template-columns: 1fr;
    }
    .plm-archive-card__thumb {
        height: 200px;      /* explicit fixed height — no collapsing on mobile */
        width: 100%;
    }
    .plm-archive-card__thumb img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
    .plm-filter-group {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* ── Archive accessibility ── */
.plm-archive-card__title a:focus-visible,
.plm-archive-card__thumb-link:focus-visible,
.plm-filter-btn:focus-visible {
    outline: 2px solid var(--plm-accent);
    outline-offset: 3px;
    border-radius: 4px;
}
