main {
  flex: 1;
}

main#main-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
}

h1 {
  color: var(--olive);
  padding: 1rem;
}

form.join-form {
  flex: 1;
  max-width: 700px;
  margin: 0;
  background-color: #fff;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

div.join-form {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1rem;
  padding: 0 1rem;
}

label {
  flex: 0 0 180px;
  font-weight: bold;
  color: var(--dark-slate-gray);
  text-align: right;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  width: 100%;
}

textarea {
  resize: vertical;
}

input[type="submit"] {
  background-color: var(--olive);
  color: var(--mint-cream);
  font-weight: bold;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease;
  display: block;
  margin: 2rem auto 0 auto;
}

input[type="submit"]:hover {
  background-color: var(--feldgrau);
}

.form-and-cards-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0rem 1rem 3rem 1rem;
}  

.form-and-cards {
  display: flex;                                                                                                 
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding: 1rem;
  flex-wrap: wrap;
}
  
.card {
  background-color: #fff;
  border: 1px solid var(--olive);
  border-radius: 8px;
  padding: 1.5rem;
  width: 250px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  margin: 2rem;
}

.card h2 {
  margin-bottom: 1rem;
  color: var(--feldgrau);
}

.card button {
  background-color: var(--olive);
  color: var(--mint-cream);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

.card button:hover {
  background-color: var(--feldgrau);
}

dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 2rem;
  border: none;
  border-radius: 10px;
  max-width: 400px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
  background: #fff;
}


dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

dialog button.close-modal {
  margin-top: 1rem;
  background-color: var(--olive);
  color: var(--mint-cream);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
}

dialog button.close-modal:hover {
  background-color: var(--feldgrau);
}

#results {
  max-width: 700px;
  margin: 3rem auto;
  padding: 2rem;
  background-color: #fff;
  border-left: 8px solid var(--olive);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  font-family: "Sunflower", Arial, Helvetica, sans-serif;
  color: var(--dark-slate-gray);
  line-height: 1.6;
}

#results p {
  font-size: 1rem;
  margin-bottom: 1.25rem;
}

#results p:first-child {
  font-weight: bold;
  font-size: 1.2rem;
  color: var(--olive);
}

#results p:last-child {
  margin-bottom: 0;
}

@media screen and (max-width: 37.5em) {
  form.join-form {
    display: block;
    width: 100%;
    padding: 1rem;
    box-sizing: border-box;
  }
  
  div.join-form {
    display: block;
    margin-bottom: 1.5rem;
  }
  
  label {
    display: block;
    text-align: left;
    padding: 0 0 0.5rem 0;
  }
  
  input,
  select,
  textarea {
    width: 100%;
    box-sizing: border-box;
  }

  .form-and-cards {
    flex-direction: column;
    align-items: center;
  }
  
  .cards-container {
    flex-direction: column;
    align-items: stretch;
  }

  .card {
    width: 100%;
    max-width: 210px;
    margin: 1rem auto;
  }  

  #results {
    width: 90%;
    padding: 1.5rem;
    margin: 2rem auto;
    font-size: 1rem;
    box-sizing: border-box;
  }
}

@keyframes fadeSlideFromTop {
  0% {
    opacity: 0;
    transform: translateY(-40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.cards-container .card {
  animation: fadeSlideFromTop 0.8s ease-out both;
}

.cards-container .card:nth-child(1) {
  animation-delay: 0.1s;
}
.cards-container .card:nth-child(2) {
  animation-delay: 0.2s;
}
.cards-container .card:nth-child(3) {
  animation-delay: 0.3s;
}
.cards-container .card:nth-child(4) {
  animation-delay: 0.4s;
}
