/* css/style-articolo.css (Versione Completa e Finale) */

body {
    background-color: #f4f6f9;
}

/* --- Layout a due colonne --- */
.page-wrapper {
    display: flex;
    gap: 40px;
    padding: 40px 0;
    align-items: flex-start;
}
.article-main-content {
    flex: 3;
    min-width: 0; /* Previene problemi di overflow in layout flex */
}
.article-sidebar {
    flex: 1;
    position: sticky;
    top: 20px;
}

/* --- Stile dell'articolo principale --- */
.article-post {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.07);
}
.article-header h1 {
    font-size: 38px;
    margin: 0 0 15px 0;
    color: #004080;
    line-height: 1.3;
}
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
    color: #6c757d;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 30px;
}
.featured-media {
    margin-bottom: 30px;
}
.featured-media img, .featured-media iframe {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}
.article-content {
    font-size: 17px;
    line-height: 1.8;
    color: #333;
}

/* --- Stili per Azioni e Commenti --- */
.article-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 40px 0;
    padding: 20px 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}
.action-btn {
    flex: 1 1 auto;
    padding: 10px 15px;
    border-radius: 50px;
    border: 1px solid #dee2e6;
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    font-size: 14px;
    text-decoration: none;
}
.action-btn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}
.action-btn.liked {
    background-color: #ffe8e8;
    color: #dc3545;
    border-color: #f5c6cb;
}
.action-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Sezione Commenti */
.comments-section { margin-top: 40px; padding-top: 20px; }
.comments-section h2 { font-size: 24px; color: #004080; margin-bottom: 25px; }
#comments-list { margin-bottom: 40px; }
.comment-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    border-radius: 8px;
    background-color: #f8f9fa;
    margin-bottom: 15px;
}
.comment-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background-color: #dee2e6; color: #495057;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; font-size: 18px; flex-shrink: 0;
}
.comment-header { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.comment-content .author { font-weight: bold; color: #212529; }
.comment-content .date { font-size: 12px; color: #6c757d; }
.comment-content .text { line-height: 1.7; color: #343a40; word-break: break-word; }

/* Form Commenti */
#comment-form { padding-top: 30px; border-top: 1px solid #e9ecef; }
#comment-form h3 { font-size: 20px; color: #333; margin-bottom: 20px; }
#comment-form p { font-size: 14px; padding: 10px; background-color: #e3f2fd; border-radius: 5px; color: #0c5460; }
#comment-form .form-group { margin-bottom: 15px; }
#comment-form label { display: block; font-weight: bold; margin-bottom: 5px; font-size: 14px; }
#comment-form input, #comment-form textarea { width: 100%; padding: 12px; border-radius: 5px; border: 1px solid #ced4da; box-sizing: border-box; font-size: 16px; font-family: inherit; }
#comment-form textarea { min-height: 120px; resize: vertical; }
#comment-message { margin-top: 15px; font-weight: bold; padding: 10px; border-radius: 5px; }

/* --- Galleria Media --- */
.media-gallery { margin-top: 40px; border-top: 1px solid #eee; padding-top: 30px; }
.media-gallery h2 { font-size: 24px; color: #004080; margin-bottom: 20px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 15px; }
.gallery-item img { width: 100%; height: 120px; object-fit: cover; border-radius: 5px; display: block; }

/* --- Stile Professionale Sidebar --- */
.sidebar-widget { background: #fff; padding: 25px; border-radius: 8px; box-shadow: 0 5px 25px rgba(0,0,0,0.07); }
.sidebar-widget h3 { font-size: 20px; margin: 0 0 20px 0; padding-bottom: 15px; border-bottom: 1px solid #eee; color: #004080; }
.recent-news-list { list-style: none; padding: 0; margin: 0; }
.recent-news-list li { margin-bottom: 20px; }
.recent-news-list li:last-child { margin-bottom: 0; }
.recent-news-list .post-link { display: flex; gap: 15px; text-decoration: none; color: #333; }
.recent-news-list .post-thumbnail { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.post-info { display: flex; flex-direction: column; justify-content: center; }
.post-info .post-title { font-size: 15px; line-height: 1.4; font-weight: normal; margin-bottom: 10px; color: #343a40; }
.post-stats { display: flex; align-items: center; gap: 15px; font-size: 13px; color: #6c757d; }
.post-stats .stat-item { display: flex; align-items: center; gap: 5px; }
.post-stats svg { width: 14px; height: 14px; opacity: 0.7; }

/* --- Sezione Notizie Correlate --- */
.related-news { margin-top: 50px; padding-top: 30px; border-top: 1px solid #eee; }
.related-news h2 { font-size: 24px; color: #004080; margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.related-card { background: #fff; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.07); overflow: hidden; text-decoration: none; transition: transform 0.2s, box-shadow 0.2s; }
.related-card:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
.related-card img { width: 100%; height: 150px; object-fit: cover; display: block; }
.related-card-content { padding: 20px; }
.related-card-content h4 { margin: 0; font-size: 16px; color: #333; line-height: 1.4; }

/* --- Responsive --- */
@media (max-width: 992px) {
    .page-wrapper { flex-direction: column; }
    .article-sidebar { position: static; width: 100%; margin-top: 40px; }
}
@media (max-width: 767px) {
    .article-header h1 { font-size: 28px; }
    .article-post { padding: 20px; }
    .gallery-grid { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
    .related-grid { grid-template-columns: 1fr; }
}