/* Basic Reset & Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa; /* Light gray background */
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: #007bff; /* Primary blue */
}

a:hover {
    color: #0056b3; /* Darker blue on hover */
}

ul {
    list-style: none;
}

h1, h2, h3 {
    margin-bottom: 0.75em;
    color: #343a40; /* Dark gray for headings */
}

/* Header */
header {
    background-color: #ffffff; /* White background */
    padding: 1.5em 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-bottom: 3px solid #007bff;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo a {
    font-size: 1.8em;
    font-weight: 700;
    color: #007bff;
    text-decoration: none;
}

.search-bar {
    display: flex;
    align-items: center;
}

.search-bar input[type="text"] {
    padding: 0.7em;
    border: 1px solid #ced4da; /* Light gray border */
    border-radius: 4px 0 0 4px;
    font-size: 0.9em;
    min-width: 200px;
}

.search-bar button {
    padding: 0.7em 1em;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

.search-bar button:hover {
    background-color: #0056b3;
}

/* Main Navigation */
.main-nav {
    background-color: #343a40; /* Dark gray for nav */
    padding: 0.8em 0;
}

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

.main-nav ul li a {
    color: #f8f9fa; /* Light text on dark background */
    padding: 0.5em 1em;
    display: block;
    transition: background-color 0.3s ease;
    border-radius: 4px;
}

.main-nav ul li a:hover {
    background-color: #495057; /* Slightly lighter gray on hover */
    color: #fff;
}

/* Hero Section */
.hero {
    background: url('img/hero-bg.jpg') no-repeat center center/cover; /* Add your hero image */
    background-color: #6c757d; /* Fallback color */
    color: white;
    padding: 5em 0;
    text-align: center;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay */
    padding: 2em;
    border-radius: 8px;
}

.hero h2 {
    font-size: 2.5em;
    margin-bottom: 0.5em;
    color: #fff;
}

.hero p {
    font-size: 1.2em;
}

/* Main Content */
main.container {
    padding-top: 2em;
    padding-bottom: 2em;
}

.featured-links, .category-sections {
    margin-bottom: 2.5em;
    background-color: #fff;
    padding: 1.5em;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.featured-links h2, .category-sections h3 a {
    color: #007bff;
    border-bottom: 2px solid #e9ecef; /* Light underline */
    padding-bottom: 0.3em;
    display: inline-block;
}
.category-sections h3 a {
    color: #28a745; /* Green for category titles */
}


.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1em;
    margin-top: 1em;
}

.link-item {
    background-color: #e9f7ff; /* Light blue background */
    padding: 0.8em 1.2em;
    border-radius: 4px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: block;
    color: #0056b3; /* Darker blue for text */
    font-weight: 600;
}

.link-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.2);
    background-color: #d0ebff;
}

.category-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5em;
    background-color: transparent; /* Make parent transparent */
    padding: 0; /* Remove parent padding */
    box-shadow: none; /* Remove parent shadow */
}

.category-card {
    background-color: #fff;
    padding: 1.5em;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.category-card h3 {
    margin-bottom: 1em;
}
.category-card h3 a:hover {
    color: #1e7e34; /* Darker green on hover */
}


.category-card ul li {
    margin-bottom: 0.5em;
}

.category-card ul li a {
    color: #495057; /* Medium gray for list items */
    display: block;
    padding: 0.3em 0;
}
.category-card ul li a:hover {
    color: #007bff;
}

/* Footer */
footer {
    background-color: #343a40;
    color: #f8f9fa;
    text-align: center;
    padding: 2em 0;
    margin-top: 2em;
}

footer p {
    margin-bottom: 0.5em;
    font-size: 0.9em;
}
footer a {
    color: #adb5bd; /* Lighter gray for footer links */
}
footer a:hover {
    color: #fff;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .logo {
        margin-bottom: 0.5em;
    }
    
    .search-bar {
        width: 100%;
        margin-top: 0.5em;
    }
    .search-bar input[type="text"] {
        flex-grow: 1;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
    }
    .main-nav ul li {
        width: 100%;
        text-align: center;
    }
    .main-nav ul li a {
        border-bottom: 1px solid #495057;
    }
     .main-nav ul li:last-child a {
        border-bottom: none;
    }


    .hero h2 {
        font-size: 2em;
    }
    .hero p {
        font-size: 1em;
    }
    .link-grid {
        grid-template-columns: 1fr; /* Stack on smaller screens */
    }
}

@media (max-width: 480px) {
    .logo a {
        font-size: 1.5em;
    }
    .hero h2 {
        font-size: 1.8em;
    }
}