/* ============================================================
   CARD TECHNOLOGY — footer.css
   ============================================================ */

.footer {
  background: #f9f9f9;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* ─── ВЕРХНЯЯ ЧАСТЬ ─── */
.footer__top {
  padding: 48px 0 36px;
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 40px;
}

.footer__logo {
  height: 40px;
  width: auto;
  margin-bottom: 16px;
  display: block;
}
.footer__tagline {
  font-size: 13px;
  line-height: 1.65;
  margin-bottom: 20px;
  color: var(--muted);
}
.footer__socials {
  display: flex;
  gap: 8px;
}
.footer__soc {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--red);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  transition: background .15s, transform .15s;
}
.footer__soc:hover { background: var(--red-dark); transform: scale(1.08); }
.footer__soc svg { width: 17px; height: 17px; }
.footer__soc img { width: 17px; height: 17px; filter: brightness(10); }

/* ─── КОЛОНКИ ССЫЛОК ─── */
.footer__col-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 14px;
}
.footer__links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer__link {
  font-size: 14px;
  color: var(--ink2);
  transition: color .15s;
  line-height: 1.4;
}
.footer__link:hover { color: var(--red); }

/* ─── НИЖНЯЯ ЧАСТЬ ─── */
.footer__bottom {
  border-top: 1px solid #ddd;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer__copy {
  font-size: 13px;
  color: var(--muted);
}
.footer__contacts {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footer__phone {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color .15s;
}
.footer__phone:hover { color: var(--red); }
.footer__email {
  font-size: 13px;
  color: var(--muted);
  transition: color .15s;
}
.footer__email:hover { color: var(--ink); }

/* ─── ПОПАП ОБРАТНОГО ЗВОНКА ─── */
.popup-cb {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
}
.popup-cb.open { display: flex; }

.popup-cb__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  cursor: pointer;
}
.popup-cb__box {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 36px 32px 28px;
  width: 100%;
  max-width: 400px;
  margin: 16px;
  box-shadow: 0 24px 80px rgba(0,0,0,.2);
}
.popup-cb__close {
  position: absolute;
  top: 14px; right: 14px;
  width: 32px; height: 32px;
  border: none; background: none;
  cursor: pointer;
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background .15s, color .15s;
}
.popup-cb__close:hover { background: #f0f0f0; color: var(--ink); }

.popup-cb__title {
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 6px;
  line-height: 1.2;
  text-align: center;
}
.popup-cb__subtitle {
  font-size: 15px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 24px;
}
.popup-cb__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.popup-cb__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.popup-cb__label {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.popup-cb__hint {
  font-size: 13px;
  color: var(--muted);
  margin-top: -2px;
}
.popup-cb__phone-wrap {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  transition: border-color .15s;
}
.popup-cb__phone-wrap:focus-within { border-color: var(--red); }
.popup-cb__flag {
  padding: 12px 12px;
  font-size: 14px;
  color: var(--ink);
  background: #f7f7f7;
  border-right: 1px solid #ddd;
  white-space: nowrap;
  user-select: none;
}
.popup-cb__input {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
  width: 100%;
  color: var(--ink);
}
.popup-cb__input:focus { border-color: var(--red); }
.popup-cb__input::placeholder { color: var(--muted); }
.popup-cb__input--phone {
  border: none;
  border-radius: 0;
  flex: 1;
  width: auto;
}
.popup-cb__input--phone:focus { border-color: transparent; }
.popup-cb__submit { width: 100%; justify-content: center; padding: 16px; font-size: 16px; margin-top: 4px; }

.popup-cb__legal {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
  text-align: center;
  line-height: 1.5;
}
.popup-cb__legal a { color: var(--muted); text-decoration: underline; }
.popup-cb__success {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  padding: 32px 0;
  line-height: 1.5;
}
.popup-cb__error {
  font-size: 13px;
  color: var(--red);
  text-align: center;
}

/* ─── ВИДЖЕТ МЕССЕНДЖЕРОВ ─── */
.msg-widget {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.msg-widget__btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 0 20px 0 16px;
  height: 52px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255,0,0,.4);
  transition: background .2s, transform .2s;
  white-space: nowrap;
}
.msg-widget__btn:hover { background: var(--red-dark); transform: scale(1.04); }
.msg-widget__ico { flex-shrink: 0; }
.msg-widget__ico--close { display: none; }
.msg-widget.open .msg-widget__ico--open  { display: none; }
.msg-widget.open .msg-widget__ico--close { display: block; }

.msg-widget__panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateY(12px) scale(.96);
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.msg-widget.open .msg-widget__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.msg-widget__item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: 50px;
  padding: 0 18px 0 8px;
  height: 48px;
  font-size: 14px;
  font-weight: 600;
  color: #222;
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
  transition: transform .15s, box-shadow .15s;
  white-space: nowrap;
}
.msg-widget__item:hover { transform: translateX(-4px); box-shadow: 0 4px 18px rgba(0,0,0,.18); }

.msg-widget__icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.msg-widget__item--phone .msg-widget__icon { background: #f0f0f0; color: #333; }
.msg-widget__item--tg    .msg-widget__icon { background: #e3f5fd; }
.msg-widget__item--wa    .msg-widget__icon { background: #e8f9ee; }
.msg-widget__item--vk    .msg-widget__icon { background: #e8f0ff; }

@media (max-width: 600px) {
  .msg-widget { bottom: 18px; right: 18px; }
  .msg-widget__btn-text { display: none; }
  .msg-widget__btn { padding: 0; width: 52px; justify-content: center; border-radius: 50%; }
  .msg-widget__label { display: none; }
  .msg-widget__item { padding: 0; width: 48px; justify-content: center; }
}

/* ─── АДАПТИВ ─── */
@media (max-width: 1100px) {
  .footer__top { grid-template-columns: 1fr repeat(3, 1fr); gap: 28px; }
}
@media (max-width: 900px) {
  .footer__top { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 600px) {
  .footer__top {
    grid-template-columns: 1fr;
    padding: 32px 0 24px;
    gap: 24px;
  }
  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .footer__contacts {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}
