/* 
 * News Article Styles
 * Version: 3.5.0
 */

/* Article Container */
.news-article {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    margin-bottom: 3rem;
}

/* Article Header */
.article-header {
    border-bottom: 3px solid var(--primary);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-danger {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
}

.badge-warning {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
}

.badge-primary {
    background: var(--gradient-primary);
    color: white;
}

.badge-secondary {
    background: var(--secondary);
    color: white;
}

.article-title {
    font-size: 2.5rem;
    line-height: 1.3;
    color: var(--dark);
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.article-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    align-items: center;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-circle);
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--secondary);
}

.author-details {
    flex: 1;
}

.author-name {
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.author-bio {
    font-size: 0.9rem;
    color: var(--secondary);
}

.meta-stats {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--secondary);
}

.meta-item i {
    color: var(--primary);
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Featured Image */
.article-featured-image {
    margin: 2rem 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

.article-featured-image img {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.article-featured-image:hover img {
    transform: scale(1.02);
}

.image-caption {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 1rem;
    font-size: 0.9rem;
    text-align: center;
}

/* Lead Section */
.article-lead {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-right: 4px solid var(--primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin: 2rem 0;
    position: relative;
}

.article-lead:before {
    content: '"';
    position: absolute;
    top: -20px;
    right: 30px;
    font-size: 6rem;
    color: var(--primary);
    opacity: 0.2;
    font-family: Georgia, serif;
}

.lead-title {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lead-content {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--dark);
    font-weight: 500;
}

/* Article Content */
.article-content {
    font-size: 1.1rem;
    line-height: 1.9;
    color: #444;
}

.article-content > * {
    margin-bottom: 1.5rem;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    color: var(--dark);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.article-content h2 {
    font-size: 1.8rem;
    border-right: 4px solid var(--primary);
    padding-right: 1rem;
}

.article-content h3 {
    font-size: 1.5rem;
}

.article-content h4 {
    font-size: 1.3rem;
}

.article-content p {
    text-align: justify;
}

.article-content ul,
.article-content ol {
    padding-right: 2rem;
    margin: 1.5rem 0;
}

.article-content li {
    margin-bottom: 0.5rem;
    position: relative;
}

.article-content ul li:before {
    content: "•";
    color: var(--primary);
    font-weight: bold;
    position: absolute;
    right: -1.2rem;
}

.article-content blockquote {
    border-right: 4px solid var(--primary);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: var(--radius-md);
    font-style: italic;
    position: relative;
}

.article-content blockquote:before {
    content: "❝";
    position: absolute;
    top: -10px;
    right: 20px;
    font-size: 2rem;
    color: var(--primary);
    opacity: 0.3;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 2rem auto;
    display: block;
    box-shadow: var(--shadow-md);
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.article-content table th,
.article-content table td {
    padding: 1rem;
    border: 1px solid #dee2e6;
    text-align: right;
}

.article-content table th {
    background: var(--light);
    font-weight: 700;
    color: var(--dark);
}

.article-content table tr:nth-child(even) {
    background: #f8f9fa;
}

/* Article Footer */
.article-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--light);
}

.categories-container,
.tags-container,
.share-container {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.2rem;
    color: var(--dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.categories-list,
.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-link,
.tag-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--light);
    color: var(--dark);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.category-link:hover,
.tag-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.share-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.share-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-normal);
}

.share-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.share-telegram { background: #0088cc; }
.share-twitter { background: #1da1f2; }
.share-linkedin { background: #0077b5; }
.share-whatsapp { background: #25d366; }
.share-copy { background: var(--secondary); }

.copy-success {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: var(--success);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    z-index: 1000;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Related News */
.related-news {
    margin: 4rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    margin: 0;
}

.view-all {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.view-all:hover {
    color: var(--primary-dark);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.news-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.news-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.news-card:hover .news-image img {
    transform: scale(1.1);
}

.news-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1;
}

.news-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-title {
    font-size: 1.2rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    flex: 1;
}

.news-title a {
    color: var(--dark);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.news-title a:hover {
    color: var(--primary);
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--secondary);
    margin-top: auto;
}

/* Comments Section */
.comments-section {
    margin: 4rem 0;
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.comment-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--secondary);
}

.comment-form-container {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.comment-form-title {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #dee2e6;
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.comments-list {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.comment {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--light);
}

.comment:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.comment-avatar {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-circle);
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
}

.comment-info {
    flex: 1;
}

.comment-name {
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.comment-date {
    font-size: 0.85rem;
    color: var(--secondary);
}

.comment-actions {
    display: flex;
    gap: 1rem;
}

.comment-action {
    background: none;
    border: none;
    color: var(--secondary);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.comment-action:hover {
    color: var(--primary);
}

.comment-content {
    line-height: 1.7;
    color: #444;
}

.comment-replies {
    margin-right: 2rem;
    margin-top: 1.5rem;
    padding-right: 2rem;
    border-right: 2px solid var(--light);
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 2rem;
}

.sidebar-widget {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.2rem;
    color: var(--dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.trending-list,
.popular-list {
    list-style: none;
}

.trending-item,
.popular-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--light);
}

.trending-item:last-child,
.popular-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.trending-link,
.popular-link {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    text-decoration: none;
    color: var(--dark);
    transition: color var(--transition-fast);
}

.trending-link:hover,
.popular-link:hover {
    color: var(--primary);
}

.trending-number {
    background: var(--light);
    color: var(--secondary);
    width: 30px;
    height: 30px;
    border-radius: var(--radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.trending-item:nth-child(1) .trending-number {
    background: var(--primary);
    color: white;
}

.trending-item:nth-child(2) .trending-number {
    background: var(--success);
    color: white;
}

.trending-item:nth-child(3) .trending-number {
    background: var(--warning);
    color: #212529;
}

.trending-content {
    flex: 1;
}

.trending-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.trending-meta {
    font-size: 0.85rem;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Reading Progress */
.reading-progress {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    transform-origin: 0%;
    z-index: 9999;
}

/* Print Styles for Articles */
@media print {
    .news-article {
        box-shadow: none;
        padding: 0;
    }
    
    .article-header,
    .article-footer,
    .related-news,
    .comments-section,
    .sidebar {
        display: none;
    }
    
    .article-content {
        font-size: 12pt;
        line-height: 1.6;
    }
    
    .article-content h2 {
        page-break-after: avoid;
    }
    
    .article-content p {
        orphans: 3;
        widows: 3;
    }
}

/* Responsive Styles for News */
@media (max-width: 992px) {
    .article-title {
        font-size: 2rem;
    }
    
    .article-meta {
        grid-template-columns: 1fr;
    }
    
    .share-buttons-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .news-article {
        padding: 1.5rem;
    }
    
    .article-title {
        font-size: 1.8rem;
    }
    
    .lead-content {
        font-size: 1.1rem;
    }
    
    .article-content {
        font-size: 1rem;
    }
    
    .share-buttons-grid {
        grid-template-columns: 1fr;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .comment-replies {
        margin-right: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 576px) {
    .news-article {
        padding: 1rem;
        margin-bottom: 2rem;
    }
    
    .article-title {
        font-size: 1.5rem;
    }
    
    .article-tags {
        gap: 0.25rem;
    }
    
    .badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
    }
    
    .author-info {
        flex-direction: column;
        text-align: center;
    }
    
    .meta-stats {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .article-lead {
        padding: 1.5rem;
    }
    
    .comment-form-container,
    .comments-list {
        padding: 1rem;
    }
}
