/* News Page Specific Styles */

/* Page Header */
.page-header {
    position: relative;
    height: 300px;
    overflow: hidden;
    margin-top: 4rem;
}

.page-header-bg {
    position: relative;
    width: 100%;
    height: 100%;
}

.page-header-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-header-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
}

.page-header-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
    margin-bottom: 1.5rem;
    text-align: center;
}

.page-description {
    font-size: 1.125rem;
    color: #d1d5db;
    text-align: center;
    max-width: 48rem;
    margin: 0 auto;
}

/* Breadcrumb */
.breadcrumb {
    background-color: white;
    border-bottom: 1px solid #e5e7eb;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    margin: 0;
    list-style: none;
    font-size: 0.875rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-link {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-link:hover {
    color: #dc2626;
}

.breadcrumb-separator {
    margin: 0 0.5rem;
    color: #9ca3af;
}

.breadcrumb-current {
    color: #111827;
    font-weight: 500;
}

/* News Main Content */
.news-main {
    padding: 3rem 0 5rem;
    background-color: #f9fafb;
    min-height: 60vh;
}

/* Category Filter */
.news-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background-color: white;
    border: 1px solid #d1d5db;
    color: #374151;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background-color: #f3f4f6;
}

.filter-btn.active {
    background-color: #dc2626;
    border-color: #dc2626;
    color: white;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.news-card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.news-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.news-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.news-image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background-color: #f3f4f6;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-category {
    position: absolute;
    top: 0;
    left: 0;
    background-color: #dc2626;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 0.25rem 0.75rem;
}

.news-content {
    padding: 1.5rem;
}

.news-date {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.news-title {
    color: #111827;
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.news-card:hover .news-title {
    color: #dc2626;
}

.news-excerpt {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Loading Indicator */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #6b7280;
}

.loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #dc2626;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

.no-results-icon {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-results h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid #d1d5db;
    background-color: white;
    color: #374151;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #f3f4f6;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    gap: 0.5rem;
}

.pagination-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid #d1d5db;
    background-color: white;
    color: #374151;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    font-weight: 500;
}

.pagination-number:hover {
    background-color: #f3f4f6;
}

.pagination-number.active {
    background-color: #dc2626;
    border-color: #dc2626;
    color: white;
}

/* Back to Home */
.back-to-home {
    padding: 2rem 0;
    border-top: 1px solid #e5e7eb;
    background-color: #f9fafb;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #dc2626;
}

.back-link svg {
    margin-right: 0.5rem;
}

/* Active Navigation Link */
.nav-link.active {
    color: #dc2626 !important;
}

.mobile-nav-link.active {
    background-color: #fef2f2;
    color: #dc2626;
}

/* Animations */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.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:nth-child(7) { animation-delay: 0.7s; }
.news-card:nth-child(8) { animation-delay: 0.8s; }
.news-card:nth-child(9) { animation-delay: 0.9s; }

/* Responsive Design */
@media (min-width: 768px) {
    .page-header {
        height: 400px;
    }
    
    .page-title {
        font-size: 3.75rem;
    }
    
    .page-description {
        font-size: 1.25rem;
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .news-filter {
        justify-content: flex-start;
    }
}

@media (min-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .news-main {
        padding: 5rem 0;
    }
}

/* Print Styles */
@media print {
    .header,
    .breadcrumb,
    .news-filter,
    .pagination,
    .back-to-home,
    .footer {
        display: none;
    }
    
    .page-header {
        height: auto;
        margin-top: 0;
    }
    
    .page-header-overlay {
        display: none;
    }
    
    .news-main {
        padding: 1rem 0;
    }
    
    .news-card {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
}