/* 404 Page Specific Styles */
.undefined-page-wrapper {
  max-width: 1200px;
  margin: 136px auto 0px auto;
  display: flex;
  column-gap: 189px;
  align-items: center; /* Vertically align items */
}

.undefined-page-content {
  width: 380px;
  display: flex;
  flex-direction: column;
}

.undefined-page-title {
  font-size: 24px;
  font-weight: 500;
  line-height: 28px;
  letter-spacing: 0px;
}

.undefined-page-code {
  margin-top: -15px;
  font-size: 200px;
  font-weight: 700;
  line-height: 250px;
  letter-spacing: 0px;
}

.undefined-page-text {
  width: 330px;
  margin-top: -15px;
  font-size: 16px;
  font-weight: 300;
  line-height: 20px;
  letter-spacing: 0px;
  margin-bottom: 64px;
}

.undefined-page-button {
  padding: 16px 32px;
  align-self: flex-start;
  /* Inherits button styles from general CSS, e.g., .header-button */
}

/* Responsive adjustments for 404 page */
@media screen and (max-width: 1300px) {
  .undefined-page-wrapper {
    margin-left: 48px;
    margin-right: 48px;
    column-gap: 10%; /* Use relative gap */
  }
}

@media screen and (max-width: 1200px) {
  .undefined-page-wrapper {
    margin-top: 88px; /* Adjusted top margin */
    margin-bottom: 32px; /* Added bottom margin for spacing */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    column-gap: 0; /* Reset column gap for column layout */
    row-gap: 32px; /* Add row gap for column layout */
    padding-left: 20px; /* Added padding for smaller screens */
    padding-right: 20px;
  }

  .undefined-page-content {
    margin-top: 0px;
    align-items: center;
    width: 90%; 
    max-width: 380px; 
  }

  .undefined-page-title {
    font-size: 26px;
    text-align: center; /* Center title on smaller screens */
  }

  .undefined-page-code {
    margin-top: -5px;
    font-size: 120px;
    line-height: 150px;
  }

  .undefined-page-text {
    text-align: center;
    font-size: 14px;
    font-weight: 100; /* Consider if this weight is too light */
    margin-bottom: 40px;
    width: 100%; 
  }

  .undefined-page-button {
    align-self: center;
    padding: 16px 16px; 
    margin-bottom: 32px;
  }

  .undefined-page-wrapper img {
    width: 100%; 
    max-width: 256px; 
    height: auto; 
  }
}

@media screen and (max-width: 668px) {
    .undefined-page-wrapper {
        margin-top: 40px; /* Further reduce top margin for very small screens */
        row-gap: 20px;
    }
    .undefined-page-title {
        font-size: 22px; /* Adjust font size */
        line-height: 28px;
    }
    .undefined-page-code {
        font-size: 100px; /* Adjust font size */
        line-height: 120px;
        margin-top: 0;
    }
    .undefined-page-text {
        font-size: 13px;
        margin-bottom: 30px;
        margin-top: -10px;
    }
    .undefined-page-button {
        padding: 14px 28px;
    }
}