/* News Page Styles */

.news-header {
    text-align: center;
    padding: 60px 20px 40px;
    background: var(--primary-blue);
    color: var(--text-light);
    margin-bottom: 40px;
}

.news-header h1 {
    font-family: 'Merriweather', serif;
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.news-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Search and Filter Section */
.news-controls {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

.search-bar {
    margin-bottom: 30px;
}

.search-bar input {
    width: 100%;
    max-width: 600px;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

/* Filter Dropdown */
.filter-dropdown {
    position: relative;
    display: inline-block;
}

.filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    transition: all 0.3s;
}

.filter-toggle:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.filter-toggle i {
    font-size: 0.9rem;
}

.filter-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
}

.filter-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.filter-option {
    padding: 12px 20px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #333;
    transition: all 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.filter-option:last-child {
    border-bottom: none;
}

.filter-option:hover {
    background: #f5f5f5;
    color: var(--primary-blue);
}

.filter-option.active {
    background: var(--primary-blue);
    color: white;
}

.filter-option.active:hover {
    background: var(--primary-blue);
    color: white;
}

/* News Grid */
.news-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* News Card */
.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.news-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-category {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: capitalize;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.news-category.supreme-court {
    color: #c8102e;
}

.news-category.high-court {
    color: #1976d2;
}

.news-category.labour-law {
    color: #388e3c;
}

.news-category.compliance {
    color: #f57c00;
}

.news-category.general {
    color: #7b1fa2;
}

.news-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-title {
    font-family: 'Merriweather', serif;
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: #333;
    line-height: 1.4;
}

.news-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 15px;
}

.news-meta i {
    margin-right: 5px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.3s;
}

.read-more:hover {
    gap: 12px;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.loading i {
    font-size: 3rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.empty-state i {
    font-size: 5rem;
    margin-bottom: 20px;
    color: #ddd;
}

.empty-state h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #666;
}

.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #dc3545;
    background: #f8d7da;
    border-radius: 8px;
}

/* Responsive Design */

/* Large tablets and small desktops */
@media (max-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .news-container {
        padding: 0 16px 50px;
    }

    .news-controls {
        padding: 0 16px;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .news-header {
        padding: 40px 16px 30px;
        margin-bottom: 30px;
    }

    .news-header h1 {
        font-size: 2rem;
    }

    .news-header p {
        font-size: 1rem;
    }

    .news-controls {
        margin-bottom: 30px;
    }

    .search-bar {
        margin-bottom: 20px;
    }

    .search-bar input {
        padding: 12px 16px;
        font-size: 0.95rem;
        max-width: 100%;
    }

    .filter-toggle {
        padding: 10px 18px;
        font-size: 0.95rem;
    }

    .news-image {
        height: 180px;
    }

    .news-content {
        padding: 16px;
    }

    .news-title {
        font-size: 1.1rem;
    }

    .news-excerpt {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .news-meta {
        font-size: 0.85rem;
        flex-wrap: wrap;
        gap: 8px;
    }

    .empty-state {
        padding: 60px 16px;
    }

    .empty-state i {
        font-size: 4rem;
    }

    .empty-state h3 {
        font-size: 1.5rem;
    }
}

/* Mobile phones */
@media (max-width: 576px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .news-header {
        padding: 30px 12px 24px;
        margin-bottom: 24px;
    }

    .news-header h1 {
        font-size: 1.6rem;
    }

    .news-header p {
        font-size: 0.9rem;
    }

    .news-controls {
        padding: 0 12px;
        margin-bottom: 24px;
    }

    .search-bar {
        margin-bottom: 16px;
    }

    .search-bar input {
        padding: 12px 14px;
        font-size: 0.9rem;
        border-radius: 25px;
    }

    .filter-dropdown {
        width: 100%;
    }

    .filter-toggle {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
    }

    .filter-menu {
        width: 100%;
        left: 0;
        right: 0;
    }

    .news-container {
        padding: 0 12px 40px;
    }

    .news-card {
        border-radius: 10px;
    }

    .news-image {
        height: 200px;
    }

    .news-category {
        top: 10px;
        left: 10px;
        padding: 5px 12px;
        font-size: 0.8rem;
    }

    .news-content {
        padding: 14px;
    }

    .news-title {
        font-size: 1.05rem;
        margin-bottom: 10px;
    }

    .news-excerpt {
        font-size: 0.88rem;
        margin-bottom: 12px;
    }

    .news-meta {
        font-size: 0.8rem;
        padding-top: 12px;
        margin-bottom: 12px;
    }

    .read-more {
        font-size: 0.9rem;
    }

    .loading {
        padding: 40px 16px;
    }

    .loading i {
        font-size: 2.5rem;
    }

    .empty-state {
        padding: 50px 12px;
    }

    .empty-state i {
        font-size: 3.5rem;
    }

    .empty-state h3 {
        font-size: 1.3rem;
    }

    .empty-state p {
        font-size: 0.9rem;
    }

    .error-message {
        padding: 30px 16px;
        font-size: 0.9rem;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .news-header h1 {
        font-size: 1.4rem;
    }

    .news-title {
        font-size: 1rem;
    }

    .news-excerpt {
        font-size: 0.85rem;
    }

    .news-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}