Files
Orchestrator/privat/CV/andreknie.de/src/components/TestimonialSlider.css
T

157 lines
3.2 KiB
CSS

.testimonials-section {
padding: var(--section-padding) 20px;
}
.testimonial-slider-controls {
display: flex;
justify-content: flex-end;
gap: 10px;
margin-bottom: 18px;
}
.testimonial-nav-button {
width: 42px;
height: 42px;
border: 1px solid var(--glass-border);
border-radius: 50%;
background: var(--bg-elevated);
color: var(--text-primary);
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}
.testimonial-nav-button:hover {
border-color: var(--accent-color);
color: var(--accent-color);
transform: translateY(-1px);
}
.testimonial-scroll-container {
display: flex;
overflow-x: auto;
scroll-snap-type: x mandatory;
scroll-behavior: smooth;
gap: 24px;
padding: 0 calc((100% - min(100%, var(--container-max))) / 2) 32px;
scroll-padding-inline: calc((100% - 88%) / 2);
cursor: grab;
user-select: none;
/* Hide scrollbar for cleaner look, or keep it subtle */
scrollbar-width: none; /* Firefox */
-ms-overflow-style: none; /* IE/Edge */
}
.testimonial-scroll-container:focus-visible,
.testimonial-nav-button:focus-visible {
outline: 2px solid var(--accent-color);
outline-offset: 4px;
}
.testimonial-scroll-container.dragging {
cursor: grabbing;
scroll-snap-type: none;
scroll-behavior: auto;
}
.testimonial-scroll-container::-webkit-scrollbar {
display: none; /* Chrome/Safari */
}
.testimonial-card {
/* On mobile, show ~85% width so the next card peeks in */
flex: 0 0 calc(88% - 24px);
scroll-snap-align: center;
/* Equal heights trick: cards stretch to the tallest sibling */
display: flex;
flex-direction: column;
margin: 0;
padding: 40px 32px;
text-align: center;
position: relative;
}
@media (min-width: 768px) {
.testimonial-scroll-container {
scroll-padding-inline: calc((100% - 60%) / 2);
}
.testimonial-card {
/* On tablet, show ~60% width */
flex: 0 0 calc(60% - 24px);
}
}
@media (min-width: 1024px) {
.testimonial-scroll-container {
scroll-padding-inline: calc((100% - 45%) / 2);
}
.testimonial-card {
/* On desktop, show ~45% width */
flex: 0 0 calc(45% - 24px);
}
}
.testimonial-quote {
position: relative;
margin-bottom: 32px;
/* Push author block to the bottom of the card */
flex-grow: 1;
display: flex;
flex-direction: column;
justify-content: center;
}
.quote-mark {
position: absolute;
top: -20px;
left: -10px;
font-size: 5rem;
color: var(--accent-color);
opacity: 0.3;
font-family: Georgia, serif;
line-height: 1;
}
.testimonial-quote p {
font-size: 1.1rem;
line-height: 1.6;
color: var(--text-primary);
font-style: italic;
margin: 0;
position: relative;
z-index: 1;
}
.testimonial-author {
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
margin-top: auto; /* Force to bottom */
}
.author-photo {
width: 48px;
height: 48px;
border-radius: 50%;
object-fit: cover;
}
.testimonial-author strong {
display: block;
color: var(--text-primary);
font-size: 0.95rem;
}
.testimonial-author span {
color: var(--text-secondary);
font-size: 0.85rem;
}