/**
 * Winwall Social Media Blog Feed Stylesheet
 * Modern timeline feed design inspired by Facebook & LinkedIn
 */

/* ==========================================================================
   FEED LAYOUT & CONTAINER
   ========================================================================== */

/* Feed Hero Banner */
.feed-hero-banner {
    position: relative;
    min-height: 380px;
    padding: 70px 0;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.feed-hero-banner::before {
    position: absolute;
    content: '';
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.45) 0%, rgba(15, 23, 42, 0.25) 50%, rgba(15, 23, 42, 0.4) 100%);
    pointer-events: none;
}

.feed-hero-banner .container {
    position: relative;
    z-index: 2;
}

.feed-hero-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 18px;
    padding: 36px 40px;
    max-width: 580px;
    box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.22);
}

.feed-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    background: linear-gradient(135deg, #fd571c 0%, #ff7539 100%);
    padding: 5px 14px;
    border-radius: 30px;
    margin-bottom: 12px;
}

.feed-hero-card h1 {
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.25;
    font-weight: 800;
    color: #192d66;
    margin-bottom: 10px;
}

.feed-hero-card p {
    font-size: 15px;
    line-height: 24px;
    color: #334155;
    font-weight: 500;
    margin-bottom: 0;
}

.winwall-feed-wrapper {
    background-color: #f1f5f9;
    min-height: 80vh;
    padding: 40px 15px 90px 15px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1e293b;
}

.winwall-feed-container {
    max-width: 760px;
    margin: 0 auto;
    width: 100%;
}

/* Back to Feed button on single view */
.btn-back-feed {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    color: #192d66;
    border: 1px solid #cbd5e1;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-bottom: 22px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}

.btn-back-feed:hover {
    background: #fd571c;
    color: #ffffff;
    border-color: #fd571c;
    transform: translateX(-3px);
}

/* Feed Timeline Header */
.winwall-feed-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    padding: 18px 24px;
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
    border: 1px solid #e2e8f0;
    gap: 16px;
    flex-wrap: wrap;
}

.feed-topbar-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.feed-topbar-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #192d66 0%, #254294 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(25, 45, 102, 0.2);
}

.feed-topbar-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 2px 0;
    line-height: 1.3;
}

.feed-topbar-sub {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.feed-topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.feed-topbar-badge {
    background: #eef2ff;
    color: #4338ca;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #e0e7ff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.feed-topbar-badge i {
    color: #10b981;
    font-size: 8px;
}

/* ==========================================================================
   FEED POST CARD
   ========================================================================== */

.feed-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 3px 16px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
    margin-bottom: 26px;
    overflow: hidden;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
    scroll-margin-top: 100px;
}

.feed-card:hover {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.09), 0 2px 6px rgba(15, 23, 42, 0.04);
}

.feed-card:target {
    border-color: #fd571c;
    box-shadow: 0 0 0 3px rgba(253, 87, 28, 0.2), 0 8px 24px rgba(15, 23, 42, 0.1);
}

