html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background-color: black;
  background: url('contact_background.png') no-repeat center center fixed;
  background-size: cover;
}

.form-container
{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
   background: transparent;
}

.form-grid
{
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 3rem;
    width: 100%;
    max-width: 1000px;
    border-radius: 5px;
    grid-template-rows: auto auto;
    overflow: hidden;
    grid-template-rows: auto auto auto auto;
}

.top-text
{
  display: flex;
  justify-self: center;
  align-items: center;
  text-align: center;
  flex-direction: column;
  color: white;
}

.top-text h1
{
  padding-top: 100px;
  font-size: 4rem;
  font-style: italic;
}

.top-text h2
{
  width: 1100px;
  padding-top: 100px;
  font-style: italic;
}

.h2-1
{
  font-size: 2rem;
}

.h2-2
{
  padding-bottom: 100px;
  font-size: 2.5rem;
}

.form-grid-bg
{
    position: absolute;
  inset: 0; 
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  z-index: 0;
  border-radius: 5px;
}

.left-column,
.right-column,
.submit-button {
  position: relative;
  z-index: 1;
}

.left-column,
.right-column
{
    display: flex;
    flex-direction: column;
    gap: 2rem;
    border-radius: 5px;
}

.left-column
{
    padding-right: 30px;
}


.left-column input {
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 15px;
  border-radius: 20px;
  border: 1px solid #ccc;
  font-size: 16px;
  font-family: 'Noto Serif JP', serif;
  box-sizing: border-box;
  transition: border-color 0.3s ease, border-radius 0.3s ease;
  background-color: rgb(45, 43, 43);
  color: white;
}

.left-column input:focus {
  outline: none;
  border-color: white; 
  box-shadow: 0 0 5px white(0,123,255,0.5);
  background-color: white;
  border-radius: 5px;
  color: black;
}

.left-column input:hover {
  outline: none;
  border-color: white; 
  box-shadow: 0 0 5px white(0,123,255,0.5);
  background-color: white;
  border-radius: 5px;
  color: black;
}

select {
  padding: 0.75rem 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  margin-bottom: 1rem;
  background-color: rgb(45, 43, 43);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  cursor: pointer;
  color: gray;
}

select:focus {
  outline: none;
  border-color: white;
  background-color: white;
  box-shadow: 0 0 0 3px rgba(0, 119, 255, 0.15);
  color: black;
}

select:hover {
  background-color: #f0f0f0;
  border-color: #aaa;
  color: black;
}

textarea {
  padding: 0.75rem 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  margin-bottom: 1rem;
  background-color: rgb(45, 43, 43);
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  color: white;
}

textarea:focus {
  outline: none;
  border-color: white;
  background-color: white;
  box-shadow: 0 0 0 3px rgba(0, 119, 255, 0.15);
  color: black;
}

textarea:hover {
  background-color: #f0f0f0;
  border-color: #aaa;
  color:black
}

.submit-button {
  grid-column: 1 / 3;
  justify-self: center; 
  padding: 0.75rem 2rem; 
  font-size: 1rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 20px;
  background-color: white;
  color: black;
}

.submit-button:hover {
    background-color: rgb(34, 32, 32);
    color: white;
    border: 2px solid white;
}

.or-text {
    grid-column: 1 / 3; /* span both columns */
    justify-self: center;
    color: white;
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    margin: 10px 0 0 0;
    z-index: 1;
    position: relative;
}

.contact-email {
    grid-column: 1 / 3; /* span both columns */
    justify-self: center;
    color: white;
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    margin: 5px 0 0 0;
    z-index: 1;
    position: relative;
}

.contact-email a {
    color: #64b5f6; /* a nice blue for the email link */
    text-decoration: none;
}

.contact-email a:hover {
    text-decoration: underline;
}

.homepage-button {
  position: fixed;
  top: 15px;
  left: 15px;
  margin: 0;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  border-radius: 5px;
  background-color: white;
  color: black;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
  border: none;
  font-family: 'Playfair Display', serif;
  z-index: 1000;
}

.homepage-button:hover {
  background-color: rgb(34, 32, 32);
  color: white;
  border: 2px solid white;
}


@media (max-width: 768px) {
  .form-container {
    padding: 2rem 1rem;
    height: auto; /* allow page to grow with content */
    align-items: flex-start; /* align items to top */
  }

  .form-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Adjust rows to fit the added elements (submit button, or-text, contact-email) */
    grid-template-rows: auto auto auto auto auto auto;
    gap: 1.5rem;
    padding: 2rem 1.5rem;
    border-width: 2px;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
  }

  .left-column,
  .right-column {
    padding: 0;
    width: 100%;
  }

  .left-column input,
  select,
  textarea {
    font-size: 0.95rem;
    padding: 10px 14px;
    width: 100%;
    box-sizing: border-box;
  }

  .submit-button {
    grid-column: 1;
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    margin-top: 10px;
  }

  .or-text {
    grid-column: 1;
    justify-self: center;
    font-size: 1rem;          /* smaller font on phone */
    margin: 8px 0 0 0;        /* slightly less margin */
    text-align: center;       /* center text */
    color: white;
    font-family: 'Playfair Display', serif;
    position: relative;
    z-index: 1;
  }

  .contact-email {
    grid-column: 1;
    justify-self: center;
    font-size: 0.9rem;        /* smaller font */
    margin: 4px 0 0 0;        /* reduce top margin */
    text-align: center;       /* center text */
    color: white;
    font-family: 'Playfair Display', serif;
    position: relative;
    z-index: 1;
  }

  .contact-email a {
    color: #64b5f6;           /* keep link color same */
    text-decoration: none;
  }

  .contact-email a:hover {
    text-decoration: underline;
  }

  .form-grid-bg {
    background-position: center;
    background-size: cover;
  }

  .top-text {
  padding: 2rem 1rem;
  align-items: center;
  text-align: center;
}

.top-text h1 {
  font-size: 2.5rem; /* Scaled down for mobile */
  padding-top: 2rem;
}

.top-text h2 {
  width: 100%;        /* Don't force fixed width */
  font-size: 1.1rem;   /* Scaled for small screens */
  padding-top: 1.5rem;
}

.h2-1 {
  font-size: 1.2rem;
}

.h2-2 {
  padding-bottom: 2rem;
  font-size: 1.3rem;
}
}

