Files
Gallus_Pub/styles/components/ImageCarousel.css
k f3952e7e81 Add section IDs and smooth scrolling for improved navigation:
- Updated components (`Hero`, `Welcome`, `EventsGrid`, `ImageCarousel`, `Drinks`) to accept optional `id` props and applied them to `<section>` elements.
- Enabled smooth scrolling by adding `scroll-behavior: smooth` to global styles.
- Enhanced dropdown menu: added internal links for section navigation and adjusted styling for improved responsiveness.
- Updated color handling in `ImageCarousel` to use CSS variables for better theme consistency.
2025-07-20 13:32:43 +02:00

176 lines
2.8 KiB
CSS

/* styles/components/ImageCarousel.css */
.image-carousel-container {
width: 100%;
max-width: 1200px;
margin: 2rem auto;
padding: 0 1rem;
}
.section-title {
text-align: center;
margin-bottom: 1.5rem;
font-size: 2rem;
font-weight: bold;
color: var(--color-text);
}
.image-carousel {
position: relative;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
height: 400px;
}
.carousel-images {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
}
.carousel-track {
display: flex;
height: 100%;
position: relative;
}
.carousel-slide {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
transition: all 0.5s ease;
display: flex;
align-items: center;
justify-content: center;
transform: scale(0.8);
z-index: 1;
}
/* Current slide - center and fully visible */
.carousel-slide.current {
opacity: 1;
transform: scale(1);
z-index: 3;
}
/* Previous slide - left side, partially visible */
.carousel-slide.prev {
opacity: 0.7;
transform: translateX(-30%) scale(0.85);
z-index: 2;
}
/* Next slide - right side, partially visible */
.carousel-slide.next {
opacity: 0.7;
transform: translateX(30%) scale(0.85);
z-index: 2;
}
.carousel-image {
max-width: 100%;
max-height: 100%;
object-fit: contain;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
/* Navigation buttons */
.nav-button {
position: absolute;
top: 50%;
transform: translateY(-50%);
background-color: rgba(255, 255, 255, 0.7);
border: none;
border-radius: 50%;
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
z-index: 10;
transition: background-color 0.3s ease;
}
.nav-button:hover {
background-color: rgba(255, 255, 255, 0.9);
}
.prev-button {
left: 10px;
}
.next-button {
right: 10px;
}
.arrow {
font-size: 18px;
font-weight: bold;
}
/* Indicators */
.carousel-indicators {
display: flex;
justify-content: center;
margin-top: 1rem;
gap: 8px;
}
.indicator-dot {
width: 12px;
height: 12px;
border-radius: 50%;
background-color: #ccc;
border: none;
cursor: pointer;
transition: background-color 0.3s ease;
}
.indicator-dot.active {
background-color: #333;
}
/* Responsive adjustments */
@media (max-width: 768px) {
.image-carousel {
height: 300px;
}
.carousel-slide.prev,
.carousel-slide.next {
opacity: 0.5;
transform: scale(0.7);
}
.carousel-slide.prev {
transform: translateX(-20%) scale(0.7);
}
.carousel-slide.next {
transform: translateX(20%) scale(0.7);
}
}
@media (max-width: 480px) {
.image-carousel {
height: 250px;
}
.carousel-slide.prev,
.carousel-slide.next {
display: none;
}
.nav-button {
width: 30px;
height: 30px;
}
}