/* https://devdevout.com/css/css-cards */

:root {
  --surface-color: #fff;
  --label-color: #bbb;
  --curve: 40;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  background-color: #fef8f8;
}

.cardstyles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 4rem 5vw;
  padding: 0;
  list-style-type: none;
}

.cardstyle {
  position: relative;
  display: block;
  height: 100%;  
  border-radius: calc(var(--curve) * 1px);
  overflow: hidden;
  text-decoration: none;
}

.cardstyle__image {      
  width: 100%;
  height: auto;
}

.cardstyle__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;      
  border-radius: calc(var(--curve) * 1px);    
  background-color: var(--surface-color);      
  transform: translateY(100%);
  transition: .2s ease-in-out;
}

.cardstyle__rightoverlay {
  position: absolute;
  bottom: 85%;
  left: 75%;
  right: 75%;
  z-index: 2;
  text-align: center;
  color: #6A515E;
  background-color: var(--surface-color);      
  transform: translateY(40%);
  transition: .2s ease-in-out;
  height: 40px;
  width: 50px;
  line-height: 45px;
  background-color: var(--label-color);
  border-radius: 50%;
}

.cardstyle__leftoverlay {
  position: absolute;
  bottom: 85%;
  left: 5%;
  right: 75%;
  z-index: 2;
  text-align: center;
  color: #6A515E;
  background-color: #fff;
  transform: translateY(40%);
  transition: .2s ease-in-out;
  height: 40px;
  width: 50px;
  line-height: 45px;
  background-color: #fff;
  border-radius: 50%;
}



.cardstyle__infooverlay {
    position: absolute;
    top: 50%; /* Center it vertically */
    left: 50%; /* Center it horizontally */
    transform: translate(-50%, -50%); /* Perfect centering */
    color: white; /* White text */
    font-size: 16px;
    font-weight: bold;
    text-align: left;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5); /* Optional: semi-transparent background */
    border-radius: 10px; /* Rounded edges */
    width: auto;
    display: inline-block;
}



.cardstyle:hover .cardstyle__overlay {
  transform: translateY(0);
}

.cardstyle__header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1em;
  padding: 1em;
  border-radius: calc(var(--curve) * 1px) 0 0 0;    
  background-color: var(--surface-color);
  transform: translateY(-100%);
  transition: .2s ease-in-out;
}

.cardstyle__arc {
  width: 80px;
  height: 80px;
  position: absolute;
  bottom: 98%;
  right: 0;      
  z-index: 1;
}

.cardstyle__arc path {
  fill: var(--surface-color);
  d: path("M 40 80 c 22 0 40 -22 40 -40 v 40 Z");
}       

.cardstyle:hover .cardstyle__header {
  transform: translateY(0);
}

.cardstyle:active .cardstyle__header {
  transform: translateY(0);
}

.cardstyle__thumb {
  flex-shrink: 0;
  width: 30px;
  height: 30px;      
  border-radius: 50%;      
}

.cardstyle__title {
  font-size: 1em;
  margin: 0 0 .3em;
  color: #6A515E;
}

.cardstyle__tagline {
  display: block;
  margin: 1em 0;
  font-family: "MockFlowFont";  
  font-size: .8em; 
  color: #D7BDCA;  
}

.cardstyle__status {
  font-size: .8em;
  color: #D7BDCA;
}

.cardstyle__description {
  padding: 0 2em 2em;
  margin: 0;
  color: #D7BDCA;
  font-family: "MockFlowFont";   
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}    










.card-button {
    background-color: #007bff; /* Bootstrap primary blue */
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 20px; /* Rounded corners */
    cursor: pointer;
    transition: background 0.3s ease-in-out, transform 0.2s ease-in-out;
    outline: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.card-button:hover {
    background-color: #0056b3; /* Darker blue on hover */
    transform: scale(1.05); /* Slight enlarge effect */
}

/* Press animation */
.card-button:active {
    background-color: #004494; /* Even darker when clicked */
    animation: pressEffect 0.2s ease-in-out;
}




.cardstyle__description {
    display: block; /* Ensure visibility */
    padding: 10px;
    color: #333;
    font-size: 16px;
    text-align: center;
}

/* Ensure button has correct style inside cardstyle__description */
.cardstyle__description .blue-button {
    background-color: #007bff !important; /* Force blue color */
    color: white !important;
    border: none !important;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 20px !important; /* Ensure rounded corners */
    cursor: pointer;
    transition: background 0.3s ease-in-out, transform 0.2s ease-in-out;
    outline: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    display: inline-block;
    margin-top: 10px;
}

/* Hover effect */
.cardstyle__description .blue-button:hover {
    background-color: #0056b3 !important;
    transform: scale(1.05);
}

/* Press animation */
.cardstyle__description .blue-button:active {
    background-color: #004494 !important;
    animation: pressEffect 0.2s ease-in-out;
}

/* Keyframes for Press Animation */
@keyframes pressEffect {
    0% { transform: scale(1); }
    50% { transform: scale(0.9); }
    100% { transform: scale(1); }
}


