/**
 * Styles for Short News Category Page
 */

/* Container for the Short News category */
.short-news-container {
    margin-bottom: 40px;
}

/* Category Header */
.category-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eaeaea;
}

.category-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #111;
}

.category-description {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Grid Layout for Short News */
.short-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* Individual Short News Item */
.short-news-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    cursor: pointer; /* Add cursor pointer to indicate clickable */
}

.short-news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.short-news-thumbnail {
    display: block;
    position: relative;
    overflow: hidden;
}

.short-news-thumbnail img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.short-news-item:hover .short-news-thumbnail img {
    transform: scale(1.05);
}

.short-news-content {
    padding: 20px;
    background: #E1FFBB;
}

.short-news-title {
    font-size: 1.2rem;
    line-height: 1.4;
    margin: 0 0 10px;
}

.short-news-title a {
    color: #111;
    text-decoration: none;
    transition: color 0.2s ease;
}

.short-news-title a:hover {
    color: #3861fb;
}

.short-news-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.short-news-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #444;
    margin-bottom: 0; /* Adjusted from 15px to 0 since we removed the button */
}

/* Modal for expanded news */
.news-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-modal.active {
    opacity: 1;
}

.news-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 800px;
    position: relative;
    transform: translateY(-30px);
    transition: transform 0.3s ease;
}

.news-modal.active .news-modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #333;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.news-modal-body {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 10px;
}

.news-modal-body h2 {
    margin-top: 0;
    color: #111;
    font-size: 1.8rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.news-modal-body .short-news-meta {
    margin-bottom: 20px;
}

.news-modal-body img {
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
    border-radius: 6px;
}

/* Modal title link styling */
.modal-title-link {
    color: #111;
    text-decoration: none;
    transition: color 0.2s ease;
}

.modal-title-link:hover {
    color: #3861fb;
    text-decoration: none;
}

/* Modal image link styling */
.modal-image-link {
    display: block;
    margin-bottom: 20px;
    transition: opacity 0.2s ease;
}

.modal-image-link:hover {
    opacity: 0.9;
}

/* Modal action links */
.modal-action-links {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #eaeaea;
    text-align: center;
}

.modal-read-more {
    display: inline-block;
    padding: 10px 20px;
    background-color: #3861fb;
    color: #fff;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.modal-read-more:hover {
    background-color: #2d4ccc;
    color: #fff;
    transform: translateY(-2px);
}

/* Prevent body scrolling when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 1rem;
}

.loading-spinner i {
    margin-right: 8px;
    color: #3861fb;
}

/* Load More Button */
.load-more-button {
    display: block;
    width: 200px;
    margin: 0 auto;
    padding: 12px 20px;
    background-color: #3861fb;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.load-more-button:hover {
    background-color: #2d4ccc;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .short-news-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
        
    .category-title {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .short-news-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .short-news-thumbnail img {
        height: 200px;
    }
}
