/* Color Palette */
:root {
  --main-color: #821909;
  --secondary-color: #d4d4d4;
  --black: #121212;
  --alternate-gray: #6d6d6d;
  --white: #ffffff;
}

/* Body styling */
body {
  font-family: 'Manrope', sans-serif;
  color: var(--black);
  background-color: var(--white);
  line-height: 1.7;
  font-size: 1rem;
  margin: 0px;
}

/* Main content container */
.container {
  flex: 1;
  max-width: 1200px;
  padding: 2rem 1.5rem;
  margin: 5rem auto 2rem;
  background-color: var(--white);
  box-sizing: border-box;
  overflow-wrap: break-word; /* Ensures long text breaks in container */
}

.site-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  line-height: 1.2;
}

.site-name a {
  color: var(--white); /* Ensures the text is visible on the navbar background */
}

.site-name a:hover {
  text-decoration: none; /* Removes underline on hover */
}


/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--main-color);
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  line-height: 1.2;
  font-family: 'Work Sans', sans-serif;
}

h1 {
  font-size: 2.0rem;
  font-weight: 700;
  color: var(--main-color);
  padding: 25px 0px;
}

h2 {
  font-size: 1.75rem;
  font-weight: 600;
}

h3 {
  font-size: 1.5rem;
  font-weight: 500;
}

p {
  margin-bottom: 1.5rem;
  color: var(--black);
}

a {
  color: var(--main-color);
  text-decoration: none;
  font-weight: 600;
}

a:hover {
  text-decoration: underline;
}

/* List Styling */
ul, ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--main-color);
  color: var(--white);
  padding: 1rem;
  width: 100%;
  position: fixed;
  top: 0;
  box-sizing: border-box; /* Ensures padding doesn’t add to width */
  max-width: 100vw; /* Prevents overflow on mobile */
}

.navbar h1 {
  font-size: 1.25rem;
  margin: 0;
}

#menu-toggle {
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  margin-left: auto;
  display: none;
}

/* Menu list */
#navbar-menu {
  display: flex;
  list-style-type: none;
  padding: 0;
  margin: 0;
  gap: 1rem;
}

#navbar-menu a {
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.grid-item {
  background-color: var(--white);
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
  border: #821909 thin solid;
}

.grid-item:hover {
  transform: scale(1.02);
}

.grid-item a {
  color: inherit;
  text-decoration: none;
  display: block;
  padding: 1.5rem;
}

.card-content h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: var(--main-color);
}

.card-content p {
  color: var(--black);
  font-size: 0.9rem;
}

/* Image Styling */
img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem 0;
  border-radius: 2px;
  box-sizing: border-box;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Button Styling */

button {
  background-color: var(--main-color);
  color: var(--white);
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  font-weight: 600;
}

.button {
  background-color: var(--main-color);
  color: var(--white);
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  font-weight: 600;
}

.button.secondary {
  background-color: var(--secondary-color);
  color: var(--black);
}

/* Footer styling */
footer {
  background-color: var(--secondary-color);
  color: var(--black);
  width: 100%;
  text-align: center;
  padding: 1rem 0;
  margin-top: auto;
  flex-shrink: 0;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--alternate-gray);
  border-radius: 4px;
  font-family: 'Open Sans', sans-serif;
  color: var(--black);
}

input[type="submit"] {
  background-color: var(--main-color);
  color: var(--white);
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* Inline code styling */
code {
  background-color: var(--secondary-color);
  color: var(--black);
  padding: 0.2em 0.4em;
  font-size: 0.95em;
  border-radius: 1px;
  font-family: 'Courier New', Courier, monospace;
}

/* Code block styling */
pre {
  background-color: var(--secondary-color);
  color: var(--black);
  padding: 1rem;
  border-radius: 2px;
  font-family: 'Courier New', Courier, monospace;
  overflow: scroll;
  line-height: 1.5;
  font-size: 0.9em;
  box-sizing: border-box;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
}

pre code {
  color: inherit;
}

#other-home-links { 
  background-color: var(--secondary-color);
  padding: 25px 20px;
  margin: 40px 0px;
  border-radius: 2px;
}

.rbitrary li {
  padding: 15px 0px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  border: 1px solid var(--alternate-gray); /* Light gray border */
  padding: 0.75rem;
  text-align: left;
}

th {
  background-color: var(--main-color);
  color: var(--white);
  font-weight: 600;
}

tr:nth-child(even) {
  background-color: var(--secondary-color);
}

figure {
  margin: 0;
  padding: 0;
}

figcaption {
  margin-top: 0.5rem; /* Add a small space above captions if needed */
  color: var(--alternate-gray);
  font-size: 0.9rem;
  text-align: center;
}

.cog-cognito {
  margin-left: 0 !important; /* Removes automatic centering */
  text-align: left; /* Ensures text and elements are aligned to the left */
  max-width: 100%; /* Allows form to span the container width if needed */
  margin-top: 150px;
}

form {
  margin-top: 150px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  #menu-toggle {
    display: block;
  }

  .navbar {
    padding: 0px 1rem; /* Extra padding to accommodate site name */
  }

  #navbar-menu {
    display: none;
    flex-direction: column;
    background-color: var(--main-color);
    width: 100%;
    padding: 1rem;
    position: absolute;
    top: 60px;
    left: 0;
  }

  #navbar-menu.show {
    display: flex;
  }

  .container {
    padding: 1rem;
  }

}
