/*
 * Facebook Style WordPress Theme
 * Theme Name: Facebook Style
 * Theme URI: https://example.com
 * Description: Un template WordPress moderno nello stile di Facebook
 * Version: 1.0.0
 * Author: Your Name
 * Author URI: https://example.com
 * License: GPL v2 or later
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: facebook-style
 */

/* Reset e Normalizzazione */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    color: #050505;
    font-size: 14px;
    line-height: 1.5;
}

a {
    color: #0a66c2;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #054399;
    text-decoration: underline;
}

/* Layout Principale */
.fb-container {
    display: flex;
    min-height: 100vh;
    background-color: #f0f2f5;
}

/* Header/Navbar */
.fb-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background-color: #fff;
    border-bottom: 1px solid #ccc;
    display: flex;
    align-items: center;
    padding: 0 16px;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.fb-logo {
    font-size: 28px;
    font-weight: bold;
    color: #0a66c2;
    margin-right: 24px;
}

.fb-search {
    flex: 1;
    max-width: 240px;
}

.fb-search input {
    width: 100%;
    padding: 8px 12px;
    background-color: #f0f2f5;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 13px;
    outline: none;
    transition: background-color 0.2s ease;
}

.fb-search input:focus {
    background-color: #fff;
    border-color: #0a66c2;
}

.fb-nav {
    display: flex;
    gap: 24px;
    margin-left: auto;
    align-items: center;
}

.fb-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.fb-nav-item:hover {
    background-color: #f0f2f5;
}

.fb-nav-item.active {
    color: #0a66c2;
    border-bottom: 3px solid #0a66c2;
}

/* Sidebar Sinistra */
.fb-sidebar-left {
    position: fixed;
    left: 0;
    top: 56px;
    width: 360px;
    height: calc(100vh - 56px);
    background-color: #fff;
    overflow-y: auto;
    border-right: 1px solid #ccc;
    padding: 16px;
}

.fb-sidebar-section {
    margin-bottom: 24px;
}

.fb-sidebar-title {
    font-size: 12px;
    font-weight: 600;
    color: #65676b;
    text-transform: uppercase;
    margin-bottom: 8px;
    padding: 0 12px;
}

.fb-sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    margin-bottom: 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.fb-sidebar-item:hover {
    background-color: #f0f2f5;
}

.fb-sidebar-item.active {
    background-color: #e7f3ff;
    color: #0a66c2;
    font-weight: 500;
}

.fb-sidebar-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f2f5;
    border-radius: 50%;
    font-size: 16px;
}

/* Content Area */
.fb-content {
    margin-left: 360px;
    margin-top: 56px;
    margin-right: 360px;
    padding: 16px;
    flex: 1;
}

/* Sidebar Destra */
.fb-sidebar-right {
    position: fixed;
    right: 0;
    top: 56px;
    width: 360px;
    height: calc(100vh - 56px);
    background-color: #fff;
    overflow-y: auto;
    border-left: 1px solid #ccc;
    padding: 16px;
}

.fb-sidebar-right-section {
    margin-bottom: 24px;
}

.fb-sidebar-right-title {
    font-size: 12px;
    font-weight: 600;
    color: #65676b;
    text-transform: uppercase;
    margin-bottom: 12px;
}

/* Post Card */
.fb-post {
    background-color: #fff;
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid #ccc;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.fb-post:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.fb-post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.fb-post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #0a66c2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
}

.fb-post-info {
    flex: 1;
}

.fb-post-author {
    font-weight: 600;
    color: #050505;
    display: block;
}

.fb-post-time {
    font-size: 12px;
    color: #65676b;
}

.fb-post-more {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.fb-post-more:hover {
    background-color: #f0f2f5;
}

.fb-post-content {
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.5;
    color: #050505;
}

.fb-post-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    margin: 12px 0;
}

.fb-post-stats {
    display: flex;
    justify-content: space-between;
    padding: 8px 16px;
    font-size: 12px;
    color: #65676b;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.fb-post-actions {
    display: flex;
    gap: 0;
}

.fb-post-action {
    flex: 1;
    padding: 8px;
    text-align: center;
    cursor: pointer;
    border-right: 1px solid #e5e7eb;
    transition: background-color 0.2s ease;
    color: #65676b;
    font-size: 13px;
    font-weight: 500;
}

.fb-post-action:last-child {
    border-right: none;
}

.fb-post-action:hover {
    background-color: #f0f2f5;
}

.fb-post-action.liked {
    color: #e4405f;
}

/* Story */
.fb-story {
    position: relative;
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
    margin-bottom: 8px;
}

.fb-story:hover {
    transform: scale(1.02);
}

.fb-story-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
    color: #fff;
    font-weight: 600;
}

/* Create Post */
.fb-create-post {
    background-color: #fff;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #ccc;
}

.fb-create-post-header {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.fb-create-post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #0a66c2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
}

.fb-create-post-input {
    flex: 1;
    background-color: #f0f2f5;
    border: none;
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.fb-create-post-input:hover {
    background-color: #e4e6eb;
}

.fb-create-post-actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.fb-create-post-btn {
    flex: 1;
    padding: 8px;
    text-align: center;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    color: #65676b;
    font-size: 13px;
    font-weight: 500;
    border: none;
    background-color: transparent;
}

.fb-create-post-btn:hover {
    background-color: #f0f2f5;
}

/* Comment */
.fb-comment {
    display: flex;
    gap: 12px;
    padding: 8px 16px;
    border-top: 1px solid #e5e7eb;
}

.fb-comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #0a66c2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    flex-shrink: 0;
}

.fb-comment-content {
    flex: 1;
}

.fb-comment-bubble {
    background-color: #f0f2f5;
    border-radius: 18px;
    padding: 8px 12px;
    margin-bottom: 4px;
}

.fb-comment-author {
    font-weight: 600;
    color: #050505;
    font-size: 13px;
}

.fb-comment-text {
    font-size: 13px;
    color: #050505;
}

.fb-comment-time {
    font-size: 12px;
    color: #65676b;
    margin-top: 4px;
}

/* Modal */
.fb-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.fb-modal.active {
    display: flex;
}

.fb-modal-content {
    background-color: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.fb-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.fb-modal-title {
    font-size: 16px;
    font-weight: 600;
}

.fb-modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.fb-modal-close:hover {
    background-color: #f0f2f5;
}

.fb-modal-body {
    padding: 16px;
}

/* Responsive */
@media (max-width: 1200px) {
    .fb-sidebar-right {
        display: none;
    }
    
    .fb-content {
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    .fb-sidebar-left {
        display: none;
    }
    
    .fb-content {
        margin-left: 0;
    }
    
    .fb-header {
        padding: 0 8px;
    }
    
    .fb-logo {
        font-size: 20px;
        margin-right: 12px;
    }
    
    .fb-search {
        max-width: 150px;
    }
    
    .fb-nav {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .fb-header {
        height: auto;
        padding: 8px;
    }
    
    .fb-search {
        display: none;
    }
    
    .fb-nav {
        gap: 8px;
    }
    
    .fb-nav-item {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .fb-content {
        padding: 8px;
    }
    
    .fb-post {
        border-radius: 0;
        margin-bottom: 8px;
    }
}
