More actions
No edit summary Tag: Reverted |
No edit summary Tag: Manual revert |
||
Line 1: | Line 1: | ||
/* 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 */ | |||
} | |||
/* Front-facing text color */ | |||
.card-front { | |||
color: #333; /* Darker text color for front-facing text */ | |||
} | |||
/* Card styling */ | /* Card styling */ | ||
.card { | .card { | ||
width: | width: 420px; /* Increased card width */ | ||
height: | height: 320px; /* Increased card height */ | ||
background-color: #fff; | background-color: #fff; | ||
border: 1px solid #ddd; | border: 1px solid #ddd; | ||
Line 10: | Line 26: | ||
cursor: pointer; | cursor: pointer; | ||
overflow: hidden; | overflow: hidden; | ||
display: flex; /* Ensure flex layout for content alignment */ | |||
flex-direction: column; /* Ensure content stacks vertically */ | |||
} | } | ||
Line 40: | Line 58: | ||
display: flex; | display: flex; | ||
flex-direction: column; | flex-direction: column; | ||
gap: | gap: 5px; /* Reduced space between text boxes */ | ||
justify-content: | justify-content: flex-start; /* Align items at the top */ | ||
align-items: center; | align-items: center; | ||
} | } | ||
Line 61: | Line 79: | ||
display: flex; /* Use flexbox to arrange the side panels */ | display: flex; /* Use flexbox to arrange the side panels */ | ||
gap: 10px; /* Space between side panels */ | gap: 10px; /* Space between side panels */ | ||
justify-content: | flex-direction: column; /* Stack title and panels vertically */ | ||
align-items: center; /* Center the | justify-content: flex-start; /* Align items at the top */ | ||
align-items: center; /* Center the content horizontally */ | |||
} | } | ||
/* | /* Title for the text box - Small and positioned at the top */ | ||
. | .text-box h4 { | ||
font-size: | font-size: 10px; /* Even smaller font size */ | ||
font-weight: bold; | |||
color: #333; | color: #333; | ||
margin | margin-bottom: 5px; /* Small gap below title */ | ||
text-transform: uppercase; /* Make it uppercase */ | |||
text-align: center; | |||
align | |||
} | } | ||
/* Sub-panel styling */ | /* Sub-panel styling */ | ||
.sub-panel { | .sub-panel { | ||
font-size: 14px; /* Adjust text size for readability */ | |||
color: #333; | |||
margin: 0; | |||
padding: 10px; | |||
background-color: #ececec; | background-color: #ececec; | ||
border: 1px solid #ccc; | border: 1px solid #ccc; | ||
Line 97: | Line 108: | ||
cursor: pointer; | cursor: pointer; | ||
transition: transform 0.4s ease-in-out, background-color 0.3s; | transition: transform 0.4s ease-in-out, background-color 0.3s; | ||
width: 100%; /* Ensure sub-panels fill the available space */ | |||
max-width: calc(45% - 10px); /* Make sure sub-panels are responsive */ | |||
height: 70px; /* Set height to make it large enough */ | |||
} | } | ||
Line 105: | Line 119: | ||
} | } | ||
/* | /* Styling for sub-panel container */ | ||
.sub-panel-container | .sub-panel-container { | ||
display: flex; | |||
flex-wrap: wrap; /* Allow panels to wrap if needed */ | |||
gap: 10px; /* Space between sub-panels */ | |||
justify-content: center; /* Center align sub-panels */ | |||
align-items: center; | |||
width: 100%; | |||
padding: 10px; | |||
} | } | ||
/* Text inside sub-panels */ | /* Text inside sub-panels */ | ||
.sub-panel p { | .sub-panel p { | ||
font-size: 14px; /* Adjust text size for | font-size: 14px; /* Adjust text size for readability */ | ||
color: #333; | color: #333; | ||
margin: 0; | margin: 0; |
Revision as of 03:18, 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 */
}
/* Front-facing text color */
.card-front {
color: #333; /* Darker text color for front-facing text */
}
/* Card styling */
.card {
width: 420px; /* Increased card width */
height: 320px; /* Increased 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;
display: flex; /* Ensure flex layout for content alignment */
flex-direction: column; /* Ensure content stacks vertically */
}
/* Inner wrapper for flip effect */
.card-inner {
width: 100%;
height: 100%;
transform-style: preserve-3d;
transition: transform 0.6s ease-in-out;
position: relative;
}
/* 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: 5px; /* Reduced space between text boxes */
justify-content: flex-start; /* Align items at the top */
align-items: center;
}
/* Flip effect */
.card:hover .card-inner {
transform: rotateY(180deg);
}
/* Text box on 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; /* Use flexbox to arrange the side panels */
gap: 10px; /* Space between side panels */
flex-direction: column; /* Stack title and panels vertically */
justify-content: flex-start; /* Align items at the top */
align-items: center; /* Center the content horizontally */
}
/* Title for the text box - Small and positioned at the top */
.text-box h4 {
font-size: 10px; /* Even smaller font size */
font-weight: bold;
color: #333;
margin-bottom: 5px; /* Small gap below title */
text-transform: uppercase; /* Make it uppercase */
text-align: center;
}
/* Sub-panel styling */
.sub-panel {
font-size: 14px; /* Adjust text size for readability */
color: #333;
margin: 0;
padding: 10px;
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;
width: 100%; /* Ensure sub-panels fill the available space */
max-width: calc(45% - 10px); /* Make sure sub-panels are responsive */
height: 70px; /* Set height to make it large enough */
}
/* Adjust hover effect for sub-panels */
.sub-panel:hover {
background-color: #ddd;
transform: scale(1.05); /* Slightly enlarge on hover */
}
/* Styling for sub-panel container */
.sub-panel-container {
display: flex;
flex-wrap: wrap; /* Allow panels to wrap if needed */
gap: 10px; /* Space between sub-panels */
justify-content: center; /* Center align sub-panels */
align-items: center;
width: 100%;
padding: 10px;
}
/* Text inside sub-panels */
.sub-panel p {
font-size: 14px; /* Adjust text size for readability */
color: #333;
margin: 0;
text-align: center;
}
/* Centering the buttons inside sub-panels */
.sub-panel button {
width: 100%; /* Make the button fill the entire width of the sub-panel */
height: 100%; /* Make the button fill the entire height of the sub-panel */
background-color: #4CAF50; /* Green background */
color: white; /* White text */
border: none; /* Remove border */
border-radius: 4px; /* Optional rounded corners */
text-align: center; /* Center the text */
font-size: 14px; /* Font size */
display: flex; /* Flexbox for centering content */
justify-content: center; /* Horizontally center the text */
align-items: center; /* Vertically center the text */
cursor: pointer;
}
/* Hover effect for buttons */
.sub-panel button:hover {
background-color: #45a049; /* Darker green on hover */
transform: scale(1.05); /* Slightly enlarge on hover */
}