.contact-section {
  width: 100vw;
  min-height: 100vh;
  background: var(--primary-color);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.contact-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      ellipse at 20% 50%,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 80% 20%,
      rgba(255, 255, 255, 0.08) 0%,
      transparent 50%
    );
  pointer-events: none;
  z-index: 1;
}

.contact-wrapper {
  width: 95%;
  max-width: 1480px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 40px;
  position: relative;
  z-index: 2;
}

.contact-header {
  text-align: center;
  animation: fadeInUp 0.8s ease-out;
}

.contact-title {
  font-size: 42px;
  font-weight: 300;
  color: var(--text-color-oposite);
  margin-bottom: 15px;
  text-shadow: 2px 2px 8px rgba(20, 20, 24, 0.3);
  animation: titleGlow 3s ease-in-out infinite alternate;
}

.contact-subtitle {
  font-size: 20px;
  color: var(--secondary-light);
  opacity: 0.95;
  animation: subtitleFloat 4s ease-in-out infinite alternate;
}

.contact-form-wrapper {
  display: flex;
  width: 95%;
  height: auto;
  min-height: 600px;
  background: var(--white);
  box-shadow: 0 20px 60px rgba(20, 20, 24, 0.3);
  position: relative;
  overflow: hidden;
  animation: slideInScale 1s ease-out 0.3s both;
}

.contact-form-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color),
    var(--tertiary-color)
  );
  z-index: 10;
}

.form-info {
  width: 40%;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 25px;
  position: relative;
  overflow: hidden;
  padding: 20px 0;
}

.form-info::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  animation: infoBackground 20s linear infinite;
  pointer-events: none;
}

.form-icon {
  width: 100px;
  height: 100px;
  background: linear-gradient(
    135deg,
    var(--light-color),
    rgba(243, 238, 239, 0.9)
  );
  color: var(--primary-color);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 40px;
  position: relative;
  overflow: hidden;
  animation: iconFloat 3s ease-in-out infinite alternate;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.form-icon::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(238, 10, 16, 0.2),
    transparent
  );
  transform: rotate(45deg);
  animation: iconShine 2s ease-in-out infinite;
}

.form-info-title {
  font-size: 28px;
  font-weight: 400;
  color: var(--light-color);
  text-align: center;
  text-shadow: 1px 1px 3px rgba(20, 20, 24, 0.3);
  position: relative;
  z-index: 2;
}

.form-info-text {
  font-size: 16px;
  color: var(--light-color);
  opacity: 0.9;
  text-align: center;
  line-height: 1.6;
  max-width: 90%;
  position: relative;
  z-index: 2;
  text-shadow: 1px 1px 2px rgba(20, 20, 24, 0.2);
}

.form-content {
  width: 60%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(
    135deg,
    var(--white) 0%,
    rgba(255, 255, 255, 0.95) 100%
  );
  position: relative;
}

.form-content::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: radial-gradient(
    circle,
    rgba(183, 150, 138, 0.1) 0%,
    transparent 70%
  );
  animation: contentDecor 15s linear infinite;
  pointer-events: none;
}

.form-fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 90%;
  height: auto;
  animation: formSlideIn 0.8s ease-out 0.5s both;
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
  position: relative;
}

.form-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-color-main);
  transition: color 0.3s ease;
}

.form-input,
.form-select {
  height: 50px;
  font-size: 15px;
  border: 2px solid var(--light-gray);
  background: var(--white);
  color: var(--text-color-main);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.form-input::before,
.form-select::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.form-textarea {
  height: 90px;
  font-size: 15px;
  border: 2px solid var(--light-gray);
  background: var(--white);
  color: var(--text-color-main);
  resize: none;
  transition: all 0.3s ease;
  position: relative;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(238, 10, 16, 0.1);
  transform: translateY(-2px);
}

.form-input:focus + .form-label,
.form-select:focus + .form-label,
.form-textarea:focus + .form-label {
  color: var(--primary-color);
}

.form-submit {
  height: 55px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
  color: var(--text-color-oposite);
  border: none;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(238, 10, 16, 0.3);
}

.form-submit::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.6s ease;
}

.form-submit:hover {
  background: linear-gradient(
    135deg,
    var(--primary-hover),
    var(--primary-color)
  );
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(238, 10, 16, 0.4);
}

.form-submit:hover::before {
  left: 100%;
}

.form-submit:active {
  transform: translateY(-1px);
}

