  /* ===== FONTS ===== */
@import url('https://fonts.googleapis.com/css?family=Marvel:400,700');
@font-face {
  font-family: kanit;
  src: url(assets/fonts/Kanit/Kanit-Bold.ttf);
}

@font-face {
  font-family: kanit-light;
  src: url(assets/fonts/Kanit/Kanit-Light.ttf);
}


@font-face {
  font-family: roboto;
  src: url(assets/fonts/RobotoSlab-VariableFont_wght.ttf);
}

/* ========= VARIABLES ========= */
:root {
  --main-color: rgb(18 159 68 / 95%);
  --border-width: .24vw;
  --gutter: 2vw;
}

body {
  margin: 1.5vw 2vw 2vw;
  font-family: 'Marvel', sans-serif;
  font-weight: 700;
}

/* ==== GRID ==== */
.grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.167fr 0.45fr .225fr 0.3fr 0.8fr;
  grid-template-rows: 0.44fr 0.1875fr 0.4fr .9fr;
  grid-gap: var(--gutter);
}

.grid figure {
  overflow: hidden;
  background: var(--main-color);
  position: relative;
  opacity: 1;
  transition: .2s;

  /* Fix for Safari 10 */
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.grid figure img {
  vertical-align: middle;
  width: 100%;
  height: 100%;
  /* -o-object-fit: cover;
     object-fit: cover; */
  transition: .2s;
  will-change: transform;
  -webkit-clip-path:
    polygon(
      var(--border-width) var(--border-width),
      calc(100% - var(--border-width)) var(--border-width),
      calc(100% - var(--border-width)) calc(100% - var(--border-width)),
      var(--border-width) calc(100% - var(--border-width))
    );
          clip-path:
    polygon(
      var(--border-width) var(--border-width),
      calc(100% - var(--border-width)) var(--border-width),
      calc(100% - var(--border-width)) calc(100% - var(--border-width)),
      var(--border-width) calc(100% - var(--border-width))
    );

  /* Fix for Safari 10 */
  flex-grow: 1;
}

figure:hover img {
  /* transform: scale(.995); */
}

/* ========= LAYOUT AND CLIP-PATH ======== */

.grid figure:nth-child(1) {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
  -webkit-clip-path: polygon(0 0, 100% 0, 100% 66%, 0% 85%);
          clip-path: polygon(0 0, 100% 0, 100% 66%, 0% 85%);
}
.grid figure:nth-child(1) img {
  -webkit-clip-path:
    polygon(
      var(--border-width) var(--border-width),
      calc(100% - var(--border-width)) var(--border-width),
      calc(100% - var(--border-width)) calc(66% - var(--border-width)),
      var(--border-width) calc(85% - var(--border-width))
    );
          clip-path:
    polygon(
      var(--border-width) var(--border-width),
      calc(100% - var(--border-width)) var(--border-width),
      calc(100% - var(--border-width)) calc(66% - var(--border-width)),
      var(--border-width) calc(85% - var(--border-width))
    );
  /*min-height: 30.5vw;*/
}

.grid figure:nth-child(2) {
  grid-column: 2 / 4;
  grid-row: 1 / 3;
}

.grid figure:nth-child(3) {
  grid-column: 4 / 6;
  grid-row: 1 / 2;
}

.grid figure:nth-child(4) {
  grid-column: 1 / 2;
  grid-row: 2 / 4;
  -webkit-clip-path: polygon(0 22%, 100% 4px, 100% 100%, 0% 100%);
          clip-path: polygon(0 22%, 100% 4px, 100% 100%, 0% 100%);
}
.grid figure:nth-child(4) img {
  -webkit-clip-path:
    polygon(
      var(--border-width) calc(22% + var(--border-width)),
      calc(100% - var(--border-width)) 7px,
      calc(100% - var(--border-width)) calc(100% - var(--border-width)),
      var(--border-width) calc(100% - var(--border-width))
    );
          clip-path:
    polygon(
      var(--border-width) calc(22% + var(--border-width)),
      calc(100% - var(--border-width)) 7px,
      calc(100% - var(--border-width)) calc(100% - var(--border-width)),
      var(--border-width) calc(100% - var(--border-width))
    );
}

.grid figure:nth-child(5) {
  grid-column: 2 / 4;
  grid-row: 3 / 4;
  height: 170px;
}

.grid figure:nth-child(6) {
  grid-column: 4 / 6;
  grid-row: 2 / 4;
}

.grid figure:nth-child(7) {
  grid-column: 1 / 2;
  grid-row: 4 / 5;
}

.grid figure:nth-child(8) {
  grid-column: 2 / 3;
  grid-row: 4 / 5;
  -webkit-clip-path: polygon(
    0 0,
    100% 0,
    88% 100%,
    0% 100%
  );
          clip-path: polygon(
    0 0,
    100% 0,
    88% 100%,
    0% 100%
  ); 
  /*width: 115%;*/
  /* width: calc(100% + var(--gutter));*/
}
.grid figure:nth-child(8) img {
  -webkit-clip-path:
    polygon(
      var(--border-width) var(--border-width),
      calc(100% - var(--border-width)) var(--border-width),
      calc(88% - var(--border-width)) calc(100% - var(--border-width)),
      var(--border-width) calc(100% - var(--border-width))
    );
          clip-path:
    polygon(
      var(--border-width) var(--border-width),
      calc(100% - var(--border-width)) var(--border-width),
      calc(88% - var(--border-width)) calc(100% - var(--border-width)),
      var(--border-width) calc(100% - var(--border-width))
    );
}

.grid figure:nth-child(9) {
  grid-column: 3 / 5;
  grid-row: 4 / 5;
  -webkit-clip-path: polygon(12% 0, 100% 0, 100% 100%, 0% 100%);
          clip-path: polygon(12% 0, 100% 0, 100% 100%, 0% 100%);
}
.grid figure:nth-child(9) img {
  -webkit-clip-path:
    polygon(
      calc(12% + var(--border-width)) var(--border-width),
      calc(100% - var(--border-width)) var(--border-width),
      calc(100% - var(--border-width)) calc(100% - var(--border-width)),
      var(--border-width) calc(100% - var(--border-width))
    );
          clip-path:
    polygon(
      calc(12% + var(--border-width)) var(--border-width),
      calc(100% - var(--border-width)) var(--border-width),
      calc(100% - var(--border-width)) calc(100% - var(--border-width)),
      var(--border-width) calc(100% - var(--border-width))
    );
}


.grid figure:nth-child(7) {
  grid-column: 4 / 6;
  grid-row: 1 / 2;
  height: 200px;
}


/* ======= CAPTION ======= */

.grid figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  text-align: center;
  z-index: 2;
}
.grid figure:nth-child(1) figcaption {
  bottom: 15%;
  height: 17%;
  text-align: left;
  padding-left: 5%;
}

