/* ATC News Posts - Frontend Styles */
.atc-news-list {
    margin: 20px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    align-items: stretch;
}

.atc-news-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.atc-news-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.atc-news-item:last-child {
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 0;
}

.news-thumbnail {
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: 6px;
}

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

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

.atc-news-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 600;
}

.atc-news-title a {
    color: #002740;
    text-decoration: none;
    display: block;
}

.atc-news-title a:hover {
    color: #005a87;
}

.atc-news-meta {
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.atc-news-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 12px;
    white-space: nowrap;
}

.atc-news-meta .news-source {
    background: #e3f2fd;
    color: #1976d2;
    font-weight: 500;
}

.atc-news-meta .news-author {
    background: #f3e5f5;
    color: #7b1fa2;
}

.atc-news-meta .news-date {
    background: #e8f5e8;
    color: #388e3c;
}

.atc-news-meta .news-categories {
    background: #fff3e0;
    color: #f57c00;
}

.atc-news-meta a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
}

.atc-news-meta a:hover {
    text-decoration: underline;
}

.atc-news-excerpt {
    margin-bottom: 20px;
    line-height: 1.6;
    color: #333;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* Standard property for modern browsers */
    display: -webkit-box;
    display: -moz-box;
    display: box;
    -webkit-line-clamp: 3;
    -moz-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    -moz-box-orient: vertical;
    box-orient: vertical;
    /* Fallback for browsers that don't support line-clamp */
    max-height: 4.8em;
    line-height: 1.6;
    flex: 1;
}

.news-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.atc-news-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #002740;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.atc-news-read-more:hover {
    background: #003d5f;
    color: white;
    transform: translateY(-1px);
}

.atc-news-featured {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #002740;
    position: relative;
}

.atc-news-featured::before {
    content: "★";
    position: absolute;
    top: 10px;
    right: 10px;
    background: #002740;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    z-index: 1;
}

.featured-news-badge {
    display: none; /* Hide inline badge, use ::before instead */
}

.atc-news-widget-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.atc-news-widget-list li {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.atc-news-widget-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.atc-news-widget-list a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
}

.atc-news-widget-list a:hover {
    color: #002740;
}

/* Single news post styles */
.single-news .news-header {
    background: linear-gradient(135deg, #002740 0%, #003d5f 100%);
    color: white;
    padding: 40px 30px;
    border-radius: 12px;
    margin: 0 0 30px 0;
    position: relative;
    overflow: hidden;
}

.single-news .news-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.03)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.news-header-content {
    position: relative;
    z-index: 1;
}

.news-category-breadcrumb {
    margin-bottom: 15px;
}

.category-label {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.single-news .news-title {
    font-size: 36px;
    margin-bottom: 20px;
    color: white;
    font-weight: 700;
    line-height: 1.2;
}

.single-news .news-meta {
    font-size: 16px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 0;
}

.news-meta-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.news-meta-row:last-child {
    margin-bottom: 0;
}

.single-news .news-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 0;
}

.single-news .news-source {
    font-weight: 600;
}

.single-news .news-source-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    transition: border-color 0.3s ease;
}

.single-news .news-source-link:hover {
    border-bottom-color: white;
}

.single-news .news-author {
    color: rgba(255,255,255,0.95);
}

.single-news .news-date {
    color: rgba(255,255,255,0.85);
}

.single-news .news-posted-by {
    color: rgba(255,255,255,0.85);
}

.single-news .news-content {
    line-height: 1.8;
    font-size: 16px;
    color: #333;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.single-news .news-content p {
    margin-bottom: 20px;
}

