body {
  font-family: Roboto, Arial;
  color: rgb(33, 33, 33);
  /* The <body> element has a default margin of 8px
     on all sides. This removes the default margins. */
  margin: 0;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden; /* Prevent horizontal scrolling */
  display: flex;
  flex-direction: column;
}

/* Fix for orientation changes */
html {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
}

@media screen and (orientation: portrait) {
  html, body {
    width: 100%;
    overflow-x: hidden;
  }
  
  /* Force proper fitting on small mobile screens */
} * {
@media screen and (orientation: portrait) {
  *, *::before, *::after {
    max-width: 100%;
    box-sizing: border-box;
  }
}
  html, body {
    width: 100%;
    overflow-x: hidden;
  }
}

/* <p> elements have a default margin on the top
   and bottom. This removes the default margins. */
p {
  margin: 0;
}

/* Consolidated no-sidebar styles - used across multiple page types */
body.no-sidebar .main {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
  padding-left: 30px;
  padding-right: 30px;
}

@media (max-width: 480px) {
  body.no-sidebar .main {
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* General styles for all pages */
html, body {
  overflow-x: hidden; /* Prevent horizontal scroll from footer */
}

/* Global image sizing constraint */
img {
  max-width: 100%;
  height: auto;
}

/* Global button styles */
button {
  cursor: pointer;
  font-family: Roboto, Arial;
  transition: background-color 0.2s;
}

select {
  cursor: pointer;
}

input, select {
  font-family: Roboto, Arial;
}

/* Primary button style */
.button-primary {
  color: #fff;
  background-color: #232F3E;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 700;
  padding: 8px 16px;
  font-size: 16px;
  transition: background-color 0.2s;
}

.button-primary:hover {
  background-color: #1A252F;
}

.button-primary:active {
  background-color: #232F3E;
  box-shadow: none;
}

.main {
  flex: 1;
}

/* Secondary button style - a variation of the primary theme */
.button-secondary {
  color: #232F3E;
  background-color: white;
  border: 2px solid #232F3E;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 700;
  padding: 8px 16px;
  font-size: 16px;
  transition: all 0.2s;
}

.button-secondary:hover {
  color: white;
  background-color: #232F3E;
}

/* These styles will limit text to 2 lines. Anything
   beyond 2 lines will be replaced with "..."
   You can find this code by using an A.I. tool or by
   searching in Google.
   https://css-tricks.com/almanac/properties/l/line-clamp/ */
.limit-text-to-2-lines {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* These styles will limit text to 3 lines and ensure consistent height */
.limit-text-to-3-lines {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 4.5em; /* Approximately 3 lines * 1.5em line-height */
  line-height: 1.5;
  text-align: left;
}

.link-primary {
  color: rgb(1, 124, 182);
  cursor: pointer;
}

.link-primary:hover {
  color: rgb(196, 80, 0);
}

/* Styles for dropdown selectors. */
select {
  color: rgb(33, 33, 33);
  background-color: rgb(240, 240, 240);
  border: 1px solid rgb(213, 217, 217);
  border-radius: 8px;
  padding: 3px 5px;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(213, 217, 217, 0.5);
}

input, select {
  font-family: Roboto, Arial;
}