/* ============================================================
   BLOG DETAIL — Split Layout  (image left · content right)
   ============================================================ */

.header {
    background: rgba(15, 15, 25, 0.97) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.25);
}

/* ── Outer shell ── */
.fb-overlay {
    background: #111;
    margin-top: 80px;
}

.fb-layout {
    display: flex;
    height: calc(100vh - 80px);
    width: 100%;
}

/* ════════════════════════════════
   LEFT — full image
   ════════════════════════════════ */
.fb-left {
    flex: 1;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-width: 0;
    overflow: hidden;
}

/* subtle vignette around the image */
.fb-left::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.55) 100%);
    pointer-events: none;
}

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

.fb-img-placeholder {
    color: #333;
    font-size: 5rem;
}

/* ── Prev / Next nav arrows ── */
.fb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.14);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
    z-index: 10;
    cursor: pointer;
}
.fb-nav-prev { left: 18px; }
.fb-nav-next { right: 18px; }

.fb-nav:hover {
    background: rgba(255,255,255,0.24);
    color: #fff;
}
.fb-nav-prev:hover { transform: translateY(-50%) translateX(-3px); }
.fb-nav-next:hover { transform: translateY(-50%) translateX(3px); }


/* Back / close button */
.fb-close {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
    z-index: 10;
}
.fb-close:hover {
    background: rgba(255,255,255,0.22);
    transform: scale(1.08);
    color: #fff;
}

/* ════════════════════════════════
   RIGHT — content panel
   ════════════════════════════════ */
.fb-right {
    width: 440px;
    flex-shrink: 0;
    background: #fff;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 80px);
    overflow: hidden;
    box-shadow: -4px 0 30px rgba(0,0,0,0.18);
}

.fb-right-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* ── Author ── */
.fb-author {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    border-bottom: 1px solid #f0f2f5;
    flex-shrink: 0;
}
.fb-author-pic {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary, #e86f1c), #c45c10);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(232,111,28,0.35);
}
.fb-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.fb-author-info strong {
    font-size: 0.92rem;
    color: #050505;
    font-weight: 700;
}
.fb-author-info span {
    font-size: 0.74rem;
    color: #8a8d91;
}
.fb-author-info i {
    font-size: 0.62rem;
    margin-left: 3px;
    color: #8a8d91;
}

/* ── Post text ── */
.fb-text {
    padding: 14px 18px 10px;
    overflow-y: auto;
    flex-shrink: 1;
    min-height: 60px;
    max-height: 240px;
    font-size: 0.93rem;
    line-height: 1.65;
    color: #1c1e21;
    scrollbar-width: thin;
    scrollbar-color: #e0e0e0 transparent;
}
.fb-text::-webkit-scrollbar { width: 4px; }
.fb-text::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }
.fb-text p { margin: 0 0 0.55rem; }
.fb-text p:last-child { margin-bottom: 0; }

.fb-post-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #050505;
    margin: 0 0 8px;
    line-height: 1.35;
}

/* ── Reaction counts ── */
.fb-counts {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 18px;
    border-top: 1px solid #f0f2f5;
    border-bottom: 1px solid #f0f2f5;
    flex-shrink: 0;
}
.fb-counts-left {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.84rem;
    color: #65676b;
}
.fb-reaction-icons {
    display: inline-flex;
    align-items: center;
}
.fb-r-heart {
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #f33e58;
    color: #fff;
    font-size: 0.52rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    box-shadow: 0 1px 4px rgba(243,62,88,0.4);
}
.fb-r-like {
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--primary, #e86f1c);
    color: #fff;
    font-size: 0.52rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: -5px;
    box-shadow: 0 1px 4px rgba(232,111,28,0.4);
}
.fb-counts-right {
    font-size: 0.84rem;
    color: #65676b;
}

