/**********************************************/

/* General Stylings */

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

html {
  font-family: Verdana, sans-serif;
  margin: 0 auto;
  max-width: 77ch;

  --border-color: #191970;
  --box-shadow: rgba(0, 0, 0, 0.3);
  --shadow-hover: rgba(6, 5, 70, 0.7);
  --link-color: #191970;

  background-color: #f4f4ff;
  color: #191970;
}

::selection {
  background-color: #191970;
  color: white;
}

@media screen and (prefers-color-scheme: dark) {
  html {
    --border-color: aqua;
    --box-shadow: rgba(0, 217, 255, 0.158);
    --shadow-hover: rgba(15, 214, 240, 0.459);
    --link-color: aqua;

    background-color: rgb(31, 28, 28);
    color: aqua;
  }

  ::selection {
    background-color: aqua;
    color: black;
  }
}

body {
  margin: 1rem;
}

main {
  margin: 0 auto 5rem auto;
}

a,
a:link,
a:hover,
a:visited,
a:active {
  color: var(--link-color);
  font-weight: bold;
  font-size: 1.1rem;
}

/**********************************************/

/* Specific Stylings */

/* Header */

.header {
  box-shadow: 0px 0px 100px 0px var(--box-shadow);
  border-radius: 1rem 1rem 1rem 1rem;
  text-transform: uppercase;
  font-weight: bold;
  font-size: 4.5rem;
  text-align: right;
  border-left: 1rem solid var(--border-color);
  margin-bottom: 1rem;
  padding-right: 1rem;
}

.header-text {
  box-shadow: 0px 0px 100px 0px var(--box-shadow);
  border-radius: 1rem 1rem 1rem 1rem;
  max-width: 65ch;
  margin-bottom: 3.5rem;
  padding: 1rem;
  border-right: 1rem solid var(--border-color);
  float: right;
}

/**********************************************/

/* Card */

.card {
  max-width: 50ch;
  box-shadow: 0px 0px 100px 0px var(--box-shadow);
  border-radius: 1rem 1rem 1rem 1rem;
  padding-bottom: 1rem;
  position: relative;
  transition: 1s;
  margin-bottom: 2rem;
  clear: right;
}

.card-text {
  margin: 1rem;
}

.first-letter {
  font-size: 3rem;
  font-weight: bold;
}

.card:hover {
  box-shadow: 0px 0px 200px 0px var(--shadow-hover);
}

/**********************************************/

/* Image */

.card-picture {
  width: 100%;
  height: auto;
  border-radius: 1rem 1rem 0 0;
  aspect-ratio: 16 / 9;
  transition: 1s;
}

.card-picture:hover,
.card:hover .card-picture,
.star:hover .card picture {
  transform: scale(1.2);
}

.picture-wrapper {
  overflow: hidden;
  border-radius: 1rem 1rem 0 0;
}

/**********************************************/

/* Icon */

.star {
  position: absolute;
  left: 1.7rem;
  top: 1.5rem;
  transition: 1s;
  max-width: 2.5rem;
  filter: grayscale(1);
}

.star:hover {
  transform: scale(1.2) rotate(360deg);
  filter: grayscale(0);
}

/**********************************************/

/* Footer */

.grid-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  align-content: flex-start;
  padding-left: 1rem;
  padding-right: 1rem;
}

.footer-section {
  display: grid;
  grid-template-columns: 2rem 1rem 1fr;
  margin-bottom: 1rem;
}

.border-footer {
  border-left: 0.25rem solid var(--border-color);
  padding-left: 3rem;
}

h3,
i {
  margin: 0;
}

.footer {
  box-shadow: 0px 0px 100px 0px var(--box-shadow);
  padding: 1rem;
  border-radius: 1rem 1rem 1rem 1rem;
}

.footer-first-letter {
  font-size: 2rem;
}

.fa-solid {
  font-size: 1.2rem;
}

@media screen and (min-width: 800px) {
  .footer {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/**********************************************/

/* List-Card-View */

@media screen and (min-width: 800px) {
  .card {
    max-width: 77ch;
    height: 10ch;
    padding: 0;
    box-shadow: 0px 0px 100px 0px var(--box-shadow);
    border-radius: 1rem 1rem 1rem 1rem;
    display: flex;
  }

  .picture-wrapper {
    border-radius: 1rem 1rem 0 1rem;
  }

  .card-picture {
    width: auto;
    height: 10ch;
  }

  .card-text h2 {
    margin-right: 1.5rem;
  }

  .card-text {
    margin: 1rem 1rem 1rem 5rem;
    display: flex;
    align-items: center;
    overflow: hidden;
  }

  .first-letter {
    margin: 0;
  }

  .card-text p {
    margin-top: 2.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .star {
    position: absolute;
    left: 8rem;
    top: 30px;
  }
}
