@font-face {
  font-family: 'Lato Regular';
  src:  url('/assets/fonts/Lato-Regular.woff2') format('woff2'),
        url('/assets/fonts/Lato-Regular.woff') format('woff');
  font-display: swap;
}

@font-face {
  font-family: 'Lato Italic';
  src:  url('/assets/fonts/Lato-Italic.woff2') format('woff2'),
        url('/assets/fonts/Lato-Italic.woff') format('woff');
  font-display: swap;
}

@font-face {
  font-family: 'Lato Semibold';
  src:  url('/assets/fonts/Lato-Semibold.woff2') format('woff2'),
        url('/assets/fonts/Lato-Semibold.woff') format('woff');
  font-display: swap;
}

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

:root {
  --black: #000000;
  --grey: #58707b;
  --grey-faint: rgba(88, 112, 123, 0.2);
  --red: #d60000;
  --white: #ffffff;
}

html {
  font-family: 'Lato Regular', Helvetica, Arial, sans-serif;
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  line-height: 1.5rem;
  min-height: 100vh;
}

nav ul {
  align-items: center;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  list-style: none;
}

h1 {
  font-family: 'Lato Semibold', Helvetica, Arial, sans-serif;
  line-height: 2.4rem;
  margin: 2.4rem 0 0 0;
  text-align: center;
}

a:link,
a:visited {
  color: var(--grey);
}

a:active,
a:focus,
a:hover {
  color: var(--red);
}

.brand {
  background-color: var(--grey);
  height: 2.4rem;
  position: relative;
  width: 100%;
}

.brand::before {
  background-color: var(--red);
  bottom: 0;
  clip-path: polygon(0 0, 97.5% 0%, 100% 100%, 0% 100%);
  content: '';
  left: 0;
  position: absolute;
  right: 75%;
  top: 0;
}

.subtitle {
  font-size: 1.2rem;
  font-family: 'Lato Italic', Helvetica, Arial, sans-serif;
  margin: 1rem auto;
  max-width: 75ch;
  text-align: center;
}

.intro {
  margin: 2.4rem auto;
  max-width: 75ch;
  text-wrap: pretty;
}

.intro p {
  font-size: 1.2rem;
  line-height: 1.8rem;
  padding: 1rem 0;
}

.inverted-color {
  filter: invert(100%);
}

.icon {
  margin: 0;
  height: 1rem;
}

.admonition .icon {
  margin: 0 0.5rem -2px 0;
}

.logo {
  margin: 1rem;
  height: 50px;
}

.admonition {
  border: 1px solid var(--grey-faint);
  margin: -1.2rem auto 2.4rem auto;
  max-width: 75ch;
}

.admonition .admonition-title {
  background-color: var(--grey);
  color: var(--white);
  font-weight: 600;
  padding: 0.5rem;
  width: 100%;
}

.admonition p {
  padding: 0.5rem;
}

#return-to-top-btn {
  background-color: var(--grey);
  border: none;
  border-radius: 50%;
  bottom: 1rem;
  cursor: pointer;
  position: fixed;
  right: 1rem;
  z-index: 1;
}

#return-to-top-btn:hover {
  background-color: var(--red);
}

#return-to-top-btn .icon {
  margin: 1rem 1rem 0.8rem 1rem;
  filter: invert(100%);
}

#publisher-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  list-style: none;
  gap: 2.4rem;
  margin: 2.4rem auto;
  max-width: 75ch;
  width: 100%;
}

.card {
  border: 1px solid var(--grey-faint);
  border-left: 4px solid var(--red);
  box-shadow: 4px 4px 4px 0px var(--grey-faint);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 150px;
  padding: 1rem;
  width: 100%;
}

.card-header {
  line-height: 2rem;
  margin: 0 0 1rem 0;
}

.card-header h2 {
  display: inline;
  font-family: 'Lato Semibold', Helvetica, Arial, sans-serif;
}

.card-header .country {
  display: inline;
}

.card-footer {
  align-items: center;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  margin: 1rem 0 0 0;
}

.card-footer p {
  display: inline-block;
}

.card .date {
  font-size: 0.8rem;
}

.card ul {
  display: flex;
  flex-direction: row;
  list-style: none;
  text-align: center;
}

.card ul li {
 flex: 1;
 min-width: 100px;
}

.card .dropdown {
  display: inline-block;
  margin: 0;
  position: relative;
  width: max-content;
  z-index: 1;
}

.card .dropdown .download-btn {
  border: none;
  border-radius: 2rem;
  background-color: var(--grey);
  cursor: pointer;
  color: var(--white);
  font-size: 1rem;
  padding: 0.5rem 2rem 0.5rem 0.8rem;
  position: relative;
}

.card .dropdown .download-btn:disabled {
  background-color: var(--grey-faint);
  cursor: not-allowed;
}

.card .dropdown .download-btn:disabled:hover {
  background-color: var(--grey-faint);
  cursor: not-allowed;
}

.card .dropdown .download-btn::after {
  content: '';
  background-image: url('/assets/icons/chevron-up-solid.svg');
  background-repeat: no-repeat;
  background-size: 0.8rem;
  filter: invert(100%);
  height: 0.8rem;
  position: absolute;
  right: 0.7rem;
  top: 0.7rem;
  transform: rotate(180deg);
  width: 0.8rem;
}

.card .dropdown .download-btn:hover {
  background-color: var(--red);
}

.card .dropdown .dropdown-content {
  background-color: var(--white);
  border: 1px solid var(--grey-faint);
  display: none;
  left: 1rem;
  margin: 0;
  padding: 0;
  position: absolute;
  text-align: center;
  top: calc(100% - 1px);
  transform: translateX(0);
  width: calc(100% - 2rem);
  z-index: -1;
}

.card .dropdown .dropdown-content.show {
  display: block;
}

.card .dropdown .dropdown-content ul,
.card .dropdown .dropdown-content li {
  margin: 0;
  padding: 0;
}

.card .dropdown .dropdown-content a:link,
.card .dropdown .dropdown-content a:visited {
  display: block;
  color: var(--grey);
  text-decoration: underline;
  padding: 0.5rem 0;
  width: calc(100% - 0.5rem - 1px);
}

.card .dropdown .dropdown-content a:active,
.card .dropdown .dropdown-content a:focus,
.card .dropdown .dropdown-content a:hover {
  background-color: var(--red);
  color: var(--white);
  text-decoration: none;
}

.sr-only {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

@media (max-width: 850px) {
  .logo {
    margin: 1rem;
    height: 30px;
  }

  main {
    padding: 0 1rem 3rem 1rem;
  }
}
