Modern Card

Not a traditional Card It's A Special Card With Responsive Design and Supports Dark Mode For Reko LOVERS 😍

Start

Get Started By Making A Folder Includes index.html or Pug , style.css and make sure you Prepared The HTML/Pug file from here Introduction To Use Dark Mode Click Here

Put This in index.html if you use HTML

HTML
<div class="myflex">
   <article class="divcontainer">
     <a class="focus-a" href="#">
       <div class="course-box html-box">
         <div class="number-box number-red">
           <span class="num"> 1 </span>
         </div>
         <h2 lang="en" dir="ltr" class="html-course course-title">
           HTML COURSE
         </h2>
         <p lang="en" dir="ltr" class="click">
           Best Course
           <span role="img"> &#128525; </span>
         </p>
         <div class="html-container last-two-parts">
           <span dir="ltr" class="slogan"> &lt; &nbsp; /&gt; </span>
           <h4 class="html-logo bottom-course">HTML</h4>
         </div>
       </div>
     </a>
   </article>
</div>

Put This in you Pug Files if you use Pug

Pug
.myflex
  article.divcontainer
    a.focus-a(href="#")
      .course-box.html-box
        .number-box.number-red
          span.num 1 
        h2.html-course.course-title(lang="en", dir="ltr").
          HTML COURSE
        p.click(lang="en", dir="ltr")
          |   Best Course 
          span(role="img")  😍 
        .html-container.last-two-parts
          span.slogan(dir="ltr") </> 
          h4.html-logo.bottom-course HTML   
        h1.fs-3.pt-5.pb-0.mb-0 Put This in you Pug Files if you use Pug    

Put This in your style.css

CSS
:root {
    --yourColor: #a7244b; /* put your color here */
  }
.dark{
    --yourColor: #a7244b; /* put your Dark Mode color here */
}  

a {
  text-decoration: none !important;
}

.divcontainer {
  margin-top: 50px;
}

.myflex {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
}

.number-box {
  text-align: center;
  padding: 14px 0;
  border-top-right-radius: 8px;
  border-top-left-radius: 8px;
  width: 20rem;
}

.number-red {
  background-color: var(--yourColor);
}

.num {
  color: #fff;
  border: 3px solid #fff;
  padding: 2px 8px;
}

.html-course {
  color: var(--yourColor);
}

.course-title {
  font-size: 1.7rem;
  padding: 30px 0 15px 0;
}
p{
  all: unset;
}
p.click {
  color: var(--yourColor);
  font-size: 1.7rem;
  font-weight: bold;
  display: none;
  color: #fff;
  transform: translateY(-40px);
}

.course-box:hover p.click {
  display: block;
}

.course-box:hover .slogan {
  display: none;
}

.html-logo {
  background-color: var(--yourColor);
}

.bottom-course {
  color: white;
  border-bottom-right-radius: 8px;
  border-bottom-left-radius: 8px;
  padding: 4px 0;
  margin-top: 19px;
  border-top: 3px solid #fff;
}

.slogan {
  font-size: 3.2rem;
  height: 50px;
  display: block;
}

.dark .course-box,
.dark .course-title,
.dark .last-two-parts {
  background-color: aliceblue;
}

.html-container {
  color: var(--yourColor);
}

.last-two-parts {
  font-weight: bolder;
  font-size: 2.5rem;
  border-bottom-right-radius: 8px;
  border-bottom-left-radius: 8px;
  padding-top: 20px;
}

.dark .course-box:hover .course-title,
.dark .course-box:hover .last-two-parts {
  background-color: inherit;
}

.html-box:hover {
  background-color: var(--yourColor);
  box-shadow: 0 7px 93px 0 rgba(255, 131, 131, 0.47);
}

.dark .html-box:hover {
  background-color: var(--yourColor);
}

.course-box {
  border-radius: 8px;
  box-shadow: 0 0 4px 0 rgba(17, 22, 26, 0.16),
   0 2px 4px 0 rgba(17, 22, 26, 0.08),
    0 4px 8px 0 rgba(17, 22, 26, 0.08);
  transition: all 0.4s;
  text-align: center;
}

.course-box:hover {
  animation-name: fade-down;
  animation-duration: 0.5s;
}

@keyframes fade-down {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translate(0);
  }
}

@media (max-width: 688px) {
  .dark .number-box {
    background-color: aliceblue;
  }
  .last-two-parts {
    padding-top: 0;
  }
  .slogan {
    display: none;
  }
  .number-box {
    width: 17rem;
    background-color: #fff;
  }
  .number-red .num {
    color: var(--yourColor);
    border-color: var(--yourColor);
  }
  .course-box:hover .number-red {
    background-color: var(--yourColor);
  }
  .course-box:hover .num {
    color: #fff;
    border-color: white;
  }
  .number-red {
    border-top: 7px solid var(--yourColor);
  }
}