/* News Page Styles */
.news-page {
    width: 100%;
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ccc;
}

.news-header h1 {
    margin: 0;
    text-shadow: 0 1px 0 #fff;
}

.news-post-card {
    background: #fdfdfd;
    border: 1px solid #dcdcdc;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 4px;
    display: flex; /* Use flexbox for layout */
    gap: 20px; /* Add space between voting and content */
}

/* News Post Voting Styles */
.news-post-voting {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding-right: 20px;
    border-right: 1px solid #e0e0e0;
}

.vote-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    width: 20px;
    height: 20px;
    position: relative;
    padding: 0;
    transition: none; /* Align with classic style */
}

.vote-btn:hover {
    color: #333;
}

.vote-btn:active {
    transform: translateY(1px);
}

.vote-btn.upvote::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 12px solid #ccc;
}

.vote-btn.downvote::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 12px solid #ccc;
}

.vote-btn.upvote:hover::before {
    border-bottom-color: #4477A1;
}

.vote-btn.downvote:hover::before {
    border-top-color: #c00;
}

.vote-btn.upvote.voted::before {
    border-bottom-color: #4477A1; /* Blue for upvote */
}

.vote-btn.downvote.voted::before {
    border-top-color: #c00; /* Red for downvote */
}

.vote-score {
    font-size: 1.2rem;
    font-weight: bold;
    color: #555;
    transition: color 0.2s, transform 0.2s;
}

@keyframes vote-up-effect {
    0% { transform: scale(1); color: #555; }
    50% { transform: scale(1.5); color: #4477A1; }
    100% { transform: scale(1); color: #555; }
}

@keyframes vote-down-effect {
    0% { transform: scale(1); color: #555; }
    50% { transform: scale(1.5); color: #c00; }
    100% { transform: scale(1); color: #555; }
}

.vote-score.vote-effect-up {
    animation: vote-up-effect 0.4s ease-in-out;
}

.vote-score.vote-effect-down {
    animation: vote-down-effect 0.4s ease-in-out;
}

.news-post-main {
    flex-grow: 1; /* Allow main content to take remaining space */
}

.news-post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.news-post-header h2 {
    margin: 0;
    font-size: 1.75rem;
    text-shadow: 0 1px 0 #fff;
}

.news-post-actions {
    display: flex;
    gap: 10px;
}

.news-post-meta {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
    text-shadow: none;
}

.news-post-content {
    line-height: 1.6;
    text-shadow: none;
}

.news-post-content img, .news-post-content video {
    max-width: 100%;
    height: auto;
    margin-top: 10px;
}

.file-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 15px;
}

.preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border: 1px solid #ddd;
    border-radius: 0;
    box-shadow: none;
}

.preview-item img, .preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.remove-file-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #c00;
    color: white;
    border: none;
    border-radius: 0;
    width: 20px;
    height: 20px;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    font-weight: bold;
    box-shadow: none;
}