More actions
No edit summary Tag: Reverted |
No edit summary Tag: Reverted |
||
Line 149: | Line 149: | ||
transform: scale(1.05); | transform: scale(1.05); | ||
} | } | ||
/* | /* General container for all main cards */ | ||
. | .main-card-container { | ||
display: grid; | |||
grid-template-columns: repeat(2, 1fr); /* Two main cards per row */ | |||
gap: 20px; | |||
padding: 20px; | |||
box-sizing: border-box; | |||
justify-items: center; /* Center cards horizontally */ | |||
align-items: start; /* Align cards at the top vertically */ | |||
} | |||
/* Main card styling */ | |||
.main-card { | |||
color: black; /* Ensure text inside the main card is black */ | |||
width: 480px; /* Main card width */ | |||
height: 380px; /* Main card height */ | |||
background-color: #fff; | |||
border: 1px solid #ddd; | |||
border-radius: 8px; | |||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); | |||
position: relative; | |||
cursor: pointer; | |||
overflow: hidden; /* Prevent overflow of content */ | |||
display: flex; | display: flex; | ||
flex-direction: column; /* Stack content vertically */ | flex-direction: column; /* Stack content inside vertically */ | ||
justify-content: flex-start; | |||
align-items: center; | |||
} | } | ||
/* | /* Main card title */ | ||
. | .main-card h3 { | ||
font-size: 20px; | font-size: 20px; | ||
font-weight: bold; | font-weight: bold; | ||
padding: 10px; | |||
text-align: center; | text-align: center; | ||
} | } | ||
/* Sub- | /* Sub-card container inside the main card */ | ||
. | .sub-card-wrapper { | ||
display: flex; | display: flex; | ||
flex-direction: column; /* Stack | flex-direction: column; /* Stack the sub-cards vertically */ | ||
gap: 10px; | gap: 10px; | ||
padding: 15px; | |||
width: 100%; | |||
} | } | ||
/* | /* Sub-card styling */ | ||
. | .sub-card { | ||
background-color: # | background-color: #f8f8f8; | ||
padding: 10px; | padding: 10px; | ||
border-radius: | border-radius: 8px; | ||
border: 1px solid #ccc; | |||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); | |||
cursor: pointer; | |||
text-align: center; | text-align: center; | ||
transition: background-color 0.3s ease, transform 0.3s ease; | |||
} | } | ||
/* Hover effect for sub- | /* Hover effect for sub-cards */ | ||
. | .sub-card:hover { | ||
background-color: #e0e0e0; | background-color: #e0e0e0; | ||
transform: scale(1.05); | transform: scale(1.05); | ||
} | |||
/* Content inside the sub-card - initially hidden */ | |||
.sub-card-content { | |||
display: none; | |||
padding: 10px; | |||
background-color: #ececec; | |||
border-radius: 8px; | |||
margin-top: 10px; | |||
text-align: left; | |||
color: #333; | |||
} | |||
/* Active class for showing sub-card content */ | |||
.sub-card.active .sub-card-content { | |||
display: block; | |||
} | } |
Revision as of 06:54, 30 December 2024
/* General container for all cards */
.card-container {
display: grid;
grid-template-columns: repeat(2, 1fr); /* Two cards per row */
gap: 20px;
padding: 20px;
box-sizing: border-box;
justify-items: center; /* Center cards horizontally */
align-items: start; /* Align cards at the top vertically */
}
/* Card styling */
.card {
color: black; /* Ensure text inside the card is black */
width: 480px; /* Card width */
height: 380px; /* Card height */
background-color: #fff;
border: 1px solid #ddd;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
position: relative;
cursor: pointer;
overflow: hidden; /* Prevent overflow of content */
display: flex;
flex-direction: column; /* Stack content inside vertically */
justify-content: flex-start;
align-items: center;
}
/* Inner wrapper for flip effect */
.card-inner {
width: 100%;
height: 100%;
transform-style: preserve-3d;
transition: transform 0.6s ease-in-out;
position: relative;
display: flex;
flex-direction: column; /* Stack front and back vertically */
}
/* 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;
}
/* Back face flipped */
.card-back {
transform: rotateY(180deg);
background-color: #f8f8f8;
display: flex;
flex-direction: column;
gap: 10px;
justify-content: flex-start; /* Align text boxes at the top */
align-items: center;
overflow-y: auto; /* Add scroll if content exceeds card height */
padding: 15px; /* Add padding for better spacing */
}
/* Flip effect */
.card:hover .card-inner {
transform: rotateY(180deg);
}
/* Text box inside the back of the card */
.text-box {
width: 90%;
padding: 10px;
background-color: #e9ecef; /* Light gray box */
border-radius: 8px;
border: 1px solid #ccc;
text-align: center;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
display: flex;
flex-direction: column; /* Stack content inside vertically */
gap: 10px;
justify-content: center; /* Center content inside */
align-items: center;
overflow-wrap: break-word; /* Prevent long text overflow */
word-wrap: break-word; /* Compatibility for older browsers */
}
/* Title for the text box */
.text-box h4 {
font-size: 14px; /* Adjusted font size */
font-weight: bold;
color: black; /* Ensure it's black */
margin: 0; /* Remove default margins */
text-transform: uppercase; /* Cleaner look */
}
/* Sub-panel container inside the text box */
.sub-panel-container {
display: flex;
flex-direction: column; /* Stack sub-panels vertically */
gap: 10px; /* Space between sub-panels */
width: 100%;
max-height: 100%; /* Prevent overflow within text-box */
overflow-y: auto; /* Add scroll for sub-panels if necessary */
padding: 5px;
box-sizing: border-box;
}
/* Individual sub-panel styling */
.sub-panel {
font-size: 16px;
color: black;
width: 100%; /* Fit within the container */
padding: 10px;
background-color: #ececec;
border: 1px solid #ccc;
border-radius: 4px;
text-align: center;
cursor: pointer;
transition: transform 0.3s ease, background-color 0.3s ease;
}
/* Hover effect for sub-panels */
.sub-panel:hover {
background-color: #ddd;
transform: scale(1.05); /* Slightly enlarge on hover */
}
/* Buttons inside sub-panels */
.sub-panel button {
width: 100%;
height: 100%;
background-color: #4CAF50; /* Green background */
color: white;
border: none;
border-radius: 4px;
font-size: 14px;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
}
/* Hover effect for buttons */
.sub-panel button:hover {
background-color: #45a049; /* Darker green on hover */
transform: scale(1.05);
}
/* General container for all main cards */
.main-card-container {
display: grid;
grid-template-columns: repeat(2, 1fr); /* Two main cards per row */
gap: 20px;
padding: 20px;
box-sizing: border-box;
justify-items: center; /* Center cards horizontally */
align-items: start; /* Align cards at the top vertically */
}
/* Main card styling */
.main-card {
color: black; /* Ensure text inside the main card is black */
width: 480px; /* Main card width */
height: 380px; /* Main card height */
background-color: #fff;
border: 1px solid #ddd;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
position: relative;
cursor: pointer;
overflow: hidden; /* Prevent overflow of content */
display: flex;
flex-direction: column; /* Stack content inside vertically */
justify-content: flex-start;
align-items: center;
}
/* Main card title */
.main-card h3 {
font-size: 20px;
font-weight: bold;
padding: 10px;
text-align: center;
}
/* Sub-card container inside the main card */
.sub-card-wrapper {
display: flex;
flex-direction: column; /* Stack the sub-cards vertically */
gap: 10px;
padding: 15px;
width: 100%;
}
/* Sub-card styling */
.sub-card {
background-color: #f8f8f8;
padding: 10px;
border-radius: 8px;
border: 1px solid #ccc;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
cursor: pointer;
text-align: center;
transition: background-color 0.3s ease, transform 0.3s ease;
}
/* Hover effect for sub-cards */
.sub-card:hover {
background-color: #e0e0e0;
transform: scale(1.05);
}
/* Content inside the sub-card - initially hidden */
.sub-card-content {
display: none;
padding: 10px;
background-color: #ececec;
border-radius: 8px;
margin-top: 10px;
text-align: left;
color: #333;
}
/* Active class for showing sub-card content */
.sub-card.active .sub-card-content {
display: block;
}