/* ── VMI Stories Frontend ────────────────────────────────────────────────────
   Filter bar reuses .vmig-filter-bar and .vmig-filter-field from the
   Groups Add-On frontend.css so both filters look identical.
   ───────────────────────────────────────────────────────────────────────────*/

html {
    scroll-behavior: smooth;
}

.vmis-member-stories {
    font-family: Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
}

/* ── Filter form layout ──────────────────────────────────────────────────────*/

.vmis-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    width: 100%;
}

.vmis-filter-form .vmig-filter-field {
    flex: 1;
}

.vmis-date-input {
    padding: 7px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    color: #333;
    width: 100%;
    box-sizing: border-box;
}

/* Buttons use .vmig-filter-reset from the Groups Add-On frontend.css */

/* ── Story cards ─────────────────────────────────────────────────────────────*/

.vmis-story {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.vmis-story:hover {
    border-color: #B39DD9;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.vmis-story-title {
    color: #333;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.vmis-story-date {
    color: #999;
    font-size: 14px;
    margin: 0 0 10px 0;
}

.vmis-story-member {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.vmis-story-member img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #B39DD9;
    flex-shrink: 0;
}

.vmis-story-member-info {
    flex: 1;
}

.vmis-story-member-name {
    color: #8B6BA8;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    text-decoration: none;
    display: inline-block;
}

.vmis-story-member-name:hover {
    text-decoration: underline;
}

.vmis-story-member-tagline {
    color: #999;
    font-size: 13px;
    margin: 3px 0 0 0;
}

.vmis-story-content {
    color: #555;
    line-height: 1.8;
    font-size: 15px;
}

.vmis-story-content p:last-child {
    margin-bottom: 0;
}

.vmis-story-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 15px 0;
}

/* ── Read more ───────────────────────────────────────────────────────────────*/

.vmis-story-preview { display: block; }

.vmis-story-full { display: none; }
.vmis-story-full.expanded { display: block; }

.vmis-read-more-btn {
    background: linear-gradient(135deg, #8B6BA8 0%, #B39DD9 100%);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s;
}

.vmis-read-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(139,107,168,0.4);
}

/* ── Empty state ─────────────────────────────────────────────────────────────*/

.vmis-stories-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    background: #fff;
    border: 2px dashed #ddd;
    border-radius: 12px;
}

.vmis-stories-empty::before {
    content: "📖";
    font-size: 64px;
    display: block;
    margin-bottom: 20px;
    opacity: 0.3;
}

/* ── Mobile ──────────────────────────────────────────────────────────────────*/

@media (max-width: 600px) {
    .vmis-filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .vmis-date-input {
        min-width: 0;
    }

    .vmig-filter-reset {
        width: 100%;
    }

    .vmis-story {
        padding: 20px;
    }

    .vmis-story-title {
        font-size: 20px;
    }
}
