* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
}

.header {
    background-color: #1a1a1a;
    color: white;
    padding: 1rem 0;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-text {
    text-align: left;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.header p {
    font-size: 1rem;
    opacity: 0.8;
}

.header-button {
    background: linear-gradient(135deg, #ff7f00 0%, #ff9500 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 127, 0, 0.2);
}

.header-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 127, 0, 0.4);
    text-decoration: none;
    color: white;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .header-text {
        text-align: center;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.news-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 350px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e0e0e0;
}

.news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    text-decoration: none;
    color: inherit;
}

.news-header {
    padding: 1.25rem;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.category-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 20px;
    margin-bottom: 0.75rem;
}

.category-daily-weather {
    background-color: #e3f2fd;
    color: #1976d2;
}

.category-daily-winds {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.category-grain-stock-quequen {
    background-color: #e8f5e8;
    color: #a2c300;
}

.category-grain-stock-rosario {
    background-color: #fff3e0;
    color: #f57c00;
}

.category-ai-agents-stock-editor {
    background-color: #f3e5f5;
    color: #56830d;
}

.news-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
    line-height: 1.3;
}

.news-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.news-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    font-weight: 400;
    max-height: 6.4rem; /* 4 lines * 1.6 line-height */
}

.news-text p {
    margin-bottom: 0.5rem;
    color: #333;
}

/* Markdown styles for content - normalized for cards */
.news-text h1, .news-text h2, .news-text h3 {
    margin: 0.25rem 0;
    color: #1a1a1a;
    line-height: 1.4;
}

.news-text h1 {
    font-size: 1rem;
    font-weight: bold;
}

.news-text h2 {
    font-size: 0.98rem;
    font-weight: bold;
}

.news-text h3 {
    font-size: 0.96rem;
    font-weight: bold;
}

.news-text strong {
    font-weight: bold;
    color: #1a1a1a;
}

.news-text em {
    font-style: italic;
}

.news-text ul {
    margin: 0.25rem 0;
    padding-left: 1rem;
}

.news-text li {
    margin-bottom: 0.1rem;
    line-height: 1.4;
}

.news-text a {
    color: #1976d2;
    text-decoration: underline;
}

.no-content {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-style: italic;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.timestamp {
    font-size: 0.8rem;
    color: #666;
    margin-top: 1rem;
    text-align: right;
    flex-shrink: 0;
    font-style: italic;
}

.footer {
    background-color: #f5f5f5;
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
    color: #666;
    border-top: 1px solid #ddd;
}

@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .container {
        padding: 1rem;
    }
}