/* IT-Security Blog Aggregator - Stylesheet */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --bg-color: #f8f9fa;
    --text-color: #333;
    --border-color: #dee2e6;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-logo {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

header h1 {
    margin: 0;
}

header h1 a {
    color: white;
    text-decoration: none;
}

header nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

header nav a {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    white-space: nowrap;
}

header nav a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Articles */
.articles h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.article-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s;
}

.article-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.article-meta {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.article-meta span {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background-color: var(--bg-color);
}

.source {
    background-color: var(--primary-color) !important;
    color: white !important;
    font-weight: 600;
}

.date {
    color: #666;
}

.category {
    font-weight: 500;
}

.category-vulnerability {
    background-color: #ffe5e5 !important;
    color: var(--danger-color) !important;
}

.category-data_breach {
    background-color: #fff3e0 !important;
    color: var(--warning-color) !important;
}

.category-malware {
    background-color: #f3e5f5 !important;
    color: #8e24aa !important;
}

.badge {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.badge-cve {
    background-color: var(--danger-color) !important;
    color: white !important;
}

.badge-tutorial {
    background-color: #3498db !important;
    color: white !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.article-card h3 {
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.article-card h3 a {
    color: var(--primary-color);
    text-decoration: none;
}

.article-card h3 a:hover {
    text-decoration: underline;
}

.summary {
    color: #555;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.article-footer {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: #666;
}

.comments {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.score {
    color: var(--success-color);
    font-weight: 600;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-prev, .btn-next {
    background-color: var(--primary-color);
    color: white;
}

.btn-prev:hover, .btn-next:hover {
    background-color: #1a252f;
}

.btn-disabled {
    background-color: #e9ecef;
    color: #adb5bd;
    cursor: not-allowed;
}

.page-info {
    font-weight: 500;
}

/* Full Article */
.article-full {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.article-header {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.article-full h1 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    line-height: 1.3;
}

.article-info {
    display: flex;
    gap: 1.5rem;
    color: #666;
    font-size: 0.875rem;
}

.cve-alert {
    background-color: #ffe5e5;
    border-left: 4px solid var(--danger-color);
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
}

.cve-alert a {
    color: var(--danger-color);
    font-weight: 600;
    margin-left: 0.5rem;
}

.summary-box {
    background-color: #f0f7ff;
    border-left: 4px solid #3498db;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
}

.summary-box h2 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #2980b9;
}

.article-content {
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    display: inline-block;
}

.btn-primary:hover {
    background-color: #1a252f;
}

.back-link {
    margin: 2rem 0;
}

.back-link a {
    color: var(--primary-color);
    text-decoration: none;
}

.back-link a:hover {
    text-decoration: underline;
}

/* Archive */
.archive-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.archive-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s;
}

.archive-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.archive-item a {
    display: block;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--primary-color);
}

.archive-item h3 {
    margin-bottom: 0.5rem;
}

.archive-item .count {
    color: #666;
    font-size: 0.875rem;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 1.25rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
    color: white;
    width: 32px;
    height: 32px;
}

.share-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.share-btn.whatsapp {
    background-color: #25D366;
}

.share-btn.whatsapp:hover {
    background-color: #1fb855;
}

.share-btn.imessage {
    background-color: #5AC8FA;
}

.share-btn.imessage:hover {
    background-color: #3ab4e6;
}

.share-btn.mastodon {
    background-color: #6364FF;
}

.share-btn.mastodon:hover {
    background-color: #4b4cd9;
}

.share-btn.twitter {
    background-color: #000000;
}

.share-btn.twitter:hover {
    background-color: #333333;
}

.share-btn.bluesky {
    background-color: #0085ff;
}

.share-btn.bluesky:hover {
    background-color: #0070d9;
}

.share-btn.matrix {
    background-color: #000000;
}

.share-btn.matrix:hover {
    background-color: #1a1a1a;
}

.share-btn svg {
    vertical-align: middle;
}

.article-source {
    margin: 0.75rem 0;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: #666;
}

.article-source a {
    color: var(--primary-color);
    text-decoration: none;
}

.article-source a:hover {
    text-decoration: underline;
}

.related-sources {
    margin: 0.75rem 0;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: #666;
}

.related-sources a {
    color: var(--primary-color);
    text-decoration: none;
}

.related-sources a:hover {
    text-decoration: underline;
}

.cve-link {
    color: var(--danger-color);
    text-decoration: none;
    font-weight: 600;
    padding: 0.1rem 0.3rem;
    background-color: rgba(231, 76, 60, 0.1);
    border-radius: 3px;
}

.cve-link:hover {
    background-color: rgba(231, 76, 60, 0.2);
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
}

footer a {
    color: white;
    text-decoration: underline;
}

/* Comments Section */
#unified-comments,
#mastodon-comments,
#bluesky-comments {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.comments-header {
    margin-bottom: 2rem;
}

.comments-header h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.join-discussion {
    color: #6364FF;
    text-decoration: none;
    font-weight: 500;
}

.join-discussion:hover {
    text-decoration: underline;
}

.no-comments, .error {
    padding: 1.5rem;
    background-color: var(--bg-color);
    border-radius: 4px;
    text-align: center;
    color: #666;
}

.error {
    background-color: #fff3e0;
    color: var(--warning-color);
}

.mastodon-comment,
.bluesky-comment,
.unified-comment {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s;
}

.mastodon-comment:hover,
.bluesky-comment:hover,
.unified-comment:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.unified-comment.mastodon {
    border-left: 3px solid #6364FF;
}

.unified-comment.bluesky {
    border-left: 3px solid #0085ff;
}

.comment-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.comment-meta {
    flex: 1;
    min-width: 0;
}

.comment-author {
    font-weight: 600;
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.comment-username {
    color: #666;
    font-size: 0.875rem;
}

.platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    background-color: rgba(0,0,0,0.05);
    margin-left: 0.5rem;
}

.platform-badge svg {
    vertical-align: middle;
}

.comment-time {
    color: #999;
    font-size: 0.875rem;
    text-decoration: none;
    margin-left: 0.5rem;
}

.comment-time:hover {
    text-decoration: underline;
}

/* Instagram link button */
.instagram-link {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.btn-instagram {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-instagram:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(188, 24, 136, 0.3);
    color: white;
}

.btn-instagram svg {
    flex-shrink: 0;
}

.comments-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e0e0e0;
}

.comments-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: #333;
}

.comments-count {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1.5rem;
    padding: 0.5rem;
    background-color: var(--bg-color);
    border-radius: 4px;
    text-align: center;
}

.comment-content {
    line-height: 1.6;
    color: var(--text-color);
}

.comment-content p {
    margin-bottom: 0.5rem;
}

.comment-content a {
    color: #6364FF;
    text-decoration: none;
}

.comment-content a:hover {
    text-decoration: underline;
}

.comment-reactions {
    margin-top: 0.75rem;
    display: flex;
    gap: 1rem;
}

.reaction {
    font-size: 0.875rem;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .pagination {
        flex-direction: column;
        gap: 1rem;
    }

    .article-meta {
        font-size: 0.75rem;
    }

    .archive-list {
        grid-template-columns: 1fr;
    }

    .share-buttons {
        flex-direction: row;
        width: 100%;
    }

    .share-btn {
        flex: 1;
        justify-content: center;
        font-size: 0.75rem;
        padding: 0.35rem 0.5rem;
    }

    .article-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}
