/* style.css */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    margin: 0;
    padding: 0;
    background-color: #f4f4f9; /* Light gray background */
    color: #333;
    font-size: 13px; /* Slightly reduced base font size */
    line-height: 1.5; /* Reduced line-height */
}

.container {
    width: 95%; /* Increased width for more content space */
    max-width: 1600px; /* Increased max-width */
    margin: 0 auto;
    padding: 10px; /* Reduced padding */
}

header {
    background-color: #2c3e50; /* Darker blue */
    color: #ffffff;
    padding: 10px 0; /* Reduced padding */
    border-bottom: 3px solid #e74c3c; /* Light red accent */
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap; /* Allow wrapping for mobile */
}

header .logo {
    font-size: 1.6em; /* Slightly reduced */
    font-weight: bold;
    text-decoration: none;
    color: #ffffff;
    margin-left: 15px; /* Reduced margin */
    border: 2px solid #ffffff;
    padding: 4px 8px; /* Reduced padding */
    border-radius: 4px;
}
header .logo:hover {
    background-color: #e74c3c;
    border-color: #e74c3c;
}

header .site-title-group {
    text-align: center;
    flex-grow: 1;
    padding: 0 10px; /* Add some padding for when it wraps */
}

header h1 {
    margin: 0;
    font-size: 2em; /* Reduced */
    color: #ffffff;
}

header p.tagline {
    margin: 3px 0 0; /* Reduced margin */
    font-size: 0.85em; /* Slightly reduced */
    color: #bdc3c7; /* Lighter gray for tagline */
}
header p.contact-info {
    margin: 5px 0 0; /* Reduced margin */
    font-size: 0.8em; /* Slightly reduced */
    color: #ecf0f1; 
    font-style: italic;
}


nav {
    margin-right: 15px; /* Reduced margin */
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap; /* Allow nav items to wrap if needed */
}

nav ul li {
    margin-left: 10px; /* Reduced margin */
    margin-bottom: 5px; /* Add bottom margin for wrapped items */
}

nav ul li a, nav ul li button.dummy-button {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    padding: 6px 10px; /* Reduced padding */
    border-radius: 3px;
    background-color: #3498db; /* Light blue for buttons */
    border: none;
    cursor: pointer;
    font-size: 0.85em; /* Reduced */
}

nav ul li a:hover, nav ul li button.dummy-button:hover {
    background-color: #2980b9; /* Darker blue on hover */
}
nav ul li button.dummy-button {
    font-family: inherit; 
}


h2 {
    color: #2c3e50; 
    border-bottom: 2px solid #e74c3c; 
    padding-bottom: 8px; /* Reduced padding */
    margin-top: 20px; /* Reduced margin */
    margin-bottom: 15px; /* Added bottom margin */
    font-size: 1.6em; /* Slightly reduced */
}

.table-wrapper { /* New wrapper for horizontal scrolling */
    overflow-x: auto;
    margin-top: 15px; /* Reduced margin */
}

table {
    width: 100%;
    min-width: 1000px; /* Ensure table has a minimum width before scrolling kicks in */
    border-collapse: collapse;
    font-size: 0.85em; /* Slightly smaller for table data */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); /* Reduced shadow */
}

th, td {
    border: 1px solid #ddd; 
    padding: 6px 8px; /* Reduced padding */
    text-align: left;
    white-space: nowrap; /* Prevent text wrapping in cells to help with scrolling */
}

th {
    background-color: #e9ecef; 
    color: #495057;
    font-weight: bold;
    position: sticky; /* Make headers sticky for scrolling */
    top: 0;
    z-index: 1;
}

tbody tr:nth-child(even) {
    background-color: #f8f9fa; 
}

tbody tr:hover {
    background-color: #e2e6ea; 
}

td a {
    color: #3498db; 
    text-decoration: none;
    font-weight: bold;
}

td a:hover {
    text-decoration: underline;
    color: #e74c3c; 
}

.legend-container {
    background-color: #ffffff;
    padding: 10px; /* Reduced padding */
    margin-bottom: 15px; /* Reduced margin */
    border-radius: 4px;
    border: 1px solid #ddd;
}

.legend-container h3 {
    margin-top: 0;
    margin-bottom: 8px; /* Reduced margin */
    color: #2c3e50;
    font-size: 1.1em; /* Reduced */
}

.legend-list {
    list-style: none;
    padding: 0;
    columns: 2; 
    column-gap: 15px; /* Reduced gap */
}

.legend-list li {
    margin-bottom: 4px; /* Reduced margin */
    font-size: 0.8em; /* Reduced */
}

footer {
    text-align: center;
    padding: 15px; /* Reduced padding */
    margin-top: 30px; /* Reduced margin */
    background-color: #2c3e50; 
    color: #bdc3c7; 
    font-size: 0.85em; /* Reduced */
    border-top: 3px solid #e74c3c; 
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    body {
        font-size: 12px; /* Further reduce base font for small screens */
    }

    .container {
        width: 98%;
        padding: 5px;
    }

    header {
        flex-direction: column; /* Stack header items */
        padding: 8px 0;
    }
    header .logo {
        margin-left: 0;
        margin-bottom: 8px;
    }
    header .site-title-group {
        margin-bottom: 8px;
    }
    header h1 {
        font-size: 1.7em;
    }
    header p.tagline, header p.contact-info {
        font-size: 0.8em;
    }

    nav {
        margin-right: 0;
        width: 100%;
        display: flex;
        justify-content: center; /* Center nav items */
    }
    nav ul {
        flex-direction: column; /* Stack nav items */
        width: 100%;
        align-items: center; /* Center align stacked nav items */
    }
    nav ul li {
        margin-left: 0;
        margin-bottom: 5px;
        width: 80%; /* Make buttons take more width */
        text-align: center;
    }
    nav ul li a, nav ul li button.dummy-button {
        display: block; /* Make links/buttons block for full clickable area */
        padding: 8px 10px; /* Adjust padding for stacked items */
    }

    h2 {
        font-size: 1.4em;
        margin-top: 15px;
        margin-bottom: 10px;
    }

    table {
        font-size: 0.8em; /* Further reduce table font size */
        min-width: 0; /* Allow table to shrink, scrolling handles overflow */
    }
    th, td {
        padding: 4px 6px; /* Further reduce cell padding */
    }

    .legend-list {
        columns: 1; /* Single column for legend on mobile */
    }
    .legend-list li {
        font-size: 0.75em;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5em;
    }
    header p.tagline, header p.contact-info {
        font-size: 0.75em;
    }
    nav ul li a, nav ul li button.dummy-button {
        font-size: 0.8em;
    }
    h2 {
        font-size: 1.2em;
    }
}