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

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    background-color: #f0f2f5;
    color: #333;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    background-color: #fff;
    border-bottom: 1px solid #ddd;
}

.logo {
    font-weight: bold;
    font-size: 1.5rem;
}

nav {
    display: flex;
    gap: 3rem;
}

nav a {
    text-decoration: none;
    color: #333;
    margin: 0 1.5rem;
}

.subscribe-btn {
    background-color: #ffc107;
    color: #333;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
}

main {
    padding: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
    color: #222;
}

#news-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 3rem;
}

.news-article {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.news-article:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.news-article img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.news-content {
    padding: 2.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-content h2 {
    font-size: 1.4rem;
    line-height: 1.4;
    margin: 0 0 1.5rem;
    color: #222;
}

.news-content p {
    margin: 0 0 2.25rem;
    color: #666;
    line-height: 1.6;
    flex-grow: 1;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.news-country {
    background-color: #e9ecef;
    color: #495057;
    padding: 0.45rem 0.9rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
}

.news-content a {
    text-decoration: none;
    color: #007bff;
    font-weight: bold;
    padding: 0.75rem 1.5rem;
    border: 1px solid #007bff;
    border-radius: 6px;
    transition: background-color 0.2s, color 0.2s;
}

.news-content a:hover {
    background-color: #007bff;
    color: #fff;
}

.loader {
    border: 8px solid #f3f3f3; 
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1.5s linear infinite;
    margin: 7.5rem auto;
}

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