/* News Page Styles */
.news-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* News Hero Section */
.news-hero {
    background: linear-gradient(135deg, #4a7c59 0%, #3a6348 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 60px;
    border-radius: 8px;
}

.news-hero .hero-content h1 {
    font-family: 'Dancing Script', cursive;
    font-size: 3rem;
    margin-bottom: 15px;
}

.news-hero .hero-content p {
    font-family: 'Merriweather', serif;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Featured Article Section */
.featured-article {
    margin-bottom: 60px;
}

.featured-header {
    text-align: center;
    margin-bottom: 40px;
}

.featured-header h2 {
    font-family: 'Lora', serif;
    font-size: 2rem;
    color: #333;
    position: relative;
}

.featured-header h2:after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background-color: #4a7c59;
    margin: 15px auto 0;
}

.featured-content {
    display: flex;
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.featured-image {
    flex: 1;
    min-height: 400px;
    position: relative;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-text {
    flex: 1;
    padding: 40px;
}

.article-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.category {
    background-color: #4a7c59;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
}

.date {
    color: #666;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
}

.featured-text h3 {
    font-family: 'Merriweather', serif;
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #333;
    line-height: 1.3;
}

.excerpt {
    font-family: 'Lora', serif;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #444;
}

.article-author {
    margin-bottom: 25px;
}

.article-author span {
    font-family: 'Montserrat', sans-serif;
    color: #666;
    font-size: 0.9rem;
}

/* Filter Section */
.news-filters {
    margin-bottom: 40px;
}

.filter-header {
    text-align: center;
}

.filter-header h2 {
    font-family: 'Lora', serif;
    font-size: 2rem;
    color: #333;
    margin-bottom: 30px;
    position: relative;
}

.filter-header h2:after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background-color: #4a7c59;
    margin: 15px auto 0;
}

.category-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.filter-btn {
    background-color: white;
    color: #4a7c59;
    border: 2px solid #4a7c59;
    padding: 10px 20px;
    border-radius: 25px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    background-color: rgba(74, 124, 89, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(74, 124, 89, 0.2);
}

.filter-btn.active {
    background-color: #4a7c59;
    color: white;
    box-shadow: 0 4px 12px rgba(74, 124, 89, 0.3);
}

.filter-btn.active:hover {
    background-color: #3a6348;
    transform: translateY(-2px);
}

/* News Grid Section */
.news-grid-section {
    margin-bottom: 60px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.news-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.news-image {
    height: 220px;
    position: relative;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #4a7c59;
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
}

.news-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.news-meta .date,
.news-meta .author {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    color: #666;
}

.news-content h3 {
    font-family: 'Merriweather', serif;
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #333;
    line-height: 1.4;
}

.news-content .excerpt {
    font-family: 'Lora', serif;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #444;
    flex-grow: 1;
}

.news-content .btn {
    margin-top: auto;
    align-self: flex-start;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 30px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    border: none;
}

.btn-primary {
    background-color: #4a7c59;
    color: white;
    border: 2px solid #4a7c59;
}

.btn-primary:hover {
    background-color: #3a6348;
    border-color: #3a6348;
}

.btn-secondary {
    background-color: white;
    color: #4a7c59;
    border: 2px solid #4a7c59;
}

.btn-secondary:hover {
    background-color: rgba(74, 124, 89, 0.1);
}

/* No News Message */
.no-news {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-news p {
    font-family: 'Merriweather', serif;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: white;
    color: #4a7c59;
    border: 2px solid #4a7c59;
    border-radius: 25px;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background-color: #4a7c59;
    color: white;
}

.page-numbers {
    display: flex;
    gap: 5px;
    align-items: center;
}

.page-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    color: #4a7c59;
    border: 2px solid #4a7c59;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-number:hover,
.page-number.active {
    background-color: #4a7c59;
    color: white;
}

.page-dots {
    color: #666;
    font-family: 'Montserrat', sans-serif;
    padding: 0 5px;
}

/* Newsletter Section */
.newsletter-section {
    background-color: #f0f7f2;
    padding: 60px 20px;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 60px;
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-content h2 {
    font-family: 'Lora', serif;
    font-size: 2rem;
    margin-bottom: 15px;
    color: #333;
}

.newsletter-content p {
    font-family: 'Merriweather', serif;
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: #444;
}

.newsletter-form {
    display: flex;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 30px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.newsletter-form input[type="email"]:focus {
    border-color: #4a7c59;
}

.newsletter-form .btn {
    white-space: nowrap;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 900px) {
    .featured-content {
        flex-direction: column;
    }
    
    .featured-image {
        min-height: 250px;
    }
    
    .news-hero .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .featured-text {
        padding: 30px;
    }
    
    .featured-text h3 {
        font-size: 1.5rem;
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .category-filters {
        gap: 10px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .newsletter-form {
        flex-direction: column;
        gap: 15px;
    }
    
    .newsletter-form .btn {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .news-hero {
        padding: 40px 15px;
        margin-bottom: 40px;
    }
    
    .news-hero .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .featured-text {
        padding: 25px 20px;
    }
    
    .featured-text h3 {
        font-size: 1.4rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .news-card {
        max-width: 400px;
        margin: 0 auto;
        width: 100%;
    }
    
    .category-filters {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .filter-btn {
        width: 200px;
        text-align: center;
    }
    
    .pagination {
        gap: 5px;
    }
    
    .pagination-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .page-number {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .news-hero .hero-content h1 {
        font-size: 2rem;
    }
    
    .featured-header h2, 
    .filter-header h2, 
    .newsletter-content h2 {
        font-size: 1.5rem;
    }
    
    .featured-text h3 {
        font-size: 1.3rem;
    }
    
    .news-content h3 {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
    
    .filter-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
        width: 180px;
    }
    
    .article-meta {
        gap: 10px;
    }
    
    .news-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .pagination-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .page-number {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
}

/* Debug Styles */
.debug-errors {
    background-color: #ffeeee;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ff0000;
    border-radius: 5px;
}

.debug-errors h3 {
    color: #cc0000;
    margin-bottom: 10px;
}

.debug-errors ul {
    margin: 0;
    padding-left: 20px;
}

.debug-errors li {
    color: #cc0000;
    margin-bottom: 5px;
}
