/* Fade Transition Banner CSS */
/* Model transisi muncul dan bergantian dengan fade effect */

.fade-banner-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 0;
}

.fade-banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Enhanced background image support */
.fade-banner-slide.has-image {
    background-attachment: scroll; /* Better for mobile */
}

.fade-banner-slide.has-gradient {
    background-attachment: fixed;
}

/* Parallax effect for desktop */
@media (min-width: 768px) {
    .fade-banner-slide.has-image {
        background-attachment: fixed;
    }
}

/* Loading state for images */
.fade-banner-slide.loading {
    background-color: #f8f9fa;
    position: relative;
}

.fade-banner-slide.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 2s infinite;
    z-index: 1;
}

.fade-banner-slide.loading .fade-banner-content {
    position: relative;
    z-index: 2;
}

@keyframes loading-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Image optimization */
.fade-banner-slide.has-image {
    background-blend-mode: overlay;
    transition: background-image 0.5s ease;
}

/* Fallback gradient animation */
.fade-banner-slide.has-gradient {
    background-size: 400% 400%;
    animation: gradient-shift 8s ease infinite;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.fade-banner-slide.active {
    opacity: 1;
    z-index: 2;
}

.fade-banner-slide.fade-in {
    opacity: 1;
    z-index: 3;
}

.fade-banner-slide.fade-out {
    opacity: 0;
    z-index: 1;
}

/* Banner Content */
.fade-banner-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Text Animation */
.fade-banner-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
    transition-delay: 0.3s;
}

.fade-banner-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
    transition-delay: 0.6s;
}

.fade-banner-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
    transition-delay: 0.9s;
    line-height: 1.6;
}

.fade-banner-button {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
    transition-delay: 1.2s;
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #0056b3 0%, #004494 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.3);
    transition: all 0.3s ease;
}

.fade-banner-button:hover {
    background: linear-gradient(135deg, #004494 0%, #003d73 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 86, 179, 0.4);
    color: white;
    text-decoration: none;
}

/* Active slide text animation */
.fade-banner-slide.active .fade-banner-title,
.fade-banner-slide.active .fade-banner-subtitle,
.fade-banner-slide.active .fade-banner-description,
.fade-banner-slide.active .fade-banner-button {
    opacity: 1;
    transform: translateY(0);
}

/* Fade transition overlay */
.fade-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 5;
}

/* Navigation Dots */
.fade-banner-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 15;
}

.fade-banner-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.fade-banner-dot.active {
    background: white;
    transform: scale(1.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.fade-banner-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

/* Navigation Arrows */
.fade-banner-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.fade-banner-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.fade-banner-prev {
    left: 20px;
}

.fade-banner-next {
    right: 20px;
}

/* Progress Bar */
.fade-banner-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    z-index: 15;
    width: 100%;
}

.fade-banner-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0056b3, #23a6d5);
    width: 0%;
    transition: width linear;
}

/* Pause indicator */
.fade-banner-pause {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    z-index: 15;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.fade-banner-pause:hover {
    background: rgba(0, 0, 0, 0.7);
}

.fade-banner-pause.paused {
    background: rgba(220, 53, 69, 0.8);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .fade-banner-container {
        height: 350px;
    }
    
    .fade-banner-content {
        padding: 1.5rem;
        max-width: 90%;
    }
    
    .fade-banner-title {
        font-size: 2rem;
    }
    
    .fade-banner-subtitle {
        font-size: 1.2rem;
    }
    
    .fade-banner-description {
        font-size: 1rem;
    }
    
    .fade-banner-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .fade-banner-prev {
        left: 10px;
    }
    
    .fade-banner-next {
        right: 10px;
    }
    
    .fade-banner-dots {
        bottom: 15px;
        gap: 8px;
    }
    
    .fade-banner-dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 576px) {
    .fade-banner-container {
        height: 280px;
    }
    
    .fade-banner-content {
        padding: 1rem;
    }
    
    .fade-banner-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .fade-banner-subtitle {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .fade-banner-description {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .fade-banner-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .fade-banner-nav {
        display: none; /* Hide arrows on very small screens */
    }
}

/* Animation keyframes */
@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: scale(1.1);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOutSlide {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* Smooth fade animation */
.fade-banner-slide.fade-in {
    animation: fadeInSlide 1.2s ease-out;
}

.fade-banner-slide.fade-out {
    animation: fadeOutSlide 1.2s ease-out;
}
