.contact-footer-content {
  display: grid;
  grid-template-columns: 1fr 20px;
  height: 100vh;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 60px;
  box-sizing: border-box;
  position: relative;
}

.contact-footer-content h2 {
  color: var(--color-txt-quaternary);
  line-height: 1.2;
  margin-top: 150px;
}

.subheader-txt h3 {
  color: var(--color-txt-quinary);
}

.left-container-contact {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.upper-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  gap: 16px;
}

.header-subheader {
  align-self: flex-start;
  width: 50%;
}

.go-up-arrow {
  height: 30px;
  width: 15px;
  display: inline-block;
  animation: bounceUp 1.5s ease-in-out infinite;
  transform-origin: center bottom;
  cursor: pointer;
}

.go-up-arrow path {
  fill: #f8f7e5;
}

.go-up-link {
  position: absolute;
  right: -40px;
  top: -100px;
  width: 30px;
  text-align: center;
  height: 60px;
  cursor: pointer;
}

.go-up-link:hover {
  border-bottom: 1px solid var(--color-bg-hover);
}

.go-up-link:hover .go-up-arrow path {
  fill: var(--color-bg-hover);
}

/* Form styling */
.contact-form {
  align-self: flex-end;
  width: 50%;
  color: var(--color-txt-primary);
  height: 400px;
  margin-bottom: 30px;
  position: relative;
}

label {
  font-size: clamp(16px, 2vw, 24px);
  font-weight: var(--fw-bold);
  padding-left: 8px;
}

.mail-container:hover label,
.name-container:hover label,
.textarea-container:hover label {
  color: var(--color-txt-quinary);
}

input {
  padding: 16px 8px;
  border: none;
  background-color: transparent;
  color: var(--color-txt-primary);
  font-size: 16px;
  border-bottom: 1px solid var(--color-bg-card);
  cursor: pointer;
  font-family: "Quicksand";
}

input::placeholder {
  color: var(--color-txt-primary);
  font-family: "Quicksand";
}

input.error::placeholder {
  color: #c56969;
  opacity: 1;
}

input.error {
  border-bottom: 1px solid #c56969;
  opacity: 1;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--color-txt-primary) !important;
  box-shadow: 0 0 0 1000px var(--color-tertiary) inset !important;
  border-bottom: 1px solid var(--color-bg-card) !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
}

form {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.upper-form {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 16px;
}

.name-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.mail-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.textarea-container {
  display: flex;
  flex-direction: column;
}

textarea {
  resize: none;
  border: none;
  background-color: transparent;
  border-bottom: 1px solid var(--color-bg-card);
  padding: 16px 8px;
  color: var(--color-txt-primary);
  font-family: "Quicksand";
  font-size: 16px;
  cursor: pointer;
  margin-top: 8px;
}

textarea::placeholder {
  color: var(--color-txt-primary);
  font-family: "Quicksand";
  font-size: 16px;
}

textarea.error::placeholder {
  color: #c56969;
  opacity: 1;
}

textarea.error {
  border-bottom: 1px solid #c56969;
  opacity: 1;
}

textarea::-webkit-scrollbar {
  width: 4px;
}

textarea::-webkit-scrollbar-track {
  background: transparent;
}

textarea::-webkit-scrollbar-thumb {
  background: var(--color-txt-quaternary);
  border-radius: 10px;
}

.privacy-policy {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.privacy-policy a {
  cursor: pointer;
  color: var(--color-txt-quinary);
}

.privacy-policy a:hover {
  color: var(--color-txt-primary);
  font-weight: var(--fw-bold);
}

.checkbox-and-text {
  display: flex;
  align-items: center;
  padding: 0 8px;
}

.checkbox-wrapper {
  height: 15px;
  display: flex;
  align-items: center;
}

.checkbox {
  background-image: url("../assets/img/checkbox_empty.svg");
  background-size: contain;
  background-repeat: no-repeat;
  height: 15px;
  width: 15px;
  margin-right: 16px;
  transition: box-shadow 125ms ease;
}

.checkbox:hover {
  box-shadow: 0 0 25px 4px rgba(249, 175, 66, 0.5);
}

.checkbox.checked {
  background-image: url("../assets/img/checkbox_checked.svg");
}

.submit-message-btn {
  width: 150px;
  border: 1px solid var(--color-txt-primary);
  border-radius: 100px;
  padding: 8px 16px;
  color: var(--color-txt-primary);
  font-size: 18px;
  align-self: center;
}

.submit-message-btn:hover {
  background-color: var(--color-bg-hover);
}

.submit-message-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  background-color: transparent;
}

.error-message {
  height: 20px;
  width: 90%;
  color: #c56969;
  padding: 8px;
  font-weight: var(--fw-normal);
  margin-bottom: 30px;
}

.success-message {
  height: 20px;
  width: 90%;
  color: green;
  padding: 8px;
  font-weight: var(--fw-normal);
  margin-bottom: 30px;
}

.privacy-span {
  color: var(--color-txt-primary);
  font-weight: var(--fw-normal);
}

/* Footer and images */

.lower-container {
  display: flex;
  justify-content: space-between;
}

.images-wrapper {
  position: relative;
  width: 240px;
  pointer-events: none;
  overflow: hidden;
  height: 150px;
  transform: scale(1.1); 
  transform-origin: bottom center;
}


.orange-wheel-footer {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 1;
  width: 110px;
  height: 110px; 
  animation: rotateWheel 8s linear infinite;
}

.blue-wheel-footer {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 150px;
  height: 150px;
  z-index: 2;
  animation: rotateOtherWay 8s linear infinite;
}


footer span,
a {
  color: var(--color-txt-primary);
  font-weight: var(--fw-normal);
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 0;
  width: clamp(280px, 50vw, 600px);
}

.socials-contaier {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 32px);
}

