/* Modern Financial Blog Aggregator Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #1a237e 0%, #0d47a1 100%);
    color: white;
    padding: 40px 0;
    margin-bottom: 40px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 300;
    letter-spacing: 1px;
}

header .description {
    font-size: 1.1em;
    opacity: 0.9;
    margin-bottom: 15px;
}

.feed-count {
    display: inline-block;
    padding: 8px 20px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    font-size: 0.9em;
    backdrop-filter: blur(5px);
}

/* Feed Grid Layout */
.feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* Feed Card Styles */
.feed-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

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

.card-media {
    height: 180px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-source {
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #1a237e;
    font-weight: 600;
    margin-bottom: 8px;
}

.card-title {
    font-size: 1.2em;
    line-height: 1.4;
    margin-bottom: 12px;
    font-weight: 600;
}

.card-title a {
    color: #1a237e;
    text-decoration: none;
    transition: color 0.2s ease;
}

.card-title a:hover {
    color: #0d47a1;
    text-decoration: underline;
}

.card-description {
    color: #666;
    font-size: 0.95em;
    line-height: 1.5;
    margin-bottom: 15px;
    flex: 1;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 0.9em;
}

.card-date {
    color: #888;
    display: flex;
    align-items: center;
}

.card-date::before {
    content: '📅';
    margin-right: 5px;
    font-size: 0.9em;
}

/* Footer Styles */
footer {
    background: #1e1e2f;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 40px;
}

footer p {
    opacity: 0.9;
    font-size: 0.95em;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    
    .feed-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 30px 0;
    }
    
    header h1 {
        font-size: 1.5em;
    }
    
    .card-media {
        height: 150px;
    }
    
    .card-content {
        padding: 15px;
    }
}

/* Loading State */
.loading {
    text-align: center;
    padding: 50px;
    font-size: 1.2em;
    color: #666;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1a237e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Error Message */
.error-message {
    background-color: #ffebee;
    border-left: 4px solid #c62828;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    color: #c62828;
}