/* ========================================
   Circular Slider Pro - Final Version
   ======================================== */

/* Main Container */
.circular-slider-wrapper {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Background Layer */
.slider-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.slider-background .bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slider-background .bg-layer.active {
    opacity: 1;
}

/* Center Circle */
.circular-slider-circle {
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
    z-index: 10;
}

/* Slides Container */
.circular-slider-slides {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

/* Each Slide */
.circular-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    pointer-events: none;
}

.circular-slide.active {
    opacity: 1;
    z-index: 5;
    pointer-events: auto;
}

.circular-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Circular Texts */
.circular-slider-texts {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 15;
}

.texts-rotating-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(0deg);
    transition: transform 1.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Hidden text words (converted to letters) */
.circular-text-word {
    display: none;
}

/* Individual Letters */
.circular-letter {
    position: absolute;
    left: 50%;
    top: 50%;
    pointer-events: auto;
    user-select: none;
    font-weight: 700;
    transform-origin: center center;
    transition: all 1.5s cubic-bezier(0.25, 0.1, 0.25, 1);
    cursor: pointer;
    padding: 5px;
    margin: -5px;
}

.circular-letter:hover {
    filter: brightness(1.3);
}

/* Active Text Background (SVG Arc Shape) */
.text-active-bg-svg {
    position: absolute;
    pointer-events: none;
    z-index: -1;
    transition: none !important;
}

.text-active-bg-path {
    transition: d 0.6s cubic-bezier(0.4, 0.0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}

.text-active-bg-path.show {
    opacity: 1 !important;
}

/* Navigation Arrows */
.circular-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    width: 65px;
    height: 65px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 50;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.circular-slider-nav:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
}

.circular-slider-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.circular-slider-nav.prev {
    left: 60px;
}

.circular-slider-nav.next {
    right: 60px;
}

.circular-slider-nav svg {
    width: 30px;
    height: 30px;
    transition: transform 0.3s ease;
    stroke-width: 3;
}

.circular-slider-nav:hover svg {
    transform: scale(1.2);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .circular-slider-wrapper {
        height: 100vh;
    }
    
    .circular-slider-circle {
        width: 300px !important;
        height: 300px !important;
    }
    
    .circular-letter {
        font-size: 14px !important;
    }
    
    .circular-slider-nav {
        width: 50px;
        height: 50px;
    }
    
    .circular-slider-nav.prev {
        left: 25px;
    }
    
    .circular-slider-nav.next {
        right: 25px;
    }
    
    .circular-slider-nav svg {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 480px) {
    .circular-slider-circle {
        width: 250px !important;
        height: 250px !important;
    }
    
    .circular-letter {
        font-size: 12px !important;
    }
    
    .circular-slider-nav {
        width: 45px;
        height: 45px;
    }
    
    .circular-slider-nav.prev {
        left: 20px;
    }
    
    .circular-slider-nav.next {
        right: 20px;
    }
    
    .circular-slider-nav svg {
        width: 20px;
        height: 20px;
    }
}

/* Loading */
.circular-slider-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 30;
}

.circular-slider-loading::after {
    content: '';
    display: block;
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Performance Optimization */
.circular-slider-wrapper * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

* {
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    -webkit-transform: translate3d(0, 0, 0);
    -moz-transform: translate3d(0, 0, 0);
}