/* Flow Flow Timeline Converter v14.0 */

.flowflow-timeline-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
    clear: both;
}
.flowflow-timeline-wrapper .original-flowflow {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    min-width: 320px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    overflow: hidden !important;
    z-index: -1 !important;
}

/* ══ FILTER DROPDOWNS ══════════════════════════════════ */
.tl-controls {
    max-width: 700px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tl-select-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 0 4px 0 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    transition: border-color .15s;
}

.tl-select-wrap:focus-within {
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26,115,232,.1);
}

.tl-select-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .6px;
    color: #94a3b8;
    text-transform: uppercase;
    white-space: nowrap;
    user-select: none;
}

.tl-select {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    outline: none;
    padding: 10px 28px 10px 4px;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    min-width: 110px;
}

/* ══ TIMELINE ══════════════════════════════════════════ */
.flowflow-timeline-wrapper .timeline-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 8px 16px 48px;
    position: relative;
    box-sizing: border-box;
}

.flowflow-timeline-wrapper .timeline-container::before {
    content: '';
    position: absolute;
    left: 50%; top: 0; bottom: 56px;
    width: 2px;
    background: linear-gradient(to bottom, transparent 0%, #cbd5e1 5%, #cbd5e1 92%, transparent 100%);
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 0;
}

/* Month pill */
.flowflow-timeline-wrapper .timeline-month {
    display: table;
    margin: 28px auto 16px;
    padding: 5px 20px;
    background: #1a73e8;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .8px;
    border-radius: 20px;
    position: relative;
    z-index: 2;
    text-transform: uppercase;
}

/* Item */
.flowflow-timeline-wrapper .timeline-item {
    position: relative;
    margin-bottom: 24px;
    padding-left: calc(50% + 22px);
    box-sizing: border-box;
    z-index: 1;
}

.flowflow-timeline-wrapper .timeline-item:nth-child(even) {
    padding-left: 0;
    padding-right: calc(50% + 22px);
}

/* Dot */
.flowflow-timeline-wrapper .timeline-item::before {
    content: '';
    position: absolute;
    left: calc(50% - 6px);
    top: 20px;
    width: 12px; height: 12px;
    background: #1a73e8;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #1a73e8;
    z-index: 3;
    pointer-events: none;
}

/* Date label */
.flowflow-timeline-wrapper .timeline-date {
    position: absolute;
    top: 16px;
    right: calc(50% + 28px);
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
    text-align: right;
}

.flowflow-timeline-wrapper .timeline-item:nth-child(even) .timeline-date {
    right: auto;
    left: calc(50% + 28px);
    text-align: left;
}

/* Card */
.flowflow-timeline-wrapper .timeline-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}

.flowflow-timeline-wrapper .timeline-content:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,.13);
    transform: translateY(-2px);
}

/* ══ VIDEO THUMBNAIL + PLAY BUTTON ══════════════════════ */
/* Landscape 16:9 */
.flowflow-timeline-wrapper .post-video-thumb {
    position: relative;
    width: 100%;
    height: 200px;
    background: #0f172a center/cover no-repeat;
    border-radius: 12px 12px 0 0;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Portrait 9:16 (Reels) */
.flowflow-timeline-wrapper .post-video-thumb-portrait {
    height: 280px;
}

/* Darken overlay on hover */
.flowflow-timeline-wrapper .post-video-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.18);
    transition: background .2s;
    border-radius: 12px 12px 0 0;
}

.flowflow-timeline-wrapper .post-video-thumb:hover::after {
    background: rgba(0,0,0,.35);
}

/* Play button circle */
.flowflow-timeline-wrapper .tl-play-btn {
    position: relative;
    z-index: 2;
    width: 52px; height: 52px;
    border-radius: 50%;
    background: rgba(26,115,232,.92);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,.4);
    transition: transform .2s, background .2s;
    flex-shrink: 0;
}

.flowflow-timeline-wrapper .post-video-thumb:hover .tl-play-btn {
    transform: scale(1.1);
    background: #1a73e8;
}

/* No thumbnail: solid dark bg with centered play */
.flowflow-timeline-wrapper .post-video-thumb:not([style*="background-image"]) {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
}

/* ══ PHOTO ═════════════════════════════════════════════ */
.flowflow-timeline-wrapper .post-image-wrap {
    display: block;
    width: 100%;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    background: #f1f5f9;
    line-height: 0;
    cursor: zoom-in;
}

.flowflow-timeline-wrapper .post-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

.flowflow-timeline-wrapper .post-image-wrap:hover .post-img { transform: scale(1.04); }

