body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

.container {
    width: 85%;
    max-width: 950px;
    margin: 20px auto;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Updated Navigation Styles */
.calculator-nav {
    background-color: #ffffff; /* Lighter background for the nav bar itself */
    padding: 10px 0; /* Add some padding top and bottom */
    margin-bottom: 25px;
    border-radius: 8px; /* Rounded corners for the nav bar */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Subtle shadow for depth */
    text-align: center; /* Center the ul element if it's inline-block or similar */
}

.calculator-nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: inline-flex; /* Use inline-flex to center the group of items and allow wrapping */
    justify-content: center; /* Center items within the flex container */
    flex-wrap: wrap; /* Allow items to wrap on smaller screens */
    gap: 10px; /* Adds space between nav items */
}
body {
  font-family: Arial, sans-serif;
  padding: 20px;
  background-color: #f5f6fa;
  color: #333;
}

h1 {
  text-align: center;
  margin-bottom: 40px;
}

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

.article-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: box-shadow 0.3s ease;
}

.article-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.article-date {
  font-size: 0.9em;
  color: #888;
}

.read-more {
  display: inline-block;
  margin-top: 10px;
  color: #0077cc;
  text-decoration: none;
  font-weight: bold;
}

.read-more:hover {
  text-decoration: underline;
}


.calculator-nav ul li {
    /* No specific styles needed here anymore as gap is handled by ul */
}

.calculator-nav ul li a {
    display: block;
    color: #336699; /* Dark blue text */
    text-align: center;
    padding: 12px 20px; /* Adjust padding for a more button-like feel */
    text-decoration: none;
    border-radius: 6px; /* Rounded corners for each nav item */
    background-color: #e9ecef; /* Light grey background for items */
    transition: background-color 0.3s, color 0.3s, transform 0.2s;
    font-weight: 500; /* Slightly bolder text */
    border: 1px solid transparent; /* Prepare for hover border */
}

.calculator-nav ul li a:hover {
    background-color: #d0d9e0; /* Slightly darker on hover */
    color: #1d4263; /* Darker text on hover */
    transform: translateY(-2px); /* Slight lift effect on hover */
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.calculator-nav ul li a.active {
    background-color: #336699; /* Primary color for active link */
    color: white;
    font-weight: bold;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) inset; /* Inner shadow for active state */
}
/* End of Updated Navigation Styles */


header {
    text-align: center;
    margin-bottom: 20px;
    color: #336699;
}

section {
    margin-bottom: 25px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

section h2 {
    margin-top: 0;
    color: #336699;
    border-bottom: 2px solid #eee;
    padding-bottom: 5px;
}

#disclaimer p, #final-reminders p {
    margin: 5px 0;
    font-size: 0.9em;
}

#disclaimer {
    background-color: #ffebeb;
    border-left: 5px solid red;
}

#final-reminders {
    background-color: #e6f7ff;
    border-left: 5px solid #1890ff;
}

fieldset {
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 15px;
    padding: 10px 15px;
}

fieldset legend {
    font-weight: bold;
    color: #555;
}

#thcForm div, #methForm div, #opiatesForm div, #amphetaminesForm div { /* Apply to all forms */
    margin-bottom: 10px;
}

#thcForm label, #methForm label, #opiatesForm label, #amphetaminesForm label { /* Apply to all forms */
    display: inline-block;
    margin-right: 10px;
    min-width: 120px; 
}

#thcForm input[type="radio"] + label, 
#methForm input[type="radio"] + label,
#opiatesForm input[type="radio"] + label,
#amphetaminesForm input[type="radio"] + label { /* Apply to all forms */
    min-width: auto; 
}


#thcForm input[type="number"], #thcForm input[type="text"],
#methForm input[type="number"], #methForm input[type="text"],
#opiatesForm input[type="number"], #opiatesForm input[type="text"],
#amphetaminesForm input[type="number"], #amphetaminesForm input[type="text"] { /* Apply to all forms */
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

#calculateBtn { /* This ID will be on all calculate buttons */
    display: block;
    width: 100%;
    padding: 10px 15px;
    background-color: #336699;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#calculateBtn:hover {
    background-color: #275a80;
}

#results-section div { 
    margin-bottom: 8px;
}

#results-section .test-result {
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border-left: 4px solid #007bff; 
    margin-top: 10px; 
}

#results-section .test-result strong {
    display: inline-block;
    margin-right: 5px;
}
#results-section .test-result span {
    white-space: pre-wrap; 
}


#results-section .primary-result { 
    font-weight: bold;
    font-size: 1.05em;
    color: #005700; 
    background-color: #e6ffe6; 
    border-left: 5px solid #006400; 
}
#results-section .primary-result strong {
    color: #004d00;
}
.test-method-entry {
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 3px solid #eee; /* Subtle left border for distinction */
}

.test-method-entry h3 {
    margin-top: 0;
    margin-bottom: 5px;
    color: #336699; /* Consistent with other H2s if desired, or a slightly different shade */
}

.sources-list {
    list-style-type: disc; /* Or square, or none if you prefer */
    padding-left: 20px;
}

.sources-list li {
    margin-bottom: 8px;
}
/* Footer Styles */
footer {
    background-color: #333; /* Dark background for footer */
    color: #f4f4f4; /* Light text color */
    text-align: center;
    padding: 20px 0;
    margin-top: 30px; /* Space above the footer */
    font-size: 0.9em;
}

.footer-content {
    width: 90%;
    max-width: 950px; /* Consistent with your .container max-width */
    margin: 0 auto; /* Center the content within the footer */
}

.footer-content p {
    margin: 10px 0;
}

.footer-content a {
    color: #a0c4ff; /* Light blue for links in footer, adjust as needed */
    text-decoration: none;
}

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

.kofi-button-container {
    margin: 15px 0; /* Space around the Ko-fi button */
}

/* If your Ko-fi button is an image or needs specific centering and it's not already centered by Ko-fi's script */
.kofi-button-container img, 
.kofi-button-container iframe,
.kofi-button-container .kofi-button-common-style-class-from-kofi { /* Replace with actual class if Ko-fi uses one */
    display: inline-block !important; /* Or block, then margin: 0 auto; if it's a block element */
    vertical-align: middle;
}
body {
  font-family: Arial, sans-serif;
  padding: 20px;
  background-color: #f5f6fa;
  color: #333;
}

h1 {
  text-align: center;
  margin-bottom: 40px;
}

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

.article-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: box-shadow 0.3s ease;
}

.article-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.article-date {
  font-size: 0.9em;
  color: #888;
}

.read-more {
  display: inline-block;
  margin-top: 10px;
  color: #0077cc;
  text-decoration: none;
  font-weight: bold;
}

.read-more:hover {
  text-decoration: underline;
}
