/* 
 * News/Blog System Styles for THINKCLUSIVE
 * Additional styling for news pages to complement existing design
 */

/* News Hero Section */
.news-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.news-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 25%, transparent 25%), 
                linear-gradient(-45deg, rgba(255,255,255,0.1) 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.1) 75%), 
                linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.1) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    opacity: 0.3;
    pointer-events: none;
}

.news-hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.news-hero .lead {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Search Box Styling */
.search-box {
    max-width: 500px;
    margin: 0 auto;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.search-box .input-group {
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border-radius: 50px;
    overflow: hidden;
}

.search-box input {
    border: none;
    padding: 18px 25px;
    font-size: 1.1rem;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
}

.search-box input:focus {
    box-shadow: none;
    background: white;
}

.search-box button {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    border: none;
    padding: 18px 25px;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.search-box button:hover {
    background: linear-gradient(45deg, #ff5252, #ff7979);
    transform: translateX(-2px);
}

/* Featured Articles Section */
.featured-section {
    padding: 80px 0;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
}

.featured-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    position: relative;
}

.featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 0%, rgba(102,126,234,0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.featured-card:hover::before {
    opacity: 1;
}

.featured-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.featured-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.featured-card .card-body {
    padding: 2rem;
}

/* Category Filters */
.category-filters {
    padding: 50px 0;
    background: white;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.filter-btn {
    margin: 8px 5px;
    padding: 12px 24px;
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box, linear-gradient(45deg, #e9ecef, #f8f9fa) border-box;
    color: #666;
    border-radius: 30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    transition: left 0.5s ease;
}

.filter-btn:hover::before {
    left: 100%;
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102,126,234,0.3);
}

/* News Grid */
.news-grid {
    padding: 80px 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
}

.news-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 30px;
    height: 100%;
    border: 1px solid rgba(0,0,0,0.05);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
    border-color: rgba(102,126,234,0.2);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.news-card .card-body {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
}

.news-card .card-body .mt-auto {
    margin-top: auto !important;
}

/* Category Badge */
.category-badge {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255,107,107,0.3);
}

/* News Meta Information */
.news-meta {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.news-meta i {
    margin-right: 6px;
    color: #667eea;
    width: 14px;
}

/* Article Detail Page Styles */
.article-header {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.article-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.1) 100%);
}

.article-meta {
    color: rgba(255,255,255,0.85);
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
}

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

.article-meta i {
    margin-right: 8px;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 25px;
}

.breadcrumb-item a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: white;
}

.breadcrumb-item.active {
    color: rgba(255,255,255,0.9);
}

/* Article Content */
.article-content {
    padding: 80px 0;
}

.featured-image {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 50px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.featured-image:hover {
    transform: scale(1.02);
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}

.article-body h2 {
    color: #333;
    margin: 50px 0 25px;
    font-weight: 600;
    position: relative;
    padding-left: 20px;
}

.article-body h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.article-body h3 {
    color: #555;
    margin: 35px 0 20px;
    font-weight: 600;
}

.article-body p {
    margin-bottom: 25px;
}

.article-body ul, .article-body ol {
    margin-bottom: 25px;
    padding-left: 35px;
}

.article-body li {
    margin-bottom: 10px;
}

.article-body blockquote {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #667eea;
    margin: 30px 0;
    padding: 20px 25px;
    border-radius: 0 10px 10px 0;
    font-style: italic;
}

/* Tags Section */
.tags-section {
    padding: 40px 0;
    border-top: 2px solid #f8f9fa;
    border-bottom: 2px solid #f8f9fa;
    margin: 50px 0;
    background: linear-gradient(45deg, #fafafa 0%, #ffffff 100%);
    border-radius: 15px;
}

.tag-link {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #666;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    text-decoration: none;
    margin-right: 10px;
    margin-bottom: 10px;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.tag-link:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102,126,234,0.3);
}

/* Author Section */
.author-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 40px;
    border-radius: 20px;
    margin: 50px 0;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
}

.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 4px solid white;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* Share Buttons */
.share-buttons {
    padding: 40px 0;
    text-align: center;
    border-top: 2px solid #f8f9fa;
    border-bottom: 2px solid #f8f9fa;
    margin: 50px 0;
    background: linear-gradient(45deg, #fafafa 0%, #ffffff 100%);
    border-radius: 15px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none;
    margin: 8px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.share-btn:hover {
    transform: translateY(-3px);
    text-decoration: none;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.share-btn.facebook {
    background: linear-gradient(45deg, #1877f2, #42a5f5);
    color: white;
}

.share-btn.twitter {
    background: linear-gradient(45deg, #1da1f2, #64b5f6);
    color: white;
}

.share-btn.line {
    background: linear-gradient(45deg, #00c300, #4caf50);
    color: white;
}

.share-btn i {
    margin-right: 10px;
    font-size: 1.1rem;
}

/* Related Articles */
.related-articles {
    padding: 80px 0;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
}

.related-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    border: 1px solid rgba(0,0,0,0.05);
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.related-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.related-card .card-body {
    padding: 1.75rem;
}

/* Back to News Link */
.back-to-news {
    display: inline-flex;
    align-items: center;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 30px;
    padding: 10px 20px;
    border-radius: 25px;
    background: linear-gradient(135deg, rgba(102,126,234,0.1) 0%, rgba(118,75,162,0.1) 100%);
    transition: all 0.3s ease;
}

.back-to-news:hover {
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    text-decoration: none;
    transform: translateX(-5px);
}

.back-to-news i {
    margin-right: 10px;
    transition: transform 0.3s ease;
}

.back-to-news:hover i {
    transform: translateX(-3px);
}

/* Article Stats */
.article-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin: 40px 0;
    padding: 30px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.2);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Pagination */
.pagination-container {
    padding: 60px 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
}

.pagination .page-link {
    border: none;
    color: #667eea;
    font-weight: 500;
    margin: 0 3px;
    border-radius: 10px;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102,126,234,0.3);
}

.pagination .page-link:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
}

/* Loading and Error States */
.loading-spinner {
    text-align: center;
    padding: 80px 0;
}

.no-results {
    text-align: center;
    padding: 80px 0;
}

.no-results i {
    font-size: 5rem;
    color: #e9ecef;
    margin-bottom: 30px;
}

.no-results h3 {
    color: #666;
    margin-bottom: 15px;
}

/* Image Error Placeholder */
.image-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 14px;
    border-radius: 8px;
    border: 1px dashed #dee2e6;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.image-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255,255,255,0.3) 10px,
        rgba(255,255,255,0.3) 20px
    );
    opacity: 0.5;
}

.image-placeholder i {
    position: relative;
    z-index: 1;
    opacity: 0.6;
}

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

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out both;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out both;
}

/* Responsive Design */
@media (max-width: 768px) {
    .news-hero {
        padding: 60px 0 40px;
    }
    
    .news-hero h1 {
        font-size: 2rem;
    }
    
    .featured-section,
    .news-grid,
    .article-content,
    .related-articles {
        padding: 50px 0;
    }
    
    .featured-image {
        height: 300px;
    }
    
    .article-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .share-buttons {
        padding: 30px 0;
    }
    
    .share-btn {
        margin: 5px;
        padding: 10px 20px;
    }
    
    .filter-btn {
        margin: 5px 2px;
        padding: 10px 18px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .search-box input,
    .search-box button {
        padding: 15px 20px;
    }
    
    .news-card .card-body,
    .related-card .card-body {
        padding: 1.25rem;
    }
    
    .author-section {
        padding: 30px 20px;
    }
    
    .tags-section {
        padding: 30px 20px;
    }
}