/* =========================================================
   FOOTER — макет: top row (logo + menu), rule, bottom row
   ========================================================= */

.sp-footer{
  background:#fff;
  color:#7c6e60;
  font-family:"Source Sans 3", sans-serif;
  font-size:12px;
}

.sp-footer .sp-container{
  margin-inline:auto;
  max-width:75%;
  padding-inline:clamp(16px, 4vw, 56px);
}

@media (max-width: 768px){
  .sp-footer .sp-container{ max-width:90% !important; }
}

.sp-footer__inner{ padding:22px 0; }

.sp-footer__rule{
  width:100%;
  height:0;
  border-top:1px solid rgba(195,150,98,.45);
}
.sp-footer__rule--top{
  margin:0 0 14px;
  border-top-color: rgba(195,150,98,.55);
}
.sp-footer__rule--mid{
  margin:14px 0 14px;
}

/* ===== TOP ROW: logo + menu (menu right next to logo, not centered) ===== */
.sp-footer__toprow{
  display:grid;
  grid-template-columns:auto minmax(0, 1fr);
  align-items:center;
  column-gap:clamp(16px, 2.4vw, 32px);
}

.sp-footer__logo{ display:flex; align-items:center; }
.sp-footer__logo img{
  height:44px;
  width:auto;
  display:block;
}

/* menu area */
.sp-footer__menu{
  min-width:0;
}

/* IMPORTANT: one line; if not enough width -> horizontal scroll, not wrap */
.sp-footer__menu-list{
  list-style:none;
  margin:0;
  padding:0;

  display:flex;
  justify-content:flex-end;   /* <<< рядом с лого, влево */
  align-items:center;

  flex-wrap:nowrap;
  white-space:nowrap;

  gap:clamp(10px, 1.6vw, 22px);
  text-transform:uppercase;
  letter-spacing:.10em;
  font-size:clamp(10px, .85vw, 11px);
  line-height:16px;

  overflow-x:auto;              /* <<< спасает от “каши” */
  overflow-y:hidden;
  -webkit-overflow-scrolling:touch;

  scrollbar-width:none;
}
.sp-footer__menu-list::-webkit-scrollbar{ display:none; }

.sp-footer__menu-list > li{ flex:0 0 auto; }

.sp-footer__menu-link{
  color:#7c6e60;
  text-decoration:none;
}
.sp-footer__menu-link:hover{ color:#c39662; }

/* ===== BOTTOM ROW: left meta, right contacts ===== */
.sp-footer__bottomrow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  width:100%;                  /* <<< чтобы низ был “в одном контейнере” */
}

.sp-footer__meta{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:nowrap;
  white-space:nowrap;
  font-size:11px;
  line-height:16px;
  color:rgba(124,110,96,.95);
}

.sp-footer__sep{ color:rgba(195,150,98,.85); }

.sp-footer__contactsrow{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:18px;
  flex-wrap:nowrap;
  white-space:nowrap;
}

.sp-footer__cap{
  text-transform:uppercase;
  letter-spacing:.10em;
  font-size:11px;
  line-height:16px;
  color:#7c6e60;
}

.sp-footer__link{
  color:#7c6e60;
  text-decoration:underline;
  text-underline-offset:2px;
}
.sp-footer__link:hover{ color:#c39662; }

/* ===== “anti-cringe” for tablet widths: switch to mobile earlier ===== */
@media (max-width: 900px){
  .sp-footer__inner{ padding:18px 0; }

  .sp-footer__toprow{
    grid-template-columns:1fr;
    row-gap:14px;
    justify-items:center;
    text-align:center;
  }


  .sp-footer__contactsrow{ order: 1; }
  .sp-footer__meta{ order: 2; }

  /* menu -> column */
  .sp-footer__menu-list{
    flex-direction:column;
    align-items:center;
    white-space:normal;
    overflow:visible;
    gap:14px;
  }

  .sp-footer__bottomrow{
    flex-direction:column;
    align-items:center;
    gap:14px;
  }

  .sp-footer__contactsrow{
    flex-direction:column;
    align-items:center;
    gap:10px;
    white-space:normal;
  }

  .sp-footer__meta{
    flex-direction:column;
    align-items:center;
    gap:6px;
    white-space:normal;
    text-align:center;
  }

  .sp-footer__sep{ display:none; }
}