.news-container {
    max-width: 800px;
    padding: 80px 15px 20px;
    margin: 0 auto;
    background: var(--light-bg);
    min-height: 100vh;
}

.news-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

.news-header h1 {
    color: var(--primary-blue);
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.news-header .subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.loading-spinner {
    text-align: center;
    padding: 50px 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Desktop layout (default) */
.news-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 15px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: slideInUp 0.5s ease-out forwards;
}

.news-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--light-gray);
    border-radius: 0;
    transition: transform 0.3s ease;
    display: block;
    max-width: 100%;
}

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

.news-content {
    padding: 20px;
}

.news-source {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.source-logo {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 10px;
    background: var(--primary-blue);
}

.source-name {
    font-size: 0.9rem;
    color: var(--primary-blue);
    font-weight: 600;
}

.news-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: auto;
}

.news-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 12px;
    line-height: 1.4;
}

.news-excerpt {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.news-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-read-more {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.3s ease;
}

.btn-read-more:hover {
    background: var(--primary-dark);
    color: white;
    text-decoration: none;
}

.news-category {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.load-more-container {
    text-align: center;
    margin-top: 30px;
}

.btn-load-more {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-load-more:hover {
    background: var(--primary-dark);
}

/* Mobile Inshorts-style layout */
@media (max-width: 768px) {
    .news-container {
        padding: 70px 0px 20px;
        max-width: 100%;
    }
    
    .news-header {
        padding: 20px 15px;
        margin-bottom: 20px;
    }
    
    .news-item {
        margin-bottom: 0; /* Remove gap between cards */
        border-radius: 0; /* Full width cards */
        height: 100vh; /* Full viewport height like Inshorts */
        display: flex;
        flex-direction: column;
        position: relative;
    }
    
    .news-image {
        height: 50vh; /* Top half of screen */
        width: 100%;
        object-fit: cover;
        border-radius: 0;
        flex-shrink: 0;
    }
    
    .news-content {
        height: 50vh; /* Bottom half of screen */
        padding: 20px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        overflow-y: auto;
        position: relative;
    }
    
    .news-source {
        margin-bottom: 15px;
        flex-shrink: 0;
    }
    
    .news-title {
        font-size: 1.3rem;
        font-weight: 700;
        margin-bottom: 15px;
        line-height: 1.3;
        flex-shrink: 0;
    }
    
    .news-excerpt {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 20px;
        flex: 1;
        overflow-y: auto;
    }
    
    .news-actions {
        flex-shrink: 0;
        margin-top: auto;
    }
    
    .btn-read-more {
        padding: 12px 20px;
        font-size: 1rem;
        border-radius: 25px;
    }
    
    .news-category {
        padding: 6px 16px;
        font-size: 0.9rem;
    }
    
    /* Hide load more button on mobile - use swipe/scroll instead */
    .load-more-container {
        display: none;
    }
    
    /* Add swipe indicator */
    .news-item::after {
        content: "↑ Glissez vers le haut";
        position: absolute;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0,0,0,0.7);
        color: white;
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 0.8rem;
        opacity: 0.7;
        animation: pulse 2s infinite;
        z-index: 10;
    }
    
    .news-item:last-child::after {
        content: "↑ Glissez pour plus d'actualités";
    }
    
    /* Remove the swipe indicator after first interaction */
    .news-item.interacted::after {
        display: none;
    }
}

/* Staggered animation for news items */
.news-item:nth-child(1) { animation-delay: 0.1s; }
.news-item:nth-child(2) { animation-delay: 0.2s; }
.news-item:nth-child(3) { animation-delay: 0.3s; }
.news-item:nth-child(4) { animation-delay: 0.4s; }
.news-item:nth-child(5) { animation-delay: 0.5s; }

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

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

.no-news-message {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.no-news-message i {
    font-size: 3rem;
    color: var(--success-green, #28a745);
    margin-bottom: 20px;
    display: block;
}

.no-news-message h4 {
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.error-message {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

/* Desktop specific styles */
@media (min-width: 769px) {
    .news-item {
        max-width: 100%;
        height: auto;
    }
    
    .news-image {
        height: 250px;
    }
    
    .news-content {
        height: auto;
    }
    
    .load-more-container {
        display: block;
    }
    
    .news-item::after {
        display: none;
    }
}