/* =====================================================
   SCIA FACEBOOK NEWS FEED
   Compact responsive card grid
   ===================================================== */

/* Four cards per row on desktop */
.scia-facebook-carousel,
.scia-facebook-viewport {
    width: 100%;
}

.scia-facebook-feed-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-flow: row;
    gap: 16px;
    width: 100%;
    margin-top: 0;
    overflow: visible;
}

/* Card */
.scia-facebook-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    overflow: hidden;
    border: 1px solid #edf0f5;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(45, 20, 89, .06);
    transition: transform .25s ease, box-shadow .25s ease;
}

.scia-facebook-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 9px 24px rgba(45, 20, 89, .10);
}

/* Image */
.scia-facebook-card-image {
    position: relative;
    display: block;
    width: 100%;
    height: 155px;
    overflow: hidden;
    background: #f0eff8;
}

.scia-facebook-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.scia-facebook-card:hover .scia-facebook-card-image img {
    transform: scale(1.04);
}

.scia-facebook-image-icon {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #1877f2;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 3px 9px rgba(0, 0, 0, .14);
}

.scia-facebook-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #1877f2;
    font-size: 38px;
}

/* Compact card content */
.scia-facebook-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    padding: 12px 14px 14px;
}

.scia-facebook-date {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 7px;
    color: #9299a8;
    font-size: 11px;
    line-height: 1.4;
}

.scia-facebook-date i {
    color: #7770b5;
}

.scia-facebook-description {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #34344f;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-line;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

/* Simple Read More link: no footer border, no filled button */
.scia-facebook-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: 9px;
    padding: 0;
    border: 0;
}

.scia-facebook-source {
    display: none;
}

.scia-facebook-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #51458f !important;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none !important;
    box-shadow: none;
    transition: color .2s ease;
}

.scia-facebook-read-more:hover {
    background: transparent;
    color: #0076ad !important;
    text-decoration: underline !important;
}

.scia-facebook-read-more i {
    font-size: 10px;
}

/* Empty state */
.scia-facebook-empty {
    padding: 28px 15px;
    border-radius: 10px;
    background: #fff;
    color: #9299a8;
    text-align: center;
}

.scia-facebook-empty i {
    display: block;
    margin-bottom: 8px;
    color: #1877f2;
    font-size: 28px;
}

/* Keep carousel controls out of the normal card-grid layout */
.scia-facebook-arrow {
    display: none;
}

/* Tablet: two cards per row */
@media (max-width: 991px) {
    .scia-facebook-feed-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .scia-facebook-card-image {
        height: 165px;
    }
}

/* Mobile: one card per row */
@media (max-width: 575px) {
    .scia-facebook-feed-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .scia-facebook-card-image {
        height: 190px;
    }

    .scia-facebook-card-body {
        padding: 12px 13px 14px;
    }
}
