:root {
    --primary-color: #018263;
    --text-dark: #1a1a1a;
    --text-light: #666;
    --bg-gradient: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    --transition-speed: 0.8s;
    --animation-speed: 20s;
}

.manus-slider-container {
    position: relative;
    width: 100vw;
    height: 600px;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-gradient);
    display: flex;
    align-items: center;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

/* ==================== BACKGROUND ANIMATIONS ==================== */

.slider-blob,
.slider-circuit-canvas {
    position: absolute;
    z-index: 0;
    pointer-events: none;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.slider-blob.animation-blob {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(1, 130, 99, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    top: -100px;
    right: -100px;
    filter: blur(50px);
    animation: blobMove var(--animation-speed) infinite alternate;
}

@keyframes blobMove {
    from { transform: translate(0, 0); }
    to { transform: translate(-100px, 100px); }
}

.slider-blob.animation-gradient {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(1, 130, 99, 0.05), rgba(1, 130, 99, 0.1), rgba(1, 130, 99, 0.05));
    background-size: 200% 200%;
    animation: gradientShift var(--animation-speed) infinite ease-in-out;
}

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

/* ==================== TEXT ANIMATIONS ==================== */

@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeLeft { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeRight { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes zoomIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(50px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-50px); } to { opacity: 1; transform: translateY(0); } }
@keyframes reveal { from { clip-path: inset(0 100% 0 0); opacity: 0; } to { clip-path: inset(0 0 0 0); opacity: 1; } }

/* ==================== SLIDER WRAPPER ==================== */

.slider-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform var(--transition-speed) cubic-bezier(0.7, 0, 0.3, 1);
    z-index: 1;
}

.slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 10%;
    box-sizing: border-box;
    position: relative;
}

/* ==================== SLIDE CONTENT ==================== */

.slide-content {
    flex: 1;
    max-width: 500px;
    z-index: 10;
}

.slide-subtitle, .slide-title, .slide-description, .slide-button {
    opacity: 0;
}

.slide.active .slide-subtitle { animation: fadeUp 0.6s ease-out 0.3s forwards; }
.slide.active .slide-title { animation: fadeUp 0.6s ease-out 0.4s forwards; }
.slide.active .slide-description { animation: fadeUp 0.6s ease-out 0.5s forwards; }
.slide.active .slide-button { animation: fadeUp 0.6s ease-out 0.6s forwards; }

/* Variations */
[data-text-animation="fade-down"] .slide.active .slide-subtitle,
[data-text-animation="fade-down"] .slide.active .slide-title,
[data-text-animation="fade-down"] .slide.active .slide-description,
[data-text-animation="fade-down"] .slide.active .slide-button { animation-name: fadeDown; }

[data-text-animation="fade-left"] .slide.active .slide-subtitle,
[data-text-animation="fade-left"] .slide.active .slide-title,
[data-text-animation="fade-left"] .slide.active .slide-description,
[data-text-animation="fade-left"] .slide.active .slide-button { animation-name: fadeLeft; }

[data-text-animation="fade-right"] .slide.active .slide-subtitle,
[data-text-animation="fade-right"] .slide.active .slide-title,
[data-text-animation="fade-right"] .slide.active .slide-description,
[data-text-animation="fade-right"] .slide.active .slide-button { animation-name: fadeRight; }

[data-text-animation="zoom-in"] .slide.active .slide-subtitle,
[data-text-animation="zoom-in"] .slide.active .slide-title,
[data-text-animation="zoom-in"] .slide.active .slide-description,
[data-text-animation="zoom-in"] .slide.active .slide-button { animation-name: zoomIn; }

[data-text-animation="slide-up"] .slide.active .slide-subtitle,
[data-text-animation="slide-up"] .slide.active .slide-title,
[data-text-animation="slide-up"] .slide.active .slide-description,
[data-text-animation="slide-up"] .slide.active .slide-button { animation-name: slideUp; }

[data-text-animation="slide-down"] .slide.active .slide-subtitle,
[data-text-animation="slide-down"] .slide.active .slide-title,
[data-text-animation="slide-down"] .slide.active .slide-description,
[data-text-animation="slide-down"] .slide.active .slide-button { animation-name: slideDown; }

[data-text-animation="reveal"] .slide.active .slide-subtitle,
[data-text-animation="reveal"] .slide.active .slide-title,
[data-text-animation="reveal"] .slide.active .slide-description,
[data-text-animation="reveal"] .slide.active .slide-button { animation-name: reveal; }

.slide-subtitle {
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 14px;
    margin-bottom: 15px;
    display: block;
}

.slide-title {
    font-size: 48px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 20px;
}

.slide-description {
    color: var(--text-light);
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.slide-button {
    display: inline-flex;
    align-items: center;
    padding: 15px 35px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    position: relative;
    z-index: 20;
    cursor: pointer;
}

.slide-button:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(1, 130, 99, 0.3);
}

/* ==================== FLOATING IMAGES ==================== */

