/* ═══════════════════════════════════════════════
   Social App — Freeweb Layout
   ═══════════════════════════════════════════════ */

body {
    background: var(--bg-primary);
    padding-top: 64px;
    /* Space for fixed header */
}

/* ── Top Header ── */
.freeweb-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.freeweb-header-inner {
    max-width: 1380px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-md);
}

.freeweb-logo {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.8px;
    color: var(--accent);
    text-decoration: none;
    flex-shrink: 0;
}

.freeweb-search-container {
    flex: 1;
    max-width: 500px;
    margin: 0 var(--space-xl);
    position: relative;
    display: flex;
    align-items: center;
}

.freeweb-search-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 10px 20px 10px 40px;
    font-size: var(--font-sm);
    color: var(--text-primary);
    transition: var(--transition);
}

.freeweb-search-input:focus {
    background: var(--bg-secondary);
    border-color: var(--border-focus);
    outline: none;
    box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.2);
}

.freeweb-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: var(--font-sm);
    display: flex;
    align-items: center;
}

.freeweb-header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.freeweb-header-icon {
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--transition);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.freeweb-header-icon:hover {
    color: var(--text-primary);
}

.freeweb-header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.freeweb-header-avatar:hover {
    border-color: var(--border);
}

/* ── Ana grid yapısı (2 Kolonlu Desktop Layout) ── */
.freeweb-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    justify-content: center;
    gap: var(--space-xl);
    max-width: 1380px;
    margin: var(--space-md) auto var(--space-xl);
    padding: 0 var(--space-md);
    padding-left: 280px; /* Space for the 260px fixed sidebar + gap */
    overflow: hidden;
}

@media (max-width: 1300px) {
    .freeweb-layout {
        margin-left: 0;
        margin-right: 0;
        max-width: none;
    }
}

@media (max-width: 768px) {
    .freeweb-layout {
        padding-left: var(--space-md);
        grid-template-columns: 1fr;
    }
}

/* 1. Sol Kolon (Ana İçerik - Feed vb.) */
.freeweb-main {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    min-width: 0;
    overflow: hidden;
}

.profile-header {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-xl) var(--space-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-lg);
}

.compose-box-freeweb {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
}

.compose-box-freeweb .compose-row {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.compose-box-freeweb .avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.compose-box-freeweb textarea {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-family: var(--font-family);
    font-size: var(--font-md);
    color: var(--text-primary);
    resize: none;
    outline: none;
    min-height: 44px;
    transition: var(--transition);
}

.compose-box-freeweb textarea:focus {
    border-color: var(--accent);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.compose-box-freeweb .compose-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 60px;
    /* Align with input */
}

.compose-icons {
    display: flex;
    gap: var(--space-md);
    color: var(--text-muted);
}

.compose-icon-btn {
    cursor: pointer;
    font-size: 1.25rem;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.compose-icon-btn:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.feed-tabs {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.feed-tab {
    flex: 1;
    text-align: center;
    padding: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.feed-tab:hover {
    background: var(--bg-primary);
}

.feed-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* 2. Sağ Kolon (Öneriler) */
.freeweb-right {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    z-index: 10;
}

.right-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
}

/* Sadece Trendler kartı sticky — scroll ile tepeye gelince sabitlenir */
.right-card-sticky {
    position: sticky;
    top: calc(64px + var(--space-xl));
}

.right-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

.suggestion-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.suggestion-item:last-child {
    margin-bottom: 0;
}

.suggestion-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.suggestion-info .avatar,
.suggestion-info .group-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.suggestion-info .group-icon {
    border-radius: var(--radius-sm);
    /* Groups have slightly rounded square icons in mockup */
}

.suggestion-details {
    display: flex;
    flex-direction: column;
}

.suggestion-name {
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    font-size: var(--font-sm);
    line-height: 1.2;
}

.suggestion-name:hover {
    text-decoration: underline;
}

.suggestion-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

.suggestion-meta {
    font-size: var(--font-xs);
    color: var(--text-muted);
}

.suggestion-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
}

.suggestion-btn {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: none;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
}

.suggestion-btn:hover {
    background: var(--border);
}

/* Post Cards Refinements */
.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-md);
}

.post-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.post-user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.post-name {
    font-weight: 600;
    font-size: var(--font-sm);
    color: var(--text-primary);
}

.post-time {
    font-size: var(--font-xs);
    color: var(--text-muted);
    margin-top: 2px;
}

.post-username {
    display: none;
    /* Hide username for cleaner feed like mockup */
}

.post-content {
    font-size: var(--font-base);
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    line-height: 1.5;
}

.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-lg);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border);
    /* Lighter divider */
}

.post-action {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: var(--font-sm);
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.post-action:hover {
    color: var(--accent);
}

.post-action.liked {
    color: var(--like-active);
}

/* Buttons */
.btn-primary {
    background: var(--accent);
    color: #fff;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--accent-hover);
}

/* ── Shared Left Sidebar ── */
.freeweb-sidebar {
    width: 260px;
    position: fixed;
    left: 0;
    top: 64px;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 30px 20px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 40;
    overflow-y: auto;
}

.freeweb-sidebar::-webkit-scrollbar {
    width: 6px;
}
.freeweb-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.sidebar-nav-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    background: transparent;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    border-radius: 100px;
    transition: all 0.2s;
}

.sidebar-nav-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-nav-btn.active {
    font-weight: 800;
    color: var(--accent);
    background: rgba(0, 149, 246, 0.15);
}

/* Responsive */
@media (max-width: 900px) {
    .freeweb-layout {
        grid-template-columns: 1fr;
    }

    .freeweb-right {
        display: none;
    }
}

@media (max-width: 768px) {
    .freeweb-sidebar {
        display: none;
    }
}

@media (max-width: 600px) {
    .freeweb-header {
        padding: 0 var(--space-md);
    }

    .freeweb-search-container {
        display: none;
    }
}