.home-footer {
  width: 100%;
  min-height: 100svh;
  background: var(--surface-muted);
  padding: clamp(1rem, 2.8vw, 2rem) clamp(1rem, 6vw, 5rem) clamp(0.8rem, 2vw, 1.3rem);
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: clamp(0.75rem, 1.5vw, 1rem);
}

.home-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
  gap: clamp(0.8rem, 2vw, 1.5rem);
}

.home-footer__brand-col {
  display: grid;
  align-content: start;
  gap: clamp(0.4rem, 1vw, 0.65rem);
}

.home-footer__logo {
  line-height: 0;
  text-decoration: none;
  justify-self: start;
}

.home-footer__logo-image {
  width: clamp(7.8rem, 12.5vw, 11rem);
  height: auto;
  display: block;
}

.home-footer__phone {
  font-size: clamp(1rem, 1.75vw, 1.45rem);
  line-height: 1.1;
  color: var(--text-primary);
  text-decoration: none;
}

.home-footer__phone-caption {
  margin: 0;
  font-size: clamp(0.68rem, 0.9vw, 0.8rem);
  color: var(--text-muted);
}

.home-footer__socials {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.home-footer__social {
  width: clamp(1.6rem, 2.1vw, 2rem);
  height: clamp(1.6rem, 2.1vw, 2rem);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.33rem;
  background: var(--surface-elevated);
  border: 1px solid var(--border-strong);
  text-decoration: none;
}

.home-footer__social-icon {
  width: 62%;
  height: 62%;
  object-fit: contain;
  display: block;
}

.home-footer__cols {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(0.65rem, 1.4vw, 1rem);
}

.home-footer__col {
  min-width: 0;
}

.home-footer__col-title {
  margin: 0;
}

.home-footer__col-details {
  border: none;
}

.home-footer__col-summary {
  list-style: none;
  cursor: default;
  padding: 0;
  margin: 0;
}

.home-footer__col-summary::-webkit-details-marker {
  display: none;
}

.home-footer__col-title a {
  color: var(--site-accent);
  font-size: clamp(0.86rem, 1.05vw, 0.98rem);
  line-height: 1.2;
  text-decoration: none;
  font-weight: 600;
}

.home-footer__col-title a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.home-footer__col-list {
  margin: clamp(0.4rem, 0.9vw, 0.6rem) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.24rem;
}

.home-footer__col-list a {
  color: var(--text-secondary);
  font-size: clamp(0.66rem, 0.8vw, 0.74rem);
  line-height: 1.35;
  text-decoration: none;
}

.home-footer__col-list a:hover {
  color: var(--site-accent);
  opacity: 1;
}

.home-footer__divider {
  width: 100%;
  height: 1px;
  background: var(--border-default);
}

.home-footer__bottom {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(0.85rem, 1.8vw, 1.25rem);
  min-height: clamp(15rem, 34vh, 21rem);
}

.home-footer__contacts {
  display: grid;
  gap: 0.5rem;
}

.home-footer__contact-line p {
  margin: 0;
  font-size: clamp(0.94rem, 1.35vw, 1.08rem);
  line-height: 1.22;
  color: var(--text-primary);
}

.home-footer__contact-line a {
  display: inline-block;
  margin-top: 0.15rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: clamp(0.84rem, 1.18vw, 1.02rem);
  line-height: 1.18;
}

.home-footer__contact-line a:hover {
  color: var(--site-accent);
}

.home-footer__map {
  min-width: 0;
}

.home-footer__map-canvas {
  width: 100%;
  height: clamp(15rem, 34vh, 21rem);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}

.home-footer__map-canvas .ymaps-2-1-79-map {
  filter: saturate(0.4) contrast(0.95) brightness(1.03);
}

.home-footer__map-canvas::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgba(235, 235, 233, 0.18);
}

.home-footer__map-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.home-footer__map-canvas--error {
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.home-footer__copyright {
  align-self: end;
  margin-top: auto;
  padding-top: 0.4rem;
  font-size: clamp(0.58rem, 0.76vw, 0.68rem);
  color: var(--text-muted);
}

@media (max-width: 1100px) {
  .home-footer {
    min-height: 0;
  }

  .home-footer__top {
    grid-template-columns: 1fr;
  }

  .home-footer__cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-footer__bottom {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .home-footer {
    min-height: 0;
    padding: 0.9rem clamp(0.75rem, 3.4vw, 1rem) 0.9rem;
    gap: 0.6rem;
    grid-template-rows: auto auto auto auto;
  }

  .home-footer__cols {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    column-gap: 0.55rem;
    row-gap: 0.65rem;
  }

  .home-footer__col--sunglasses {
    grid-column: 1 / span 3;
    grid-row: 1;
  }

  .home-footer__col--frames {
    grid-column: 4 / span 3;
    grid-row: 1;
  }

  .home-footer__col--lenses {
    grid-column: 1 / span 2;
    grid-row: 2;
  }

  .home-footer__col--accessories {
    grid-column: 3 / span 2;
    grid-row: 2;
  }

  .home-footer__col--feed {
    grid-column: 5 / span 2;
    grid-row: 2;
  }

  .home-footer__col-list li:nth-child(n + 5) {
    display: none;
  }

  .home-footer__col-details {
    border-bottom: 1px solid var(--border-default);
  }

  .home-footer__col-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 0.55rem 0;
  }

  .home-footer__col-summary::after {
    content: '+';
    font-size: 1rem;
    line-height: 1;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-left: 0.5rem;
  }

  .home-footer__col-details[open] .home-footer__col-summary::after {
    content: '−';
  }

  .home-footer__col-list {
    margin-top: 0;
    padding-bottom: 0.45rem;
  }

  .home-footer__bottom {
    min-height: 0;
    gap: 0.65rem;
  }

  .home-footer__contacts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 0.75rem;
    row-gap: 0.32rem;
  }

  .home-footer__contact-line {
    display: grid;
    gap: 0.06rem;
    min-width: 0;
  }

  .home-footer__contact-line p {
    font-size: 0.72rem;
    line-height: 1.25;
    font-weight: 500;
  }

  .home-footer__contact-line a {
    margin-top: 0;
    font-size: 0.68rem;
    line-height: 1.2;
    word-break: break-all;
  }

  .home-footer__map-canvas {
    height: clamp(10rem, 35vh, 14rem);
  }

  .home-footer__social {
    width: 1.55rem;
    height: 1.55rem;
  }
}

@media (max-width: 520px) {
  .home-footer__cols {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      'sun frames'
      'lenses lenses'
      'accessories accessories'
      'feed feed';
  }

  .home-footer__col--sunglasses {
    grid-area: sun;
    grid-column: auto;
    grid-row: auto;
  }

  .home-footer__col--frames {
    grid-area: frames;
    grid-column: auto;
    grid-row: auto;
  }

  .home-footer__col--lenses {
    grid-area: lenses;
    grid-column: auto;
    grid-row: auto;
  }

  .home-footer__col--accessories {
    grid-area: accessories;
    grid-column: auto;
    grid-row: auto;
  }

  .home-footer__col--feed {
    grid-area: feed;
    grid-column: auto;
    grid-row: auto;
  }

  .home-footer__contacts {
    grid-template-columns: 1fr;
    row-gap: 0.28rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-footer__col-title a,
  .home-footer__col-list a,
  .home-footer__contact-line a {
    transition: none;
  }
}
