/* 1. Enable smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* 2. Make nav sticky */
.country-listing-wrapper>nav {
  position: sticky;
  top: 0;
  align-self: start;
}

/* 3. ScrollSpy active styles (see JS tab for activation) */
.country-listing li.active>a {
  color: var(--grey-02);
  font-weight: 500;
}

/* Sidebar Navigation */

.country-listing-wrapper .country-listing {
  z-index: 9;
  margin: auto;
  padding: 20px 0;
  top: 62px;
  display: block;
}

.country-listing a {
  border-radius: 8px;
  padding: 4px;
  font-family: 'RocheSans-Regular';
  border: 1px solid var(--grey-05);
  text-decoration: none;
  color: var(--grey-02);
  min-width: fit-content;
  box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
  background: var(--white);
  /* This small transition makes setting of the active state smooth */
}

.country-listing a {
  text-decoration: none;
  display: block;
  padding: 10px 16px;
  color: var(--grey-02);
  transition: none;
}

.country-listing li {
  margin-left: 10px;
  display: inline-flex;
  text-align: center;
}

.country-listing li {
  margin-bottom: 10px;
  margin-left: 3px;
}

.country-listing a:hover,
.country-listing a:focus {
  color: var(--acBlueText);
  transition: none;
}

.country-listing a:hover,
.country-listing a:focus {
  border-color: var(--acBlueShade);
  box-shadow: none;
  background-color: var(--white);
  color: var(--acBlueText);
  text-decoration: none;
}

.country-listing-wrapper {
  margin: 0 auto;
}

.country-listing-section section {
  padding-top: 20px;
}

/* Container for flexboxes */
.continent {
  display: flex;
  flex-wrap: wrap;
}

/* Create four equal columns */
.country {
  flex: 50%;
  margin-bottom: 20px;
}

.country-listing-wrapper section {
  border-bottom: 1px solid var(--grey-05);
  padding-bottom: 15px;
}

.country-listing-wrapper section:last-child {
  border: none;
}

/* On screens that are 992px wide or less, go from four columns to two columns */
@media screen and (min-width: 768px) {
  .country {
    flex: 25%;
    flex-grow: 0;
  }
}

.outer {
  position: relative;
}

.outer>a {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
}

.inner {
  position: relative;
  pointer-events: none;
  z-index: 1;
}

.inner a {
  pointer-events: all;
}

.country-list {
  text-align: center;
  align-items: center;
}

.country-flag {
  display: inline-flex;
}

.country-flag {
  background: var(--white);
  display: inline-flex;
  width: 36px;
  height: 24px;
  overflow: hidden;
  position: relative;
}

span.flag {
  text-align: center;
  width: 44px;
  height: 30px;
  margin-top: 0px;
  position: absolute;
}

.continent-heading {
  margin-bottom: 20px;
}
.continent-heading {
  font-size: 22px;
  font-weight: 400;
  line-height: 1.1;
  font-family: "RocheSans-Medium";
  text-align: center;
}

.country-block-flag {
  display: flex;
  width: max-content;
  justify-content: center;
  align-items: center;
}

.country-flag img {
  border-radius: 40px;
}

.country-text {
  padding-left: 0;
  font-size: 14px;
}

.country-language a {
  font-size: 14px;
  color: var(--grey-03);
}

.country-language-title {
  font-size: 16px;
}

.country-language-title a {
  color: var(--grey-02);
}

@media (min-width:768px) {
  .country-list {
    display: flex;
  }

  .continent-heading {
    text-align: left;
  }

  .country-text {
    text-align: left;
    padding-left: 10px;
  }

}

.country-name {
  font-size: 16px;
}

.country-language a:hover {
  color: var(--acBlueShade);
}

.country-language a:before {
  content: "|";
  display: inline-block;
  color: var(--grey-03);
  font-size: 13px;
  margin-top: 3px;
  padding: 0 5px;
}

.country-language a:first-child:before {
  content: none;
}

@media(min-width: 768px) {
  .country-listing-wrapper .country-listing {
    top: 65px;
    text-align: center;
  }
  .country-listing ul,
  .country-listing ol {
    white-space: nowrap;
    overflow-x: auto;
  }
}

.country-listing ul,
.country-listing ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

section {
  padding-top: 40px;
  scroll-margin: 150px;
}

@media (max-width: 767px) {
  .country-listing a {
    padding: 5px 12px;
  }
  .country-listing-section section {
    scroll-margin: 250px;
  }
  .country-listing li {
    margin-bottom: 5px;
  }
  .country-listing-wrapper .country-listing {
    background: var(--white);
    padding-bottom: 5px;
  }
}

.country-listing li.selected a {
  background: var(--acBlueShade);
  color: var(--white);
}

.footer-main .country-flag {
  margin-right: 10px;
}
