/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
    color: #333;
}

/* Navigation Bar */
.navbar {
    background-color: #4b0082; /* Indigo */
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.nav-menu {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.nav-menu li a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-menu li a:hover {
    background-color: #6a0dad; /* Lighter purple */
}

.nav-menu li a.active {
    background-color: #6a0dad;
    font-weight: bold;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.hero h1 {
    font-size: 2.5rem;
    color: #4b0082;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    color: #555;
}

/* Search Bar */
.search-bar {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.search-bar input {
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    max-width: 300px;
}

.search-bar button {
    padding: 0.5rem 1rem;
    background-color: #4b0082;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-bar button:hover {
    background-color: #6a0dad;
}

/* Featured Section */
.featured {
    margin-bottom: 2rem;
}

.featured h2 {
    font-size: 2rem;
    color: #4b0082;
    margin-bottom: 1rem;
}

.featured .card {
    background-color: #e6e6fa; /* Light lavender for featured */
    border: 2px solid #4b0082;
}

/* Articles Section */
.articles h2 {
    font-size: 2rem;
    color: #4b0082;
    margin-bottom: 1.5rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.card h3 {
    font-size: 1.5rem;
    color: #4b0082;
    margin-bottom: 0.5rem;
}

.card p {
    color: #555;
    margin-bottom: 1rem;
}

.card-link {
    display: inline-block;
    background-color: #4b0082;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.card-link:hover {
    background-color: #6a0dad;
}

/* Highlighted Text */
.highlight {
    color: #ff0000;
    font-weight: bold;
}

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

footer a {
    color: #e6e6fa;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        flex-direction: column;
        align-items: center;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .articles h2, .featured h2 {
        font-size: 1.5rem;
    }

    .card {
        padding: 1rem;
    }

    .search-bar input {
        max-width: 200px;
    }
}