@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap');

body {
  margin: 0px;
  font-family: 'Roboto', sans-serif;
}

header {
  padding: 10px 10%;
  text-align: center;
  background-color: black;
  color: white;
}

table {
  border-collapse: collapse;
  margin: auto;
}

tr {
  border-bottom: 1px solid rgb(179, 179, 179);
}

th,
td {
  padding: 10px 20px;
  vertical-align: top;
}

nav a {
  color: white;
  text-decoration: none;
  margin: 10px;
  padding: 10px;
}

img {
  width: 100%;
}

section {
  display: grid;
  padding: 50px 10%;
  row-gap: 30px;
  grid-auto-rows: 1fr;
}

.alternate article {
  grid-row: auto / span 2;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  grid-template-rows: min-content max-content;
  align-items: stretch;
  justify-content: stretch;
  overflow: hidden;
}

article:nth-child(1),
article:nth-child(3) {
  grid-row: 2 / span 2;
}

article:nth-child(2) {
  grid-row: 1 / span 2;
}

.alternate article figure,
.alternate article img {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
}

.alternate article figure {
  color: #000000;
  background-color: rgba(255, 255, 255, 0.6);
  padding: 18px 15px 5px 15px;
  margin: 0px;
  z-index: 0;
  transition: 1s;
  align-self: flex-end;
  opacity: 0;
}

img {
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0% 50%, 25% 0);
  align-self: end;
  transition: 1s;
}

.alternate article figure h2 {
  font-size: 20px;
  margin: 0px 0px 15px 0px;
}

article:hover img {
  transform: rotate(-125deg);
  transform-origin: 0 50%;
}

article:hover figure {
  opacity: 1;
  transition: 1s;
}

@media (min-width:1000px) {
  section {
    grid-template-columns: repeat(5, 1fr);
  }

  article:nth-child(5) {
    grid-row: 2 / span 2;
  }

  article:nth-child(4) {
    grid-row: 1 / span 2;
  }
}

@media (min-width:1400px) {
  section {
    grid-template-columns: repeat(6, 1fr);
  }
}

::selection{
  background-color: #ff0000;
  color: rgb(0, 85, 255);
}