/* ============================================
   CONTACTS PAGE — contacts.css
   Підключати ПІСЛЯ style.css
============================================ */

/* ── Page top title ───────────────────── */
.con-page-top {
  padding: calc(72px + 3rem) 0 1rem;
  background: var(--white);
  text-align: center;
  border-bottom: 1px solid var(--gray-200);
}

.con-page-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: .6rem;
}

.con-page-sub {
  font-size: 1rem;
  color: var(--gray-500);
  padding-bottom: 2rem;
}

/* ── Departments section ──────────────── */
.con-depts { background: var(--white); }

.depts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* ── Department card ──────────────────── */
.dept-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem 2rem;
  text-align: center;
  transition: transform .3s cubic-bezier(.34,1.4,.64,1),
              box-shadow .3s var(--ease),
              border-color .3s;
  position: relative;
  overflow: hidden;
}

.dept-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--green-600);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .3s var(--ease);
}

.dept-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(34,128,74,.13);
  border-color: var(--green-200);
}
.dept-card:hover::after { transform: scaleX(1); }

/* Icon */
.dept-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  transition: transform .3s cubic-bezier(.34,1.4,.64,1);
}
.dept-card__icon svg { width: 28px; height: 28px; }
.dept-card:hover .dept-card__icon { transform: scale(1.1) rotate(-4deg); }

.dept-card__icon--buy   { background: #e8f5ff; color: #1a73e8; }
.dept-card__icon--sales { background: #fff3e0; color: #e65100; }
.dept-card__icon--log   { background: var(--green-50); color: var(--green-600); }
.dept-card__icon--hr    { background: #fce4ec; color: #c62828; }

/* Title */
.dept-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1.1rem;
}

/* Contact links */
.dept-card__contacts {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  text-align: left;
}

.dept-contact {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .84rem;
  color: var(--gray-600);
  transition: color .2s;
  word-break: break-all;
}
.dept-contact svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--green-600);
}
.dept-contact:hover { color: var(--green-600); }

/* ── Address strip ────────────────────── */
.con-address {
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  padding: 1.75rem 0;
}

.con-address__inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.con-address__icon {
  width: 44px;
  height: 44px;
  background: var(--green-600);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
}
.con-address__icon svg { width: 20px; height: 20px; }

.con-address__label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--green-600);
  margin-bottom: .25rem;
}

.con-address__val {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
}

.con-address__hours {
  font-size: .83rem;
  color: var(--gray-500);
  margin-top: .2rem;
}

/* ── Form + Map section ───────────────── */
.con-bottom { background: var(--white); }

.con-bottom__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}

/* Form wrap */
.con-form-wrap {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
}

.con-form__title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: .4rem;
}

.con-form__sub {
  font-size: .9rem;
  color: var(--gray-500);
  margin-bottom: 1.75rem;
  line-height: 1.5;
}

.con-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.con-form__group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-bottom: 1rem;
}

.con-form__label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--gray-700);
}

.con-form__input {
  width: 100%;
  padding: .72rem 1rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .93rem;
  color: var(--gray-900);
  background: var(--white);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  appearance: none;
  -webkit-appearance: none;
}
.con-form__input:focus {
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(34,128,74,.1);
}
.con-form__input::placeholder { color: var(--gray-400); }
.con-form__input.error { border-color: #e53e3e; }

.con-form__select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23868e96' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .9rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.con-form__textarea {
  resize: vertical;
  min-height: 130px;
  line-height: 1.6;
}

.con-form__btn {
  width: 100%;
  justify-content: center;
  padding: .9rem;
  font-size: .97rem;
  margin-top: .5rem;
}

/* Success state */
.con-form__success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem 1rem;
  gap: 1rem;
}
.con-form__success.visible { display: flex; }

.con-form__success-icon {
  width: 64px;
  height: 64px;
  background: var(--green-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-600);
}
.con-form__success-icon svg { width: 28px; height: 28px; }
.con-form__success h3 { font-size: 1.4rem; font-weight: 700; color: var(--gray-900); }
.con-form__success p  { font-size: .95rem; color: var(--gray-500); max-width: 280px; }

/* Map */
.con-map {
  position: sticky;
  top: 88px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.con-map__label {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1.25rem;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  font-size: .85rem;
  font-weight: 600;
  color: var(--gray-700);
}
.con-map__label svg { width: 16px; height: 16px; color: var(--green-600); }

.con-map__iframe {
  display: block;
  width: 100%;
  height: 480px;
  border: none;
}

/* ── Responsive ───────────────────────── */
@media (max-width: 1100px) {
  .depts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .con-bottom__grid { grid-template-columns: 1fr; }
  .con-map { position: static; }
  .con-map__iframe { height: 320px; }
}

@media (max-width: 600px) {
  .depts-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .con-form__row { grid-template-columns: 1fr; }
  .con-form-wrap { padding: 1.5rem 1.25rem; }
  .dept-contact { font-size: .78rem; }
  .con-address__inner { flex-direction: column; align-items: flex-start; gap: .75rem; }
}

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