/* Global Styles */
:root {
    --header-bg: #83ad1c; /* Green header */
    --footer-bg: #007AC3; /* Blue footer */
    --text-light: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Styles */
header {
    background-color: var(--header-bg);
    color: var(--text-light);
    padding: 1rem 2rem 0;
    position: relative;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo img {
    height: 50px;
}

.logo h1 {
    font-size: 18px;
    font-weight: normal;
}

.search-container {
    width: 100%;
    max-width: 300px;
}

.search-container form {
    width: 100%;
    display: flex; /* Make the form a flex container */
}

/* Remove .search-input-group entirely if it exists in the HTML or keep it with these properties */
.search-input-group {
    display: flex;
    width: 100%;
    flex-wrap: nowrap; /* Prevent wrapping */
}

.search-container input[type="text"] {
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    flex: 1;
    height: 40px;
    min-width: 0; /* Allow input to shrink below content size */
    width: auto; /* Let flexbox control width */
}

.search-container button {
    background-color: var(--footer-bg);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: inline-flex; /* Changed to inline-flex */
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    position: relative;
    flex-shrink: 0;
    margin-left: 0.5rem; /* Add a fallback margin */
}

/* Search Results Container */
.search-results-container {
    position: fixed;
    top: 80px;
    right: 0;
    width: 25%;
    height: 100%;
    overflow-y: auto;
    background-color: #f9f9f9;
    border-left: 1px solid #ccc;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease-in-out;
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.search-results-title {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
}

.search-close-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0 5px;
    line-height: 1;
}

.search-close-button:hover {
    color: #000;
}

.search-close-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Navigation */
.topnav {
    background-color: var(--header-bg);
    padding: 0 2rem;
    width: 100%;
    /* border-top: 1px solid rgba(255, 255, 255, 0.2); */
}

.topnav nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    justify-content: flex-end;
    margin: 0;
    padding: 0.5rem 0;
}

.topnav nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    display: block;
}

.topnav nav a:hover {
    text-decoration: underline;
}

/* Main Content */
main {
    flex: 1;
    background-color: white;
    padding: 1.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.content-section {
    display: flex;
    gap: 3rem;
}

.sidebar {
    width: 250px;
}

.sidebar h2 {
    margin-bottom: 1rem;
    color: #333;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    margin-bottom: 0.75rem;
}

.sidebar a {
    color: #0066cc;
    text-decoration: none;
}

.sidebar a:hover {
    text-decoration: underline;
}

.content {
    flex: 1;
}

p {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    margin-bottom: 16px;
    margin-top: 4px;
}

/* Footer */
footer {
    background-color: var(--footer-bg);
    color: var(--text-light);
    padding: 1.5rem 2rem;
    margin-top: 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    height: 40px;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .topnav nav ul {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .content-section {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        margin-bottom: 2rem;
    }
}