/* Card Header: Author, Badges, Options */
.feed-card-header {
    padding: 20px 24px 14px 24px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.feed-author-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.feed-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #fd571c;
    box-shadow: 0 2px 8px rgba(253, 87, 28, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    padding: 4px;
    box-sizing: border-box;
}

.feed-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.feed-author-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.feed-author-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.feed-author-name {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.feed-verified-badge {
    color: #0284c7;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
}

/* Date & Time Badges (Small, rounded badge/button style as requested) */
.feed-badges-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.feed-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 9999px;
    line-height: 1.4;
    letter-spacing: 0.2px;
    text-decoration: none;
    border: 1px solid transparent;
}

.feed-badge-date {
    background-color: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}

.feed-badge-time {
    background-color: #eef2ff;
    color: #4f46e5;
    border-color: #e0e7ff;
}

.feed-badge-rel {
    background-color: #fff7ed;
    color: #c2410c;
    border-color: #ffedd5;
}

.feed-header-options {
    flex-shrink: 0;
}

.feed-permalink-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.feed-permalink-btn:hover {
    background: #f1f5f9;
    color: #192d66;
}

/* ==========================================================================
   POST TITLE (H1) & CONTENT BODY
   ========================================================================== */

.feed-card-body {
    padding: 0 24px 18px 24px;
}

/* H1 Post Title */
h1.feed-post-title {
    font-size: 21px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    margin: 4px 0 14px 0;
    word-break: break-word;
    font-family: inherit;
}

h1.feed-post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

h1.feed-post-title a:hover {
    color: #fd571c;
}

/* Formatted Content */
.feed-post-content {
    font-size: 15px;
    line-height: 1.7;
    color: #334155;
    word-break: break-word;
}

.feed-post-content p {
    margin-bottom: 12px;
}

.feed-post-content p:last-child {
    margin-bottom: 0;
}

.feed-post-content a {
    color: #fd571c;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 500;
    transition: color 0.15s ease;
}

.feed-post-content a:hover {
    color: #e0440b;
}

.feed-post-content ul, 
.feed-post-content ol {
    margin: 10px 0 14px 20px;
    padding-left: 10px;
}

.feed-post-content li {
    margin-bottom: 6px;
}

.feed-post-content blockquote {
    border-left: 4px solid #fd571c;
    background: #fff7ed;
    padding: 10px 16px;
    border-radius: 0 8px 8px 0;
    margin: 14px 0;
    font-style: italic;
    color: #9a3412;
}

.feed-post-content h2, 
.feed-post-content h3, 
.feed-post-content h4 {
    color: #1e293b;
    font-weight: 700;
    margin: 18px 0 10px 0;
    line-height: 1.4;
}

.feed-post-content h2 { font-size: 18px; }
.feed-post-content h3 { font-size: 16px; }
.feed-post-content h4 { font-size: 15px; }

/* ==========================================================================
   POST MEDIA (IMAGE GALLERY)
   ========================================================================== */

.feed-media-container {
    margin: 16px 0 18px 0;
    border-radius: 12px;
    overflow: hidden;
    background: #0f172a;
    border: 1px solid #e2e8f0;
}

/* 1 Image */
.feed-media-grid-1 {
    display: block;
    width: 100%;
}

.feed-media-grid-1 .feed-media-item {
    width: 100%;
    max-height: 480px;
    display: block;
    overflow: hidden;
    cursor: zoom-in;
    background: #0f172a;
}

.feed-media-grid-1 img {
    width: 100%;
    height: 100%;
    max-height: 480px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.feed-media-grid-1 .feed-media-item:hover img {
    transform: scale(1.02);
}

/* 2 Images */
.feed-media-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    background: #cbd5e1;
}

.feed-media-grid-2 .feed-media-item {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    cursor: zoom-in;
    background: #0f172a;
}

.feed-media-grid-2 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.feed-media-grid-2 .feed-media-item:hover img {
    transform: scale(1.03);
}

/* 3 Images */
.feed-media-grid-3 {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3px;
    background: #cbd5e1;
    max-height: 420px;
}

.feed-media-grid-3 .feed-media-item:first-child {
    height: 100%;
}

.feed-media-grid-3 .feed-media-col {
    display: flex;
    flex-direction: column;
    gap: 3px;
    height: 100%;
}

.feed-media-grid-3 .feed-media-item {
    overflow: hidden;
    cursor: zoom-in;
    height: 100%;
    background: #0f172a;
}

.feed-media-grid-3 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.feed-media-grid-3 .feed-media-item:hover img {
    transform: scale(1.03);
}

/* 4 or more Images */
.feed-media-grid-4 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    background: #cbd5e1;
}

.feed-media-grid-4 .feed-media-item {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    cursor: zoom-in;
    position: relative;
    background: #0f172a;
}

.feed-media-grid-4 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.feed-media-grid-4 .feed-media-item:hover img {
    transform: scale(1.03);
}

.feed-media-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 26px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}

.feed-media-overlay:hover {
    background: rgba(15, 23, 42, 0.75);
}

/* ==========================================================================
   POST ATTACHMENTS (FILES & DOCUMENTS)
   ========================================================================== */

.feed-files-container {
    margin: 14px 0 16px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feed-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    color: #1e293b;
    transition: all 0.2s ease;
}

.feed-file-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.04);
}