.slide-visual {
    flex: 1;
    position: relative;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
}

.visual-grid {
    position: relative;
    width: 400px;
    height: 400px;
}

.floating-img {
    position: absolute;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.1s ease-out, opacity 0.8s ease;
    opacity: 0;
}

.slide.active .floating-img {
    opacity: 1;
}

.img-main { width: 280px; height: 320px; top: 40px; left: 60px; z-index: 3; }
.img-top { width: 120px; height: 120px; top: -20px; left: 180px; z-index: 2; }
.img-right { width: 180px; height: 220px; top: 20px; right: -40px; z-index: 4; }
.img-bottom { width: 140px; height: 140px; bottom: -20px; right: 0; z-index: 5; }

.floating-img img { width: 100%; height: 100%; object-fit: cover; }

/* ==================== NAVIGATION ==================== */

.slider-nav {
    position: absolute;
    bottom: 40px;
    left: 10%;
    display: flex;
    align-items: center;
    z-index: 100;
    gap: 15px;
}

.rtl-mode .slider-nav { left: auto; right: 10%; flex-direction: row-reverse; }

.nav-arrows {
    display: flex;
    gap: 15px;
}

.nav-arrow {
    width: 45px;
    height: 45px;
    border: 1px solid #ddd;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fff;
    z-index: 110;
}

.nav-arrow:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.slider-dots {
    display: flex;
    gap: 10px;
}

.dot {
    width: 30px;
    height: 4px;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 2px;
    z-index: 110;
}

.dot.active { background: var(--primary-color); width: 50px; }

.slide-counter {
    position: absolute;
    bottom: 40px;
    right: 10%;
    font-size: 18px;
    font-weight: 600;
    z-index: 100;
}

.rtl-mode .slide-counter { right: auto; left: 10%; }

/* ==================== RESPONSIVE DESIGN ==================== */

@media (max-width: 1024px) {
    .manus-slider-container {
        height: 700px;
    }
    
    .slide {
        padding: 0 5%;
    }
    
    .slide-title {
        font-size: 40px;
    }
    
    .visual-grid {
        width: 350px;
        height: 350px;
    }
    
    .img-main { width: 240px; height: 280px; left: 50px; }
    .img-right { width: 150px; height: 180px; }
}

@media (max-width: 768px) {
    .manus-slider-container {
        height: auto;
        min-height: auto;
        overflow-y: auto;
        overflow-x: hidden;
        display: block;
        padding: 0;
    }
    
    .slider-wrapper {
        display: block;
        height: auto;
    }

    .slide {
        flex-direction: column !important;
        text-align: center !important;
        padding: 40px 20px !important;
        height: auto;
        min-width: 100%;
        display: block;
    }
    
    .slide-content {
        margin-bottom: 30px;
        max-width: 100%;
        width: 100%;
        order: 1;
    }

    .slide-title {
        font-size: 32px;
        margin-bottom: 15px;
    }

    .slide-subtitle {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .slide-description {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .slide-visual {
        width: 100%;
        height: 300px;
        order: 2;
        margin-top: 20px;
    }

    .visual-grid {
        width: 280px;
        height: 280px;
    }
    
    .img-main { width: 180px; height: 220px; left: 40px; top: 30px; }
    .img-top { width: 80px; height: 80px; left: 130px; top: -10px; }
    .img-right { width: 120px; height: 160px; right: -20px; top: 20px; }
    .img-bottom { width: 100px; height: 100px; bottom: -10px; right: 10px; }
    
    .slider-nav {
        position: static;
        justify-content: center;
        margin-top: 30px;
        bottom: auto;
        left: auto;
        right: auto;
        transform: none;
        padding: 0 20px;
    }
    
    .rtl-mode .slider-nav {
        left: auto;
        right: auto;
    }

    .slide-counter {
        position: static;
        text-align: center;
        margin-top: 20px;
        right: auto;
        left: auto;
    }
}

@media (max-width: 480px) {
    .slide {
        padding: 30px 15px !important;
    }
    
    .slide-title {
        font-size: 24px;
    }

    .slide-subtitle {
        font-size: 11px;
    }

    .slide-description {
        font-size: 14px;
    }

    .slide-button {
        padding: 12px 25px;
        font-size: 14px;
    }

    .visual-grid {
        width: 240px;
        height: 240px;
    }

    .img-main { width: 150px; height: 180px; left: 30px; }
    .img-top { width: 70px; height: 70px; left: 110px; }
    .img-right { width: 100px; height: 140px; }
    .img-bottom { width: 80px; height: 80px; }

    .nav-arrow {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .dot {
        width: 25px;
    }

    .dot.active {
        width: 40px;
    }
}

/* ==================== RTL/LTR ==================== */

.rtl-mode { direction: rtl; }
.rtl-mode .slide { flex-direction: row-reverse; }
.rtl-mode .slide-content { text-align: right; }
.ltr-mode { direction: ltr; }
.ltr-mode .slide-content { text-align: left; }
