/* ============================================================
   FOOTER (Figma node 4:17851 "Bottom")
   Full-bleed white background; content constrained by .container.
   Vertical rhythm (Figma): columns -> 40px -> divider -> 32px ->
   bottom bar -> 60px -> big logo.
   ============================================================ */
.footer {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  padding: 40px 0 60px;
}

.footer__container {
  display: flex;
  flex-direction: column;
  gap: 60px;            /* gap between upper block and big logo */
}

/* upper block groups the columns row, divider and bottom bar */
.footer__upper {
  display: flex;
  flex-direction: column;
  gap: 32px;            /* divider -> bottom bar */
}

/* ---- top: aside (info+form) + menu columns ---- */
.footer__content {
  display: flex;
  align-items: flex-start;
  gap: clamp(40px, 8vw, 115px);
}

/* divider sits 40px below the columns row */
.footer__divider {
  border: 0;
  border-top: 1px solid var(--border-primary);
  width: 100%;
  margin: 8px 0 0;      /* 32px upper-gap + 8px = 40px below columns */
}

/* ============================================================
   LEFT ASIDE — contacts + subscribe
   ============================================================ */
.footer__aside {
  flex: 0 0 415px;
  max-width: 415px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.footer__info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font: 400 16px/1.25 'Geologica', sans-serif;
  color: var(--text-secondary);
}
.footer__info p { margin: 0; }
.footer__address { color: var(--text-secondary); }
.footer__address b { font-weight: 700; color: var(--text-primary); }

.footer__phone-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer__phone {
  color: var(--text-accent);
  text-decoration: underline;
  white-space: nowrap;
}
/* small "copy" glyph next to the phone (matches Figma Icons24) */
.footer__copy-ico {
  position: relative;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.footer__copy-ico::before,
.footer__copy-ico::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 12px;
  border: 1.5px solid var(--text-accent);
  border-radius: 3px;
}
.footer__copy-ico::before { left: 0; top: 2px; }
.footer__copy-ico::after  { left: 4px; top: -1px; background: var(--bg-tertiary); }

.footer__delivery b { font-weight: 700; color: var(--text-primary); }

/* ---- subscribe form ---- */
.footer__subscribe {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.footer__subscribe-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer__subscribe-title {
  margin: 0;
  font: 700 32px/1 'Rubik', sans-serif;
  letter-spacing: -0.768px;
  color: var(--bg-primary);
}
.footer__subscribe-text {
  margin: 0;
  max-width: 380px;
  font: 400 16px/1.25 'Geologica', sans-serif;
  color: var(--text-primary);
}

.footer__field {
  display: block;
  background: rgba(17, 30, 63, 0.04);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-pill);
  padding: 14px 16px;
}
.footer__field input {
  width: 100%;
  border: none;
  outline: none;
  background: none;
  font: 400 14px/1.15 'Geologica', sans-serif;
  color: var(--text-primary);
}
.footer__field input::placeholder { color: var(--text-tertiary); }

.footer__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  background: var(--teal);
  color: var(--text-primary-inverse);
  border-radius: var(--radius-pill);
  font: 400 16px/1.25 'Geologica', sans-serif;
}
.footer__submit-arrow {
  width: 20px;
  height: 20px;
  position: relative;
}
/* diagonal up-right arrow */
.footer__submit-arrow::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 11px;
  height: 11px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
}
.footer__submit-arrow::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 13px;
  width: 13px;
  height: 2px;
  background: currentColor;
  transform: rotate(-45deg);
  transform-origin: right center;
}

/* ============================================================
   MENU COLUMNS
   ============================================================ */
.footer__menus {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: clamp(24px, 3.5vw, 56px);
}
.footer__col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
/* Каталог holds two link sub-lists, so it needs more room than the
   single-list columns */
.footer__col--catalog { flex-grow: 1.9; }
.footer__col-title {
  margin: 0;
  font: 500 24px/1.1 'Geologica', sans-serif;
  letter-spacing: -0.18px;
  color: var(--bg-primary);
}

/* Каталог has two stacked link lists side by side */
.footer__catalog-lists {
  display: flex;
  gap: clamp(20px, 2vw, 32px);
}
.footer__catalog-lists .footer__links { flex: 1 1 0; min-width: 0; }

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font: 400 16px/1.25 'Geologica', sans-serif;
}
.footer__links li { margin: 0; }
.footer__links a {
  color: var(--text-secondary);
  transition: color .15s ease;
}
.footer__links a:hover { color: var(--text-accent); }