.contact-list {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
  color: var(--text-color-oposite);
  opacity: 0.9;
  animation: fadeInUp 0.8s ease-out 0.8s both;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  transition: transform 0.3s ease;
}

.contact-item:hover {
  transform: translateY(-2px);
}

.contact-item i {
  color: var(--secondary-light);
  font-size: 18px;
  animation: iconPulse 2s ease-in-out infinite;
}

/* Вторая секция */
.contact-section.visit-section {
  background: var(--shadow-color);
}

.visit-section .contact-title {
  color: var(--light-color);
}

.visit-section .contact-subtitle {
  color: var(--tertiary-light);
}

.visit-section .form-info {
  background: linear-gradient(
    135deg,
    var(--shadow-color) 0%,
    rgba(20, 20, 24, 0.9) 100%
  );
}

.visit-section .form-info::before {
  background: radial-gradient(
    circle,
    rgba(183, 150, 138, 0.1) 0%,
    transparent 70%
  );
}

.visit-section .form-icon {
  background: linear-gradient(
    135deg,
    var(--tertiary-color),
    var(--tertiary-dark)
  );
  color: var(--light-color);
}

.visit-section .form-icon::before {
  background: linear-gradient(
    45deg,
    transparent,
    rgba(169, 139, 104, 0.3),
    transparent
  );
}

/* Анимации */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInScale {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(30px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes titleGlow {
  0% {
    text-shadow: 2px 2px 8px rgba(20, 20, 24, 0.3);
  }
  100% {
    text-shadow: 2px 2px 8px rgba(20, 20, 24, 0.3),
      0 0 20px rgba(255, 255, 255, 0.2);
  }
}

@keyframes subtitleFloat {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-3px);
  }
}

@keyframes iconFloat {
  0% {
    transform: translateY(0) scale(1);
  }
  100% {
    transform: translateY(-5px) scale(1.02);
  }
}

@keyframes iconShine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  50% {
    transform: translateX(0%) translateY(0%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

@keyframes iconPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

@keyframes infoBackground {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes contentDecor {
  0% {
    transform: translateX(0) translateY(0);
  }
  100% {
    transform: translateX(-20px) translateY(20px);
  }
}

@keyframes formSlideIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 1024px) {
  .contact-wrapper {
    width: 95%;
  }

  .contact-form-wrapper {
    flex-direction: column;
    width: 95%;
    min-height: 600px;
  }

  .form-info,
  .form-content {
    width: 100%;
  }

  .form-info {
    height: auto;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .form-content {
    height: auto;
    min-height: 420px;
    display: flex;
    justify-content: center;
  }

  .form-fields {
    width: 90%;
  }

  .contact-list {
    flex-direction: column;
    gap: 15px;
    text-align: center;
    align-items: center;
  }
}

@media (max-width: 768px) {
  .contact-wrapper {
    width: 95%;
    gap: 30px;
  }

  .contact-title {
    font-size: 28px;
  }

  .contact-subtitle {
    font-size: 16px;
  }

  .contact-form-wrapper {
    width: 95%;
    min-height: 550px;
  }

  .form-info {
    min-height: 150px;
    gap: 20px;
  }

  .form-content {
    min-height: 400px;
  }

  .form-icon {
    width: 80px;
    height: 80px;
    font-size: 32px;
  }

  .form-info-title {
    font-size: 22px;
  }

  .form-info-text {
    font-size: 14px;
  }

  .form-row {
    flex-direction: column;
    gap: 15px;
  }

  .form-fields {
    gap: 15px;
    width: 90%;
  }

  .contact-list {
    font-size: 13px;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .contact-wrapper {
    width: 95%;
    gap: 25px;
  }

  .contact-title {
    font-size: 24px;
  }

  .contact-subtitle {
    font-size: 15px;
  }

  .contact-form-wrapper {
    width: 95%;
    min-height: 500px;
  }

  .form-info {
    min-height: 120px;
    gap: 15px;
  }

  .form-content {
    min-height: 380px;
    display: flex;
    justify-content: center;
  }

  .form-icon {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }

  .form-info-title {
    font-size: 20px;
  }

  .form-info-text {
    font-size: 13px;
  }

  .form-fields {
    gap: 12px;
    width: 90%;
  }

  .form-input,
  .form-select {
    height: 45px;
    font-size: 14px;
  }

  .form-textarea {
    height: 70px;
    font-size: 14px;
  }

  .form-submit {
    height: 50px;
    font-size: 15px;
  }

  .contact-list {
    font-size: 12px;
    gap: 10px;
  }
}
