:root {
  --main-color: #FBF0E7;
  --secondary-color: #DC874B;
  --tertiary-color: #030303;
  --light-color: #E7D7CD;
}

body {
  background-color: #fffaf3;
  margin: 0;
}

.main-container {
  max-width: 918px;
  margin: 0 auto;
  box-sizing: border-box;
}

.hero-section {
  min-height: 20vh;
  background: url('./images/heading-background.png') no-repeat center center;
  background-size: cover;
  padding: 40px;
  color: #fff;
  border-top: 3px solid var(--secondary-color)
}

.hero-section-content {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column
}

.hero-section-title {
  text-transform: uppercase;
  font-size: 40px;
  font-weight: 400;
  font-family: 'Cormorant', 'san-serif';
  font-weight: 700;
}

.hero-section-description {
  text-align: center;
  font-family: 'Roboto', 'san-serif';
  font-weight: 300
}

.search-section {
  padding: 24px 0 32px;
}

.search-bar {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 873px;
  height: 48px;
  margin: 0 auto;
  background-color: #fff;
  border-radius: 8px;
  border: 1px solid var(--light-color);
  box-sizing: border-box;
}

.search-bar__icon {
  position: absolute;
  left: 16px;
  color: var(--tertiary-color);
  pointer-events: none;
}

.search-bar__input {
  width: 100%;
  height: 100%;
  padding: 0 16px 0 48px;
  border: none;
  background: transparent;
  font-size: 20px;
  color: var(--tertiary-color);
  outline: none;
  font-family: 'Cormorant', 'san-serif'
}

.search-bar__input::placeholder {
  color: var(--tertiary-color);
  opacity: 1;
}

.table-section {
  padding-bottom: 48px;
}

.table-grid {
  width: 100%;
}

.table-wrapper {
  width: 100%;
  overflow-x: hidden;
}

@media (max-width: 767px) {
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .ranking-table {
    table-layout: auto;
    width: max-content;
    min-width: 900px;
  }

  .ranking-table__th-city {
    width: auto;
    min-width: 130px;
  }

  .ranking-table__th-icon,
  .ranking-table__th {
    min-width: 72px;
    white-space: nowrap;
  }

  .ranking-table__label {
    white-space: nowrap;
    font-size: 10px;
  }

  .city-pill {
    white-space: nowrap;
    font-size: 14px;
  }

  .city-pill__country {
    font-size: 12px;
  }

  .ranking-table td:first-child {
    min-width: 130px;
  }

  .rank-pill {
    min-width: 58px;
    font-size: 13px;
  }
}

.ranking-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 4px 0;
  font-family: system-ui, -apple-system, sans-serif;
}

.ranking-table__th-city {
  width: 18%;
  min-width: 0;
  vertical-align: middle;
}

.ranking-table__th-icon {
  min-width: 0;
  padding: 24px 4px 6px;
  background-color: #FBF0E7;
  border-radius: 12px 12px 0 0;
  text-align: center;
  vertical-align: bottom;
  font-weight: 400;
  cursor: pointer;
}

.ranking-table__head-labels .ranking-table__th {
  position: relative;
  min-height: 44px;
  padding: 0 4px 8px;
}

.ranking-table__th {
  min-width: 0;
  background-color: #FBF0E7;
  text-align: center;
  vertical-align: bottom;
  font-weight: 400;
  cursor: pointer;
  white-space: normal;
}

.ranking-table__th-icon.ranking-table__th--active,
.ranking-table__th.ranking-table__th--active {
  background-color: #F7D7B9
}

.ranking-table__th.ranking-table__th--active {
  position: relative;
}

.ranking-table__sort-arrow {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  display: block;
  width: 0;
  height: 0;
  margin: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
}

.ranking-table__sort-arrow--asc {
  border-top: 6px solid var(--tertiary-color);
}

.ranking-table__sort-arrow--desc {
  border-bottom: 6px solid var(--tertiary-color);
}

.ranking-table__icon {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 24px;
  color: var(--tertiary-color);
}

.ranking-table__label {
  display: block;
  font-size: 12px;
  line-height: 1.25;
  padding-bottom: 14px;
  color: var(--tertiary-color);
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.ranking-table__city {
  padding: 0;
  text-align: left;
  vertical-align: middle;
}

.city-pill {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  box-sizing: border-box;
  font-family: 'Cormorant', 'san-serif';
  font-size: 15px;
  line-height: 1.3;
  color: var(--tertiary-color);
  background-color: var(--main-color);
  white-space: normal;
  word-wrap: break-word;
}

.city-pill__country {
  font-size: 13px;
  opacity: 0.85;
}

.ranking-table__row:nth-child(even) .city-pill {
  background-color: #f5ebe3;
}

.ranking-table__row:hover .city-pill,
.ranking-table__row--highlight .city-pill {
  background-color: #edd9c8;
}

.ranking-table td {
  padding: 8px 0 0;
  text-align: center;
  vertical-align: middle;
}

.rank-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 8px 4px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.1;
  box-sizing: border-box;
  font-family: 'Roboto', 'san-serif';
  font-weight: 300;
}

.rank-pill--top {
  background-color: var(--secondary-color);
  color: #000;
}

.rank-pill--mid {
  background-color: #f2d2b6;
  color: var(--tertiary-color);
}

.rank-pill--low {
  background-color: #b5d4e8;
  color: var(--tertiary-color);
}

.ranking-table__empty {
  padding: 32px;
  text-align: center;
  color: var(--tertiary-color);
  opacity: 0.7;
}

.show-more-btn {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 16px;
  background-color: var(--tertiary-color);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-family: 'Cormorant', 'san-serif';
  font-size: 16px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.show-more-btn:hover {
  opacity: 0.88;
}

.show-more-btn[hidden] {
  display: none;
}