/* ========================================================
   עיצוב פורום גיטריסטים
   ======================================================== */

body {
    background-color: var(--bg-body);
}

/* המעטפת הראשית - מקבלת את העיצוב התלת-מימדי של הקורסים */
.forum-main-wrapper {
    max-width: 1000px;
    margin: 40px auto;
    padding: 40px;
    background-color: #EBF8F7; /* צבע טורקיז-תכלת סופר עדין */
    border-radius: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

/* רקע הקשקוש (הגלים) התלת ממדיים */
.forum-waves-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
    opacity: 0.22;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 2000 1000' preserveAspectRatio='xMidYMid slice'%3E%3Cdefs%3E%3ClinearGradient id='g1' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%235A2D82'/%3E%3Cstop offset='50%25' stop-color='%236ED3CF'/%3E%3Cstop offset='100%25' stop-color='%23F2A65A'/%3E%3C/linearGradient%3E%3ClinearGradient id='g2' x1='100%25' y1='0%25' x2='0%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%23F2A65A'/%3E%3Cstop offset='50%25' stop-color='%235A2D82'/%3E%3Cstop offset='100%25' stop-color='%236ED3CF'/%3E%3C/linearGradient%3E%3Cfilter id='glow'%3E%3CfeGaussianBlur stdDeviation='8' result='coloredBlur'/%3E%3CfeMerge%3E%3CfeMergeNode in='coloredBlur'/%3E%3CfeMergeNode in='SourceGraphic'/%3E%3C/feMerge%3E%3C/filter%3E%3C/defs%3E%3Cg fill='none' filter='url(%23glow)'%3E%3Cpath d='M-100,500 Q400,100 1000,500 T2100,500' stroke='url(%23g1)' stroke-width='10' opacity='0.3'/%3E%3Cpath d='M-100,485 Q400,85 1000,485 T2100,485' stroke='url(%23g1)' stroke-width='12' opacity='0.5'/%3E%3Cpath d='M-100,470 Q400,70 1000,470 T2100,470' stroke='url(%23g1)' stroke-width='15' opacity='0.7'/%3E%3Cpath d='M-100,455 Q400,55 1000,455 T2100,455' stroke='url(%23g1)' stroke-width='8' opacity='1'/%3E%3Cpath d='M-100,800 Q500,1100 1200,700 T2100,700' stroke='url(%23g2)' stroke-width='15' opacity='0.4'/%3E%3Cpath d='M-100,780 Q500,1080 1200,680 T2100,680' stroke='url(%23g2)' stroke-width='10' opacity='0.7'/%3E%3Cpath d='M-100,760 Q500,1060 1200,660 T2100,660' stroke='url(%23g2)' stroke-width='5' opacity='1'/%3E%3Cpath d='M-100,300 Q600,-50 1100,400 T2100,300' stroke='url(%23g1)' stroke-width='20' opacity='0.2'/%3E%3Cpath d='M-100,280 Q600,-70 1100,380 T2100,280' stroke='url(%23g1)' stroke-width='12' opacity='0.5'/%3E%3Cpath d='M-100,260 Q600,-90 1100,360 T2100,260' stroke='url(%23g1)' stroke-width='6' opacity='0.9'/%3E%3C/g%3E%3Cg font-family='Arial' font-weight='bold' filter='url(%23glow)' opacity='0.6'%3E%3Ctext x='200' y='300' font-size='80' fill='%235A2D82'%3E%26%239835;%3C/text%3E%3Ctext x='800' y='700' font-size='80' fill='%236ED3CF'%3E%26%239834;%3C/text%3E%3Ctext x='1400' y='400' font-size='80' fill='%23F2A65A'%3E%26%239835;%3C/text%3E%3Ctext x='500' y='800' font-size='80' fill='%235A2D82'%3E%26%239834;%3C/text%3E%3Ctext x='1100' y='200' font-size='80' fill='%23F2A65A'%3E%26%239834;%3C/text%3E%3Ctext x='1700' y='800' font-size='80' fill='%235A2D82'%3E%26%239835;%3C/text%3E%3Ctext x='1800' y='300' font-size='80' fill='%236ED3CF'%3E%26%239834;%3C/text%3E%3Ctext x='150' y='650' font-size='80' fill='%23F2A65A'%3E%26%239835;%3C/text%3E%3Ctext x='950' y='900' font-size='80' fill='%236ED3CF'%3E%26%239835;%3C/text%3E%3Ctext x='350' y='150' font-size='40' fill='%23F2A65A' opacity='0.8'%3E%26%239834;%3C/text%3E%3Ctext x='1250' y='850' font-size='120' fill='%235A2D82' opacity='0.4'%3E%26%239835;%3C/text%3E%3Ctext x='1600' y='150' font-size='50' fill='%236ED3CF' opacity='0.9'%3E%26%239834;%3C/text%3E%3C/g%3E%3C/svg%3E");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

/* הבטחת תוכן קדמי מעל הגלים */
.forum-header, #posts-feed, #expanded-post-view {
    position: relative;
    z-index: 2;
}

