/*
 * Site footer: dark area with 4 columns, bottom bar with "Powered by" and the to-top button.
 * Values measured on the live site at 375 / 768 / 1024 / 1366 / 1920 px.
 */

.site-footer {
  padding: 30px 0;
  background: var(--color-dark);
  color: var(--color-footer-text);
}

.site-footer-inner {
  margin: 50px 0;
  padding: 0 25px;
}

.footer-container {
  max-width: var(--layout-inner-container);
  margin: 0 auto;
}

/* 1 column, 2 from 768px, 4 from 960px */
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  margin-left: -25px;
}

.footer-col {
  width: 100%;
  padding: 15px;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .footer-col { width: 50%; }
}

@media (min-width: 960px) {
  .footer-col { width: 25%; }

  /* thin line on the left of columns 2–4 */
  .footer-col-line { border-left: 3px solid var(--color-footer-text); }
}

@media (min-width: 1220px) {
  .footer-grid { margin-left: -35px; }
}

/* Column 1: logo and social icons */
.footer-logo img {
  display: block;
}

.footer-social {
  margin-top: 40px;
}

.footer-social img {
  width: 30px;
  margin: 0 5px 5px;
}

@media (min-width: 1025px) {
  .footer-social img {
    width: 25px;
    margin: 0 0 5px;
  }
}

/* Column titles */
.footer-title {
  margin: 0;
  font-size: var(--size-md);
  font-weight: var(--weight-bold);
  line-height: var(--leading-base);
  color: var(--color-white);
}

.footer-title-tight {
  margin-bottom: 10px;
  line-height: var(--leading-tight);
}

/* Column 2: links with icons */
.footer-links {
  margin: 5px 0 10px -19px;
  padding: 0;
  list-style: none;
}

.footer-links li + li {
  margin-top: 5px;
  padding-top: 5px;
}

.footer-links a {
  margin-left: 20px;
  color: var(--color-white);
}

.footer-links a:hover {
  color: var(--color-white);
}

/* the last link (long text) wraps with a hanging indent */
.footer-links li:last-child a {
  display: block;
  padding-left: 20px;
  text-indent: -20px;
}

/* Column 3: map */
#map {
  width: 100%;
  height: var(--layout-map-height);
  overflow: hidden;
}

/* Column 4: contact */
.footer-contact p {
  margin: 0 0 10px;
  font-size: var(--size-sm);
  color: var(--color-white);
}

.footer-contact img {
  margin-right: 5px;
}

.footer-contact a,
.footer-contact a:hover {
  color: inherit;
}

/* ---------- Bottom bar ---------- */

.footer-bar {
  position: relative;
  padding: 20px 30px;
  background: var(--color-darker);
  color: var(--color-footer-bar-text);
  text-align: center;
}

.footer-bar p {
  margin: 0;
  color: #cccccc;
}

@media (min-width: 960px) {
  .footer-bar { text-align: left; }
}

@media (max-width: 767px) {
  .footer-bar img {
    display: block;
    margin: 0 auto;
  }
}

/* To-top button: dark square on the right with an arrow (our own SVG) */
.to-top::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='14' viewBox='0 0 16 14'%3E%3Cpath d='M1 9l7-7 7 7-1.5 1.5L8 5l-5.5 5.5z' fill='%23fff' fill-opacity='.8'/%3E%3C/svg%3E") 50% 0 no-repeat;
}

@media (min-width: 767px) {
  .to-top {
    position: absolute;
    top: 0;
    right: 0;
    width: 70px;
    height: 100%;
    border-radius: 0 0 4px;
    background: var(--color-dark);
  }

  .to-top::after {
    top: 50%;
    display: block;
    width: 100%;
    margin-top: -8px;
    transition: margin 0.2s;
  }

  .to-top:hover::after {
    margin-top: -12px;
  }

  .to-top::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 0;
    margin-left: -1px;
    transition: height 0.25s, margin 0.25s;
  }

  .to-top:hover::before {
    height: 16px;
    margin-top: -8px;
    background: var(--color-white);
  }
}

@media (max-width: 766px) {
  .to-top {
    margin-bottom: 20px;
  }

  .to-top::after {
    top: 7px;
  }
}
