/* Basic styles and layout settings for the body */
body {
  background-color: #f5f5f5;
  font-family: Verdana, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Styling for h2 elements with a yellow color and black outline for readability */
h2 {
  color: rgb(233, 217, 44); /* Yellow color for the text */
  text-shadow: -1.5px -1.5px 0 #000, 1.5px -1.5px 0 #000, -1.5px 1.5px 0 #000,
    1.5px 1.5px 0 #000; /* Black outline */
}

/* Header styling using a background image with centered text */
header {
  background-image: url("../images/stone.png"); /* Ensure the path is correct */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: rgb(233, 217, 44);
  padding: 1em 0;
  text-align: center;
  text-shadow: -1.5px -1.5px 0 #000, 1.5px -1.5px 0 #000, -1.5px 1.5px 0 #000,
    1.5px 1.5px 0 #000; /* Black outline */
}

nav {
  width: 100%; /* Full width */
}

nav ul {
  list-style-type: none;
  padding: 0;
  margin: 0; /* Remove default margin */
  display: flex; /* Use flexbox for alignment */
  justify-content: center; /* Center horizontally */
  align-items: center; /* Center vertically */
  flex-wrap: wrap; /* Allow items to wrap in small screens */
}

nav ul li {
  margin: 0 10px; /* Space between items */
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

main {
  margin: 1em 5%;
}

/* Footer styling with flexbox for layout, and similar background and styling as header */
footer {
  display: flex; /* Use flexbox to align children */
  justify-content: center; /* Center horizontally */
  align-items: center; /* Align items vertically in the middle */
  flex-direction: column; /* Stack children vertically */
  background-image: url("../images/stone.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: white;
  text-align: center;
  padding: 1em 0 3em; /* Adjusted padding to ensure button is visually part of the footer */
  width: 100%;
  margin-top: 50px; /* Ensures footer is neatly spaced from content above */
  text-shadow: -1.5px -1.5px 0 #000, 1.5px -1.5px 0 #000, -1.5px 1.5px 0 #000,
    1.5px 1.5px 0 #000; /* Black outline for text readability */
}

.active {
  border-bottom: 3px solid rgb(233, 217, 44);
}

input[type="text"],
input[type="number"],
input[type="email"] {
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid #ccc;
  width: calc(20%);
  box-sizing: border-box;
  margin-top: 5px;
  margin-bottom: 15px;
  max-width: 300px;
  min-width: 200px;
}

button {
  font-family: Verdana, Arial, sans-serif;
  background-color: #007bff;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
  max-width: 200px;
  margin: 5px; /* Adds a margin around each button */
  display: inline-block; /* Ensures buttons flow in line with text */
}

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

@import url("https://fonts.googleapis.com/css?family=Montserrat:400,700");

form {
  max-width: 420px;
  margin: 50px;
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
}

.feedback-input,
.subscribe-input {
  font-size: 16px;
  border-radius: 5px;
  line-height: 22px;
  background-color: white;
  transition: all 0.3s;
  padding: 13px;
  margin-bottom: 15px;
  width: 100%;
  box-sizing: border-box;
  outline: 0;
}

.feedback-input:focus,
.subscribe-input:focus {
  border: 2px solid #007bff;
}

textarea {
  height: 150px;
  line-height: 150%;
  resize: vertical;
}

[type="submit"] {
  width: 100%;
  background: #007bff; /* Light blue background */
  border-radius: 5px;
  border: 0;
  cursor: pointer;
  color: white;
  font-size: 16px; /* Adjusted for uniformity */
  padding-top: 10px;
  padding-bottom: 10px;
  transition: all 0.3s;
  margin-top: -4px;
  font-weight: 700;
}

[type="submit"]:hover {
  background: #0056b3;
}

.resource-list {
  list-style-type: none; /* Removes default bullets */
  padding-left: 0; /* Aligns text to the left */
}

.resource-list li {
  padding: 8px 0; /* Adds vertical padding for each item */
  border-bottom: 1px solid #e0e0e0; /* Adds a subtle line between items */
  margin-bottom: 10px; /* Adds space between items */
}

.resource-list li a {
  color: #007bff; /* Sets the text color to light blue */
  text-decoration: none; /* Removes underline from links */
  font-weight: bold; /* Makes the text bold */
}

.resource-list li a:hover {
  text-decoration: none; /* Adds an underline on hover */
  color: #0056b3; /* Changes color on hover */
}

.resource-list li:before {
  content: "↳ "; /* Adds a custom bullet before each item */
  margin-right: 10px; /* Adds right margin for spacing */
  color: #000408; /* Sets the color of the bullet */
}

/* Responsive settings for images to ensure they are always displayed properly within their containers */
img {
  max-width: 100%; /* Ensures the image is responsive and does not overflow its container */
  height: auto; /* Keeps the image aspect ratio intact */
  display: block; /* Displays the image as a block-level element */
  margin: 0 auto 20px; /* Centers the image horizontally and adds space below it */
}

code {
  font-family: "Courier New", monospace;
  background-color: rgb(255, 255, 255);
  color: #000000;
  font-weight: bold;
  padding: 3px 6px;
  border: 1px solid #007bff;
  border-radius: 4px;
  box-sizing: border-box;
  display: inline-block;
  margin: 4px;
  line-height: 1.6;
  word-wrap: break-word;
  white-space: pre-wrap; /* Adjusted to preserve formatting and allow wrapping */
  overflow: auto; /* Adds scrollbars if content overflows */
  vertical-align: middle;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 600px) {
  code {
    padding: 2px 4px; /* Slightly smaller padding for smaller screens */
    font-size: 100%; /* Slightly reduced font size to help fit content */
  }
}

/* Quiz container styles with a simple, clean background and centered text */
.quiz-container {
  margin: 20px auto;
  padding: 20px;
  width: 90%;
  max-width: 600px;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-align: center;
  overflow-y: auto;
}
@media (max-width: 600px) {
  .quiz-container {
    padding: 10px; /* Adjust padding to ensure touch friendliness */
    width: 95%; /* Optimally use screen space */
    max-width: none; /* Allow the container to expand fully on small screens */
  }

  .quiz-container button {
    width: 100%; /* Full-width buttons are easier to tap */
    padding: 12px 0; /* Larger tap area */
  }
}

.quiz-container h3 {
  color: #333;
}

.quiz-container ul {
  list-style-type: none;
  padding: 0;
}

.quiz-container li {
  text-align: left;
  margin-bottom: 8px;
}

.quiz-container button {
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.quiz-container button:hover {
  background-color: #0056b3;
}

.home-intro {
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.home-intro h2 {
  color: #8ee8ba;
  font-size: 24px;
}

.home-intro p {
  color: #555;
  font-size: 16px;
  line-height: 1.6;
}

.back-to-top {
  margin-top: 10px; /* Provides space above the back-to-top button */
}

.back-to-top button {
  width: 50px; /* Ensures the button is wide enough */
  height: 50px; /* Ensures the button is tall enough */
  font-size: 24px; /* Adjusted size of the arrow icon for balance */
  cursor: pointer;
  border: 2px solid black; /* Black border for visibility */
  border-radius: 50%; /* This makes the button circular */
  background-color: #f8f8f8;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top button:hover {
  background-color: #e7e7e7; /* Slight color change on hover for interaction feedback */
}