/* Caps styling to match Figma (catalog items are uppercase except 1st) */
.footer__col--catalog .footer__links a { text-transform: uppercase; }
.footer__col--catalog .footer__links li:first-child a { text-transform: none; }

/* ============================================================
   BOTTOM BAR — legal + social
   ============================================================ */
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.footer__legal {
  display: flex;
  flex-direction: column;
  font: 400 14px/1.15 'Geologica', sans-serif;
  color: var(--text-secondary);
}
.footer__legal p { margin: 0; }
.footer__legal-links a {
  color: var(--text-secondary);
  text-decoration: underline;
  display: block;
}
.footer__legal-links a:hover { color: var(--text-accent); }

.footer__socials {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.footer__social {
  display: block;
  width: 44px;
  height: 44px;
}
.footer__social img { width: 44px; height: 44px; display: block; }

/* ============================================================
   BIG BRAND LOGO
   ============================================================ */
.footer__logo {
  width: 100%;
}
.footer__logo img {
  width: clamp(280px, 28vw, 389px);
  height: auto;
  display: block;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  /* aside drops to full row above the menus */
  .footer__content { flex-wrap: wrap; }
  .footer__aside { flex-basis: 100%; max-width: none; }
  .footer__menus { flex: 1 1 100%; }
}

@media (max-width: 768px) {
  .footer__menus { flex-wrap: wrap; row-gap: 40px; }
  .footer__col { flex: 1 1 40%; min-width: 220px; }
  .footer__col--catalog { flex-basis: 100%; }
}

@media (max-width: 600px) {
  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .footer { padding: 32px 0 40px; }
  .footer__subscribe-title { font-size: 28px; }
  .footer__catalog-lists { flex-direction: column; gap: 8px; }
  .footer__menus { flex-direction: column; row-gap: 32px; }
  .footer__col { flex-basis: 100%; min-width: 0; }
  .footer__logo img { width: min(100%, 280px); }
}

/* ============================================================
   НОВЫЙ ФУТЕР (molecmag style)
   ============================================================ */
.mm-footer { background: var(--bg-tertiary); border-top: 1px solid rgba(27,29,34,.08); margin-top: 0; padding: clamp(40px,5vw,60px) 0 26px; }
.mm-footer__top { display: grid; grid-template-columns: 1.25fr 2fr; gap: clamp(28px,3vw,56px); }
.mm-footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px,2vw,32px); }
.mm-footer__logo { display: inline-block; }
.mm-footer__logo img { width: 152px; height: 36px; display: block; }
.mm-footer__tagline { font: 400 14px/1.55 'Geologica', sans-serif; color: var(--text-secondary); margin: 18px 0 20px; max-width: 310px; }
.mm-footer__contacts { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 9px; font: 400 14px 'Geologica', sans-serif; color: var(--text-secondary); }
.mm-footer__contacts a { color: var(--text-primary); text-decoration: none; transition: color .15s; }
.mm-footer__contacts a:hover { color: var(--teal); }
.mm-footer__socials { display: flex; flex-wrap: wrap; gap: 10px; }
.mm-footer__social { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--bg-primary-bg); color: var(--text-secondary); border: 1px solid rgba(27,29,34,.08); transition: background .15s, color .15s, border-color .15s, transform .15s; }
.mm-footer__social svg { width: 20px; height: 20px; display: block; }
.mm-footer__social:hover { background: var(--teal); color: #fff; border-color: var(--teal); transform: translateY(-2px); }
.mm-footer__col-title { font: 600 15px 'Rubik', sans-serif; color: var(--text-primary); margin: 2px 0 16px; }
.mm-footer__links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.mm-footer__links a { font: 400 14px/1.35 'Geologica', sans-serif; color: var(--text-secondary); text-decoration: none; transition: color .15s; }
.mm-footer__links a:hover { color: var(--teal); }
.mm-footer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: clamp(28px,3vw,40px); padding-top: 22px; border-top: 1px solid rgba(27,29,34,.08); }
.mm-footer__copy { font: 400 13px 'Geologica', sans-serif; color: var(--text-tertiary); margin: 0; }
.mm-footer__legal { display: flex; flex-wrap: wrap; gap: 20px; margin: 0; }
.mm-footer__legal a { font: 400 13px 'Geologica', sans-serif; color: var(--text-secondary); text-decoration: none; transition: color .15s; }
.mm-footer__legal a:hover { color: var(--teal); }
@media (max-width: 920px) {
  .mm-footer__top { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 520px) {
  .mm-footer__cols { grid-template-columns: 1fr 1fr; gap: 24px; }
  .mm-footer__bottom { flex-direction: column; align-items: flex-start; }
}
