/* Body: vertical flex layout */
body {
  font-family: "Open Sans", Helvetica, Arial, sans-serif;
  font-size: 19px;
  font-weight: 300;
  color: #004272;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100dvh; /* full viewport height */
  background-color: #f0f8ff;
  position: relative;
}

/* Background image (behind content, full page) */
#tm-bg {
  position: absolute; /* not fixed */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url(../img/pop-bg.jpg);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: -1;
  transition: all 0.3s ease;
}

/* Optional overlay for semi-transparent effect */
#tm-bg::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.3); /* adjust opacity if needed */
}

/* Page wrapper: grows to push footer down */
.page-wrapper {
  flex: 1 0 auto; /* grow with available space */
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Main content */
.tm-main-content {
  flex: 1 0 auto; /* expand to fill space between header & footer */
  display: flex;
  flex-direction: row; /* default: row, stacks in column on mobile */
  align-items: center;
  justify-content: center; /* optional vertical centering */
  padding: 50px 15px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 5px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

/* Footer: always at bottom when content is short */
footer {
  flex-shrink: 0; /* prevents collapsing */
  width: 100%;
  min-height: 200px;
  display: flex;
  flex-wrap: wrap;
  text-align: center;
  background: #103d5e;
  padding: 10px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

/* Footer hover effect */
footer:hover {
  background-color: #103d5e;
}

/* Mobile adjustments */
@media (max-width: 545px) {
  .tm-main-content {
    flex-direction: column; /* stack content */
    padding: 30px 15px;
  }

  footer {
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
  }
}
