@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

@font-face {
  font-style: normal;
  font-weight: normal;
  font-family: "Material Icons";

  font-display: swap;
  src: url("MaterialIcons.woff2") format("woff2");
}

:root {
  --primary: #30374B;
  --header: transparent;
  --accent: #c71500;
  --accent-hover: #da2410;
  --default-text: #464546;
}

:focus {
  outline: 0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

img {
  border: none;
  max-width: 100%;
  display: block;
}

ul,
ol {
  list-style: none;
}

a {
  text-decoration: none;
  transition: all 200ms cubic-bezier(0.39, 0, 0.17, 0.99);
}

body {
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  line-height: 1.45;
  color: var(--default-text);
  background-color: rgb(253, 243, 243);
}

html,
body {
  height: 100%;
}
.wrapper {
  height: auto;
  min-height: 100%;
}
section,
footer {
  padding: 0 10px;
}

h1 {
  font-size: 18px;
}

h2 {
  padding-top: 20px;
}
.top {
  padding-bottom: 20px;
  text-align: center;
  font-size: 20px;
}

.center {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  height: 40px;
  width: 100%;
  text-align: center;
  color: #fff;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 0;
  border: none;
  background: var(--accent);
  border-radius: 5px;
  background-color: rgb(245, 90, 74);
  box-shadow: 4px 4px 14px rgba(70, 69, 70, .25);
}

.btn:hover {
  background: var(--accent-hover);
}


.header-section {
  padding: 15px;
  font-weight: bold;
  text-align: center;
  background: #fff;
  box-shadow: 0 4px 18px rgba(45, 45, 45, .15);
}

.header-section .logo {
  display: inline-block;
  padding: 5px;
}

.card-section {
  margin-top: 20px;
  margin-bottom: 60px;
}

.card-section .card-block {
  padding: 10px 0;
}

.card-section .card-item {
  position: relative;
  box-shadow: 4px 4px 14px rgba(70, 69, 70, .25);
  border-radius: 5px;
  margin-bottom: 15px;
  text-align: left;
  background-color: #fff;
}


.card-item .logo-block {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  height: 90px;
  padding: 5px;
  border-radius: 5px;
  box-shadow: 2px 2px 10px rgba(70, 69, 70, .25);
  background-color: #fff;
}
.card-item .flag {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  z-index: 2;
  font-size: 14px;
  font-weight: 700;
  top: -12px;
  height: 24px;
  padding: 2px 20px;
  width: auto;
  border-radius: 5px 0 0 0;
  color: #fff;
  background-color: #f55a4a
}
.card-item .flag:before,
.card-item .flag:after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  left: 99%;
  border: solid transparent;
}
.card-item .flag:before {
  border-left-color: #f55a4a;
  border-width: 0 10px 15px;
  top: 0;
}
.card-item .flag:after {
  border-left-color: #f55a4a;
  border-width: 15px 10px 0;
  bottom: 0;
}
.card-section .card-item h2 {
  padding: 0;
 font-size: 18px;
}

.card-section .card-content {
  position: relative;
  display: grid;
  grid-gap: 0 10px;
  border-radius: 5px;
  grid-template-columns: 40% auto;
  padding: 0 10px 0 0;
  background: #fff;
}

.card-item .card-logo-block {
  display: flex;
  justify-content: center;
  align-items: center;
  grid-column: 1;
  grid-row: 1/3;
  padding: 18px 10px 0;
  background-color: #f5f5f5;
}

.card-item .score {
  grid-column: 2;
  grid-row: 2;
  padding: 0 0 0 10px;
  margin-top: 5px;
  font-size: 32px;
  font-weight: 700;
}

.card-item .buttons-block {
  align-self: center;
  justify-self: flex-end;
  grid-column: 2;
  grid-row: 3;
  min-width: 160px;
  width: 100%;
  padding: 8px 0;
  border-top: 1px solid #e5e5e5;
}

.card-item .site-description {
  font-size: 14px;
}

.rating-wrapper {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  grid-column: 1;
  grid-row: 3;
  text-align: center;
  padding: 0 10px 10px;
  background-color: #f5f5f5;
}

.card-item .site-info {
  padding: 18px 10px 0;
  grid-column: 2;
  grid-row: 1;
}

.rating-count {
  display: flex;
  font-size: 18px;
  line-height: 28px;
  margin-right: 6px
}

.rating-block {
  display: flex;
  justify-content: center
}

.rating-wrapper .reviews {
  color: #8c8c8c;
  font-size: 10px;
  padding-top: 5px;
}

.rating-block .rating-item {
  display: flex;
  align-items: center;
  line-height: 1;
  margin: 0 1.5px;
}

.rating-block .rating-item:first-child {
  margin-left: 0
}

.rating-block .rating-item.is-active:before {
  color: #FFB800;
}

.rating-block .rating-item:before {
  content: '\e94a';
  font-family: 'Material Icons';
  font-size: 16px;
  line-height: 1;
  color: #ccc;
}

footer {
  padding-top: 25px;
  padding-bottom: 25px;
  color: #fff;
  background-color: rgb(245, 90, 74);
  border-color: rgb(253, 243, 243);
}

@media screen and (min-width: 1030px) {
  h1 {
    font-size: 28px;
  }

  .header-section {
    text-align: left;
  }

  .card-section .card-block {
    padding: 20px 0;
  }

  .card-block .card-content {
    grid-template: 1fr/120px 1.5fr 160px minmax(140px, 200px);
    align-items: center;
    padding: 20px;
  }

  .card-item .card-logo-block {
    display: block;
    grid-column: 1;
    grid-row: 1/3;
    padding: 0;
    background-color: #fff;
  }

  .card-item .rating-wrapper {
    grid-column: 3;
    grid-row: 2;
    background: transparent;
  }

  .card-item .site-info {
    grid-column: 2;
    grid-row: 1;
    margin-right: 20px;
    padding-top: 0;
  }

  .card-item .score {
    font-size: 42px;
    grid-column: 3;
    grid-row: 1;
    text-align: center;
    margin: 0;
    padding: 0;
    line-height: 1;
  }

  .card-section .card-item h2 {
    font-size: 20px;
  }

  .card-item .buttons-block {
    grid-column: 4;
    grid-row: 1/3;
    width: auto;
    padding: 0;
    border: none;
  }
  .rating-wrapper .reviews {
    font-size: 11px;
  }
  .rating-block .rating-item:before {
    font-size: 24px;
  }
}