/* ══ TEXT ══════════════════════════════════════════════ */
.flowflow-timeline-wrapper .post-link { text-decoration: none; color: inherit; display: block; }
.flowflow-timeline-wrapper .post-link:hover .post-text { color: #1a73e8; }

.flowflow-timeline-wrapper .post-text {
    padding: 14px 16px 10px;
    font-size: 14px;
    line-height: 1.65;
    color: #334155;
    margin: 0;
    word-break: break-word;
}

/* ══ STATS ═════════════════════════════════════════════ */
.flowflow-timeline-wrapper .post-stats {
    display: flex;
    gap: 14px;
    padding: 8px 16px 10px;
    border-top: 1px solid #f1f5f9;
}
.flowflow-timeline-wrapper .post-stats .stat-item { font-size: 12px; color: #94a3b8; }

/* ══ FOOTER ════════════════════════════════════════════ */
.flowflow-timeline-wrapper .post-footer {
    padding: 8px 16px 10px;
    border-top: 1px solid #f1f5f9;
}
.flowflow-timeline-wrapper .post-time { font-size: 11px; color: #cbd5e1; }

/* ══ EMPTY / LOAD MORE ═════════════════════════════════ */
.flowflow-timeline-wrapper .tl-empty { text-align:center; color:#94a3b8; padding:40px 20px; font-size:14px; }

.flowflow-timeline-wrapper .tl-load-more {
    display: block;
    margin: 8px auto 0;
    padding: 11px 36px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(26,115,232,.3);
    transition: background .2s, transform .15s;
    position: relative; z-index: 2;
}
.flowflow-timeline-wrapper .tl-load-more:hover { background:#1558b0; transform:translateY(-1px); }
.flowflow-timeline-wrapper .tl-load-more:active { transform:translateY(0); }

/* ══ VIDEO MODAL ═══════════════════════════════════════ */
#tl-vid-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999999;
    align-items: center;
    justify-content: center;
}

#tl-vid-bg {
    position: absolute;
    inset: 0;
    background: rgba(5,8,15,.93);
    cursor: pointer;
}

#tl-vid-close {
    position: absolute;
    top: 16px; right: 16px;
    z-index: 10000001;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: rgba(255,255,255,.13);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 30px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s;
}
#tl-vid-close:hover { background: rgba(255,255,255,.24); }

#tl-vid-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 94vw;
    max-height: 94vh;
}

/* Landscape video in modal */
.tl-vid-landscape {
    position: relative;
    width: 82vw;
    max-width: 920px;
    aspect-ratio: 16/9;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,.8);
}

/* Portrait (reel) in modal */
.tl-vid-portrait {
    position: relative;
    height: 80vh;
    max-height: 700px;
    aspect-ratio: 9/16;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,.8);
}

.tl-vid-landscape iframe,
.tl-vid-portrait iframe {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    border: none;
}

#tl-vid-modal[style*="display: block"],
#tl-vid-modal[style*="display:block"] { display: flex !important; }

/* ══ PHOTO LIGHTBOX ════════════════════════════════════ */
#tl-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999998;
    align-items: center;
    justify-content: center;
}
#tl-lb-bg { position:absolute; inset:0; background:rgba(5,8,15,.92); cursor:pointer; }

#tl-lb-close {
    position: absolute;
    top: 16px; right: 16px;
    z-index: 10000000;
    display: flex; align-items: center; gap: 6px;
    padding: 8px 18px;
    background: rgba(255,255,255,.13);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 30px;
    color: #fff; font-size: 13px; font-weight: 500;
    cursor: pointer; transition: background .2s;
}
#tl-lb-close:hover { background: rgba(255,255,255,.24); }
#tl-lb-inner { position:relative; z-index:1; display:flex; align-items:center; justify-content:center; }
#tl-lb-img { display:block; max-width:90vw; max-height:88vh; border-radius:10px; box-shadow:0 24px 80px rgba(0,0,0,.8); object-fit:contain; }

#tl-lightbox[style*="display: block"],
#tl-lightbox[style*="display:block"] { display: flex !important; }

/* ══ RESPONSIVE ════════════════════════════════════════ */
@media (max-width: 640px) {
    .flowflow-timeline-wrapper .timeline-container::before { left:14px; transform:none; }
    .flowflow-timeline-wrapper .timeline-item,
    .flowflow-timeline-wrapper .timeline-item:nth-child(even) { padding-left:38px; padding-right:0; }
    .flowflow-timeline-wrapper .timeline-item::before,
    .flowflow-timeline-wrapper .timeline-item:nth-child(even)::before { left:8px; }
    .flowflow-timeline-wrapper .timeline-date,
    .flowflow-timeline-wrapper .timeline-item:nth-child(even) .timeline-date { position:static; display:block; text-align:left; padding:0 0 5px; }
    .tl-vid-landscape { width: 96vw; }
    .tl-vid-portrait { height: 75vh; }
}
