/* ===============================================
   News Magazine Style
   Modern, crisp magazine layout for news.php
   =============================================== */

/* Hero Section with Tabs */
.news-hero {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    padding: 3rem 0 0 0;
    margin-bottom: 2rem;
    border-radius: 0;
}

.news-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.news-hero .lead {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 2rem;
}

/* Tab Navigation */
.news-tabs {
    display: flex;
    gap: 0;
    border-bottom: none;
    margin: 0;
    padding: 0;
}

.news-tab {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.8);
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    text-align: center;
    border-radius: 0;
}

.news-tab:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.news-tab.active {
    background: white;
    color: #27ae60;
    box-shadow: 0 -3px 0 0 #27ae60 inset;
}

.news-tab i {
    margin-right: 0.5rem;
}

/* Tab Content */
.news-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.news-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Featured Article */
.featured-article {
    position: relative;
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.featured-article-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.featured-article-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);
    padding: 2rem;
    color: white;
}

.featured-article-category {
    display: inline-block;
    background: #2ecc71;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.featured-article-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.featured-article-excerpt {
    font-size: 1rem;
    opacity: 0.95;
    margin-bottom: 1rem;
}

.featured-article-meta {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Magazine Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.news-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.news-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card-category {
    display: inline-block;
    background: #f8f9fa;
    color: #27ae60;
    padding: 0.25rem 0.6rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.news-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    color: #2c3e50;
}

.news-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-card-title a:hover {
    color: #27ae60;
}

.news-card-excerpt {
    font-size: 0.95rem;
    color: #6c757d;
    margin-bottom: 1rem;
    flex: 1;
    line-height: 1.6;
}

.news-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #95a5a6;
    padding-top: 1rem;
    border-top: 1px solid #ecf0f1;
}

.news-card-date {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.news-card-author {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Sidebar Widgets */
.news-sidebar {
    position: sticky;
    top: 20px;
}

.sidebar-widget {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.sidebar-widget-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #2c3e50;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #2ecc71;
}

/* Categories Widget */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #ecf0f1;
    transition: padding-left 0.3s ease;
}

.category-item:last-child {
    border-bottom: none;
}

.category-item:hover {
    padding-left: 0.5rem;
}

.category-item a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.category-item:hover a {
    color: #27ae60;
}

.category-count {
    background: #ecf0f1;
    color: #7f8c8d;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Recent Posts Widget */
.recent-post {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #ecf0f1;
}

.recent-post:last-child {
    border-bottom: none;
}

.recent-post-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.recent-post-content {
    flex: 1;
}

.recent-post-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    line-height: 1.3;
}

.recent-post-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.recent-post-title a:hover {
    color: #27ae60;
}

.recent-post-date {
    font-size: 0.8rem;
    color: #95a5a6;
}

/* Social Links */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.social-links .btn {
    justify-content: flex-start;
    text-align: left;
}

/* Search Widget */
.news-search {
    display: flex;
    gap: 0.5rem;
}

.news-search input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    font-size: 0.95rem;
}

.news-search input:focus {
    outline: none;
    border-color: #2ecc71;
}

.news-search button {
    padding: 0.75rem 1.5rem;
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.news-search button:hover {
    background: #27ae60;
}

/* Pagination */
.news-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination-link {
    padding: 0.75rem 1.25rem;
    background: white;
    color: #2c3e50;
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination-link:hover {
    background: #2ecc71;
    color: white;
    border-color: #2ecc71;
}

.pagination-link.active {
    background: #2ecc71;
    color: white;
    border-color: #2ecc71;
}

.pagination-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 991px) {
    .news-hero h1 {
        font-size: 2rem;
    }

    .news-tabs {
        flex-wrap: wrap;
    }

    .news-tab {
        flex: 1 1 50%;
    }

    .featured-article-image {
        height: 300px;
    }

    .featured-article-title {
        font-size: 1.5rem;
    }

    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }

    .news-sidebar {
        position: static;
        margin-top: 2rem;
    }
}

@media (max-width: 767px) {
    .news-hero {
        padding: 2rem 0 0 0;
    }

    .news-hero h1 {
        font-size: 1.75rem;
    }

    .news-tab {
        flex: 1 1 100%;
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .featured-article-image {
        height: 250px;
    }

    .featured-article-overlay {
        padding: 1.5rem;
    }

    .featured-article-title {
        font-size: 1.3rem;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-card-image {
        height: 180px;
    }
}
