/* ============================================================
   home.css — Guest homepage specific styles
   ============================================================ */

/* ── HERO SECTION (guest only) ── */
.hero {
    background: linear-gradient(135deg, var(--brand-deeper) 0%, var(--brand-dark) 50%, #9333ea 100%);
    border-radius: 20px;
    padding: 40px 28px;
    color: #fff;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -60px; left: -20px;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 99px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.hero-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 12px;
}
.hero-title span { color: #e879f9; }
.hero-sub {
    font-size: 14px;
    opacity: 0.8;
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 380px;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn-hero-primary {
    height: 44px;
    padding: 0 28px;
    background: #fff;
    color: var(--brand-dark);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 14px;
    border: none;
    border-radius: 12px;
    transition: transform 0.15s, box-shadow 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    pointer-events: all;
    -webkit-user-select: none;
    user-select: none;
}
.btn-hero-primary * { pointer-events: none; }
.btn-hero-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,0.15); }
.btn-hero-secondary {
    height: 44px;
    padding: 0 24px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 14px;
    border: 1.5px solid rgba(255,255,255,0.3);
    border-radius: 12px;
    transition: background 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    pointer-events: all;
}
.btn-hero-secondary * { pointer-events: none; }
.btn-hero-secondary:hover { background: rgba(255,255,255,0.25); }
.hero-stats {
    display: flex;
    gap: 20px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.15);
}
.hero-stat-num { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 20px; font-weight: 800; }
.hero-stat-label { font-size: 11px; opacity: 0.65; margin-top: 1px; }

/* Ken: guest hero row (copy + KPI grid) - was hand-inlined before, pulled
   into real classes so the mobile centering/full-width rules below have
   something to hook into. */
.hero-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.hero-copy { flex: 1; min-width: 240px; }
.hero-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; min-width: 220px; }
.hero-kpi-tile { background: rgba(255,255,255,0.12); border-radius: 14px; padding: 14px 16px; backdrop-filter: blur(4px); }

/* ── FEED SORT BAR ── */
.feed-sort {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 4px;
    display: flex;
    gap: 2px;
    margin-bottom: 16px;
}
.sort-btn {
    flex: 1;
    padding: 8px 10px;
    border: none;
    border-radius: 10px;
    background: transparent;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center; gap: 6px;
    transition: background 0.15s, color 0.15s;
}
.sort-btn:hover { background: var(--surface-2); color: var(--text-primary); }
.sort-btn.active { background: var(--brand-light); color: var(--brand); }

/* ── MEME POST CARD ── */
.post-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: visible; /* must be visible so 3-dot menus and dropdowns escape the card */
    transition: box-shadow 0.18s;
    position: relative;
}
/* Clip only the media area, not the whole card */
.post-card .post-media {
    overflow: hidden;
}
.post-card:hover { box-shadow: 0 4px 20px rgba(168,85,247,0.08); }

.post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px 0;
}
.post-avatar {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand), var(--brand-deeper));
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700; font-size: 13px; color: #fff;
    overflow: visible; /* must be visible for online dot to show outside bounds */
    position: relative;
    text-decoration: none;
}
.post-avatar img {
    width: 100%; height: 100%; object-fit: cover;
    border-radius: 10px; /* clip image corners without clipping the dot */
    position: absolute; inset: 0;
}
/* Online dot inside post-avatar */
.post-avatar .online-dot {
    position: absolute;
    bottom: -3px; right: -3px;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--success);
    border: 2px solid #fff;
    display: none;
    z-index: 1;
}
.post-avatar.is-online .online-dot { display: block; }
.post-username { font-size: 14px; font-weight: 700; }
.post-time { font-size: 12px; color: var(--text-muted); }
.post-more {
    margin-left: auto;
    width: 28px; height: 28px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.post-more:hover { background: var(--surface-2); }

.post-caption {
    padding: 16px 16px 0px 16px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    word-break: break-word;
}
.post-tag { color: var(--brand); font-weight: 600; }
.status-post-body {
    padding: 8px 16px !important;
    margin: 0 !important;
    white-space: pre-wrap; /* only on status posts, not memes */
}

.post-media {
    width: 100%;
    background: var(--surface-2);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px; font-weight: 700;
    color: var(--text-muted);
    overflow: hidden;
    position: relative;
    margin-top: 10px;
}
.post-media img, .post-media video { width: 100%; height: 100%; object-fit: cover; }

.post-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 12px;
    border-top: 1px solid var(--border);
}
.post-action-btn {
    display: flex; align-items: center; gap: 5px;
    padding: 6px 10px;
    border: none; background: transparent;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px; font-weight: 600;
    color: var(--text-muted);
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}
.post-action-btn:hover { background: var(--brand-light); color: var(--brand); }
.post-action-btn.liked { color: #e11d48; }
.post-action-btn.liked:hover { background: #fff1f2; }
.post-bookmark {
    margin-left: auto;
    display: flex; align-items: center;
    padding: 6px 10px;
    border: none; background: transparent;
    color: var(--text-muted);
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}
.post-bookmark:hover { background: var(--brand-light); color: var(--brand); }
.post-bookmark.saved { color: var(--brand); }

/* ── TRENDING TAGS (right sidebar) ── */
.trend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}
.trend-item:last-child { border-bottom: none; }
.trend-tag { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.trend-count { font-size: 11px; color: var(--text-muted); }







/* ── RESPONSIVE HOME ── */
@media (max-width: 767px) {
    /* Ken: guest hero content should be centered on mobile, and the KPI
       tiles should fill the card's full width instead of shrinking to
       their min-width once the row wraps to a column. */
    .hero-inner { flex-direction: column; text-align: center; }
    .hero-eyebrow { margin-left: auto; margin-right: auto; }
    .hero-sub { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .hero-kpis { width: 100%; }
}
@media (min-width: 768px) {
    .hero { padding: 48px 40px; }
    .hero-title { font-size: 36px; }
}

/* ── POST 3-DOT MENU ── */
.post-menu {
    position: absolute;
    top: 32px; right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.14);
    min-width: 230px; /* widened so the Privacy row (Public/Followers/Private) fits on one line at the larger 13px label size */
    z-index: 500; /* high enough to escape any parent stacking context */
    overflow: hidden;
    animation: modal-in 0.15s ease;
}

/* ── INLINE COMMENTS (meme + status posts) ── */
.inline-comments {
    border-top: 1px solid var(--border);
    padding: 12px 16px;
}
.comment-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 10px;
}
.comment-bubble {
    background: var(--surface-2);
    border-radius: 10px;
    padding: 8px 12px;
    flex: 1;
    min-width: 0;
}
.comment-author {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}
.comment-handle {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: 4px;
}
.comment-body {
    font-size: 13px;
    word-break: break-word;
    margin-top: 2px;
}
.comment-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}
.comment-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
}