/* Articles Page Styles */

.hero-articles {
    background: linear-gradient(rgba(30, 64, 175, 0.8), rgba(30, 58, 138, 0.8)), 
                url('https://images.unsplash.com/photo-1481627834876-b7833e8f5570?ixlib=rb-4.0.3') center/cover;
    min-height: 60vh;
    display: flex;
    align-items: center;
    margin-top: 58px;
    position: relative;
    overflow: hidden;
}

.hero-articles::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.hero-articles .container {
    position: relative;
    z-index: 2;
}

.hero-articles .row {
    align-items: center;
}

.hero-articles h1 {
    animation: slideInLeft 0.8s ease-out;
}

.hero-articles .lead {
    animation: slideInLeft 0.8s ease-out 0.2s both;
}

.hero-articles .d-flex {
    animation: slideInLeft 0.8s ease-out 0.4s both;
}

.hero-articles .col-lg-6:last-child {
    animation: slideInRight 0.8s ease-out 0.3s both;
}


@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Filter Buttons */

.btn-custom {
    background: var(--primary-color);
    border: var(--primary-color);
    color: white;
    font-weight: 600;
    padding: 10px 25px;
    transition: all 0.3s ease;
}
.btn-custom.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}
.btn-custom:hover {
    background: #1e40af;
    color: white;
    transform: translateY(-2px);
}

.btn-outline-custom {
    border-color: white;
    color: white;
    font-weight: 600;
    padding: 10px 25px;
    transition: all 0.3s ease;
}

.btn-outline-custom:hover {
    background: white !important;
    border-color: white !important;
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

/* Featured Article */
.featured-article {
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-article:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1) !important;
}

.featured-article .object-cover {
    object-fit: cover;
    border-radius: 0;
}

/* Articles Grid */
.card-hover {
    transition: all 0.3s ease;
    border-radius: 15px;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1) !important;
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    border-radius: 15px 15px 0 0;
}

/* Badges */
.badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 50px;
}

/* Category Cards */
.category-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.12);
    border-color: var(--primary-color);
}

.category-icon {
    width: 80px;
    height: 80px;
    background: rgba(30, 64, 175, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.category-card:hover .category-icon {
    background: var(--primary-color);
    color: white !important;
}

.category-card:hover .category-icon i {
    color: white !important;
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-blue) 100%);
}

/* Search Input */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 64, 175, 0.25);
}

/* Load More Button Enhanced */
#loadMoreBtn {
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#loadMoreBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 64, 175, 0.3);
}

#loadMoreBtn .load-count {
    opacity: 0.7;
    font-size: 0.9em;
    margin-left: 0.5rem;
}

/* Progress Bar */
.progress {
    border-radius: 10px;
    background-color: rgba(30, 64, 175, 0.1);
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
}

/* Results Counter */
#resultsCounter {
    font-weight: 500;
    color: #6c757d;
}

/* Clear Buttons */
#clearFilters, #clearSearch {
    transition: all 0.3s ease;
}

#clearFilters:hover, #clearSearch:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
    transform: translateY(-1px);
}

/* No Results Section */
#noResultsMessage {
    animation: fadeIn 0.5s ease-in;
}

#noResultsMessage .bi-search {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Enhanced Filter Buttons */
.btn-outline-primary {
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Enhanced Article Cards */
.article-card {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.article-card.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Lazy Loading Images */
.lazy-image {
    transition: filter 0.3s ease;
    filter: blur(5px);
}

.lazy-image:not([data-src]) {
    filter: none;
}

/* Search Input Enhancement */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 64, 175, 0.25);
}

/* Button Groups */
.btn-group-toggle .btn {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Loading Status */
#loadingStatus {
    color: #6c757d;
    font-style: italic;
}

/* Section Title */
.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 3rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .hero-articles {
        min-height: 55vh;
        padding: 40px 0;
    }
    
    .hero-articles .row {
        flex-direction: column-reverse;
    }
    
    .hero-articles .col-lg-6:first-child {
        text-align: center;
        margin-top: 2rem;
    }
    
    .hero-articles img {
        max-width: 400px;
        width: 100%;
        height: auto;
    }
}

@media (max-width: 768px) {
    .hero-articles {
        min-height: auto;
        padding: 60px 0 40px;
        text-align: center;
    }
    
    .hero-articles .container {
        padding: 0 20px;
    }
    
    .hero-articles .row {
        gap: 2rem;
    }
    
    .hero-articles h1 {
        font-size: 2.5rem;
        line-height: 1.2;
        margin-bottom: 1.5rem;
    }
    
    .hero-articles .lead {
        font-size: 1.1rem;
        margin-bottom: 2rem;
        padding: 0 10px;
    }
    
    .hero-articles .d-flex {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        margin-bottom: 3rem;
    }
    
    .hero-articles .btn {
        width: 200px;
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .hero-articles img {
        max-width: 350px;
        border-radius: 15px;
        box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    }
    
    .featured-article .card-body {
        padding: 2rem !important;
    }
    
    .category-card {
        margin-bottom: 1.5rem;
    }
    
    .btn-custom, .btn-outline-primary {
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 576px) {
    .hero-articles {
        margin-top: 70px;
        padding: 40px 0 30px;
    }
    
    .hero-articles .container {
        padding: 0 15px;
    }
    
    .hero-articles h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-articles .lead {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        padding: 0 5px;
    }
    
    .hero-articles .d-flex {
        gap: 0.75rem;
        margin-bottom: 2rem;
    }
    
    .hero-articles .btn {
        width: 180px;
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .hero-articles img {
        max-width: 300px;
        border-radius: 12px;
    }
    
    .featured-article .card-body {
        padding: 1.5rem !important;
    }
}

@media (max-width: 480px) {
    .hero-articles h1 {
        font-size: 1.75rem;
    }
    
    .hero-articles .lead {
        font-size: 0.95rem;
    }
    
    .hero-articles .btn {
        width: 160px;
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    
    .hero-articles img {
        max-width: 280px;
    }
}

@media (max-width: 375px) {
    .hero-articles {
        padding: 30px 0 25px;
    }
    
    .hero-articles .container {
        padding: 0 10px;
    }
    
    .hero-articles h1 {
        font-size: 1.6rem;
    }
    
    .hero-articles img {
        max-width: 260px;
    }
}

/* Animation for filtering */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.fade-out {
    animation: fadeOut 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Newsletter form */
.newsletter-section input[type="email"] {
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
}

.newsletter-section .btn-light {
    border-radius: 50px;
    font-weight: 600;
    padding: 12px 24px;
}

/* Article meta information */
.card-body small {
    font-size: 0.85rem;
}

.text-muted {
    color: #6c757d !important;
}

/* Hover effects for buttons */
.btn-outline-primary {
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}