/*
 * YSAN Journal Highlights — full-width editorial card system
 * Scoped to the WordPress journal highlights plugin.
 */

/* Ensure the feed is not constrained by the
   old placeholder's narrow grid column. */
section.ysan-jh-active > .ysan-jh-grid,
.ysan-jh-mount > .ysan-jh-grid {
    box-sizing: border-box;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 24px !important;

    width: min(1180px, calc(100% - 48px)) !important;
    max-width: 1180px !important;

    margin: 35px auto 20px !important;
    padding: 0 !important;

    grid-column: 1 / -1 !important;
    flex: 0 0 100%;
    align-self: stretch;
}

/* Preserve the original section heading and visual design. */
.ysan-jh-card {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;

    width: 100%;
    min-width: 0;
    min-height: 355px;

    background: #fff;
    border: 1px solid #e4dece;
    border-top: 3px solid #c99836;

    padding: 28px 29px 25px;

    box-shadow: 0 10px 30px rgba(3, 48, 52, .045);
    transition: transform .2s ease, box-shadow .2s ease;
}

.ysan-jh-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 19px 42px rgba(3, 48, 52, .10);
}

.ysan-jh-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 23px;
}

.ysan-jh-meta {
    color: #9a7025;
    font-family: Arial, sans-serif;
    font-size: 11px;
    line-height: 1.55;
    letter-spacing: .075em;
    font-weight: 750;
    text-transform: uppercase;
    overflow-wrap: normal;
}

.ysan-jh-index {
    color: #d0c7b4;
    font-size: 15px;
    font-weight: 700;
    flex: 0 0 auto;
}

.ysan-jh-card h3 {
    margin: 0 0 17px !important;
    color: #053f44 !important;
    font-family: "Roboto", Arial, sans-serif !important;
    font-size: clamp(20px, 1.7vw, 24px) !important;
    line-height: 1.3 !important;
    letter-spacing: -.025em;
    font-weight: 800 !important;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.ysan-jh-notice {
    display: inline-block;
    margin: 0 0 15px;
    color: #8b682d;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.55;
}

.ysan-jh-excerpt {
    margin: 0 0 24px !important;
    color: #617477 !important;
    font-size: 14px !important;
    line-height: 1.75 !important;
    flex: 1;
    overflow-wrap: normal;
    word-break: normal;
}

.ysan-jh-card-footer {
    padding-top: 17px;
    margin-top: auto;
    border-top: 1px solid #e5dece;
}

.ysan-jh-link {
    display: inline-block;
    color: #053f44 !important;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .035em;
    text-decoration: none !important;
    border-bottom: 2px solid #c99836;
    padding-bottom: 4px;
}

.ysan-jh-link:hover {
    color: #087b8c !important;
}

.ysan-jh-active [hidden] {
    display: none !important;
}

@media (max-width: 920px) {
    section.ysan-jh-active > .ysan-jh-grid,
    .ysan-jh-mount > .ysan-jh-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 18px !important;
    }
}

@media (max-width: 640px) {
    section.ysan-jh-active > .ysan-jh-grid,
    .ysan-jh-mount > .ysan-jh-grid {
        grid-template-columns: 1fr !important;
        width: calc(100% - 30px) !important;
        gap: 16px !important;
        margin: 25px auto !important;
    }

    .ysan-jh-card {
        min-height: 0;
        padding: 23px;
    }

    .ysan-jh-card h3 {
        font-size: 22px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ysan-jh-card {
        transform: none !important;
        transition: none !important;
    }
}