.grid figcaption h3 {
  font-weight: 700;
  color: #fdfdfd;
  margin-left: 10px;
  font-size: calc(.5em + 1.7vw);
  line-height: 1;
}

/* Caption effect */


figure:hover figcaption:before,
figure:hover figcaption:after {
  transform: scaleY(1);
}

figcaption:before,
figcaption:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background:rgb(8 8 8 / 48%);
  height: 150%;
  transition: .3s;
  transform: scaleY(0);
  transform-origin: bottom;
  z-index: -1;
}

figcaption:before {
  -webkit-clip-path: polygon(0% 0%, 100% 15%, 100% 100%, 0% 100%);
          clip-path: polygon(0% 0%, 100% 15%, 100% 100%, 0% 100%);
}

figcaption:after {
  height: 120%;
  background:rgb(8 8 8 / 48%);
  -webkit-clip-path: polygon(0% 15%, 100% 0%, 100% 100%, 0% 100%);
          clip-path: polygon(0% 15%, 100% 0%, 100% 100%, 0% 100%);
}

figcaption div {
  margin: 0;
  transition: .3s transform;
  will-change: transform;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
}

figcaption > div {
  overflow: hidden;
  display: inline-block;
  transform: translateY(100%);
}

figcaption > div div {
  transform: translateY(-100%);
  display: inline-block;
}

/* ========= COPYRIGHT ========= */

.copyright {
  color: var(--main-color);
  text-transform: uppercase;
  position: absolute;
  bottom: 0;
  right: -1.9vw;
  -ms-writing-mode: tb-rl;
      writing-mode: vertical-rl;
  font-size: 1.5vw;
}

/* writing-mode doesn't rotate the copyright symbol */
.copyright:before {
  content: '\00a9';
  display: inline-block;
  transform: rotate(90deg);
}

