/*
 * Editorial cards — Figma "Blog / 35" featured-articles pattern.
 * Image (280×186 ratio) → beige category chip → IvyJournal 24px title → Manrope snippet.
 * Also provides a neutral "link card" variant for feature blocks on the homepage.
 */

.redesign .card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

@media (max-width: 1024px) {
    .redesign .card-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile article carousel (Figma Featured Articles node 11490:544
 * Row, 4 cards × 291 px with 24 px gaps + slider dots). Horizontal
 * snap-scroller with 20 px side peek so the next card hints at the
 * edge. Matches the featured-podcast carousel style. */
@media (max-width: 768px) {
    .redesign .card-grid {
        display: flex;
        grid-template-columns: none;
        gap: 24px;
        padding: 0 20px;
        margin: 0 -20px;                /* bleed to viewport edges so snap works */
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .redesign .card-grid::-webkit-scrollbar { display: none; }
    .redesign .card {
        flex: 0 0 calc(100% - 40px);
        max-width: 291px;               /* Figma mobile card width */
        scroll-snap-align: center;
    }
}

.redesign .card {
    display: flex;
    flex-direction: column;
    gap: 24px;
    text-decoration: none;
    color: inherit;
    transition: transform 180ms ease;
}

.redesign .card:hover {
    text-decoration: none;
    transform: translateY(-2px);
}

.redesign .card__media {
    aspect-ratio: 280 / 186;
    overflow: hidden;
    background: var(--brand-offwhite-peach);
    position: relative;
}

.redesign .card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Hover shadow + image zoom now provided by the .media-lift utility
 * (public_html/css/redesign/components/media-lift.css). Add the
 * class alongside .card__media on the blade: `class="card__media media-lift"`. */

.redesign .card__body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Beige category chip — matches Figma "Tag" component */
.redesign .chip {
    align-self: flex-start;
    display: inline-block;
    padding: 4px 8px;
    background: var(--brand-beige);
    color: var(--brand-brown);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    line-height: 1.5;
}

.redesign .card__title {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 24px;
    line-height: 1.4;
    color: var(--text-heading);
    margin: 0;
}

.redesign .card__meta {
    font-size: 14px;
    color: var(--text-paragraph);
}

.redesign .card__summary {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-paragraph);
    margin: 0;
    text-align: justify;          /* Figma cards use justified text */
    text-align-last: left;
}

/* 3-line clamp for featured-articles summaries */
.redesign .card__summary--clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Feature card — used on the homepage trio (Mikvah / Calendar / Classes).
 * Image + heading + link list below. More visual weight than .card. */
.redesign .feature-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.redesign .feature-card__media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--brand-offwhite-peach);
}

.redesign .feature-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.redesign .feature-card__title {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 32px;
    line-height: 1.3;
    color: var(--text-heading);
    margin: 0;
}

.redesign .feature-card__links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-top: 1px solid var(--border-primary);
    padding-top: 16px;
}

.redesign .feature-card__links a {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    color: var(--brand-sea-green);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: color var(--hover-dur) var(--hover-ease);
}

.redesign .feature-card__links a:hover {
    color: var(--brand-sea-green-darker);
    text-decoration: none;
}

.redesign .feature-card__links a::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 2px;
    background: currentColor;
    transition: width 160ms ease;
}

.redesign .feature-card__links a:hover::before {
    width: 24px;
}
