/* ============================================
   ATS NEWS GRID STYLES
   ============================================ */

.ats-news-grid-container {
    width: 100%;
    max-width: 100%;
}

.ats-news-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* News Item */
.ats-news-item {
    display: flex;
    flex-direction: row;
    gap: 0;
    align-items: flex-start;
    margin-bottom: 30px;
    min-height: auto;
}

/* Image Link */
.ats-news-image-link {
    display: block;
    flex-shrink: 0;
    overflow: hidden;
    text-decoration: none;
    position: relative;
    box-sizing: border-box;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.ats-news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* No Image Placeholder */
.ats-news-no-image {
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ats-news-no-image span {
    color: #999;
    font-size: 14px;
}

/* Content Area */
.ats-news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-left: 20px;
    box-sizing: border-box;
    min-height: 0;
    height: auto;
}

/* Title */
.ats-news-title-link {
    text-decoration: none;
    display: block;
    flex-shrink: 0;
}

.ats-news-title {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: #000000;
    transition: color 0.3s ease;
}

.ats-news-title-link:hover .ats-news-title {
    color: #0073aa;
}

/* Divider */
.ats-news-divider {
    font-size: 24px;
    font-weight: 700;
    color: #000000;
    margin: 10px 0;
    line-height: 1;
    flex-shrink: 0;
}

/* Excerpt/Description */
.ats-news-excerpt {
    font-size: 16px;
    line-height: 1.6;
    color: #666666;
    margin-bottom: 15px;
    flex: 1 1 auto;
    overflow: hidden;
    word-wrap: break-word;
}

/* When word count is 0, description fills space and truncates */
.ats-news-excerpt.ats-responsive-excerpt {
    position: relative;
    overflow: hidden;
}

.ats-news-ellipsis {
    font-weight: 600;
}

/* Find Out More Button */
.ats-news-button {
    display: inline-block;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    color: #0073aa;
    transition: color 0.3s ease;
    margin-top: auto;
    flex-shrink: 0;
    align-self: flex-start;
}

.ats-news-button:hover {
    color: #005177;
}

/* Load More Button */
.ats-news-load-more-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.ats-news-load-more {
    display: inline-block;
    padding: 12px 30px;
    background-color: #0073aa;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.ats-news-load-more:hover {
    background-color: #005177;
}

.ats-news-load-more:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ats-news-load-more.loading {
    opacity: 0.7;
}

/* Responsive - Tablet and Mobile (Stacked Layout) */
@media screen and (max-width: 1024px) {
    .ats-news-item {
        flex-direction: column;
    }
    
    .ats-news-image-link {
        margin-bottom: 15px;
        display: block !important;
        overflow: hidden !important;
        position: relative !important;
        -webkit-transform: translateZ(0) !important;
        transform: translateZ(0) !important;
        -webkit-backface-visibility: hidden !important;
        backface-visibility: hidden !important;
        -webkit-mask-image: -webkit-radial-gradient(white, black) !important;
        mask-image: radial-gradient(white, black) !important;
        box-sizing: border-box !important;
    }
    
    .ats-news-image {
        display: block !important;
        -webkit-transform: translateZ(0) !important;
        transform: translateZ(0) !important;
        -webkit-backface-visibility: hidden !important;
        backface-visibility: hidden !important;
    }
    
    .ats-news-content {
        padding-left: 0;
        width: 100%;
        align-self: stretch;
    }
    
    .ats-news-title {
        font-size: 22px;
    }
    
    .ats-news-excerpt {
        font-size: 15px;
    }
}

/* Responsive - Mobile Only (Font Size Adjustments) */
@media screen and (max-width: 768px) {
    .ats-news-title {
        font-size: 20px;
    }
    
    .ats-news-excerpt {
        font-size: 14px;
    }
    
    .ats-news-button {
        font-size: 15px;
    }
}

@media screen and (max-width: 480px) {
    .ats-news-title {
        font-size: 18px;
    }
    
    .ats-news-excerpt {
        font-size: 13px;
    }
    
    .ats-news-load-more {
        padding: 10px 25px;
        font-size: 14px;
    }
}
