:root {
  --page-ink: #12231a;
  --page-text: #455449;
  --page-muted: #69786c;
  --page-paper: #fffdf8;
  --page-soft: #f3f8f0;
  --page-green: #245b39;
  --page-green-2: #6ca56b;
  --page-gold: #d99a3d;
  --page-blue: #e7f2f3;
  --page-line: rgba(18, 35, 26, 0.1);
  --page-shadow: 0 22px 70px rgba(32, 63, 43, 0.1);
}

body {
  background: var(--page-paper);
  color: var(--page-ink);
  padding-top: 0;
}

.contacts-page {
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0) 0, #fffdf8 620px),
    var(--page-paper);
}

.contacts-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

/* CONTACTS BANNER FIX */
.contacts-banner {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background: #dfeadd;
}

.contacts-banner .banner-image-container,
.contacts-banner .banner-image,
.contacts-banner .banner-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.contacts-banner .banner-image {
  object-fit: cover;
  object-position: center;
  z-index: -2;
}

.contacts-banner .banner-overlay {
  z-index: -1;
  background:
    linear-gradient(
      90deg,
      rgba(10, 34, 18, 0.78),
      rgba(10, 34, 18, 0.44) 52%,
      rgba(10, 34, 18, 0.16)
    ),
    linear-gradient(0deg, rgba(10, 34, 18, 0.62), rgba(10, 34, 18, 0.14) 58%);
}

.contacts-banner .banner-content {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
  z-index: 2 !important;
  width: min(1180px, calc(100% - 40px)) !important;
  max-width: 1180px !important;
  margin: 0 auto !important;
  padding: 150px 0 76px !important;
}

.contacts-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffe1aa;
  font:
    800 13px/1 "Montserrat",
    sans-serif;
  backdrop-filter: blur(12px);
  animation: contactsUp 0.7s ease both;
}

.contacts-banner .banner-title {
  max-width: 780px;
  margin: 20px 0 0;
  color: #fff;
  font:
    800 64px/1.02 "Montserrat",
    sans-serif;
  text-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
  animation: contactsUp 0.78s 0.08s ease both;
}

.contacts-banner .highlight {
  color: #ffd38d;
}

.contacts-banner .banner-description {
  max-width: 640px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 21px;
  line-height: 1.65;
  animation: contactsUp 0.78s 0.16s ease both;
}

/* MAIN */
.contacts-main {
  padding: 84px 0 96px;
}

.contacts-section {
  margin-bottom: 84px;
}

.contacts-section:last-child {
  margin-bottom: 0;
}

.section-header {
  max-width: 780px;
  margin: 0 auto 42px;
  text-align: center;
}

.section-title {
  margin: 0;
  color: var(--page-ink);
  text-align: center;
  font:
    800 44px/1.12 "Montserrat",
    sans-serif;
}

.section-title::after {
  display: block;
  content: "";
  width: 58px;
  height: 3px;
  margin: 18px auto 0;
  border-radius: 999px;
  background: var(--page-green);
}

.section-subtitle {
  max-width: 780px;
  margin: 18px auto 0;
  color: var(--page-text);
  text-align: center;
  font-size: 17px;
  line-height: 1.7;
}

/* CONTACT CARDS */
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.contact-info-card,
.form-container,
.map-container {
  border: 1px solid var(--page-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(32, 63, 43, 0.08);
}

.contact-info-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}

.contact-info-card::before {
  content: "";
  position: absolute;
  right: -44px;
  top: -44px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(108, 165, 107, 0.12);
}

.contact-info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 80px rgba(32, 63, 43, 0.13);
  border-color: rgba(36, 91, 57, 0.18);
}

.card-icon {
  position: relative;
  z-index: 2;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 18px;
  background: var(--page-blue);
  color: #2a7781;
  font-size: 26px;
}

.card-title {
  position: relative;
  z-index: 2;
  margin: 0 0 12px;
  color: var(--page-ink);
  font:
    800 22px/1.2 "Montserrat",
    sans-serif;
}

.card-content {
  position: relative;
  z-index: 2;
  color: var(--page-text);
  line-height: 1.65;
}

.card-content p {
  margin: 0 0 8px;
}

.card-content p:last-child {
  margin-bottom: 0;
}

.card-content a {
  color: var(--page-green);
  font-weight: 800;
  text-decoration: none;
}

/* FORM */
.form-container {
  width: min(860px, 100%);
  margin: 0 auto;
  padding: 34px;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 14px;
  margin-bottom: 22px;
  font-weight: 800;
}

.alert-success {
  background: rgba(108, 165, 107, 0.14);
  color: var(--page-green);
}

.alert-error {
  background: rgba(214, 91, 91, 0.12);
  color: #9d2f2f;
}

