/* Custom Styles for Tech News Website */

/* Global Styles */
:root {
    --primary-color: #007bff;
    --primary-gradient: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.15);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: var(--font-family);
    line-height: 1.7;
    color: #2d3748;
    background-color: #ffffff;
    overflow-x: hidden;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection styles */
::selection {
    background-color: rgba(0, 123, 255, 0.2);
    color: var(--primary-color);
}

/* Header Styles */
.navbar {
    backdrop-filter: blur(15px);
    background: linear-gradient(135deg, rgba(30, 39, 46, 0.95) 0%, rgba(44, 62, 80, 0.95) 100%) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.navbar-brand {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.navbar-brand:hover {
    color: #ffd700 !important;
    transform: translateY(-1px);
}

.navbar-brand i {
    color: #ffd700;
    filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.5));
    animation: pulse 2s infinite;
    margin-right: 0.5rem;
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1);
        filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.5));
    }
    50% { 
        transform: scale(1.05);
        filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.8));
    }
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9) !important;
    transition: var(--transition);
    position: relative;
    padding: 0.75rem 1rem !important;
    border-radius: 6px;
    margin: 0 0.25rem;
}

.navbar-nav .nav-link:hover {
    color: #ffd700 !important;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

.navbar-nav .nav-link.active {
    color: #ffd700 !important;
    background: rgba(255, 215, 0, 0.15);
    font-weight: 600;
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: linear-gradient(90deg, #ffd700, #ffed4e);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

/* Search form in navbar */
.navbar .form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
}

.navbar .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.navbar .form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: #ffd700;
    box-shadow: 0 0 0 0.2rem rgba(255, 215, 0, 0.25);
    color: white;
}

.navbar .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
}

.navbar .btn-outline-light:hover {
    background: #ffd700;
    border-color: #ffd700;
    color: #2c3e50;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

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

.hero-section::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 1000 100" fill="white" opacity="0.1"><polygon points="0,0 1000,0 1000,100 0,80"/></svg>');
    background-size: cover;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-weight: 800;
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
    animation: slideInUp 1s ease-out;
}

.hero-section .lead {
    font-size: 1.3rem;
    font-weight: 300;
    opacity: 0.95;
    animation: slideInUp 1s ease-out 0.2s both;
}

.hero-section img {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    animation: slideInRight 1s ease-out 0.4s both;
}

.hero-image-container {
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0,123,255,0.1) 0%, rgba(102,126,234,0.1) 100%);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.hero-image-container:hover .hero-overlay {
    opacity: 1;
}

.tech-icons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 2rem;
}

