/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Popup modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #2c3e50;
    color: #fff;
    margin: 15% auto;
    padding: 2rem;
    border-radius: 8px;
    max-width: 850px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: modalopen 0.5s;
}

@keyframes modalopen {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #888;
}

.close-btn:hover {
    color: #333;
}

/* Header styles */
header {
    background-color: #1a1a1a;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s;
    cursor: pointer;
}

nav ul li a:hover,
nav ul li a.active {
    color: #4CAF50;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #4CAF50;
    transition: width 0.3s;
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

.controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 20px;
}

#countryFilter,
#languageSelect {
    padding: 5px;
    font-size: 14px;
}


/* Content section styles */
.content-section {
    display: none;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.content-section.active {
    display: block;
}

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

.news-item {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.news-item a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.5rem;
}

.news-item a:hover {
    color: #4CAF50;
}

.news-meta {
    color: #666;
    font-size: 0.8rem;
    margin: 0.3rem 0;
}

.news-source {
    color: #888;
    font-size: 0.75rem;
    font-style: italic;
    margin: 0.3rem 0 0 0;
}

.news-orientation {
    font-size: 0.75rem;
    font-style: italic;
    margin: 0.3rem 0 0 0;
}

.left {
    background-color: blue;
}

.center-left {
    background-color: rgb(23, 155, 221);
}

.center {
    background-color: rgb(255, 255, 255);
}

.center-right {
    background-color: rgb(223, 91, 15);
}

.right {
    background-color: red;
}

/* Form styles */
.form-container {
    max-width: 500px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.form-group button:hover {
    background-color: #45a049;
}

/* Footer styles */
footer {
    background-color: #1a1a1a;
    color: white;
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
}

/* Responsive styles */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 1rem;
    }

    .logo {
        margin-bottom: 1rem;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    nav ul li {
        margin: 0.5rem;
    }

    .modal-content {
        margin: 30% auto;
        width: 90%;
    }

    .news-container {
        grid-template-columns: 1fr;
    }
}