.hiring_wrapper{
  padding: 20px;
  margin-top: 50px;
}

.search_title {
  margin-bottom: 50px;
  text-align: center;
}

.search_title span, .listing_title .titledesc {
  font-size: 30px;
  font-weight: 800;
  color: #333232;
  margin-bottom: 3px;
  text-transform: uppercase;
  font-family: kanit;
  /* text-shadow: 3px 1px #dfdddd; */
  text-align: center;
}

.subtitle p {
  font-weight: 500;
  font-family: kanit;
  color: #333232;
  text-align: center;
}

  .niports{
  /* text-shadow: 3px 1px #0d7d27;  */
  color: #0d7d27 !important;
  }

  .eqipment_description{
    position: absolute;
    background-color: #2222229c;
    padding: 9px;
    width: 100%;
    /* height: 50px; */
    color: #e3d7d6;
    font-size: 13px;
    /* font-family: kanit-light; */
    bottom: -150px;
    visibility: hidden;
    transition: 1s ease-in-out;

  }

  .product_name{
    text-align: center;
    color: #f6faf7;
    text-transform: uppercase;
    font-weight: 800;
    font-family: roboto;
    font-size: 18px;

  }

  .product_description, .quantity{
    font-size: 15px;
    font-family: kanit-light;
    font-weight: 200;
  }

  .quantity{
    font-size: 19px;
  }

  .cyellow{
    color:#ffc107
  }

  .productbtn svg{
    width: 13px;
    margin-right: 5px;
    fill: #f6faf7;
  }

  .productbtn{
    margin-top: 5px;
    padding: 0.4rem 1.5rem;
    outline: none;
    border: none;
    font-family: kanit-light;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
  }

  .productbtn span{
    font-size: 12px;
    color: #f6faf7;
  }

  .bg-green {
    background-color: #068123!important;
    color: #f6faf7;
   
}


figure:hover .eqipment_description {
  /* transform:  scale3d(10deg); */
  bottom: 0;
  top: 0;
  transition: 1s ease-in-out;
  visibility: visible;
 
}

figure:hover .cuv{
  bottom: 0;
  top: 15px;
  padding-top: 20px;
  transition: 1s ease-in-out;
  visibility: visible;
  
}

figure:hover .ml{
  padding-left: 35px;
  
}




/* ============== RESPONSIVENESS ============== */

@media (max-width: 800px) {
  .grid figure:nth-child(1) figcaption {
    padding-left: 0;
    height: 40px;
  }
}

/* @media (max-width: 600px) {
  .grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 200px;
    grid-auto-rows: 200px;
  }
  .grid figure {
    grid-column: auto!important;
    grid-row: auto!important;
    -webkit-clip-path: unset!important;
            clip-path: unset!important;
  }
  .grid figure:nth-child(2),
  .grid figure:nth-child(8),
  .grid figure:nth-child(9),
  .grid figure:nth-child(10) {
    grid-row: auto / span 2 !important;
    width: auto;
  }
} */

@media (max-width: 1058px) {
  .grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    grid-auto-rows: auto;
  }
  .grid figure {
    grid-column: auto!important;
    grid-row: auto!important;
    -webkit-clip-path: unset!important;
            clip-path: unset!important;
  }
  .grid figure:nth-child(2),
  .grid figure:nth-child(8),
  .grid figure:nth-child(9),
  .grid figure:nth-child(10) {
    grid-row: auto ;
    width: auto;
  }
}


@media (max-width:790px) {
  .grid figure {
    height: 350px;
    border-radius: 5px;
  }

  .product_description, .quantity {
    font-family: kanit;
    font-weight: 600;
    margin-top: 5px;   
}

.grid figure:nth-child(1) img, .grid figure:nth-child(4) img, .grid figure:nth-child(8) img, .grid figure:nth-child(9) img{
  -webkit-clip-path: unset!important;
  clip-path: unset!important;
}
}


@media (max-width: 582px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .grid figure {
    grid-column-end: div 1!important;
    grid-row: auto!important;
  }
}







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

a,
a:visited,
a:focus,
a:active,
a:link {
  text-decoration: none;
  outline: 0;
}

a {
  color: var(--main-color);
  transition: .2s ease-in-out;
}

h1, h2, h3, h4 {
  margin: 0 0 1vw;
  font-weight: 700;
}

ul {
  padding: 0;
  list-style: none;
}