.contact {
  padding: 8rem 0;
  background: linear-gradient(135deg, var(--color-light), var(--color-white));
  position: relative;
  overflow: hidden;
}

.contact::before {
  content: "";
  position: absolute;
  top: -30%;
  left: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(
    circle,
    rgba(110, 181, 192, 0.1) 0%,
    transparent 70%
  );
  border-radius: 50%;
  animation: float-contact 25s ease-in-out infinite;
}

.contact::after {
  content: "";
  position: absolute;
  bottom: -20%;
  right: -15%;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(255, 204, 187, 0.1) 0%,
    transparent 70%
  );
  border-radius: 50%;
  animation: float-contact 30s ease-in-out infinite reverse;
}

.contact__container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 2;
}

.contact__header {
  text-align: center;
  margin-bottom: 6rem;
}

.contact__title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  color: var(--color-primary);
  margin-bottom: 1rem;
  letter-spacing: -2px;
}

.contact__subtitle {
  font-size: 1.2rem;
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto;
}

.contact__content {
  display: flex;
  justify-content: center;
  align-items: center;
}

.contact__form-wrapper {
  position: relative;
  width: 100%;
  max-width: 600px;
}

.contact__form {
  background: var(--color-white);
  border-radius: 30px;
  padding: 3rem 2.5rem;
  box-shadow: 0 25px 80px rgba(0, 108, 132, 0.12);
  border: 1px solid rgba(110, 181, 192, 0.1);
  position: relative;
  overflow: hidden;
}

.contact__form::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(
    90deg,
    var(--color-accent),
    var(--color-secondary),
    var(--color-primary)
  );
  border-radius: 30px 30px 0 0;
}

.contact__form-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.contact__form-subtitle {
  color: var(--color-text-light);
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form__group {
  position: relative;
  margin-bottom: 1.5rem;
}

.form__label {
  position: absolute;
  top: 1rem;
  left: 1.2rem;
  font-size: 1rem;
  color: var(--color-text-light);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--color-white);
  padding: 0 0.5rem;
  z-index: 2;
}

.form__input,
.form__select,
.form__textarea {
  width: 100%;
  padding: 1rem 1.2rem;
  border: 2px solid var(--color-light);
  border-radius: 15px;
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-white);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}

.form__input:focus,
.form__select:focus,
.form__textarea:focus,
.form__input:not(:placeholder-shown),
.form__select:not([value=""]),
.form__textarea:not(:placeholder-shown) {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 4px rgba(110, 181, 192, 0.1);
}

.form__input:focus + .form__label,
.form__select:focus + .form__label,
.form__textarea:focus + .form__label,
.form__input:not(:placeholder-shown) + .form__label,
.form__select:not([value=""]) + .form__label,
.form__textarea:not(:placeholder-shown) + .form__label {
  top: -0.5rem;
  font-size: 0.85rem;
  color: var(--color-secondary);
  font-weight: 600;
}

.form__input::placeholder,
.form__textarea::placeholder {
  color: transparent;
}

.form__textarea {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

.form__select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 1rem center;
  background-repeat: no-repeat;
  background-size: 1rem;
  padding-right: 3rem;
}

.form__checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--color-light);
  border-radius: 15px;
}

.form__checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-secondary);
  border-radius: 5px;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.form__checkbox input {
  opacity: 0;
  position: absolute;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.form__checkbox input:checked + .form__checkbox-mark {
  opacity: 1;
  transform: scale(1);
}

.form__checkbox-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 12px;
  height: 12px;
  background: var(--color-secondary);
  border-radius: 2px;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form__checkbox-text {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.5;
}

.form__checkbox-text a {
  color: var(--color-secondary);
  text-decoration: none;
  font-weight: 600;
}

.form__checkbox-text a:hover {
  color: var(--color-primary);
}

.form__submit {
  width: 100%;
  padding: 1.2rem 2rem;
  background: linear-gradient(
    135deg,
    var(--color-secondary),
    var(--color-primary)
  );
  color: var(--color-white);
  border: none;
  border-radius: 15px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.form__submit::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.form__submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(0, 108, 132, 0.3);
}

.form__submit:hover::before {
  left: 100%;
}

.form__submit:active {
  transform: translateY(0);
}

.form__submit--loading {
  pointer-events: none;
  opacity: 0.8;
}

.form__submit--loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid var(--color-white);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.notification {
  position: fixed;
  top: 5rem;
  right: 2rem;
  background: var(--color-white);
  border-radius: 20px;
  padding: 1.5rem 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--color-success);
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  max-width: 400px;
}

.notification.show {
  transform: translateX(0);
  opacity: 1;
}

.notification__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.notification__icon {
  width: 40px;
  height: 40px;
  background: var(--color-success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: 1.2rem;
}

.notification__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-success);
}

.notification__message {
  font-size: 0.95rem;
  color: var(--color-text-light);
  line-height: 1.5;
}

.notification__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-text-light);
  cursor: pointer;
  transition: color 0.3s ease;
}

.notification__close:hover {
  color: var(--color-text);
}

@keyframes float-contact {
  0%,
  100% {
    transform: translateY(0px) translateX(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-30px) translateX(20px) rotate(2deg);
  }
  66% {
    transform: translateY(10px) translateX(-15px) rotate(-1deg);
  }
}

@keyframes spin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@media (max-width: 1024px) {
  .form__row {
    grid-template-columns: 1fr;
  }

  .contact__form {
    padding: 2.5rem 2rem;
  }
}

@media (max-width: 768px) {
  .contact {
    padding: 4rem 0;
  }

  .contact__header {
    margin-bottom: 3rem;
  }

  .contact__form {
    padding: 2rem 1.5rem;
  }

  .notification {
    top: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
    transform: translateY(-100px);
  }

  .notification.show {
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .form__checkbox-group {
    flex-direction: column;
    gap: 1rem;
  }
  .contact__header {
    display: none;
  }
}
