:root {
  --white: #fefefe;
  --grey-1: #f1f3f5;
  --grey-2: #ced4da;
  --grey-5: #adb5bd;
  --grey-9: #212529;
  --purple: #53448d;
  --purple-dark: #272044;
}

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

html {
  font-size: 62.5%;
}

body {
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

h1 {
  font-size: 9rem;
  font-weight: 700;
  letter-spacing: 0.1rem;
  text-align: center;
}

h2 {
  font-size: 4.8rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 5rem;
}

p,
a,
address {
  font-size: 1.8rem;
}

h4 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 1.6rem;
}

h5 {
  color: var(--grey-5);
  text-transform: uppercase;
  font-size: 1.6rem;
  letter-spacing: 0.5rem;
  font-weight: 700;
  text-align: center;
}

.grid {
  display: grid;
}

.grid-1-2-2 {
  grid-template-columns: 1fr 2fr 2fr;
  gap: 1.6rem;
}

.grid-1-1-1 {
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-1-1 {
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  align-items: center;
}

/* ******** Header ******** */
.hero-img {
  background-image: linear-gradient(
      rgba(71, 44, 178, 0.3),
      rgba(39, 32, 68, 0.8)
    ),
    url(/images/hero.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 95vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hgroup {
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.heading--sub {
  font-size: 2.4rem;
  letter-spacing: 0.4rem;
  font-weight: 600;
}

.heading--sub-2 {
  font-size: 4rem;
  font-weight: 500;
  letter-spacing: 0.2rem;
}

.btn-link,
.btn-link:link,
.btn-link:visited {
  text-decoration: none;
  padding: 1.2rem 3.2rem;
  transition: all ease 0.2s;
  display: block;
  text-align: center;
}

.btn-link:hover {
  transform: translateY(-0.2rem);
}

.btn-link:active {
  transform: translateY(0.2rem);
}

.btn--white {
  background: var(--white);
  color: var(--grey-9);
  margin-top: 3.2rem;
}

.btn--dark {
  background: var(--purple-dark);
  color: var(--white);
  margin-top: 3.2rem;
}

/* ******** main ******** */
/* ******** about city  ******** */
.bg-white-container {
  margin: 10rem auto;
  max-width: 130rem;
  padding-right: 1.7rem;
  padding-left: 1.7rem;
}
.about-img {
  width: 100%;
  filter: drop-shadow(0 8px 8px var(--purple)) brightness(1.2);
}

.table-container {
  margin-top: 16rem;
  overflow: auto;
}

table {
  margin: 0 auto;
  font-size: 1.8rem;
  text-align: center;
  table-layout: fixed;
  width: 100%;
  border: 2px solid var(--purple-dark);
  border-collapse: collapse;
  overflow: scroll;
}

caption {
  font-size: 2.4rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  font-weight: 700;
}

thead th:first-child {
  width: 20%;
}

thead th :nth-child(2),
thead th:nth-child(3) {
  width: 40%;
}
th {
  background-color: var(--purple-dark);
  color: var(--white);
  padding: 1rem 0;
}

tbody tr td {
  padding: 0.5rem 0;
}

tbody tr:nth-child(even) {
  background-color: rgba(170, 153, 249, 0.347);
}

/* ********  favorite  ******** */
.favorite-img {
  width: 100%;
  height: 30rem;
  object-fit: cover;
}
/* ******** Favorite cafes******** */
.cards-container {
  background: var(--grey-1);
  padding: 10rem 1.7rem;
}

.cards-grid-container {
  max-width: 130rem;
  margin: 0 auto;
}

.card-box {
  background-color: var(--white);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.1);
}

.card-img-container {
  display: flex;
  justify-content: center;
}

.cafe-img {
  width: 50%;
}

.heading-3-card {
  font-size: 2.4rem;
  font-weight: 700;
}

.cafe-map {
  width: 50%;
}

.card-text-container {
  margin: 3rem 2rem;
}

/* ******** Footer ******** */
footer {
  background-image: linear-gradient(
      rgba(39, 32, 68, 0.95),
      rgba(39, 32, 68, 0.6)
    ),
    url(/images/painted-lady.jpg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  padding: 8rem 4rem;
}

.heading-3-footer {
  font-size: 2rem;
  color: var(--white);
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-list {
  list-style: none;
}

.footer-link,
.footer-link:link,
.footer-link:visited,
.footer-link:active {
  text-decoration: none;
  color: var(--grey-2);
  font-size: 1.6rem;
}

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

.footer-text {
  color: var(--grey-2);
  font-size: 1.6rem;
}

.text--small {
  text-align: center;
  font-size: 1.2rem;
}

.acknowledgement {
  margin-top: 6rem;
}

.link-github {
  text-decoration: none;
  color: var(--grey-2);
  font-size: 1.2rem;
}

.link-github:hover {
  color: var(--white);
}

/* ******** Media quary******** */
/* 1200px */
@media (max-width: 75rem) {
  .acknowledgement {
    margin-top: 4rem;
  }

  html {
    font-size: 56.25%;
  }
}

/* 900px */
@media (max-width: 56.25rem) {
  html {
    font-size: 50%;
  }

  .grid-1-2-2 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-1-1-1 {
    grid-template-columns: 1fr;
    gap: 6rem;
    margin: 0 2rem;
  }

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

/* 600px */
@media (max-width: 37.5rem) {
  .grid-1-2-2 {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