/* כותרת הפורום */
.forum-header {
    background: white;
    padding: 30px;
    border-radius: 30px;
    box-shadow: var(--shadow-soft);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
    border: 3px solid rgba(110, 211, 207, 0.1);
}

.forum-title {
    margin: 0;
    font-size: 2.2rem;
    color: var(--primary);
    font-weight: 900;
}
.forum-subtitle {
    margin: 5px 0 0 0;
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: bold;
}

.ask-btn {
    font-size: 1.1rem;
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(242, 166, 90, 0.4);
}

/* כרטיסיית שאלה */
.post-item {
    background: white;
    padding: 30px;
    border-radius: 30px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 25px;
    border-right: 6px solid var(--primary);
    transition: 0.3s;
    border: 3px solid transparent;
}
.post-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(90, 45, 130, 0.1);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.post-user {
    display: flex;
    align-items: center;
    gap: 15px;
}
.post-avatar {
    width: 50px;
    height: 50px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.post-author-name {
    font-weight: 800;
    color: var(--primary);
    font-size: 1.1rem;
    margin: 0;
}
.post-date {
    font-size: 0.85rem;
    color: #888;
    margin: 0;
}

.post-title {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin: 0 0 10px 0;
    font-weight: 800;
}
.post-preview {
    color: var(--text-light);
    line-height: 1.6;
    margin: 0 0 20px 0;
    font-size: 1.05rem;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
}

.reply-count-badge {
    background: var(--bg-light);
    color: var(--primary);
    padding: 6px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.read-more-link {
    color: var(--accent);
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    font-size: 1.05rem;
}
.read-more-link:hover { color: var(--accent-hover); }

/* --- תצוגת פוסט מורחב --- */
#expanded-post-view {
    background: white;
    padding: 40px;
    border-radius: 40px;
    box-shadow: var(--shadow-soft);
    animation: fadeIn 0.4s ease;
}

.back-to-feed {
    background: var(--bg-light);
    color: var(--primary);
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 25px;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.back-to-feed:hover { background: var(--primary); color: white; }

.expanded-question-box {
    background: #fdfdfd;
    border: 2px solid #eee;
    padding: 30px;
    border-radius: 25px;
    margin-bottom: 40px;
}

.expanded-title {
    font-size: 2rem;
    color: var(--primary);
    font-weight: 900;
    margin: 0 0 15px 0;
}

.expanded-body {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.replies-section { margin-top: 30px; }
.replies-title { font-size: 1.4rem; color: var(--primary); margin-bottom: 20px; font-weight: 800; border-bottom: 2px solid var(--bg-light); padding-bottom: 10px;}

.reply-item {
    background: var(--bg-body);
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 15px;
    border-right: 4px solid var(--secondary);
}
.reply-item.staff-reply {
    background: #fdfbfd;
    border-right: 4px solid var(--primary);
    border: 2px solid rgba(90, 45, 130, 0.1);
}

.reply-header { display: flex; justify-content: space-between; margin-bottom: 10px; }
.reply-author { font-weight: bold; color: var(--primary); display:flex; align-items:center; gap:10px;}
.reply-date { font-size: 0.85rem; color: #888; display:flex; align-items:center; gap:5px;}
.reply-body { line-height: 1.6; color: var(--text-dark); font-size: 1.05rem;}

.staff-badge { background: var(--primary); color: white; padding: 3px 10px; border-radius: 15px; font-size: 0.75rem; font-weight: bold; }

.add-reply-box {
    margin-top: 40px;
    background: var(--bg-body);
    padding: 30px;
    border-radius: 25px;
}
.add-reply-box h3 { margin-top:0; color:var(--primary); font-weight:800; margin-bottom: 15px;}
.add-reply-box textarea { width: 100%; padding: 20px; border-radius: 20px; border: 2px solid #ddd; font-family: inherit; font-size: 1.05rem; resize: vertical; margin-bottom: 15px; }
.add-reply-box textarea:focus { border-color: var(--primary); outline: none; }

.reply-action-btn { color: var(--text-light); font-size: 0.9rem; cursor: pointer; transition: 0.3s; background: none; border: none; padding: 0; font-weight: bold; margin-left: 10px;}
.reply-action-btn:hover { color: var(--primary); }
.reply-action-btn.delete { color: #e74c3c; }
.reply-action-btn.delete:hover { color: #c0392b; }

@media (max-width: 768px) {
    .forum-main-wrapper { padding: 20px 15px; margin: 20px 10px; border-radius: 25px;}
    .forum-header { padding: 20px; flex-direction: column; text-align: center; border-radius: 20px;}
    .forum-title { font-size: 1.8rem; }
    .post-item { padding: 20px; border-radius: 20px;}
    .post-title { font-size: 1.2rem; }
    #expanded-post-view { padding: 20px; border-radius: 20px;}
    .expanded-question-box { padding: 20px; border-radius: 15px;}
    .expanded-title { font-size: 1.6rem; }
}