/* ── Action bar ── */
.fb-actions {
    display: flex;
    align-items: center;
    padding: 2px 10px;
    border-bottom: 1px solid #f0f2f5;
    flex-shrink: 0;
}
.fb-action {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 0;
    font-size: 0.88rem;
    font-weight: 600;
    color: #65676b;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
    font-family: inherit;
    outline: none;
}
.fb-action:hover { background: #f0f2f5; color: #050505; }
.fb-action i { font-size: 1.05rem; }
.fb-action.active { color: var(--primary, #e86f1c); }
.fb-action.active i { color: var(--primary, #e86f1c); }

@keyframes fb-pop-anim {
    0%   { transform: scale(1); }
    35%  { transform: scale(1.3); }
    65%  { transform: scale(0.9); }
    100% { transform: scale(1); }
}
.fb-action.fb-pop i { animation: fb-pop-anim 0.4s ease; }

/* ── Comments (scrollable) ── */
.fb-comments {
    flex: 1;
    overflow-y: auto;
    padding: 12px 18px;
    scrollbar-width: thin;
    scrollbar-color: #e0e0e0 transparent;
}
.fb-comments::-webkit-scrollbar { width: 4px; }
.fb-comments::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

.fb-comment {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    align-items: flex-start;
}
.fb-c-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #e4e6eb;
    color: #65676b;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.fb-c-bubble {
    background: #f0f2f5;
    border-radius: 18px;
    padding: 8px 14px;
    max-width: calc(100% - 60px);
}
.fb-c-bubble strong {
    display: block;
    font-size: 0.79rem;
    color: #050505;
    font-weight: 700;
    margin-bottom: 2px;
}
.fb-c-bubble p {
    font-size: 0.88rem;
    line-height: 1.45;
    color: #1c1e21;
    margin: 0;
    word-break: break-word;
}
.fb-c-time {
    font-size: 0.67rem;
    color: #8a8d91;
    align-self: flex-end;
    margin-bottom: 4px;
    flex-shrink: 0;
    white-space: nowrap;
}

.fb-no-comments {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #b0b3b8;
    font-size: 0.87rem;
}

/* ── Write comment ── */
.fb-write {
    padding: 10px 18px;
    border-top: 1px solid #f0f2f5;
    flex-shrink: 0;
    background: #fff;
}
.fb-write-form {
    display: flex;
    align-items: center;
    gap: 8px;
}
.fb-w-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary, #e86f1c), #c45c10);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.fb-w-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f0f2f5;
    border-radius: 22px;
    padding: 0 6px 0 14px;
    min-height: 36px;
    border: 1.5px solid transparent;
    transition: border-color 0.2s, background 0.2s;
}
.fb-w-input-wrap:focus-within {
    background: #fff;
    border-color: var(--primary, #e86f1c);
}
.fb-w-input-wrap input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.88rem;
    color: #050505;
    outline: none;
    font-family: inherit;
    padding: 8px 0;
}
.fb-w-input-wrap input::placeholder { color: #8a8d91; }
.fb-w-input-wrap button {
    background: none;
    border: none;
    color: var(--primary, #e86f1c);
    font-size: 0.95rem;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 50%;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fb-w-input-wrap button:hover { background: rgba(232,111,28,0.1); }

.fb-w-login {
    font-size: 0.86rem;
    color: #65676b;
    text-align: center;
    padding: 4px 0;
}
.fb-w-login a {
    color: var(--primary, #e86f1c);
    font-weight: 600;
    text-decoration: none;
}
.fb-w-login a:hover { text-decoration: underline; }

/* ════════════════════════════════
   SHARE MODAL
   ════════════════════════════════ */
.share-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}
.share-modal-overlay.active { opacity: 1; visibility: visible; }

.share-modal {
    background: #fff;
    border-radius: 14px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.28);
    transform: translateY(20px) scale(0.96);
    transition: transform 0.25s cubic-bezier(.22,.68,0,1.2);
    overflow: hidden;
}
.share-modal-overlay.active .share-modal { transform: translateY(0) scale(1); }

.share-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e4e6eb;
}
.share-modal-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #050505;
    margin: 0;
}
.share-modal-close {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #e4e6eb;
    border: none;
    color: #65676b;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.share-modal-close:hover { background: #d8dadf; }

.share-modal-body {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 18px 20px;
}
.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 12px 6px;
    border-radius: 10px;
    text-decoration: none;
    color: #050505;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    background: none;
    border: none;
    font-family: inherit;
}
.share-option:hover { background: #f2f2f2; }
.share-option-icon {
    width: 46px; height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
}
.share-wa .share-option-icon  { background: #25d366; }
.share-fb .share-option-icon  { background: #1877f2; }
.share-tw .share-option-icon  { background: #000; }
.share-tg .share-option-icon  { background: #0088cc; }
.share-em .share-option-icon  { background: #ea4335; }
.share-copy .share-option-icon { background: var(--primary, #e86f1c); }

.share-modal-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px 16px;
    border-top: 1px solid #e4e6eb;
}
.share-modal-link input {
    flex: 1;
    padding: 8px 12px;
    border: 1.5px solid #e4e6eb;
    border-radius: 8px;
    font-size: 0.8rem;
    color: #65676b;
    background: #f0f2f5;
    outline: none;
    font-family: inherit;
    min-width: 0;
}
.share-modal-link input:focus { border-color: var(--primary, #e86f1c); }
.share-modal-link button {
    padding: 8px 16px;
    background: var(--primary, #e86f1c);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
    white-space: nowrap;
}
.share-modal-link button:hover { background: var(--primary-dark, #c45c10); }

/* ════════════════════════════════
   RESPONSIVE
   ════════════════════════════════ */
@media (max-width: 900px) {
    .fb-right { width: 380px; }
}

@media (max-width: 700px) {
    .fb-overlay { margin-top: 70px; }

    /* Fixed viewport height so right panel can scroll internally */
    .fb-layout {
        flex-direction: column;
        height: calc(100vh - 70px);
    }

    /* Bigger image — roughly 45% of viewport height */
    .fb-left {
        flex: none;
        height: 45vh;
        min-height: 260px;
    }

    /* Nav arrows closer to edges on small screens */
    .fb-nav-prev { left: 10px; }
    .fb-nav-next { right: 10px; }
    .fb-nav { width: 40px; height: 40px; font-size: 0.95rem; }

    /* Right panel fills the rest and constrains its children */
    .fb-right {
        width: 100%;
        flex: 1;
        min-height: 0;
        height: auto;
    }

    /* Comments fill available space and scroll */
    .fb-comments {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}
