/* ===========================================
   CTSFW Publications — List/Card Styles
   =========================================== */

/* Base wrapper: now forced to ONE column */
.ctsfw-pubs {
    --navy: #001846;
    --maroon: #7b1824;
    --eggshell: #f6f4ee;
    --ink: #111827;
    --ring: rgba(0, 0, 0, .08);

    font-family: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

    /* One column grid */
    display: grid;
    grid-template-columns: 1fr;
    /* 👈 single column */
    gap: 16px;
    align-items: stretch;
}

/* Themes (text colors only; backgrounds are on cards) */
.ctsfw-pubs.theme-light {
    color: var(--ink);
}

.ctsfw-pubs.theme-dark {
    color: var(--eggshell);
}

/* -------------------------------------------
   Card
   ------------------------------------------- */
.pub-item.pub-card {
    border: 1px solid var(--ring);
    background: #fff;
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
    will-change: transform, box-shadow;
}

.ctsfw-pubs.theme-dark .pub-item.pub-card {
    background: #111827;
    border-color: rgba(255, 255, 255, .08);
}

/* Clickable area */
.pub-card__link {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 14px;
    padding: 12px;
    text-decoration: none;
    color: inherit;
    min-height: 152px;
}

/* Cover media column */
.pub-card__media {
    position: relative;
    width: 110px;
    height: 150px;
    overflow: hidden;
    border: 1px solid var(--ring);
    background: #f9fafb;
}

.ctsfw-pubs.theme-dark .pub-card__media {
    background: #0b1020;
    border-color: rgba(255, 255, 255, .08);
}

/* Cover image */
.pub-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translateZ(0);
    /* GPU hint */
}

/* Copy column */
.pub-card__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

/* Title and subtitle (wp_title/wp_subtitle) */
.pub-card__title {
    font-size: 0.98rem;
    line-height: 1.2;
    margin: 0 0 4px 0;
    font-weight: 600;
    word-wrap: break-word;
}

.pub-card__subtitle {
    font-size: 0.85rem;
    margin: 0;
    opacity: .9;
    word-wrap: break-word;
}

/* Hover enlarge effect (like Events) */
.pub-item.pub-card:hover {
    transform: scale(1.01);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}

/* Drawn SVG ribbon for NEW */
.pub-card__new {
    position: absolute;
    top: 0;
    left: 0;
    width: 48px;
    height: 48px;
    pointer-events: none;
}

.pub-card__new svg {
    width: 100%;
    height: 100%;
    display: block;
}

.pub-card__new path {
    fill: var(--maroon);
}

.pub-card__new text {
    font-size: 14px;
    fill: #fff;
    font-weight: 700;
    letter-spacing: .5px;
}

/* Empty state */
.ctsfw-pubs__empty {
    grid-column: 1 / -1;
    padding: 1rem;
    border: 1px dashed var(--ring);
    background: rgba(0, 0, 0, .02);
    font-style: italic;
    text-align: center;
}

.ctsfw-pubs.theme-dark .ctsfw-pubs__empty {
    background: rgba(255, 255, 255, .03);
    border-color: rgba(255, 255, 255, .12);
}

/* Accessibility utility */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 1px, 1px) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Small screens: keep single column; tighten card a bit */
@media (max-width: 480px) {
    .pub-card__link {
        grid-template-columns: 90px 1fr;
        gap: 10px;
        padding: 10px;
    }

    .pub-card__media {
        width: 90px;
        height: 130px;
    }
}