/* Process Diagram Slideshow Styles */
.process-diagram {
    margin: 15px auto;
    text-align: center;
    max-width: 100%;
    width: 100%;
    position: relative;
    border-radius: 10px;
    padding: 2px; /* Match the border thickness */
    overflow: visible; /* Allow border to be visible */
}

.slideshow-container {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    border-radius: 8px; /* Slightly smaller than the parent to fit inside the border */
}

.process-diagram::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2px; /* Border thickness */
    border-radius: 10px;
    background: linear-gradient(
        45deg,
        var(--accent-color),
        rgba(0, 255, 65, 0.5),
        rgba(0, 255, 65, 0.2),
        rgba(0, 255, 65, 0.8),
        var(--accent-color)
    );
    background-size: 400% 400%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: borderGradient 3s linear infinite;
    z-index: 10; /* Ensure it's above the slideshow content */
    pointer-events: none; /* Allow clicks to pass through to the slideshow */
    box-sizing: border-box;
}

@keyframes borderGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.slides {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.33, 1, 0.68, 1);
    width: 100%;
    height: 100%;
}

.slide {
    min-width: 100%;
    flex: 1 0 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    opacity: 0.2; /* Much lower initial opacity */
    transition: opacity 1s cubic-bezier(0.33, 1, 0.68, 1); /* Longer, smoother transition */
    position: relative;
    overflow: hidden;
}

.slide.active {
    opacity: 1;
}

/* Add crossfade effect */
.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: black;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.8s ease;
    pointer-events: none;
}

.slide:not(.active)::before {
    opacity: 0.3; /* Slight darkening for inactive slides */
}

.slides .slide .diagram-image {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    padding: 0;
    border-radius: 8px; /* Match slideshow-container border radius */
    box-shadow: none; /* Remove shadow that might cause layout issues */
    border: none; /* Remove border that causes extra space */
    transform: none !important;
    transition: none !important;
    user-select: none; /* 이미지 선택 방지 */
    -webkit-user-drag: none; /* 크롬/사파리에서 드래그 방지 */
    -khtml-user-drag: none; /* 옛 브라우저 호환성 */
    -moz-user-drag: none; /* 파이어폭스 드래그 방지 */
}

.slides .slide .diagram-image:hover {
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* Navigation Buttons */
.slide-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 255, 65, 0.2);
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    padding: 20px;
    border-radius: 50%;
    font-size: 36px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
}

.slide-nav-btn:hover {
    background-color: rgba(0, 255, 65, 0.4);
}

.prev-btn {
    left: 30px;
}

.next-btn {
    right: 30px;
}

/* Slide Indicators */
.slide-indicators {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding-bottom: 5px;
    width: 100%;
}

/* Desktop indicators (inside slideshow) */
.slideshow-container .slide-indicators {
    position: absolute;
    bottom: 20px;
}

/* Hide mobile-only elements on desktop */
.mobile-only {
    display: none;
}

/* Mobile responsive styling */
@media screen and (max-width: 768px) {
    /* Hide desktop indicators */
    .desktop-only {
        display: none;
    }
    
    /* Show and style mobile indicators */
    .mobile-only {
        display: flex;
        margin: 20px 0;
        padding: 0;
    }
    
    /* Ensure process-diagram has proper spacing */
    .process-diagram {
        margin-bottom: 0;
    }
}

.indicator {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    border: 2px solid var(--accent-color);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.indicator.active {
    background-color: var(--accent-color);
}

/* Mobile Styles */
@media screen and (max-width: 768px) {
    .slide-nav-btn {
        padding: 15px;
        font-size: 13px;
        width: 8px;
        height: 8px;
        z-index: 10; /* 상위 레이어에 배치 */
        opacity: 0.8;
    } 
    
    .prev-btn {
        left: 10px;
    }
    
    .next-btn {
        right: 10px;
    }
}