.single-news .news-content h2,
.single-news .news-content h3 {
    color: #002740;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}

.single-news .news-content h2 {
    font-size: 24px;
}

.single-news .news-content h3 {
    font-size: 20px;
}

.single-news .news-featured-image {
    margin-bottom: 30px;
    text-align: center;
}

.single-news .news-featured-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.news-tags {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.news-tags h3 {
    color: #002740;
    margin-bottom: 15px;
    font-size: 18px;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud a {
    background: #002740;
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.tag-cloud a:hover {
    background: #003d5f;
    color: white;
}

.news-sharing {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.news-sharing h3 {
    color: #002740;
    margin-bottom: 15px;
    font-size: 18px;
}

.news-comments {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Navigation */
.post-navigation {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.post-navigation .nav-links {
    display: flex;
    width: 100%;
    justify-content: space-between;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    flex: 1;
    max-width: 48%;
}

.post-navigation .nav-previous {
    text-align: left;
}

.post-navigation .nav-next {
    text-align: right;
}

.post-navigation a {
    color: #002740;
    text-decoration: none;
    display: block;
    padding: 15px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.post-navigation a:hover {
    background: #f8f9fa;
}

.post-navigation .nav-subtitle {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 5px;
}

.post-navigation .nav-title {
    font-size: 16px;
    font-weight: 600;
    color: #002740;
}

/* News Archive Header */
.news-archive-header {
    background: linear-gradient(135deg, #002740 0%, #003d5f 100%);
    color: white;
    padding: 60px 30px;
    border-radius: 12px;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.news-archive-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.03)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.news-archive-content {
    position: relative;
    z-index: 1;
}

.news-archive-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
}

.news-archive-description {
    font-size: 18px;
    color: rgba(255,255,255,0.9);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* News Filters */
.news-filters {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 40px;
}

.filter-row {
    display: flex;
    gap: 30px;
    align-items: end;
    flex-wrap: wrap;
}

.filter-category,
.filter-search {
    flex: 1;
    min-width: 200px;
}

.filter-category label,
.filter-search label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #002740;
}

.atc-news-filter,
.atc-news-search {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.atc-news-filter:focus,
.atc-news-search:focus {
    outline: none;
    border-color: #002740;
}

.atc-news-search::placeholder {
    color: #999;
}

/* News List Container */
.news-list-container {
    margin-bottom: 40px;
}

/* Pagination */
.news-pagination {
    margin-top: 40px;
    text-align: center;
}

.news-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.news-pagination .page-numbers {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #002740;
    font-weight: 500;
    transition: all 0.3s ease;
}

.news-pagination .page-numbers:hover {
    background: #002740;
    color: white;
    border-color: #002740;
}

.news-pagination .page-numbers.current {
    background: #002740;
    color: white;
    border-color: #002740;
}

.news-pagination .prev,
.news-pagination .next {
    padding: 10px 20px;
}

/* No News Found */
.no-news-found {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.no-news-found h2 {
    color: #002740;
    margin-bottom: 15px;
    font-size: 28px;
}

.no-news-found p {
    color: #666;
    font-size: 16px;
    margin-bottom: 25px;
}

.btn-back-to-news {
    display: inline-block;
    background: #002740;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.btn-back-to-news:hover {
    background: #003d5f;
    color: white;
}

/* Responsive design */
@media (max-width: 1200px) {
    .atc-news-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .news-archive-title {
        font-size: 36px;
    }
    
    .filter-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .filter-category,
    .filter-search {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .atc-news-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .news-archive-header {
        padding: 40px 20px;
    }
    
    .news-archive-title {
        font-size: 28px;
    }
    
    .news-archive-description {
        font-size: 16px;
    }
    
    .news-filters {
        padding: 20px;
    }
    
    .atc-news-title {
        font-size: 18px;
    }
    
    .single-news .news-title {
        font-size: 24px;
    }
    
    .single-news .news-meta span {
        display: block;
        margin-bottom: 8px;
    }
    
    .single-news .news-header {
        padding: 20px;
    }
    
    .single-news .news-content-wrapper {
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    
    .news-pagination .nav-links {
        gap: 5px;
    }
    
    .news-pagination .page-numbers {
        padding: 8px 12px;
        font-size: 14px;
    }
}
