/* ===== News Page Styles ===== */

/* Advertisement Banner */
.ad-banner {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    padding: 15px 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    animation: slideDown 0.5s ease;
}

.ad-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 1.1rem;
    font-weight: 600;
}

.ad-content i {
    font-size: 1.5rem;
    animation: pulse 2s infinite;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* News Section */
.news-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.news-header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeIn 0.8s ease;
}

.news-header h1 {
    font-size: 2.5rem;
    color: #006400;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.news-header p {
    font-size: 1.1rem;
    color: #666;
}

/* Search and Filter Controls */
.news-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
    align-items: center;
    justify-content: space-between;
}

.search-box {
    flex: 1;
    min-width: 250px;
    max-width: 400px;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #006400;
    box-shadow: 0 0 0 3px rgba(0,100,0,0.1);
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: #006400;
    color: white;
    border-color: #006400;
}

/* Featured News Slider */
.featured-news {
    margin-bottom: 50px;
}

.featured-news h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.featured-slider {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.featured-slide {
    display: none;
    position: relative;
    min-height: 400px;
    background: linear-gradient(135deg, #000000, #006400);
}

.featured-slide.active {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.featured-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-content {
    padding: 40px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-content h3 {
    font-size: 2rem;
    margin: 15px 0;
    line-height: 1.3;
}

.featured-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.date {
    font-size: 0.9rem;
    opacity: 0.9;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    background: white;
    color: #006400;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: fit-content;
}

.read-more:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(255,255,255,0.3);
}

/* Category Badges */
.category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    z-index: 10;
}

.category-badge.education { background: #2196F3; }
.category-badge.infrastructure { background: #FF9800; }
.category-badge.security { background: #F44336; }
.category-badge.community { background: #4CAF50; }

/* News Container Layout */
.news-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

/* Sidebar */
.news-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.sidebar-section h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.recent-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recent-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    align-items: center;
}

.recent-item:hover {
    background: #006400;
    color: white;
    transform: translateX(5px);
}

.recent-date {
    font-size: 0.75rem;
    font-weight: 600;
    color: #ff0000;
    white-space: nowrap;
}

.recent-item:hover .recent-date {
    color: #ffd700;
}

.recent-title {
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Sidebar Advertisement */
.sidebar-ad {
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 2px dashed #ccc;
}

.ad-label {
    font-size: 0.75rem;
    color: #999;
    margin-bottom: 10px;
}

.ad-box {
    padding: 40px 20px;
    background: white;
    border-radius: 8px;
}

.ad-box i {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 10px;
}

.ad-box p {
    font-size: 1.1rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 5px;
}

.ad-box small {
    font-size: 0.85rem;
    color: #999;
}

/* Category List */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.category-item i {
    margin-right: 10px;
}

.category-item span {
    background: rgba(255,255,255,0.3);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
}

.category-item.education { background: #2196F3; }
.category-item.infrastructure { background: #FF9800; }
.category-item.security { background: #F44336; }
.category-item.community { background: #4CAF50; }

.category-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.news-card:nth-child(1) { animation-delay: 0.1s; }
.news-card:nth-child(2) { animation-delay: 0.2s; }
.news-card:nth-child(3) { animation-delay: 0.3s; }
.news-card:nth-child(4) { animation-delay: 0.4s; }
.news-card:nth-child(5) { animation-delay: 0.5s; }
.news-card:nth-child(6) { animation-delay: 0.6s; }

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.news-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.1);
}

.news-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #006400, #000000);
    color: white;
}

.news-image-placeholder i {
    font-size: 4rem;
    opacity: 0.3;
}

.news-content {
    padding: 25px;
}

.news-content h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.4;
}

.news-meta {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 15px;
}

.news-meta i {
    margin-right: 5px;
}

.news-content > p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.news-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #006400;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.news-link:hover {
    gap: 12px;
    color: #ff0000;
}

/* Full Article Styles */
.full-article {
    display: none;
    background: white;
    border-radius: 15px;
    padding: 2.5rem;
    margin: 2rem 0;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.full-article.active {
    display: block;
    animation: fadeInUp 0.6s ease;
}

.article-header {
    border-bottom: 3px solid #f0f0f0;
    padding-bottom: 2rem;
    margin-bottom: 2.5rem;
    position: relative;
}

.back-to-news {
    background: #006400;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.back-to-news:hover {
    background: #004d00;
    transform: translateX(-5px);
    box-shadow: 0 5px 15px rgba(0,100,0,0.3);
}

.article-header h2 {
    color: #006400;
    font-size: 2.2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.article-meta {
    color: #666;
    font-size: 0.95rem;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.article-meta i {
    margin-right: 5px;
    color: #006400;
}

.article-content {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #444;
}

.article-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.article-content h3 {
    color: #006400;
    margin: 2.5rem 0 1.2rem 0;
    font-size: 1.6rem;
    border-left: 4px solid #006400;
    padding-left: 1rem;
}

.article-content ul {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.8rem;
    position: relative;
}

.article-content li:before {
    content: "•";
    color: #006400;
    font-weight: bold;
    margin-right: 10px;
}

.article-gallery {
    margin: 2.5rem 0;
    text-align: center;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
}

.caption {
    font-style: italic;
    color: #666;
    margin-top: 0.8rem;
    font-size: 0.9rem;
    text-align: center;
}

blockquote {
    border-left: 4px solid #006400;
    padding: 1.5rem 2rem;
    margin: 2.5rem 0;
    font-style: italic;
    color: #555;
    background: #f8f9fa;
    border-radius: 0 8px 8px 0;
}

cite {
    display: block;
    margin-top: 1rem;
    font-weight: bold;
    color: #333;
    font-style: normal;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.page-btn {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 45px;
}

.page-btn:hover:not(:disabled) {
    background: #f5f5f5;
    transform: translateY(-2px);
}

.page-btn.active {
    background: #006400;
    color: white;
    border-color: #006400;
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .news-container {
        grid-template-columns: 1fr;
    }
    
    .news-sidebar {
        order: 2;
    }
    
    .news-grid {
        order: 1;
    }
}

@media (max-width: 768px) {
    .news-header h1 {
        font-size: 2rem;
    }
    
    .news-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .featured-slide.active {
        grid-template-columns: 1fr;
    }
    
    .featured-slide img {
        height: 250px;
    }
    
    .featured-content {
        padding: 25px;
    }
    
    .featured-content h3 {
        font-size: 1.5rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .ad-content {
        font-size: 0.95rem;
    }
    
    /* Full Article Mobile Styles */
    .full-article {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .article-header h2 {
        font-size: 1.8rem;
    }
    
    .article-content {
        font-size: 1rem;
    }
    
    .article-content h3 {
        font-size: 1.4rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .news-section {
        padding: 20px 15px;
    }
    
    .news-header h1 {
        font-size: 1.6rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-btn {
        font-size: 0.85rem;
        padding: 8px 15px;
    }
    
    .featured-content h3 {
        font-size: 1.3rem;
    }
    
    .news-content {
        padding: 20px;
    }
    
    .news-content h3 {
        font-size: 1.1rem;
    }
    
    /* Full Article Mobile Small Styles */
    .full-article {
        padding: 1rem;
    }
    
    .article-header h2 {
        font-size: 1.5rem;
    }
    
    .article-content h3 {
        font-size: 1.2rem;
    }
    
    .back-to-news {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}