html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: auto;
  background: linear-gradient(to bottom, #f8e5af, #56a32900);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


/* #region БАЗОВІ БЛОКИ */

.cont-wrap {
  display: flex;
  flex-direction: column;
  padding-top: 20px; /* topmost gap under header */
  padding-bottom: 28px; /* lowest gap above endbar */
  width: 100%;
  gap: 10px;
}

.desc_container {
  display: flex;
  justify-content: center;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 8px 0;
}

.cont {
  position: relative;
  align-items: center;
  background: linear-gradient(to top, #e9ffcf, #fbffc9);
  border-radius: 10px;
  background-clip: border-box;
  box-sizing: border-box;
  box-shadow: 7px 7px 5px rgba(61, 37, 0, 0.24);
  width: 80%;
  margin: 0 auto;
  overflow: hidden;
}

.cont > * {
  position: relative;
  z-index: 1;
}
/* #endregion */

/* #region СПЕЦИФІЧНІ БЛОКИ */

.forms {
  padding: 30px 40px;
  flex-direction: column;
  display: flex;
  min-height: 620px;
  justify-content: center;
  text-align: center;
  gap: 10px;
  width: 80%;
  margin: 0 auto;
}

.form-inside {
  width: 100%;
  margin: 0 auto;
  background-color: rgba(0, 255, 255, 0);
}

.btns {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  margin-inline: 10%;
}

.btns button {
  padding: 16px;
  border: none;
  border-radius: 6px;
  background: #207744;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
  font-family: "AppleBerry", sans-serif;
  font-size: 3vh;
  color: rgb(255, 255, 255);
  box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.212);
}

.btns button:hover {
  background: #2e9740;
  color: #ffe96d;
}


/* #endregion */

/* #region ТЕКСТОВКА */

.cont p {
  font-size: 22px;
  margin: 0;
  line-height: 35px;
  color: #1a250e;
  font-family: "impress", sans-serif;
}

.cont h1 {
  margin: 0;
  font-size: 48px;
  color: #207744;
  font-family: "AppleBerry", sans-serif;
}

/* #endregion*/


/* #region TABLE */

/* Container for the table */
.form-inside table {
  width: 100%;
  max-width: 600px;      /* optional: limit table width */
  margin-inline: auto;
  margin-block: 10px 25px;
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 1px 15px rgba(0, 0, 0, 0.13);
  border-collapse: separate; /* for border-radius to work */
  border-spacing: 0 10px;    /* vertical spacing between rows */
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Table header (labels) */
th[scope="row"] {
  text-align: left;
  padding: 10px 15px;
  font-weight: 600;
  font-size: 16px;
  color: #333;
  vertical-align: middle;
  width: 38%;
}

/* Table cells */
td {
  padding: 10px 15px;
  vertical-align: middle;
}

/* Inputs and select styling */
input[type="text"],
input[type="email"],
input[type="date"],
input[type="tel"],
input[type="number"]:not(.verify-input),
select,
textarea {
  width: 100%;
  padding: 8px 12px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  outline: none;
  transition: all 0.2s;
  font-family: inherit;
  box-sizing: border-box;
  background-color: #ffffff;
  color: #333333;
}

input[type="date"] {
  min-height: 38px;
  line-height: normal;
}

select {
  height: 38px;
  background-color: #ffffff;
}

textarea {
  resize: vertical;
  min-height: 85px;
  line-height: 1.4;
  width: 100%;
  box-sizing: border-box;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  padding: 4px 0;
  width: 100%;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: #333;
  cursor: pointer;
  line-height: 1.3;
  text-align: left;
  user-select: none;
}

.radio-option input[type="radio"] {
  cursor: pointer;
  accent-color: #207744;
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  padding: 0;
}

.required-note {
  font-size: 14px;
  color: #555;
  margin-top: 8px;
  text-align: center;
}

.school-class-group {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.school-class-group input[name="school"] {
  flex: 2;
  min-width: 0;
}

.klass-label {
  font-weight: 600;
  font-size: 16px;
  color: #333;
  white-space: nowrap;
}

.school-class-group input[name="klass"] {
  flex: 1;
  min-width: 0;
}

/* Focus effect */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
input[type="tel"]:focus,
input[type="number"]:not(.verify-input):focus,
textarea:focus,
select:focus {
  border-color: #3d6eeb;
  box-shadow: 0 0 5px rgba(61, 110, 235, 0.5);
}

/* Optional: hover effect for table rows */
tr:hover {
  background: #f9f9f9;
}

/* Optional: style for select options */
select option {
  padding: 5px;
}

.g-recaptcha {
  margin: 0 auto;
  width: fit-content;
}

/* #region VERIFICATION GATE */

.verify-box {
  width: 100%;
  max-width: 500px;
  margin: 20px auto;
  background: #ffffff;
  padding: 25px 30px;
  border-radius: 12px;
  box-shadow: 0 1px 15px rgba(0, 0, 0, 0.13);
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

.verify-question {
  font-size: 24px;
  font-weight: bold;
  color: #207744;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  margin: 10px 0;
  text-align: center;
}

.verify-input {
  width: 200px !important;
  height: 50px !important;
  padding: 10px !important;
  font-size: 22px !important;
  text-align: center !important;
  border: 2px solid #207744 !important;
  border-radius: 8px !important;
  outline: none !important;
  box-sizing: border-box !important;
  background-color: #ffffff !important;
  color: #000000 !important;
  margin: 0 auto !important;
  display: block !important;
}

.verify-input:focus {
  border-color: #2e9740 !important;
  box-shadow: 0 0 8px rgba(46, 151, 64, 0.4) !important;
}

.verify-btn {
  padding: 14px 28px;
  border: none;
  border-radius: 6px;
  background: #207744;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  font-family: "AppleBerry", sans-serif;
  font-size: 22px;
  color: #ffffff;
  box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.21);
}

.verify-btn:hover {
  background: #2e9740;
  color: #ffe96d;
  transform: scale(1.02);
}

.verify-error {
  color: #d93025;
  font-weight: bold;
  font-size: 18px;
  margin-top: 10px;
  text-align: center;
}

/* #endregion */

@media screen and (max-width: 825px) {
  html,
  body {
    min-height: 100vh;
  }

  .cont-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 20px;
    padding-bottom: 20px;
    width: min(1100px, calc(100% - 32px));
    margin:0 auto;
  }

  .desc_container {
    margin: 0;
  }

  .cont {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
  }

  .forms {
    width: 100%;
    min-height: auto;
    padding: 16px;
    gap: 14px;
  }

  .cont h1 {
    font-size: 36px;
  }

  .cont p {
    font-size: 18px;
    line-height: 28px;
  }

  .form-inside table {
    max-width: 100%;
    padding: 16px;
  }

  .btns {
    flex-direction: column-reverse;
    align-items: stretch;
    justify-content: center;
    margin-inline: 0;
    gap: 12px;
  }

  .btns button {
    width: 100%;
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .cont {
    width: calc(100% - 16px);
  }
}

/* #endregion*/