/* CUSTOM PROPS  */
:root {
  --text-color: #111517;
  --body-bg-color: #fafafa;
  --element-bg: #fff;
}

/* FONTS  */
@font-face {
  font-family: 'Nunito Sans 7pt Condensed';
  src: url('../fonts/NunitoSans7ptCondensed-ExtraBold.woff2') format('woff2'),
    url('../fonts/NunitoSans7ptCondensed-ExtraBold.woff') format('woff');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Nunito Sans 7pt Condensed';
  src: url('../fonts/NunitoSans7ptCondensed-Light.woff2') format('woff2'),
    url('../fonts/NunitoSans7ptCondensed-Light.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Nunito Sans 7pt Condensed';
  src: url('../fonts/NunitoSans7ptCondensed-Regular.woff2') format('woff2'),
    url('../fonts/NunitoSans7ptCondensed-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Nunito Sans 7pt Condensed';
  src: url('../fonts/NunitoSans7ptCondensed-SemiBold.woff2') format('woff2'),
    url('../fonts/NunitoSans7ptCondensed-SemiBold.woff') format('woff');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

.dark-mode {
  --element-bg: #2b3844;
  --text-color: #fff;
  --body-bg-color: #202c36;
}

/* GLOBAL */
html {
  box-sizing: border-box;
  height: 100%;
  scroll-behavior: smooth;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  height: 100%;
  display: flex;
  flex-direction: column;
  font-family: 'Nunito Sans', 'Arial', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-color);
  background-color: var(--body-bg-color);
  margin: 0;
  padding: 0;
  transition: color 0.4s ease,
    background-color 0.4s ease;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1320px;
  padding-left: 20px;
  padding-right: 20px;
  margin-left: auto;
  margin-right: auto;
}

/* MAIN-CONTENT */
.main-content {
  flex-grow: 1;
}

.main-content-inner {
  padding-top: 80px;
}

/* SITE-HEADER  */
.site-header {
  padding-top: 24px;
  padding-bottom: 24px;
  background-color: var(--element-bg);
  box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.06);
  transition: color 0.4s ease,
    background-color 0.4s ease;
}

.site-header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  white-space: nowrap;
}

.site-header-logo {
  font-size: 24px;
  line-height: normal;
  font-weight: 800;
  color: var(--text-color);
}

.site-header-logo:hover {
  opacity: 0.8;
}

.site-header-logo:active {
  opacity: 0.6;
}

.site-header-theme-toggler {
  padding: 0;
  border: 0;
  background-color: transparent;
  cursor: pointer;
}

.site-header-theme-toggler:hover {
  opacity: 0.8;
}

.site-header-theme-toggler:active {
  opacity: 0.6;
}

.site-header-theme-toggler-inner {
  display: flex;
  align-items: center;
  color: var(--text-color);
}

.site-header-theme-toggler-text {
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
  margin-left: 8px;
}

/* MAIN CONTENT  */
.main-content {
  padding: 48px 0;
}

.site-search-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 48px;
}

.site-search {
  width: 100%;
  max-width: 480px;
  padding-top: 18px;
  padding-bottom: 18px;
  padding-left: 74px;
  padding-right: 10px;
  border: 0;
  background-color: var(--element-bg);
  background-image: url(../img/search.svg);
  background-repeat: no-repeat;
  background-position: left 32px center;
  color: var(--text-color);
  font-size: 14px;
  line-height: 20px;
  border-radius: 5px;
  box-shadow: 0px 2px 9px 0px rgba(0, 0, 0, 0.05);
}

.site-select {
  border: 0;
  min-width: 200px;
  padding: 18px 24px;
  color: var(--text-color);
  background-color: var(--element-bg);
  font-size: 14px;
  line-height: 20px;
  border-radius: 5px;
  box-shadow: 0px 2px 9px 0px rgba(0, 0, 0, 0.05);
}

/* INDEX COUNTRIES  */
.index-countries-list {
  display: flex;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
  margin-left: -75px;
  margin-bottom: -75px;
  list-style-type: none;
}

.index-countries-item {
  display: flex;
  flex-direction: column;
  width: calc(25% - 75px);
  margin-left: 75px;
  margin-bottom: 75px;
}