.feed-file-lead {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.feed-file-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.feed-file-icon.icon-pdf { background: #fee2e2; color: #dc2626; }
.feed-file-icon.icon-doc { background: #dbeafe; color: #2563eb; }
.feed-file-icon.icon-xls { background: #dcfce7; color: #16a34a; }
.feed-file-icon.icon-zip { background: #ffedd5; color: #ea580c; }
.feed-file-icon.icon-other { background: #f1f5f9; color: #64748b; }

.feed-file-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.feed-file-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.feed-file-size {
    font-size: 12px;
    color: #64748b;
}

.feed-file-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    background: #192d66;
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    flex-shrink: 0;
    transition: background 0.15s ease;
}

.feed-file-action:hover {
    background: #fd571c;
    color: #ffffff;
}

/* ==========================================================================
   SOCIAL ENGAGEMENT BAR (LIKE, SHARE, COPY LINK)
   ========================================================================== */

.feed-card-footer {
    border-top: 1px solid #f1f5f9;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: #fafbfc;
}

.feed-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    text-decoration: none;
}

.feed-action-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.feed-action-btn.btn-like.liked {
    color: #ef4444;
}

.feed-action-btn.btn-like.liked i {
    font-weight: 900;
    transform: scale(1.15);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feed-action-btn.btn-share:hover {
    color: #0284c7;
}

.feed-action-btn.btn-copylink:hover {
    color: #fd571c;
}

/* ==========================================================================
   EMPTY FEED STATE
   ========================================================================== */

.feed-empty-state {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 60px 24px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

.feed-empty-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #fff7ed;
    color: #fd571c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 20px;
}

.feed-empty-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.feed-empty-desc {
    font-size: 14px;
    color: #64748b;
    max-width: 420px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==========================================================================
   MODERN LIGHTBOX MODAL
   ========================================================================== */

.feed-lightbox-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 29, 0.94);
    backdrop-filter: blur(8px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.feed-lightbox-backdrop.active {
    display: flex;
    opacity: 1;
}

.feed-lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.feed-lightbox-img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    user-select: none;
}

.feed-lightbox-close {
    position: absolute;
    top: -46px;
    right: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: none;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.feed-lightbox-close:hover {
    background: #fd571c;
}

.feed-lightbox-prev,
.feed-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    border: none;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.feed-lightbox-prev { left: -60px; }
.feed-lightbox-next { right: -60px; }

.feed-lightbox-prev:hover,
.feed-lightbox-next:hover {
    background: #fd571c;
}

.feed-lightbox-caption {
    color: #cbd5e1;
    font-size: 13px;
    margin-top: 10px;
    text-align: center;
}

/* ==========================================================================
   FEED TOAST NOTIFICATION
   ========================================================================== */

.feed-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #0f172a;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 9999999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.feed-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.feed-toast i {
    color: #10b981;
    font-size: 16px;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE, TABLET, DESKTOP)
   ========================================================================== */

@media (max-width: 768px) {
    .winwall-feed-wrapper {
        padding: 20px 10px 60px 10px;
    }

    .winwall-feed-topbar {
        padding: 14px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .feed-card {
        border-radius: 12px;
        margin-bottom: 18px;
    }

    .feed-card-header {
        padding: 16px 16px 10px 16px;
    }

    .feed-card-body {
        padding: 0 16px 14px 16px;
    }

    h1.feed-post-title {
        font-size: 18px;
        margin: 2px 0 10px 0;
    }

    .feed-post-content {
        font-size: 14.5px;
        line-height: 1.65;
    }

    .feed-badges-row {
        gap: 4px;
    }

    .feed-badge {
        font-size: 11px;
        padding: 2px 8px;
    }

    .feed-card-footer {
        padding: 8px 12px;
    }

    .feed-action-btn {
        padding: 6px 10px;
        font-size: 12.5px;
    }

    .feed-lightbox-prev { left: 10px; }
    .feed-lightbox-next { right: 10px; }
    .feed-lightbox-close { top: 10px; right: 10px; }
}

@media (max-width: 480px) {
    .feed-media-grid-2,
    .feed-media-grid-3,
    .feed-media-grid-4 {
        grid-template-columns: 1fr;
    }

    .feed-media-grid-3 .feed-media-col {
        display: none;
    }

    .feed-author-name {
        font-size: 14px;
    }

    .feed-file-item {
        padding: 10px 12px;
    }

    .feed-file-name {
        font-size: 13px;
        max-width: 170px;
    }

    .feed-file-action {
        padding: 5px 10px;
        font-size: 11.5px;
    }
}
