/* * {
  margin: 0;
  padding: 0;
} */


:root {
  font-size: 18px;
  --colorGreen: #00a448;
  --colorBlue: #0d468f;
  --colorRed: #e73233; 
  --colorYellow: #f69f21;
}
body {
  padding: 2rem;
}
.bg--dark {
  color: #fff;
  background-color: #2c3e50;
}

footer {
  padding: 3rem;
}

.grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  grid-template-rows: 300px 300px 300px;
}
@media only screen and (min-width: 768px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media only screen and (min-width: 1200px) {
  .grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
@media only screen and (min-width: 1440px) {
  .grid {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }
}
.box {
  align-self: center;
  justify-self: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  width: 300px;
  min-height: 300px;
  border-radius: 6px;
  box-shadow: 4px 8px 16px rgba(0,0,0,0.1);
}
h4 {
  margin: 2rem auto 1rem;
}
button {
  padding: 1rem 2rem;
  font-size: 16px;
}
.seeCodeHere {
  margin: auto 0 1.5rem;
  line-height: 1.4;
}

/* Simple Glitch */
.box.simpleGlitch {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: bungee, sans-serif;
  font-size: 50px;
  font-weight: 900;
}
span.simpleGlitchOnHover:hover {
  animation: glitch 1s infinite;
} 
span.simpleGlitch {
  animation: glitch 2s infinite;
}

@keyframes glitch {
  0% { text-shadow: none; }
  75% { text-shadow: none; }
  76% {
    text-shadow: 0.05em 0 0 rgba(255, 0, 0, .75),
    -0.05em -0.025em 0 rgba(0, 255, 0, .75),
    -0.05em -0.05em 0 rgba(0, 0, 255, .75);
  }
  80% {
    text-shadow: 0.05em 0 0 rgba(255, 0, 0, .75),
    -0.05em -0.025em 0 rgba(0, 255, 0, .75),
    -0.05em -0.05em 0 rgba(0, 0, 255, .75);
  }
  81% {
    text-shadow: 0.05em 0 0 rgba(255, 0, 0, .75),
    -0.025em -0.05em 0 rgba(0, 255, 0, .75),
    0.025em 0.05em 0 rgba(0, 0, 255, .75);
  }
  85% {
    text-shadow: 0.05em 0 0 rgba(255, 0, 0, .75),
    -0.025em -0.05em 0 rgba(0, 255, 0, .75),
    0.025em 0.05em 0 rgba(0, 0, 255, .75);
  }
  86% {
    text-shadow: 0.025em 0.05em 0 rgba(255, 0, 0, .75),
    0.05em 0 0 rgba(0, 255, 0, .75),
    0 -0.05em 0 rgba(0, 0, 255, .75);
  }
  87% {
    text-shadow: 0.025em 0.05em 0 rgba(255, 0, 0, .75),
    0.05em 0 0 rgba(0, 255, 0, .75),
    0 -0.05em 0 rgba(0, 0, 255, .75);
  }
  88% {
    text-shadow: -0.025em 0 0 rgba(255, 0, 0, .75),
    -0.025em -0.025em 0 rgba(0, 255, 0, .75),
    -0.025em 0.05em 0 rgba(0, 0, 255, .75);
  }
  100% {
    text-shadow: -0.025em 0 0 rgba(255, 0, 0, .75),
    -0.025em -0.025em 0 rgba(0, 255, 0, .75),
    -0.025em 0.05em 0 rgba(0, 0, 255, .75);
  }
}
@keyframes flipHorizontal {
  50% { transform: rotateY(180deg);}
  to { transform: rotateY(360deg);}
}

/* Text-Shadow Effect */
.text-shadow {
  margin-top: 1.5rem;
  font-size: 40px;
  font-weight: 700;
  text-align: center;
  color: green;
  font-family: bungee, sans-serif;
  text-shadow: 
    0.025em 0.025em 0 yellow,
    0.05em 0.05em 0 blue,
    0.075em 0.075em 0 red,
    0.1em 0.1em 0 black;
}

/* Typing Effect */
.typingEffect {
  margin-top: 3rem;
  font-size: 30px;
  font-family: monospace;
  overflow: hidden;
  white-space: nowrap;
  width: 13ch;
  border-right: 3px solid;
  animation: typingEffect 2s steps(13), blinkingCursor .5s step-end infinite alternate;
}

@keyframes typingEffect {
  from {width: 0;}
}
@keyframes blinkingCursor {
  50% {border-color: transparent;}
}

/* Conic Gradient */
.conicGradient {
  width: 150px;
  height: 150px;
  border-radius: 6px;
  background: conic-gradient(#f69f21, #00a448);
}
.conicGradient:hover {
  background: conic-gradient(#f69f21, #e73233, #0d468f, #00a448);
}

/* Pie Chart with Conic Gradient */
.conicGradientPieChart {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  /* After color: one value where the color should start and one where it should end. At beginning and end one value is enough - beginning (0turn) and end (1turn) are assumed. */
  background: conic-gradient(#00a448 .2turn, #0d468f .2turn .55turn, #e73233 .55turn .75turn, #f69f21 .75turn);
}
.conicGradientPieChart:hover {
  background: conic-gradient(#00a448 .35turn, #0d468f .35turn .5turn, #e73233 .5turn .65turn, #f69f21 .65turn);
}

/* Resize */
.box.resize {
  /* magic here */
  resize: both;
  /* overflow must be 'auto', 'hidden' or 'scroll' but NOT 'visible' */
  overflow: hidden;
  background-color: #fff;
  height: 300px;
  box-sizing: border-box;
  text-align: center;
}
.box.resize p,
.box.resize span {
  padding: 0 1.5rem;
}

/* Filter: hue-rotate */
.filter.hue-rotate {
  width: 150px;
  height: 150px;
  border-radius: 6px;
  background-color:#ff0;
}
.filter.hue-rotate:hover {
  animation: hueRotate 5s infinite;
}
@keyframes hueRotate {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

/* Flip Vertical */
.box.flipAnimation {
  justify-content: center;
  perspective: 500px;
}
.box.flipAnimation .textX,
.box.flipAnimation .textY {
  font-size: 30px;
  font-weight: 900;
  cursor: pointer;
}
.box.flipAnimation .rectangleX,
.box.flipAnimation .rectangleY {
  width: 200px;
  height: 80px;
  
  margin-top: 40px;
  cursor: pointer;
}
.box.flipAnimation .rectangleX {
  background-color: #f69f21;
}
.box.flipAnimation .rectangleY {
  background-color: #00a448;
}
.box.flipAnimation .textX:hover,
.box.flipAnimation .rectangleX:hover {
  animation: flipVertical 1s linear;
}
.box.flipAnimation .textY:hover,
.box.flipAnimation .rectangleY:hover {
  animation: flipHorizontal 2s linear;
}

@keyframes flipVertical {
  50% { transform: rotateX(180deg);}
  to { transform: rotateX(360deg);}
}
@keyframes flipHorizontal {
  50% { transform: rotateY(180deg);}
  to { transform: rotateY(360deg);}
}

/* Image Behind Text */
.box.image-text {
  justify-content: center;
  position: relative;
}
.box.image-text h1 {
  font-size: 85px;
  font-weight: 900;
  letter-spacing: 8px;
  font-family: "Montserrat", sans-serif;
  text-transform: uppercase;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  background: url(images/roses.jpg) 50% 50%;
  background-size: cover;
  -webkit-text-fill-color:transparent;
  -webkit-background-clip:text;
  transition: .5s linear;
}
.box.image-text h1:hover {
  background: url(images/flowers.jpeg) 50% 50%;
  -webkit-text-fill-color:transparent;
  -webkit-background-clip:text;
}

/* Expanding Text */
.text__expanding {
  display: flex;
  flex-direction: row;
  margin: auto 0;
  height: 63px;
}
.text__expanding span {
  text-transform: uppercase;
  font-family: "montserrat", sans-serif;
  font-size: 55px;
  letter-spacing: 5px;
  transition: .5s linear;
  margin: auto 0;
}
.text__expanding .hidden {
  max-width: 0;
  opacity: 0;
  transition: .5s linear;
}
.text__expanding:hover .hidden {
  max-width: 1em;
  opacity: 1;
}
.text__expanding:hover span {
  font-size: 25px;
  letter-spacing: 2px;
}

/* Text Change with CSS */
a.textChangeCSS {
  padding: 1em 2em;
  margin-top: 3.5rem;
  border: 1px solid black;
  border-radius: 6px;
  text-decoration: none;
  color: #000;
}
.textChangeCSS {
  position: relative;
}
.textChangeCSS::before {
  content: 'Hover above the button.';
  position: absolute;
  width: 150px;
  top: -65px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: coral;
}
.textChangeCSS:hover::before {
  content: 'Now click and hold.';
  color: green;
}
.textChangeCSS:focus::before {
  content: 'Unfocus the button.';
  color: blue;
}
.textChangeCSS::after {
  content: 'Some Text';
  position: absolute;
  width: 150px;
  top: 90px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: coral;
}
.textChangeCSS:hover::after {
  content: 'Some other Text';
  color: green;
}
a.textChangeCSS:focus::after {
  content: 'And yet some other text';
  color: blue;
}


/* * { outline: 2px dotted red }
* * { outline: 2px dotted green }
* * * { outline: 2px dotted orange }
* * * * { outline: 2px dotted blue }
* * * * * { outline: 1px solid red }
* * * * * * { outline: 1px solid green }
* * * * * * * { outline: 1px solid orange }
* * * * * * * * { outline: 1px solid blue } */