.tech-icons i {
    font-size: 2rem;
    animation: float 2s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.tech-icons i:nth-child(1) { animation-delay: 0s; }
.tech-icons i:nth-child(2) { animation-delay: 0.2s; }
.tech-icons i:nth-child(3) { animation-delay: 0.4s; }
.tech-icons i:nth-child(4) { animation-delay: 0.6s; }
.tech-icons i:nth-child(5) { animation-delay: 0.8s; }
.tech-icons i:nth-child(6) { animation-delay: 1s; }

/* Article Cards */
.article-card {
    transition: var(--transition);
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    height: 100%;
    overflow: hidden;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    position: relative;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: var(--transition);
}

.article-card:hover::before {
    transform: scaleX(1);
}

.article-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.article-card .position-relative {
    overflow: hidden;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.article-card .card-img-top {
    height: 220px;
    object-fit: cover;
    transition: var(--transition);
    filter: brightness(1.1) contrast(1.1);
}

.article-card:hover .card-img-top {
    transform: scale(1.1);
    filter: brightness(1.2) contrast(1.2);
}

.article-card .card-body {
    display: flex;
    flex-direction: column;
}

.article-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    color: #333;
    text-decoration: none;
}

.article-card .card-title:hover {
    color: var(--primary-color);
}

.article-card .card-text {
    flex-grow: 1;
    color: #666;
    font-size: 0.9rem;
}

.article-meta {
    font-size: 0.85rem;
    color: #888;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid #eee;
}

.article-meta i {
    color: var(--primary-color);
}

/* Category Badges */
.category-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.category-ai { 
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}
.category-mobile { 
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}
.category-web { 
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}
.category-blockchain { 
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}
.category-default { 
    background: linear-gradient(135deg, var(--secondary-color) 0%, #5a6268 100%);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

/* Filter Tabs */
.nav-pills .nav-link {
    color: var(--secondary-color);
    border-radius: 30px;
    margin: 0 0.5rem 0.5rem 0;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
    background: white;
    box-shadow: var(--shadow-sm);
}

.nav-pills .nav-link:hover {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.1) 0%, rgba(0, 123, 255, 0.05) 100%);
    color: var(--primary-color);
    border-color: rgba(0, 123, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.nav-pills .nav-link.active {
    background: var(--primary-gradient);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-color);
    border-color: #dee2e6;
    transition: var(--transition);
}

.pagination .page-link:hover {
    background-color: rgba(0, 123, 255, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.pagination .page-item.active .page-link {
    background: var(--primary-gradient);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.pagination .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Pagination Info */
.pagination-info {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.05) 0%, rgba(102, 126, 234, 0.05) 100%);
    border: 1px solid rgba(0, 123, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 0.75rem 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    animation: fadeIn 0.5s ease-out;
}

.pagination-info i {
    color: var(--primary-color);
}

.pagination-info strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Article Detail Page */
.article-detail {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-title {
    color: #333;
    line-height: 1.3;
}

.article-meta {
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.article-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.article-body {
    color: #444;
}

.article-body h2,
.article-body h3,
.article-body h4 {
    color: #333;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-body p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.article-body blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    background-color: #f8f9fa;
    padding: 1rem 1.5rem;
    border-radius: 0 8px 8px 0;
}

.article-body code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    color: #e83e8c;
}

.article-body pre {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid #dee2e6;
}

/* Tags */
.article-tags .badge {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

/* Share Buttons */
.share-buttons .btn {
    margin-bottom: 0.5rem;
}

/* Sidebar */
.sidebar .card {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.sidebar .card-header {
    background-color: var(--primary-color);
    color: white;
    border-bottom: none;
}

.sidebar .card-title {
    font-size: 1rem;
    font-weight: 600;
}

/* Related Articles */
.related-article {
    display: flex;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.related-article:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.related-article img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 1rem;
}

.related-article-content h6 {
    font-size: 0.9rem;
    line-height: 1.3;
    margin-bottom: 0.25rem;
}

.related-article-content h6 a {
    color: #333;
    text-decoration: none;
}

.related-article-content h6 a:hover {
    color: var(--primary-color);
}

.related-article-content small {
    color: #888;
    font-size: 0.8rem;
}

/* Footer */
footer {
    margin-top: auto;
    background: linear-gradient(135deg, #1a252f 0%, #2c3e50 50%, #34495e 100%) !important;
    position: relative;
    overflow: hidden;
    color: #ffffff !important;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 215, 0, 0.6) 50%, transparent 100%);
}

footer::after {
    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" fill="rgba(255,255,255,0.02)"><circle cx="20" cy="20" r="2"/><circle cx="80" cy="40" r="1"/><circle cx="40" cy="80" r="1.5"/><circle cx="90" cy="90" r="1"/><circle cx="10" cy="60" r="1"/></svg>');
    pointer-events: none;
}

footer .container {
    position: relative;
    z-index: 1;
}

footer h5 {
    color: #ffffff !important;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
}

footer h5 i {
    color: #ffd700;
    filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.3));
    margin-right: 0.5rem;
}

footer p {
    color: rgba(255, 255, 255, 0.85) !important;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

footer .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

.social-links {
    margin-top: 1rem;
}

.social-links a {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.8) !important;
    transition: var(--transition);
    display: inline-block;
    padding: 0.75rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 0.5rem 0.5rem 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.social-links a:hover {
    color: #ffd700 !important;
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.4);
    transform: translateY(-4px) scale(1.15);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4);
}

.social-links a:nth-child(1):hover { /* Facebook */
    color: #4267B2 !important;
    background: rgba(66, 103, 178, 0.2);
    box-shadow: 0 10px 30px rgba(66, 103, 178, 0.4);
}

.social-links a:nth-child(2):hover { /* Twitter */
    color: #1DA1F2 !important;
    background: rgba(29, 161, 242, 0.2);
    box-shadow: 0 10px 30px rgba(29, 161, 242, 0.4);
}

.social-links a:nth-child(3):hover { /* LinkedIn */
    color: #0077B5 !important;
    background: rgba(0, 119, 181, 0.2);
    box-shadow: 0 10px 30px rgba(0, 119, 181, 0.4);
}

.social-links a:nth-child(4):hover { /* GitHub */
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --border-radius: 8px;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
        text-align: center;
    }
    
    .hero-section .lead {
        font-size: 1.1rem;
        text-align: center;
    }
    
    .hero-image-container {
        margin-top: 2rem;
    }
    
    .tech-icons {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .tech-icons i {
        font-size: 1.5rem;
    }
    
    .article-title {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    .article-detail {
        font-size: 1rem;
    }
    
    .article-card {
        margin-bottom: 1.5rem;
    }
    
    .article-card .card-img-top {
        height: 180px;
    }
    
    .related-article {
        flex-direction: column;
        text-align: center;
    }
    
    .related-article img {
        width: 100%;
        height: 150px;
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .nav-pills {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-pills .nav-link {
        margin: 0.25rem;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .social-links a {
        font-size: 1.2rem;
        padding: 0.4rem;
    }
    
    .hero-section {
        padding: 3rem 0;
    }
    
    .article-image img {
        height: 250px !important;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .article-card .card-img-top {
        height: 160px;
    }
    
    .tech-icons {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .tech-icons i {
        font-size: 1.2rem;
    }
    
    .nav-pills .nav-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .article-image img {
        height: 200px !important;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .image-placeholder {
        font-size: 1.5rem;
    }
    
    .image-placeholder .placeholder-text {
        font-size: 0.8rem;
        bottom: 0.5rem;
    }
}

/* Image placeholder responsive adjustments */
@media (max-width: 576px) {
    .image-placeholder {
        font-size: 1.2rem;
    }
    
    .image-placeholder .placeholder-text {
        font-size: 0.7rem;
    }
}

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

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

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 123, 255, 0.8);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out;
}

.slide-in-up {
    animation: slideInUp 0.8s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

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

.scale-in {
    animation: scaleIn 0.6s ease-out;
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Section Styles */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #718096;
}

.section-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.section-icon i {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Popular Articles Section */
.popular-articles-section {
    background: linear-gradient(135deg, rgba(255, 69, 0, 0.02) 0%, rgba(255, 140, 0, 0.02) 100%);
    border-radius: var(--border-radius);
    padding: 2rem;
    border: 1px solid rgba(255, 69, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.popular-articles-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff4500 0%, #ff8c00 100%);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.popular-articles-section .section-icon {
    background: linear-gradient(135deg, rgba(255, 69, 0, 0.15) 0%, rgba(255, 140, 0, 0.15) 100%);
    border-color: rgba(255, 69, 0, 0.2);
}

/* All Articles Section */
.all-articles-section {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.02) 0%, rgba(102, 126, 234, 0.02) 100%);
    border-radius: var(--border-radius);
    padding: 2rem;
    border: 1px solid rgba(0, 123, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.all-articles-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.all-articles-section .section-icon {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.15) 0%, rgba(102, 126, 234, 0.15) 100%);
    border-color: rgba(0, 123, 255, 0.2);
}

/* Featured Article Card for Popular Section */
.featured-article-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.featured-article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff4500 0%, #ff8c00 100%);
    z-index: 2;
}

.featured-article-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.featured-article-card .card-img-top {
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.featured-article-card:hover .card-img-top {
    transform: scale(1.1);
    filter: brightness(1.1) contrast(1.1);
}

.featured-article-card .views-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 69, 0, 0.9);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 3;
}

/* Image Placeholder */
.image-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}

.image-placeholder::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" fill="rgba(255,255,255,0.1)"><circle cx="20" cy="20" r="2"/><circle cx="80" cy="40" r="1.5"/><circle cx="40" cy="80" r="2.5"/><circle cx="90" cy="90" r="1"/><circle cx="10" cy="60" r="1.5"/><circle cx="60" cy="30" r="1"/><circle cx="30" cy="50" r="2"/><circle cx="70" cy="70" r="1.5"/></svg>');
    animation: float 6s ease-in-out infinite;
}

.image-placeholder .placeholder-icon {
    position: relative;
    z-index: 2;
    animation: pulse 2s ease-in-out infinite;
}

.image-placeholder .placeholder-text {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    opacity: 0.8;
    z-index: 2;
}

/* Article Image Fallback */
.article-image-error {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.hero-image-error {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Utility Classes */
.text-justify {
    text-align: justify;
}

.cursor-pointer {
    cursor: pointer;
}

.transition-all {
    transition: all 0.3s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Article Content Styling */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: var(--heading-color);
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    line-height: 1.3;
}

.article-content h1 {
    font-size: 2.5rem;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.article-content h2 {
    font-size: 2rem;
    color: var(--primary-color);
}

.article-content h3 {
    font-size: 1.75rem;
}

.article-content h4 {
    font-size: 1.5rem;
}

.article-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.article-content ul,
.article-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    background: var(--light-bg);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    font-style: italic;
    font-size: 1.2rem;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    position: relative;
}

.article-content blockquote::before {
    content: '"';
    font-size: 4rem;
    color: var(--primary-color);
    position: absolute;
    top: -0.5rem;
    left: 1rem;
    opacity: 0.3;
}

.article-content code {
    background: var(--light-bg);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--primary-color);
}

.article-content pre {
    background: var(--dark-bg);
    color: #f8f9fa;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin: 1.5rem 0;
}

.article-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin: 2rem 0;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.article-content th,
.article-content td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.article-content th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.article-content tr:hover {
    background: var(--light-bg);
}

.article-content a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.article-content a:hover {
    border-bottom-color: var(--primary-color);
    color: var(--secondary-color);
}

.article-content strong,
.article-content b {
    color: var(--heading-color);
    font-weight: 600;
}

.article-content em,
.article-content i {
    font-style: italic;
    color: var(--muted-color);
}

/* Responsive adjustments for article content */
@media (max-width: 768px) {
    .article-content {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .article-content h1 {
        font-size: 2rem;
    }
    
    .article-content h2 {
        font-size: 1.75rem;
    }
    
    .article-content h3 {
        font-size: 1.5rem;
    }
    
    .article-content blockquote {
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
    }
    
    .article-content ul,
    .article-content ol {
        padding-left: 1.5rem;
    }
}
