/* Articles Index Page Styles */

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 4rem 0 2rem;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    opacity: 0.1;
}

.page-header-content {
    position: relative;
    z-index: 2;
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-description {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.breadcrumb-nav {
    display: flex;
    justify-content: center;
}

.breadcrumb {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 0.5rem 1rem;
    backdrop-filter: blur(10px);
}

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

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    margin: 0 0.5rem;
    opacity: 0.7;
}

.breadcrumb-item a {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.breadcrumb-item a:hover {
    opacity: 0.8;
    transform: translateY(-1px);
    text-decoration: none;
}

.breadcrumb-item.active {
    opacity: 0.8;
}

/* Filters Section */
.filters-section {
    background: #f8f9fa;
    padding: 2rem 0;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.filters-wrapper {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
    margin-bottom: 1rem;
}

/* Search Container */
.search-container {
    max-width: 500px;
}

.search-form {
    position: relative;
}

.search-input-wrapper {
    position: relative;
    display: flex;
}

.search-input {
    width: 100%;
    padding: 0.8rem 3rem 0.8rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    transform: translateY(-1px);
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-50%) scale(1.1);
}

/* Filters Container */
.filters-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.filter-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.filter-select {
    padding: 0.5rem 0.8rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* View Toggle */
.view-toggle {
    display: flex;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.view-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.view-btn:hover {
    background: #f8f9fa;
}

.view-btn.active {
    background: var(--primary-color);
    color: white;
}

/* Active Filters */
.active-filters {
    margin-bottom: 1rem;
}

.active-filters-content {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.active-filters-label {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
}

.active-filter {
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideInDown 0.3s ease-out;
}

.remove-filter {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-filter:hover {
    background: rgba(255, 255, 255, 0.2);
}

.clear-all-filters {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.clear-all-filters:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* Results Info */
.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.results-count {
    color: #666;
    font-size: 0.9rem;
}

/* Articles Section */
.articles-section {
    padding: 3rem 0;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Articles List View */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3rem;
}

.articles-list .article-card {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 1.5rem;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.articles-list .article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.articles-list .article-image-wrapper {
    height: 200px;
}

.articles-list .article-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Article Card */
.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.article-image-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.article-image-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

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

.article-card:hover .article-image {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    gap: 0.5rem;
}

.article-card:hover .image-overlay {
    opacity: 1;
}

.image-overlay i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.article-category-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.article-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    z-index: 2;
}

.article-card:hover .article-actions {
    opacity: 1;
    transform: translateX(0);
}

.action-btn {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.action-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.action-btn.bookmarked {
    background: var(--primary-color);
    color: white;
}

/* Article Content */
.article-content {
    padding: 1.5rem;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #666;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.article-title {
    margin-bottom: 1rem;
}

.article-title a {
    color: #333;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.4;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-title a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.article-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.author-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.read-more-btn {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.read-more-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: white;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

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

.no-results-content {
    max-width: 500px;
    margin: 0 auto;
}

.no-results-icon {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 1.5rem;
}

.no-results-title {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 1rem;
}

.no-results-description {
    color: #999;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3rem 0;
    color: white;
}

.newsletter-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
}

.newsletter-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.newsletter-description {
    opacity: 0.9;
    font-size: 1rem;
}

.newsletter-form {
    min-width: 350px;
}

.newsletter-input-group {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 0.3rem;
    backdrop-filter: blur(10px);
}

.newsletter-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.8rem 1rem;
    color: white;
    font-size: 1rem;
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-input:focus {
    outline: none;
}

.newsletter-submit {
    background: white;
    color: var(--primary-color);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.newsletter-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Lazy Loading */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .filters-wrapper {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .filters-container {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .newsletter-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
    
    .articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2.5rem;
    }
    
    .filters-section {
        position: static;
    }
    
    .search-container {
        max-width: 100%;
    }
    
    .filters-container {
        gap: 1rem;
    }
    
    .filter-group {
        min-width: 0;
    }
    
    .filter-select {
        min-width: 100px;
        font-size: 0.8rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .articles-list .article-card {
        grid-template-columns: 1fr;
    }
    
    .articles-list .article-image-wrapper {
        height: 200px;
    }
    
    .newsletter-form {
        min-width: 100%;
    }
    
    .newsletter-input-group {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .newsletter-submit {
        border-radius: 15px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
    }
    
    .page-description {
        font-size: 1rem;
    }
    
    .filters-container {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .view-toggle {
        align-self: center;
    }
    
    .article-content {
        padding: 1rem;
    }
    
    .article-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .active-filters-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}