/* ------------------------------------------------------------------------------ */
/* ------------------------------------------------------------ 6.0/00 - 12-09-22 */
/* file     -> card2info.css */
/* colors   -> #EE741D | rgba(238,116,29) | hsla(25,86%,53%) */
/* ------------------------------------------------------------------------------ */
/* link     -> https://codepen.io/darvil82/pen/BaYxrdG */
/* info     -> card2info */
/* ------------------------------------------------------------------------------ */
/* ROOT and VARIBLES */
:root {
	--hover-bgr:hsla(210,100%,56%,1);
    
    /* cards */
    --card-front-col: rgba(0,0,0,.6); /* black, gray OR client-color */
    --card-front-bgr: #fff;
    --card-back-col: #fff;
    --card-back-bgr: #EE741D;
    --card-ibox-hgt: 14rem;         /* min-height of the card - depends of the text card-back - def 14rem */
    --card-body-bdr: 1px solid rgba(0,0,0,.05);     /* border - def 1px */
    /* grid-area */
    --grid-area-gap: 1rem;          /* gap between flipboxes - def 1rem | min .3rem - check used shadow */
    --grid-area-pad: 1rem;          /* padding - check card-border-radius - def 1rem | min .3rem */
    --grid-area-bgr: none;          /* background - def none */
    --grid-area-bdr: 0px solid rgba(0,0,0,.25);     /* border - def 0px  */
    --grid-area-rad: 0rem;          /* border-radius - def 0rem */
    /* counter - card-front */ 
    --count-color: red;            /* color of the counter - must be the same as card-back-background AND no transparent */
    --count-size: 2.4rem;             /* counter size - def 4rem */
    --count-pos-top:0;        /* counte rposition top - def 1rem */
    --count-pos-right: 0;        /* counter position right - def 1.2rem */
    --count-pos-bottom: 0;     /* counter position bottom - NOT IN USE */ 
    --count-pos-left: 96%;       /* counter position left - NOT IN USE */
    --count-width: 1px;             /* counter stroke - def 1px | max 3px */
    /* animation */
    --time-flip: 0.8s;              /* def 0.8s */
	}

/* ------------------------------------------------------------------------------ */
/* ------------------------------------------------------------ 6.0/00 - 05-09-22 */
/* CARD2info */
/* RESET COUNTER -> SEE design.css */

*, ::after, ::before {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  height: 100%;
}

body {
  display: flex;
  background: #fff;
  padding: 10rem;
  overflow-x: hidden;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.75em;
  justify-content: center;
  align-items: center;
}

.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(2, 1fr);
  width: 100%;
  position: relative;
  margin:4rem 0 0 0;
  gap: 1em;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 700px;
}

.item {
  border-radius: 5px;
  flex: 0 0;
  position: relative;
  display: flex;
  flex-direction: column;
  color: white;
  cursor: pointer;
  z-index: 0;
  transition: all 0.5s, z-index 0s 0.5s;
}
.item .thumbnail {
  overflow: hidden;
  position: relative;
  border-radius: 5px;
  /*box-shadow: 0 2em 1em -1.5em rgba(0, 0, 0, 0.4), 0 -2em 1em -1.5em rgba(0, 0, 0, 0.4);*/
  background-color: #ccc;
}
.item .thumbnail > img {
  height: 200px;
  width: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: 16/9;
  transition: transform 1s;
}
.item .description {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(100%);
  transition: 0.75s 0.25s;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 1.5em;
  z-index: 1;
}
.item .description::before {
  content: "";
  inset: 0;
  position: absolute;
  background-image: linear-gradient(transparent 50%, rgba(0, 0, 0, 0.9));
  z-index: -1;
}
.item .summary, .item::before {
  position: absolute;
  z-index: -1;
  background-color: #2e2e38;
  inset-inline: 1em;
  transition: 1s;
}
.item .summary {
  overflow: hidden;
  font-size: 0.9em;
  padding: 1.25em;
  bottom: 0;
  border-bottom-right-radius: 5px;
  border-bottom-left-radius: 5px;
  transform: rotateX(90deg);
}
.item::before {
  content: "";
  border-top-right-radius: 5px;
  border-top-left-radius: 5px;
  top: -1.5em;
  bottom: 100%;
  transform: translateY(100%);
}
.item:hover {
  transform: scale(1.75);
  filter: drop-shadow(0 0 2em black);
  z-index: 1;
}
.item:hover, .item:hover::before,
.item:hover > * {
  transition-delay: 0.5s;
}
.item:hover::before {
  transform: translateY(0%);
  transition-delay: 1s;
}
.item:hover .description {
  opacity: 1;
  transform: translateY(0%);
}
.item:hover .summary {
  transform: translateY(100%);
  transition-delay: 1s;
}
.item:hover .thumbnail > img {
  transform: scale(1.25);
  transition: transform 30s;
}

.item:nth-child(1) {
  grid-column: 1/span 3;
}

.item:nth-child(2) {
  grid-column: 4/span 2;
}

.item:nth-child(3) {
  grid-column: 1/span 2;
  grid-row: 2;
}

.item:nth-child(4) {
  grid-column: 3/span 3;
  grid-row: 2;
}

/* ------------------------------------------------------------------------------ */
/* ------------------------------------------------------------ 6.0/00 - 21-08-22 */
/* css-counter postion background */
/* https://stackoverflow.com/questions/43514987/css-increasing-number-as-background-images-for-css */	
.card-counter::before { 
	position:absolute;
    display:flex;
	  top:var(--count-pos-top,1.2rem);*/
  	right:var(--count-pos-right,-1.2rem);
  	bottom:var(--count-pos-bottom,0.6rem);
    left:var(--count-pos-left,1.2rem);
	justify-content:center;
    align-items:center;
    counter-increment:Element 1;
	content:counter(Element) '';
	font-size:var(--count-size,4rem); 
	font: 800 Arial;
	  -webkit-text-fill-color:transparent; /* works FF, Chrome and Edge */
	  -webkit-text-stroke:var(--count-width,1px);
	  -webkit-font-smoothing:antialiased;
	color:var(--count-color,#EE741D); /* must be the same color als card-back background */
    opacity:1;
	z-index:999;
	}
/* shadow */
/*
.shadow, .flex-item {
  box-shadow: 0 -1px 1px rgba(0, 0, 0, 0.04), 0 2px 2px rgba(0, 0, 0, 0.04), 0 4px 4px rgba(0, 0, 0, 0.04), 0 8px 8px rgba(0, 0, 0, 0.04), 0 16px 16px rgba(0, 0, 0, 0.04);
}
*/	
/* ------------------------------------------------------------------------------ */
/* END */	
/* ------------------------------------------------------------------------------ */