.socials-contaier a {
  cursor: pointer;
}

.socials-contaier a:hover {
  color: var(--color-txt-quinary);
}

@keyframes rotateOtherWay {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(-360deg);
  }
}

@keyframes bounceUp {
  0% {
    transform: translateY(95%) scaleY(1);
  }
  50% {
    transform: translateY(-40%) scaleY(1.5);
  }
  100% {
    transform: translateY(95%) scaleY(1);
  }
}


/* Laptops media queries */
@media (min-height: 650px) and (max-height: 800px) and (min-width: 1200px) {
  .contact-footer-content h2 {
    margin-top: 80px;
    font-size: 60px;
  }

  .contact-form {
    margin-bottom: 0;
  }

  .go-up-link {
    top: 0;
  }

  .images-wrapper {
    width: 210px;
  }

  .orange-wheel-footer {
    height: 100px;
    width: 100px;
  }

  .blue-wheel-footer {
    height: 140px;
    width: 140px;
  }
}

/* Media queries for mobile devices */
@media (max-width: 950px) {
  .header-subheader {
    width: 40%;
  }

  .contact-form {
    width: 60%;
  }
}

@media (max-width: 850px) {
  .contact-footer-content {
    padding: 0 16px;
    grid-template-columns: 1fr;
    max-width: none;
    height: auto;
  }

  .contact-footer-content h2 {
    margin-top: 80px;
  }

  .upper-container {
    flex-direction: column;
    gap: 64px;
  }

  .header-subheader {
    width: 100%;
  }

  .contact-form {
    width: 100%;
    margin-bottom: 0;
  }

  .go-up-link {
    right: 200px;
    top: 350px;
  }

  .lower-container {
    flex-direction: column-reverse;
    align-items: center;
    height: 280px;
  }

  footer {
    width: 90%;
  }

  .images-wrapper {
    width: 240px;
  }
}

@media(max-width: 650px) {
  .go-up-link {
    right: 100px;
  }

  footer {
    width: 100%;
  }
}

@media(max-width: 450px) {
  footer {
    flex-direction: column;
    gap: 16px;
    margin-top: 32px;
  }

  .go-up-link {
    right: 10px;
    top: 400px;
  }

  .upper-form {
    flex-direction: column;
  }

  .lower-container {
    padding-top: 80px;
  }

  .checkbox-and-text {
    margin-top: 16px;
  }

  .blue-wheel-footer {
    height: 120px;
    width: 120px;
  }

  .orange-wheel-footer {
    height: 80px;
    width: 80px;
  }

  .images-wrapper {
    width: 180px;
  }
}

/* Tablet - portrait */
/* Small tablets - landscape */
@media (min-width: 900px) and (max-width: 1280px)
  and (min-height: 600px) and (max-height: 800px)
  and (orientation: landscape) {
    .contact-footer-content h2 {
      margin-top: 50px;
    }

    .contact-form {
      margin-bottom: 0;
    }

    .go-up-link {
      top: 80px;
    }
}

/* Medium tablets (8–10") landscape */
@media (min-width: 1024px) and (max-width: 1180px)
  and (min-height: 768px) and (max-height: 834px)
  and (orientation: landscape) {
    .go-up-link {
      top: -100px;
    }
}

/* Large tablets - portrait */
@media (min-width: 835px) and (max-width: 1024px)
  and (min-height: 1181px) and (max-height: 1366px)
  and (orientation: portrait) {
    .contact-footer-content {
      display: flex;
      flex-direction: column;
    }

    .upper-container {
      flex-direction: column;
      justify-content: center;
      gap: 200px;
    }

    .header-subheader {
      width: 100%;
    }

    .contact-form {
      width: 100%;
    }

    .left-container-contact {
      height: 100%;
    }
}