.index-country {
  flex-grow: 1;
  border-radius: 5px;
  overflow: hidden;
  background-color: var(--element-bg);
  color: var(--text-color);
  box-shadow: 0px 0px 7px 2px rgba(0, 0, 0, 0.03);
}

.index-country-flag {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.index-country-info {
  padding: 24px 24px 48px;
}

.index-country-name {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 18px;
  line-height: 26px;
  font-weight: 800;
}

.index-countr-link {
  color: var(--text-color);
}

.index-country-details {
  margin: 0;
}

.index-coutry-details-item {
  display: flex;
  flex-wrap: wrap;
}

.index-coutry-details-item:not(:last-child) {
  margin-bottom: 8px;
}

.index-country-details-title {
  font-weight: 600;
}

.index-country-details-value {
  margin-left: 4px;
}


/* COUNTRY-PAGE  */
.countr-page-back-wrapper {
  margin-bottom: 80px;
}

.countr-page-back-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 40px;
  background-color: var(--element-bg);
  color: var(--text-color);
  border-radius: 6px;
  box-shadow: 0px 0px 7px 0px rgba(0, 0, 0, 0.29);
}

.countr-page-back-link:hover {
  opacity: 0.8;
}

.countr-page-back-link:active {
  opacity: 0.6;
}

.country-page-back-icon {
  margin-right: 10px;
  width: 20px;
  height: 20px;
}

.country-page-back-text {
  font-size: 16px;
  line-height: 20px;
}

.country-page-flag-info {
  display: flex;
}

.country-page-flag {
  width: 560px;
  height: 400px;
  object-fit: cover;
  margin-right: 120px;
  border-radius: 10px;
  box-shadow: 0px 0px 14px 4px rgba(0, 0, 0, 0.03);
}

.country-page-info {
  width: 600px;
  padding-top: 40px;
}

.country-page-title {
  margin-top: 0;
  margin-bottom: 24px;
  font-size: 32px;
  line-height: 44px;
  font-weight: 800;
}

.country-page-dls-wrapper {
  display: flex;
  justify-content: space-between;
  margin-bottom: 70px;
}

.country-page-details {
  width: 250px;
}

.country-page-details-item {
  display: flex;
}

.country-page-details-item:not(:last-child) {
  margin-bottom: 12px;
}

.country-page-details-title {
  margin-right: 4px;
  font-weight: 600;
}

.country-page-details-value {
  margin: 0;
  font-weight: 300;
}

.country-page-border-countries {
  display: flex;
  align-items: center;
}

.country-page-border-countries-heading {
  margin: 0;
  margin-right: 15px;
  font-weight: 600;
  font-size: 16px;
  line-height: 20px;
}

.country-page-border-countries-list {
  display: flex;
  flex-wrap: wrap;
}

.country-page-border-countries-link {
  min-width: 96px;
  padding: 5px 10px;
  margin-top: 4px;
  margin-bottom: 4px;
  background-color: var(--element-bg);
  color: var(--text-color);
  text-align: center;
  border-radius: 2px;
  box-shadow: 0px 0px 4px 1px rgba(0, 0, 0, 0.10);
  transition: color 0.4s ease,
    background-color 0.4s ease;
}

.country-page-border-countries-link:not(:last-child) {
  margin-right: 10px;
}

.country-page-border-countries-link:hover {
  opacity: 0.8;
}

.country-page-border-countries-link:hover {
  opacity: 0.6;
}


/* RESPONSIVE PAGE */

@media only screen and (max-width: 400px) {

  /* SITE-HEADER */
  .site-header {
    padding-top: 30px;
    padding-bottom: 30px;
  }

  .site-header-logo {
    font-size: 14px;
  }

  .site-header-theme-toggler-text {
    font-size: 12px;
  }

  /* SITE-MAIN */
  .site-search-select {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
  }

  .site-search {
    margin-bottom: 40px;
  }

  .site-search {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .index-countries-list {
    flex-direction: column;
    margin: 0;
  }

  .index-countries-item {
    width: 100%;
    max-width: 264px;
    margin: 0 auto;
  }

  .index-countries-item:not(:last-child) {
    margin-bottom: 40px;
  }
}