/* FEF Social Feed — shared styles for Instagram + Facebook feed widgets.
   Mobile-first, responsive; columns are set inline by Elementor per breakpoint. */

.fef-sf-wrap { width: 100%; }

.fef-sf-header { display: flex; justify-content: center; margin-bottom: 14px; }
.fef-sf-follow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 18px; border-radius: 999px;
    font-weight: 600; text-decoration: none; font-size: 14px;
    transition: transform .15s ease, filter .15s ease;
}
.fef-sf-follow:hover { transform: translateY(-1px); filter: brightness(1.05); }

.fef-sf-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.fef-sf-item {
    display: block;
    position: relative;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    outline: none;
}
.fef-sf-item:focus-visible { box-shadow: 0 0 0 3px rgba(59,130,246,.6); }

.fef-sf-media {
    position: relative;
    overflow: hidden;
    background: #eef0f2;
    line-height: 0;
}

/* Aspect ratios */
.fef-sf-ratio-1-1  .fef-sf-media { aspect-ratio: 1 / 1; }
.fef-sf-ratio-4-5  .fef-sf-media { aspect-ratio: 4 / 5; }
.fef-sf-ratio-16-9 .fef-sf-media { aspect-ratio: 16 / 9; }

.fef-sf-img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .45s ease;
}
.fef-sf-ratio-auto .fef-sf-img { height: auto; object-fit: contain; }
.fef-sf-zoom .fef-sf-item:hover .fef-sf-img { transform: scale(1.07); }

/* Type badge (video / album) */
.fef-sf-type {
    position: absolute; top: 8px; right: 8px;
    background: rgba(0,0,0,.6); color: #fff;
    width: 26px; height: 26px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; line-height: 1;
}

/* Hover overlay */
.fef-sf-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.45);
    opacity: 0;
    transition: opacity .3s ease;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 8px; padding: 14px; text-align: center;
    color: #fff;
}
.fef-sf-item:hover .fef-sf-overlay { opacity: 1; }
.fef-sf-glyph { font-size: 26px; line-height: 1; opacity: .95; }

.fef-sf-caption {
    font-size: 13px; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Below-image meta (always-on captions / dates) */
.fef-sf-meta { padding: 10px 12px 12px; }
.fef-sf-caption-below {
    font-size: 13px; line-height: 1.45; color: #1c1e21;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.fef-sf-date { font-size: 11px; color: #8a8d91; margin-top: 6px; }

/* Facebook card look */
.fef-sf-facebook .fef-sf-item {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    border-radius: 8px;
}

/* Setup + error cards (admin/editor only for errors) */
.fef-sf-setup {
    text-align: center; padding: 34px 20px;
    background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 12px;
    color: #475569;
}
.fef-sf-setup-icon { font-size: 34px; margin-bottom: 8px; }
.fef-sf-setup h4 { margin: 0 0 6px; font-size: 16px; color: #334155; }
.fef-sf-setup p { margin: 0; font-size: 13px; }
.fef-sf-error {
    padding: 12px 14px; background: #fef2f2; border: 1px solid #fecaca;
    border-radius: 8px; color: #b91c1c; font-size: 13px;
}

/* Lightbox */
.fef-sf-lightbox {
    position: fixed; inset: 0; z-index: 999999;
    background: rgba(0,0,0,.9);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s;
}
.fef-sf-lightbox.is-open { opacity: 1; visibility: visible; }
.fef-sf-lightbox img, .fef-sf-lightbox video {
    max-width: 92vw; max-height: 88vh; border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.fef-sf-lb-close {
    position: absolute; top: 18px; right: 22px;
    background: none; border: none; color: #fff; font-size: 34px;
    line-height: 1; cursor: pointer; opacity: .8;
}
.fef-sf-lb-close:hover { opacity: 1; }

@media (max-width: 600px) {
    .fef-sf-caption { -webkit-line-clamp: 3; }
}

@media (prefers-reduced-motion: reduce) {
    .fef-sf-img, .fef-sf-overlay, .fef-sf-lightbox, .fef-sf-follow { transition: none; }
    .fef-sf-zoom .fef-sf-item:hover .fef-sf-img { transform: none; }
}
