/* ------------------------------
   GENERAL STYLES
------------------------------- */
body {
    background-color: #121212;
    color: #e0e0e0; /* Light grey for readability */
    margin: 0;
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
}

/* -----------------------------
   HEADER
------------------------------- */
.header {
    background: #1f1f1f;
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid #3f9b9b;
}

.header h1 {
    margin: 0;
    font-size: 2.5rem;
    color: #bb86fc; /* Purple for a subtle, modern feel */
    text-align: center;
}

.nav {
    margin-top: 1rem;
    width: 100%;
}

.nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.nav a {
    text-decoration: none;
    font-size: 1.2rem;
    color: #e0e0e0;
    transition: color 0.3s ease, font-size 0.3s ease;
}

.nav a:hover {
    color: #03dac6; /* Teal hover color */
    font-size: 1.4rem;
}

.header {
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.5);
}

/* Responsive styles for smaller screens */
@media (max-width: 768px) {
    .header {
        text-align: center;
        align-items: center; /* Ensure header remains centered */
    }

    .header h1 {
        font-size: 2rem;
        text-align: center;
    }

    .nav ul {
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
    }

    .nav ul li a {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.6rem;
        text-align: center;
    }

    .nav ul {
        flex-direction: row;
        align-items: center;
        justify-content: center;
    }

    .nav ul li a {
        font-size: 0.9rem;
    }
}


/* Search Section */
.search-container {
    padding: 1rem;
    text-align: center;
}

#search-input {
    padding: 0.5rem;
    width: 60%;
    margin-right: 0.5rem;
    border: 1px solid #03dac6;
    border-radius: 4px;
    background: #333333; /* Darker input background */
    color: #e0e0e0;
}

#search-input::placeholder {
    color: #b0b0b0; /* Lighter placeholder text */
}

#search-button {
    padding: 0.5rem 1rem;
    background: #03dac6;
    color: #121212;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

#search-button:hover {
    background: #018786;
}

/* Articles Section */
.articles-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 2rem 1rem;
    margin: 0 auto;
    max-width: 1200px;
}

.article-card {
    background: #1f1f1f;
    border: 1px solid #2c3e3f; /* Darker teal border */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4);
}

.article-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.article-content {
    padding: 1rem;
}

.article-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #bb86fc; /* Purple title */
}

.article-author {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: #b0b0b0; /* Light gray for author names */
}

.article-description {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: #e0e0e0; /* Light gray description */
}

.article-content a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #03dac6;
    color: #121212;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.article-content a:hover {
    background: #018786;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .articles-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .articles-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    #search-input {
        width: 100%;
        margin: 0 0 1rem 0;
    }

    #search-button {
        width: 100%;
    }
}

/* ------------------------------
   SEARCH SUGGESTIONS STYLES
------------------------------- */
.search-suggestions {
    margin-top: 10px;
    margin-left: 15%;
    background: #333333;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    position: absolute;
    width: 60%;
    z-index: 10;
}

.suggestion-item {
    padding: 0.5rem;
    color: #e0e0e0;
    cursor: pointer;
    transition: background 0.3s ease;
}

.suggestion-item:hover {
    background: #03dac557;
}

/* ------------------------------
   FOOTER
------------------------------- */
footer {
    background-color: #1f1f1f;
    color: #cfcfcf;
    text-align: center;
    padding: 20px 0;
    position: relative;
}

footer p {
    margin: 0;
    font-size: 1rem;
}

/* Responsive layout for smaller screens */
@media (max-width: 768px) {
    html {
        padding: 0 10px;
    }

    header {
        text-align: center;
    }

    .nav {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    html {
        padding: 0 5px;
    }
}
