You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

97 lines
1.8 KiB

@import url('https://fonts.googleapis.com/css?family=Muli&display=swap');
* {
box-sizing: border-box;
}
body {
font-family: 'Muli', sans-serif;
/* Adjust display to allow space for controls */
display: flex;
flex-direction: column; /* Stack controls above container */
align-items: center;
justify-content: center;
height: 100vh;
overflow: hidden;
margin: 0;
}
.container {
display: flex;
width: 90vw;
}
.panel {
background-size: cover;
background-position: center;
background-repeat: no-repeat;
height: 80vh;
border-radius: 50px;
color: #fff;
cursor: pointer;
flex: 0.5;
margin: 10px;
position: relative;
transition: all 700ms ease-in, outline 0.1s linear; /* Keep existing transition */
}
.panel h3 {
font-size: 24px;
position: absolute;
bottom: 20px;
left: 20px;
margin: 0;
opacity: 0;
/* Add slide animation styles */
transform: translateY(30px);
transition: opacity 0.3s ease-in 0.4s, transform 0.4s ease-in 0.4s;
}
.panel.active {
flex: 5;
}
.panel.active h3 {
opacity: 1;
transform: translateY(0); /* Final position for slide animation */
/* Remove transition from here as it's handled by base .panel h3 */
}
.panel:focus {
outline: 3px solid #fff;
outline-offset: -3px;
}
/* --- ADDED Styles for Auto-Cycle Controls --- */
.controls {
text-align: center;
margin-bottom: 20px; /* Add space between buttons and cards */
}
.controls button {
background-color: #eee;
border: none;
padding: 10px 20px;
margin: 0 10px;
border-radius: 5px;
cursor: pointer;
font-size: 1rem;
transition: background-color 0.3s ease;
}
.controls button:hover {
background-color: #ddd;
}
/* --- End of Added Styles --- */
@media (max-width: 480px) {
.container {
width: 100vw;
}
.panel:nth-of-type(4),
.panel:nth-of-type(5) {
display: none;
}
}