/* -----------------------------------------------------------------------
   Y Story – Elementor Widget Styles
   ----------------------------------------------------------------------- */

.ystory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    width: 100%;
}

/* ── Card ── */
.ystory-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.ystory-card:hover {
    background-color: #f5f5f5;
    transform: translateY(-3px);
    text-decoration: none;
    color: inherit;
}

.ystory-card:focus-visible {
    outline: 2px solid #c0392b;
    outline-offset: 3px;
}

.ystory-card-inner {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
}

/* ── Default text base (set once on the container) ── */
.ystory-grid {
    font-family: 'Open Sans', sans-serif, "微软雅黑", "Microsoft Yahei", "宋体", "SimSun";
    font-weight: 400;
    font-size: 16px;
    line-height: 27px;
    color: #333333;
}

/* ── Date ── */
.ystory-card-date {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #888888;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* ── Title ── */
.ystory-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: #1a1a1a;
    transition: color 0.2s ease;
}

.ystory-card:hover .ystory-card-title {
    color: #c0392b;
}

/* ── Excerpt ── */
.ystory-card-excerpt {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #555555;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .ystory-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .ystory-grid {
        grid-template-columns: 1fr;
    }
}
