/* ===== News Index Page Styles ===== */

.card-img-wrapper {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card-list .col-md-3 {
    position: relative;
}

.news-card-list .col-md-3 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 200px;
}

/* Search & Filter Bar Styling */
.search-filter-wrapper {
    background: #0a4578c4;
    border-radius: 5px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.2);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.search-filter-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
    will-change: transform;
}

@keyframes pulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(180deg); }
}

.search-filter-wrapper .form-label {
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-filter-wrapper .form-label i {
    font-size: 1rem;
    opacity: 0.9;
}

.search-filter-wrapper .form-control,
.search-filter-wrapper .form-select {
    border: none;
    border-radius: 5px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    will-change: transform;
}

.search-filter-wrapper .form-control:focus,
.search-filter-wrapper .form-select:focus {
    background: #fff;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.search-filter-wrapper .form-control::placeholder {
    color: #999;
}

.search-filter-wrapper .input-icon-wrapper {
    position: relative;
}

.search-filter-wrapper .input-icon-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    font-size: 1.1rem;
    z-index: 2;
}

[dir="rtl"] .search-filter-wrapper .input-icon-wrapper i {
    left: auto;
    right: 1rem;
}

.search-filter-wrapper .input-icon-wrapper .form-control {
    padding-left: 3rem;
}

[dir="rtl"] .search-filter-wrapper .input-icon-wrapper .form-control {
    padding-left: 1rem;
    padding-right: 3rem;
}

.search-filter-wrapper .btn-primary {
    background: linear-gradient(45deg, #2f71b6 0%, #2d334e 100%);
    border: none;
    border-radius: 5px;
    padding: 0.75rem 2rem;
    box-shadow: 0 4px 15px rgb(27 81 128 / 78%);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

.search-filter-wrapper .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(245, 87, 108, 0.4);
}

.search-filter-wrapper .btn-outline-light {
    color: #fff;
    border-radius: 5px;
    padding: 0.75rem 1.5rem;
    background: transparent;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    will-change: transform;
}

.search-filter-wrapper .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

.stats-info {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stats-info i {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Active Filters Badge */
.active-filters-wrapper {
    animation: slideInDown 0.5s ease;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.active-filters-wrapper .badge {
    border-radius: 50px;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

.active-filters-wrapper .badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.active-filters-wrapper .badge a {
    text-decoration: none;
    margin-left: 0.5rem;
    font-weight: bold;
    transition: all 0.2s ease;
}

[dir="rtl"] .active-filters-wrapper .badge a {
    margin-left: 0;
    margin-right: 0.5rem;
}

.active-filters-wrapper .badge a:hover {
    transform: scale(1.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-filter-wrapper {
        padding: 1.5rem;
        border-radius: 15px;
    }

    .search-filter-wrapper .btn-primary,
    .search-filter-wrapper .btn-outline-light {
        width: 100%;
        margin-top: 0.5rem;
    }

    .stats-info {
        width: 100%;
        justify-content: center;
        margin-top: 1rem;
    }

    .card-img-wrapper {
        height: 150px;
    }

    .news-card-list .row > div:first-child {
        max-height: 150px;
    }
}

/* News Cards Styling */
.news-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    height: 100%;
    will-change: transform;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.news-card .card-img-wrapper img {
    transition: transform 0.3s ease;
    will-change: transform;
}

.news-card:hover .card-img-wrapper img {
    transform: scale(1.1);
}

.card-img-placeholder {
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.news-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
}

[dir="rtl"] .news-badge {
    right: auto;
    left: 10px;
}

.badge-blog {
    background: rgba(0, 123, 255, 0.9);
    color: white;
}

.badge-rss {
    background: rgba(255, 152, 0, 0.9);
    color: white;
}

.featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 193, 7, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
}

[dir="rtl"] .featured-badge {
    left: auto;
    right: 10px;
}

.news-meta {
    font-size: 0.875rem;
    color: #6c757d;
}

.news-meta span {
    margin-right: 10px;
}

[dir="rtl"] .news-meta span {
    margin-right: 0;
    margin-left: 10px;
}

.card-title a {
    color: var(--theme-color);
    font-size: 1rem;
    text-decoration: none;
    transition: color 0.3s;
}

.card-title a:hover {
    color: #667eea;
}

.news-category {
    margin-top: 10px;
}

.news-card-list {
    transition: box-shadow 0.3s ease;
    will-change: box-shadow;
}

.news-card-list:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.news-badge-list {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
}

[dir="rtl"] .news-badge-list {
    right: auto;
    left: 10px;
}

.pagination {
    margin-top: 30px;
}

.news-card, .news-card-list {
    opacity: 0;
    animation: fadeInUp 0.4s ease forwards;
}

.news-card:nth-child(1), .news-card-list:nth-child(1) { animation-delay: 0.05s; }
.news-card:nth-child(2), .news-card-list:nth-child(2) { animation-delay: 0.1s; }
.news-card:nth-child(3), .news-card-list:nth-child(3) { animation-delay: 0.15s; }
.news-card:nth-child(4), .news-card-list:nth-child(4) { animation-delay: 0.2s; }
.news-card:nth-child(5), .news-card-list:nth-child(5) { animation-delay: 0.25s; }
.news-card:nth-child(6), .news-card-list:nth-child(6) { animation-delay: 0.3s; }
.news-card:nth-child(n+7), .news-card-list:nth-child(n+7) { animation-delay: 0.35s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-link {
    color: #667eea;
}

.page-item.active .page-link {
    background-color: #667eea;
    border-color: #667eea;
}
