/* Department student newsletter pages (cseai-newsletter.php, law-newsletter.php). Cards come from departments/newsletter-list.php */

.nl-wrap {
    --nl-blue: #0B4FA8;
    --nl-navy: #0A1F44;
    --nl-ink: #1F2937;
    --nl-muted: #5B6B85;
    --nl-soft: #EEF3FF;
    --nl-line: #E3E8F2;
    --nl-gold: #FFC400;
    max-width: 1040px;
    margin-top: 18px;
    color: var(--nl-ink);
}

/* intro box: page heading + description */
.nl-intro {
    padding: 24px 28px;
    border-radius: 16px;
    background: linear-gradient(120deg, var(--nl-soft) 0%, #F7F9FE 100%);
    border-left: 5px solid var(--nl-blue);
}
.nl-badge {
    display: inline-flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--nl-blue);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.nl-intro h1 {
    margin: 0 0 10px;
    color: var(--nl-navy);
    font-size: 24px;
    font-weight: 800;
    line-height: 1.3;
}
.nl-intro p {
    margin: 0 0 8px;
    font-size: 15.5px;
    line-height: 1.7;
}
.nl-intro p:last-child {
    margin-bottom: 0;
    color: var(--nl-muted);
    font-size: 14px;
}

/* issues: small cards, newest first */
.nl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 210px));
    gap: 20px;
    margin: 26px 0 0;
    padding: 0;
    list-style: none;
}
.nl-card a {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--nl-line);
    border-radius: 14px;
    color: inherit;
    text-decoration: none;
    transition: box-shadow .2s ease, transform .2s ease;
}
.nl-card a:hover,
.nl-card a:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px -18px rgba(10, 31, 68, .55);
}
.nl-card-cover {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: var(--nl-soft);
}
.nl-card-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform .35s ease;
}
.nl-card a:hover .nl-card-cover img,
.nl-card a:focus-visible .nl-card-cover img {
    transform: scale(1.05);
}
/* "Read PDF" label that slides up over the cover on hover / keyboard focus */
.nl-card-hover {
    position: absolute;
    inset: auto 0 0 0;
    padding: 10px;
    background: linear-gradient(0deg, rgba(10, 31, 68, .92) 0%, rgba(10, 31, 68, .75) 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
    transform: translateY(100%);
    transition: transform .25s ease;
}
.nl-card a:hover .nl-card-hover,
.nl-card a:focus-visible .nl-card-hover {
    transform: none;
}
@media (hover: none) {
    .nl-card-hover {                       /* touch screens have no hover: always show it */
        transform: none;
    }
}
.nl-card-body {
    display: block;
    padding: 12px 14px 14px;
    border-top: 3px solid var(--nl-gold);
}
.nl-card-title {
    display: block;
    color: var(--nl-navy);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.3;
}
.nl-card-meta {
    display: block;
    margin-top: 4px;
    color: var(--nl-muted);
    font-size: 13px;
}

/* no cover / no issues yet */
.nl-nocover {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--nl-blue);
    font-size: 30px;
    font-weight: 800;
}
.nl-empty {
    margin-top: 26px;
    padding: 28px;
    border: 2px dashed var(--nl-line);
    border-radius: 16px;
    text-align: center;
}
.nl-empty-title {
    margin: 0 0 6px;
    color: var(--nl-navy);
    font-size: 18px;
    font-weight: 800;
}
.nl-empty p:last-child {
    margin: 0;
    color: var(--nl-muted);
}

@media (max-width: 767px) {
    .nl-intro {
        padding: 18px;
    }
    .nl-intro h1 {
        font-size: 20px;
    }
    .nl-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .nl-card-cover img,
    .nl-card-hover,
    .nl-card a {
        transition: none;
    }
}

/* month of the issue: highlighted in the site blue */
.nl-card-date {
    color: var(--nl-blue);
    font-weight: 700;
}
