Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
/* General container for all cards */
.card-container {
display: flex;
flex-wrap: wrap;
justify-content: center; /* Center the cards */
gap: 20px; /* Space between cards */
padding: 20px; /* Padding for the container */
box-sizing: border-box;
}
/* Individual card styling */
.card {
width: 300px; /* Adjust size for responsiveness */
height: 200px;
background-color: #fff;
border: 1px solid #ddd;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
perspective: 1000px; /* Enable 3D perspective */
position: relative;
cursor: pointer;
transition: transform 0.6s ease;
}
/* Card inner wrapper */
.card-inner {
position: relative;
width: 100%;
height: 100%;
transform-style: preserve-3d;
transition: transform 0.6s ease;
}
/* Front and back styling */
.card-front, .card-back {
position: absolute;
width: 100%;
height: 100%;
backface-visibility: hidden;
display: flex;
justify-content: center;
align-items: center;
padding: 10px;
box-sizing: border-box;
}
.card-back {
transform: rotateY(180deg);
background-color: #f8f8f8; /* Different background for back */
}
/* Flip effect on hover */
.card:hover .card-inner {
transform: rotateY(180deg);
}
/* Sub-panel inside the back */
.sub-panel {
margin: 5px 0;
font-size: 14px;
color: #333;
text-align: center;
}
/* Styling for sub-card container */
.sub-card-container {
display: flex;
flex-direction: column;
gap: 10px;
justify-content: flex-start;
align-items: center;
width: 100%;
padding: 10px;
box-sizing: border-box;
}
/* Sub-card styling */
.sub-card {
width: 90%;
height: 60px;
background-color: #ececec;
border: 1px solid #ccc;
display: flex;
justify-content: center;
align-items: center;
border-radius: 4px;
cursor: pointer;
transition: transform 0.4s ease-in-out, background-color 0.3s;
}
.sub-card:hover {
background-color: #ddd;
}
/* Nested sub-card styling */
.sub-card-container .sub-card-container {
padding-left: 20px;
border-left: 2px solid #ccc;
margin-top: 10px;
}