.contact-form {
  display: grid;
  gap: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.form-group {
  display: grid;
  gap: 8px;
}

.form-group label,
.file-upload-label {
  color: var(--page-ink);
  font-weight: 900;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  width: 100%;
  min-height: 50px;
  padding: 13px 15px;
  border: 1px solid var(--page-line);
  border-radius: 14px;
  background: #fff;
  color: var(--page-ink);
  font: inherit;
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

textarea {
  min-height: 150px;
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(36, 91, 57, 0.42);
  box-shadow: 0 0 0 4px rgba(36, 91, 57, 0.1);
}

.honeypot-field {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.file-upload-wrapper {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px dashed rgba(36, 91, 57, 0.28);
  border-radius: 16px;
  background: linear-gradient(135deg, #fff, #f7fbf5);
  transition:
    border-color 0.22s ease,
    background 0.22s ease;
}

.file-upload-wrapper.dragover {
  border-color: var(--page-green);
  background: rgba(36, 91, 57, 0.06);
}

.file-upload-button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 16px;
  border-radius: 14px;
  background: #fff;
  color: var(--page-green);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(32, 63, 43, 0.06);
}

.file-upload-input {
  display: none;
}

.file-upload-hint,
.form-footer-note {
  color: var(--page-muted);
  font-size: 13px;
  line-height: 1.5;
}

.file-preview {
  display: grid;
  gap: 8px;
}

.file-preview-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--page-line);
  border-radius: 12px;
  background: #fff;
  color: var(--page-text);
}

.file-preview-icon {
  color: var(--page-green);
}

.file-preview-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.file-preview-size {
  color: var(--page-muted);
  font-size: 13px;
}

.file-preview-remove {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(214, 91, 91, 0.12);
  color: #9d2f2f;
  cursor: pointer;
}

/* BUTTONS */
.btn,
.btn-primary,
.btn-navigate,
.modal-accept {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--page-green);
  color: #fff;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease;
}

.btn:hover,
.btn-primary:hover,
.btn-navigate:hover,
.modal-accept:hover {
  transform: translateY(-2px);
  background: #1c4a2f;
  color: #fff;
  box-shadow: 0 18px 45px rgba(36, 91, 57, 0.2);
}

.form-footer-note a {
  color: var(--page-green);
  font-weight: 900;
}

/* MAP */
.map-container {
  position: relative;
  overflow: hidden;
  height: 460px;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.map-overlay {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 2;
}

/* PRIVACY MODAL */
.privacy-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(18, 35, 26, 0.58);
  backdrop-filter: blur(8px);
}

.privacy-modal.show {
  display: flex;
}

.privacy-modal__content {
  width: min(860px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.26);
}

.privacy-modal__header,
.privacy-modal__footer {
  padding: 20px 24px;
  border-bottom: 1px solid var(--page-line);
}

.privacy-modal__footer {
  border-bottom: 0;
  border-top: 1px solid var(--page-line);
  display: flex;
  justify-content: flex-end;
}

.privacy-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.privacy-modal__header h3 {
  margin: 0;
  font:
    800 24px/1.2 "Montserrat",
    sans-serif;
}

.modal-close {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--page-soft);
  color: var(--page-ink);
  font-size: 26px;
  cursor: pointer;
}

.privacy-modal__body {
  padding: 24px;
  overflow: auto;
  color: var(--page-text);
  line-height: 1.7;
}

.privacy-modal__body h4 {
  margin: 22px 0 8px;
  color: var(--page-green);
  font:
    800 19px/1.25 "Montserrat",
    sans-serif;
}

.privacy-modal__body h4:first-child {
  margin-top: 0;
}

/* REVEAL */
.contacts-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.72s ease,
    transform 0.72s ease;
}

.contacts-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes contactsUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* RESPONSIVE */
@media (max-width: 980px) {
  .contacts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .contacts-shell,
  .contacts-banner .banner-content {
    width: min(100% - 28px, 1180px);
  }

  .contacts-banner {
    min-height: 520px;
    padding-top: 90px;
  }

  .contacts-banner .banner-content {
    padding-bottom: 58px;
  }

  .contacts-banner .banner-title {
    font-size: 40px;
  }

  .contacts-banner .banner-description {
    font-size: 16px;
  }

  .contacts-main {
    padding: 56px 0 72px;
  }

  .contacts-section {
    margin-bottom: 62px;
  }

  .section-title {
    font-size: 32px;
  }

  .contacts-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .form-container {
    padding: 24px;
  }

  .map-container {
    height: 360px;
  }

  .map-overlay {
    left: 14px;
    right: 14px;
  }

  .map-overlay .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
