/* ==========================================================================
   1. CONTACT & FOOTER - BASE LAYOUT
   ========================================================================== */
.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;
}

.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%;
}

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

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

.contactDescription {
  color: var(--color-secondary);
}

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

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,
.mail-container,
.textarea-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

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

input,
textarea {
  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";
}

textarea {
  resize: none;
  margin-top: 8px;
}

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

/* Form States & Validation */
.mail-container:hover label,
.name-container:hover label,
.textarea-container:hover label {
  color: var(--color-txt-quinary);
}

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

input.error::placeholder,
textarea.error::placeholder {
  color: #c56969;
}

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;
}

/* Scrollbar Textarea */
textarea::-webkit-scrollbar {
  width: 4px;
}
textarea::-webkit-scrollbar-track {
  background: transparent;
}
textarea::-webkit-scrollbar-thumb {
  background: var(--color-txt-quaternary);
  border-radius: 10px;
}

/* Privacy & Checkbox */
.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);
}

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

.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.checked {
  background-image: url("../assets/img/checkbox_checked.svg");
}

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

.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,
.success-message {
  height: 20px;
  width: 90%;
  padding: 8px;
  font-weight: var(--fw-normal);
  margin-bottom: 30px;
}

.error-message {
  color: #c56969;
}
.success-message {
  color: green;
}

/* ==========================================================================
   3. FOOTER & DECORATIVE ELEMENTS
   ========================================================================= */
.lower-container {
  display: flex;
  justify-content: space-between;
}

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

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

.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);
}

.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;
}

/* ==========================================================================
   4. ANIMATIONS & UI HELPERS
   ========================================================================== */
.go-up-link {
  position: absolute;
  right: -40px;
  top: -100px;
  width: 30px;
  text-align: center;
  height: 60px;
  cursor: pointer;
}

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

.go-up-arrow path {
  fill: var(--color-txt-primary);
}

.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);
}

@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);
  }
}

/* ==========================================================================
   5. MEDIA QUERIES (DESKTOP & LAPTOP)
   ========================================================================== */
@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 (max-width: 950px) {
  .header-subheader {
    width: 40%;
  }
  .contact-form {
    width: 60%;
  }
}

/* ==========================================================================
   6. MEDIA QUERIES (MOBILE)
   ========================================================================== */
@media (max-width: 850px) {
  .contact-footer-content {
    padding: 0 16px;
    grid-template-columns: 1fr;
    height: auto;
  }
  .contact-footer-content h2 {
    margin-top: 80px;
  }
  .upper-container {
    flex-direction: column;
    gap: 64px;
  }
  .header-subheader,
  .contact-form {
    width: 100%;
  }
  .contact-form {
    margin-bottom: 0;
  }
  .go-up-link {
    right: 200px;
    top: 350px;
  }
  .lower-container {
    flex-direction: column-reverse;
    align-items: center;
    height: 280px;
  }
  footer {
    width: 90%;
  }
}

@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;
  }
}

/* ==========================================================================
   7. MEDIA QUERIES (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;
  }
}

@media (min-width: 1024px) and (max-width: 1180px) and (min-height: 768px) and (max-height: 834px) and (orientation: landscape) {
  .go-up-link {
    top: -100px;
  }
}

@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,
  .contact-form {
    width: 100%;
  }
  .left-container-contact {
    height: 100%;
  }
}
