/* Gallery Section Styles */
.gallery-section {
    padding: 80px 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.gallery-section h2 {
    text-align: center;
    color: #EA232A;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.gallery-section h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, #EA232A, #ff4d4d);
    margin: 1rem auto 0;
    border-radius: 2px;
}

.section-description {
    text-align: center;
    color: #64748b;
    max-width: 700px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.gallery-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.gallery-slider {
    position: relative;
    margin: 0 50px;
    border-radius: 15px;
    overflow: hidden; /* Pindahkan overflow ke sini */
}

.gallery-track {
    display: flex;
    transition: transform 0.3s ease-out;
    gap: 20px;
    padding: 10px;
    width: max-content;
    transform: translateX(0);
}

.gallery-track:active {
    cursor: grabbing;
}

.gallery-item {
    flex: 0 0 400px;
    width: 400px;
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    cursor: pointer;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Navigation Buttons */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: #EA232A;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
}

.gallery-nav:hover {
    background: #ff4d4d;
    transform: translateY(-50%) scale(1.1);
}

.prev {
    left: 0;
}

.next {
    right: 0;
}

/* Dots Navigation */
.gallery-dots {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    gap: 0.5rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cbd5e1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: #EA232A;
    transform: scale(1.2);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    color: white;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
    transform: translateY(0);
}

.gallery-overlay h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.gallery-overlay p {
    font-size: 1rem;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Animation */
.gallery-item {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation delay for gallery items */
.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }

/* Media Queries */
@media (max-width: 768px) {
    .gallery-slider {
        margin: 0 30px;
    }

    .gallery-nav {
        width: 30px;
        height: 30px;
        font-size: 1.2rem;
    }

    .gallery-overlay {
        opacity: 1;
        transform: translateY(0);
        padding: 1.5rem;
    }

    .gallery-overlay h3 {
        font-size: 1.2rem;
    }

    .gallery-overlay p {
        font-size: 0.9rem;
    }

    .gallery-section h2 {
        font-size: 2rem;
    }

    .section-description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    .gallery-slider {
        margin: 0 20px;
    }
}
