/* Контактная форма — подключать на страницах, где есть include contact.html */

.contact-section {
  background-color: #f4eee9;
}

#contact-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 50px 20px 30px;
}

.contact-section-title {
  font-family: 'TildaSans', sans-serif;
  font-weight: 300;
  color: #815583;
  font-size: 45px;
  margin: 0 0 6px 0;
  text-align: center;
  line-height: 1.1;
}
/* На широких экранах <br> в заголовке скрыт, на мобильном — перенос «Написать нам» / «ᯓ✉» */
.contact-section-title .contact-title-br {
  display: none;
}

@media (max-width: 768px) {
  .contact-section-title { font-size: 45px; margin-bottom: 6px; }
  /* Жирность не переопределяем — как на ПК на всех экранах */
}

@media (max-width: 480px) {
  .contact-section-title { font-size: 45px; margin-bottom: 36px; }
  .contact-section-title .contact-title-br { display: block; }
  .contact-columns { gap: 20px; }
}

.contact-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: stretch;
  margin-top: 0;
  margin-bottom: 30px;
}

@media (max-width: 768px) {
  .contact-columns {
    grid-template-columns: 1fr;
  }
}

.contact-column-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #815583;
  font-size: 25px;
  line-height: 1.3;
  font-family: 'TildaSans', sans-serif;
  font-weight: 300;
  text-align: center;
}

.contact-column-text .contact-intro {
  margin: 0 0 1em 0;
}

.contact-column-text .contact-intro:last-of-type {
  margin-bottom: 0;
}

.contact-column-image-wrap {
  margin: 1.5em 0 0 0;
  text-align: center;
}

.contact-column-image {
  display: inline-block;
  width: 120px;
  max-width: 100%;
  height: auto;
  vertical-align: middle;
  transform: rotate(-20deg);
}

.contact-footer {
  font-family: 'TildaSans', sans-serif;
  font-weight: 300;
  font-size: 14px;
  color: #816e80;
  text-align: center;
  margin: 0;
}

.form-element {
  font-family: 'TildaSans', sans-serif;
  font-weight: 300;
}

#contact-form {
  padding: 20px 0;
  text-align: center;
}

#contact-form h2 {
  color: #815583;
  font-size: 36px;
  margin-bottom: 35px;
}

#contact-form label {
  color: #3d183e;
  font-size: 20px;
  display: block;
  text-align: left;
  margin-bottom: 8px;
  margin-top: 8px;
}

#contact-form input:not([type="checkbox"]),
#contact-form textarea {
  width: 100%;
  padding: 20px 15px;
  margin-bottom: 10px;
  border: 1px solid #b783b9;
  border-radius: 20px;
  font-size: 16px;
  color: #815583;
  box-sizing: border-box;
  background: transparent;
}

#contact-form input[aria-invalid="true"],
#contact-form textarea[aria-invalid="true"] {
  border-color: #b83434;
}

#contact-form textarea {
  min-height: 160px;
  resize: vertical;
  line-height: 1.4;
}

#contact-form input::placeholder,
#contact-form textarea::placeholder {
  color: #815583;
  opacity: 0.5;
}

#contact-form input:focus,
#contact-form textarea:focus {
  outline: none;
}

#contact-form button {
  max-width: 500px;
  width: 300px;
  margin: 22px auto 0;
  display: block;
  padding: 15px;
  background-color: #815583;
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  position: relative;
  box-sizing: border-box;
}

#contact-form button:hover:not(:disabled) {
  background-color: #7a527b;
}

#contact-form button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

#contact-form button.loading::after {
  content: '...';
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  width: 0;
  animation: contact-dots 1.2s steps(4, end) infinite;
}

@keyframes contact-dots { to { width: 1.2em; } }

#contact-form .consent-text {
  font-size: 16px;
  color: #815583;
  text-align: center;
  margin-top: 15px;
}

#contact-form .consent-text a {
  color: #815583;
  text-decoration: underline;
}

#contact-form .consent-text a:hover {
  color: #7a527b;
}

#contact-form .error {
  color: #b83434;
  font-size: 16px;
  text-align: left;
  margin-top: 0;
  margin-bottom: 15px;
  display: none;
  transition: opacity 0.3s ease;
  opacity: 0;
}

#contact-form .error.visible {
  display: block;
  opacity: 1;
}

#contact-success-message {
  display: none;
  max-width: 600px;
  margin: 50px auto;
  padding: 30px;
  background-color: #b783b9;
  color: #ffffff;
  border-radius: 20px;
  text-align: center;
  transition: opacity 0.3s ease;
  opacity: 0;
}

#contact-success-message.visible {
  display: block;
  opacity: 1;
}

#contact-success-message h3 {
  font-family: 'TildaSans', sans-serif;
  font-weight: 200;
  font-size: 40px;
  color: #ffffff;
  margin: 0 0 20px 0;
}

#contact-success-message p {
  font-family: 'TildaSans', sans-serif;
  font-weight: 300;
  font-size: 26px;
  color: #ffffff;
  margin: 0;
}

#contact-form #contact-recaptcha-container {
  margin: 30px auto 10px;
  display: flex;
  justify-content: center;
}

/* reCAPTCHA скрыта до первого ввода в форму */
#contact-recaptcha-container.contact-recaptcha--hidden {
  display: none !important;
}

/* honeypot скрываем аккуратно */
.contact-section .hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}
