@import url("https://fonts.googleapis.com/css2?family=Ubuntu+Mono&display=swap");
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #10072100;
  font-family: "arial", monospace;
  font-weight: 300;
}

.container {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
  height: 400px;
  gap: 10px;
}
.container > div {
  flex: 0 0 80px;
  border-radius: 0.5rem;
  transition: 0.5s ease-in-out;
  cursor: pointer;
  box-shadow: 0px 4px 40px 0px #0070c0d4, 0px 4px 200px 0px #0070c087;
  position: relative;
  overflow: hidden;
  height: 100%;
}
.container > div:nth-of-type(1) {
  background: linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.7) 0%,
      rgba(0, 0, 0, 0.7) 100%
    ),
    url("./automobile.jpg") no-repeat;
  object-fit: cover;
}

.block {
  color: #f65005;
  padding: 10px;
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  gap: 10px;
  align-items: center;
  justify-content: space-between;

  .title {
    transform: rotate(180deg);
    /* change mode  */
    writing-mode: vertical-rl;
    /* comment this line */
    /* word-break: break-word; */
    text-orientation: sideways-right;
    /* change font size */
    font-size: 28px;
    font-weight: 700;
    margin-top: auto;
  }
}

.container > div:nth-of-type(2) {
  background: linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.7) 0%,
      rgba(0, 0, 0, 0.7) 100%
    ),
    url("./transport.jpg") no-repeat center;
  object-fit: cover;
}

.container > div:nth-of-type(3) {
  background: linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.7) 0%,
      rgba(0, 0, 0, 0.7) 100%
    ),
    url("./industries.jpg") no-repeat center;
  object-fit: cover;
}

.container > div:nth-of-type(4) {
  background: linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.7) 0%,
      rgba(0, 0, 0, 0.7) 100%
    ),
    url("./Agriculture.jpg") no-repeat center;
  object-fit: cover;
}

.container > div:nth-of-type(5) {
  background: linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.7) 0%,
      rgba(0, 0, 0, 0.7) 100%
    ),
    url("./Minescarrieres.jpg") no-repeat center;
  object-fit: cover;
  background-size: cover;
}

.container > div .element {
  margin-top: 20px;
  font-size: 1.5rem;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: left;
  padding: 10px;
  opacity: 0;
  flex-direction: column;
  height: 100%;
  transform: translatey(100%);
  transition: opacity 0.5s ease-in-out, transform 0.5s 0.2s;
  visibility: hidden;
}

.h2 {
  color: #f65005;
}
.container > div .content {
  height: 100%;
}
.container > div .content span {
  display: block;
  margin-top: 15px;
  font-size: 1rem;
}
.container > div:hover {
  flex: 0 0 350px;
}
.container > div:hover .element {
  opacity: 1;
  transform: translatey(0%);
  visibility: visible;
}
.container > div:hover .block {
  color: #f65005;
  padding: 10px;
  display: flex;
  flex-direction: row-reverse;
  gap: 10px;
  height: auto;

  .title {
    transform: none;
    writing-mode: horizontal-tb;
    font-size: 30px;
    font-weight: 700;
    margin-bottom: auto;
  }
}
@keyframes rotate-text {
  0% {
    transform: translateY(0%);
  }
  100% {
    transform: translateY(100%);
  }
}
.bg {
  border-radius: 10px;
  background: rgba(41, 48, 55, 0.2);
  backdrop-filter: blur(10px);
  padding: 20px;
}

.tt {
  padding-left: 22px;
  padding-right: 22px;
  padding-top: 12px;
  padding-bottom: 12px;
  background-color: #f65005;
  color: #ffffff;
  margin-top: 22px;
  border-color: #f65005;
  border-style: solid;
  border-width: 1px;
  border-radius: 5px;
  width: fit-content;
  display: block;
  margin-left: auto;
  margin-right: 0;
}

/* mobile */
@media only screen and (max-width: 950px) {
  .container {
    width: 80%;
    flex-direction: column;
  }

  .block {
    flex-direction: row-reverse;
    height: 100%;
    .title {
      /* change style title in mobile */
      transform: none;
      writing-mode: horizontal-tb;
      font-size: 20px;
      font-weight: 700;
      margin-bottom: auto;
      /*  */
    }
  }

  .container > div .content span {
    display: block;
    margin-top: 15px;
    font-size: 13px;
  }
}
