/* ============================================
   Products Carousel / Slider Section
   ============================================ */

/* Section Wrapper */
.products-slider-section {
    padding: 80px 2rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    position: relative;
    overflow: hidden;
}

.products-slider-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(245, 158, 11, 0.06) 0%, transparent 50%);
    animation: bgFloat 15s ease-in-out infinite;
}

@keyframes bgFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(1deg); }
    66% { transform: translate(-20px, 20px) rotate(-1deg); }
}

.products-slider-section .section-header {
    position: relative;
    z-index: 2;
}

.products-slider-section .section-title {
    color: #ffffff;
}

.products-slider-section .section-title::after {
    background: #f59e0b;
}

.products-slider-section .section-subtitle {
    color: rgba(255, 255, 255, 0.7);
}

/* Carousel Container */
.products-carousel-wrapper {
    position: relative;
    max-width: 1400px;
    margin: 3rem auto 0;
    z-index: 2;
}

/* Main Carousel Track */
.products-carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.products-carousel-track.dragging {
    transition: none;
    cursor: grabbing;
}

/* Carousel Slide (each product card) */
.carousel-slide {
    flex: 0 0 calc(33.333% - 1.5rem);
    margin: 0 0.75rem;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

/* Slide Product Card */
.slide-product-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

.slide-product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #f59e0b, #3b82f6);
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.slide-product-card:hover::before {
    opacity: 1;
}

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

.slide-product-card:hover {
    transform: translateY(-12px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4),
                0 0 40px rgba(59, 130, 246, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

/* Slide Product Image */
.slide-product-image {
    height: 240px;
    position: relative;
    overflow: hidden;
}

.slide-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.slide-product-card:hover .slide-product-image img {
    transform: scale(1.12);
}

.slide-product-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9), transparent);
}

/* Slide Product Badge */
.slide-product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.4rem 1rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    z-index: 3;
    letter-spacing: 0.5px;
}

.slide-product-badge.badge-best {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.slide-product-badge.badge-new {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.slide-product-badge.badge-featured {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

/* Slide Product Info */
.slide-product-info {
    padding: 1.8rem;
    position: relative;
    z-index: 2;
}

.slide-product-category {
    color: rgba(245, 158, 11, 0.9);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.6rem;
}

.slide-product-title {
    font-size: 1.25rem;
    color: #ffffff;
    margin-bottom: 0.8rem;
    font-weight: 700;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.slide-product-card:hover .slide-product-title {
    color: #60a5fa;
}

.slide-product-description {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.2rem;
}

/* Slide Product Features */
.slide-product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.slide-product-feature {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.3s ease;
}

.slide-product-feature:hover {
    background: rgba(59, 130, 246, 0.3);
    color: #bfdbfe;
}

/* Slide Product Action Button */
.slide-product-action {
    width: 100%;
    padding: 0.9rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.slide-product-action:hover {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.slide-product-action i {
    font-size: 0.9rem;
}

/* Navigation Arrows */
.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    color: #ffffff;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.carousel-nav-btn:hover {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-color: transparent;
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.5);
    transform: translateY(-50%) scale(1.1);
}

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

.carousel-nav-btn.carousel-prev {
    left: -28px;
}

[dir="rtl"] .carousel-nav-btn.carousel-prev {
    left: auto;
    right: -28px;
}

.carousel-nav-btn.carousel-next {
    right: -28px;
}

[dir="rtl"] .carousel-nav-btn.carousel-next {
    right: auto;
    left: -28px;
}

/* Dots / Pagination */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 2.5rem;
    position: relative;
    z-index: 2;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    cursor: pointer;
    transition: all 0.4s ease;
    padding: 0;
}

.carousel-dot:hover {
    border-color: #60a5fa;
    background: rgba(59, 130, 246, 0.3);
}

.carousel-dot.active {
    width: 36px;
    border-radius: 6px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

/* Progress Bar */
.carousel-progress {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin: 1.5rem auto 0;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.carousel-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #f59e0b);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s linear;
}

.carousel-progress-bar.animating {
    animation: progressFill 5s linear forwards;
}

@keyframes progressFill {
    from { width: 0%; }
    to { width: 100%; }
}

/* Auto-play indicator */
.carousel-autoplay-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    position: relative;
    z-index: 2;
}

.carousel-autoplay-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.carousel-autoplay-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.carousel-autoplay-btn.active {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    color: #60a5fa;
}

/* Slide Counter */
.carousel-slide-counter {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin-top: 1rem;
    position: relative;
    z-index: 2;
    letter-spacing: 2px;
}

.carousel-slide-counter .current {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.3rem;
}

.carousel-slide-counter .separator {
    margin: 0 0.5rem;
    color: rgba(245, 158, 11, 0.6);
}

/* ============================================
   Second Slider Section (under team)
   ============================================ */

.team-slider-section {
    padding: 80px 2rem;
    background: var(--bg-light, #f9fafb);
    position: relative;
    overflow: hidden;
}

.team-slider-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%231e3a8a' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.team-slider-section .section-header {
    position: relative;
    z-index: 2;
}

/* Team Slider Wrapper */
.team-carousel-wrapper {
    position: relative;
    max-width: 1400px;
    margin: 3rem auto 0;
    z-index: 2;
}

/* Team Carousel Track */
.team-carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.team-carousel-track.dragging {
    transition: none;
    cursor: grabbing;
}

/* Team Carousel Slide */
.team-carousel-slide {
    flex: 0 0 calc(25% - 1.5rem);
    margin: 0 0.75rem;
}

/* Team Slider Card */
.team-slider-card {
    background: white;
    border-radius: 24px;
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.team-slider-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1e3a8a, #3b82f6, #f59e0b);
    transform: scaleX(0);
    transition: transform 0.5s ease;
    transform-origin: left;
}

[dir="rtl"] .team-slider-card::before {
    transform-origin: right;
}

.team-slider-card:hover::before {
    transform: scaleX(1);
}

.team-slider-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 60px rgba(30, 58, 138, 0.15);
}

/* Team Slider Member Image */
.team-slider-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    position: relative;
    overflow: visible;
}

.team-slider-image-inner {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid transparent;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6) border-box;
    position: relative;
    transition: all 0.4s ease;
}

.team-slider-card:hover .team-slider-image-inner {
    border-color: #f59e0b;
    transform: scale(1.05);
}

.team-slider-image-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid white;
}

/* Certification badge on image */
.team-slider-cert-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Team Slider Info */
.team-slider-name {
    font-size: 1.2rem;
    color: var(--primary-color, #1e3a8a);
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.team-slider-position {
    color: var(--accent-color, #f59e0b);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.team-slider-cert-text {
    color: var(--success-color, #10b981);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

/* Team Slider Social Links */
.team-slider-social {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1.2rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
}

.team-slider-card:hover .team-slider-social {
    opacity: 1;
    transform: translateY(0);
}

.team-slider-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-light, #f9fafb);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color, #1e3a8a);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.team-slider-social a:hover {
    background: var(--primary-color, #1e3a8a);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

/* Team Nav Buttons */
.team-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--border-color, #e5e7eb);
    background: white;
    color: var(--primary-color, #1e3a8a);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.team-nav-btn:hover {
    background: var(--primary-color, #1e3a8a);
    color: white;
    border-color: var(--primary-color, #1e3a8a);
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.3);
    transform: translateY(-50%) scale(1.1);
}

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

.team-nav-btn.team-prev {
    left: -25px;
}

[dir="rtl"] .team-nav-btn.team-prev {
    left: auto;
    right: -25px;
}

.team-nav-btn.team-next {
    right: -25px;
}

[dir="rtl"] .team-nav-btn.team-next {
    right: auto;
    left: -25px;
}

/* Team Carousel Dots */
.team-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
}

.team-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--border-color, #e5e7eb);
    background: transparent;
    cursor: pointer;
    transition: all 0.4s ease;
    padding: 0;
}

.team-carousel-dot:hover {
    border-color: var(--primary-color, #1e3a8a);
}

.team-carousel-dot.active {
    width: 30px;
    border-radius: 5px;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    border-color: transparent;
}

/* Team Slider Progress */
.team-slider-progress {
    width: 160px;
    height: 3px;
    background: var(--border-color, #e5e7eb);
    border-radius: 2px;
    margin: 1.2rem auto 0;
    overflow: hidden;
}

.team-slider-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #1e3a8a, #3b82f6);
    border-radius: 2px;
    width: 0%;
}

.team-slider-progress-bar.animating {
    animation: teamProgressFill 4s linear forwards;
}

@keyframes teamProgressFill {
    from { width: 0%; }
    to { width: 100%; }
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1200px) {
    .carousel-slide {
        flex: 0 0 calc(50% - 1.5rem);
    }

    .team-carousel-slide {
        flex: 0 0 calc(33.333% - 1.5rem);
    }
}

@media (max-width: 768px) {
    .products-slider-section,
    .team-slider-section {
        padding: 60px 1rem;
    }

    .carousel-slide {
        flex: 0 0 calc(100% - 1.5rem);
    }

    .team-carousel-slide {
        flex: 0 0 calc(50% - 1.5rem);
    }

    .carousel-nav-btn {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .carousel-nav-btn.carousel-prev {
        left: 5px;
    }

    [dir="rtl"] .carousel-nav-btn.carousel-prev {
        left: auto;
        right: 5px;
    }

    .carousel-nav-btn.carousel-next {
        right: 5px;
    }

    [dir="rtl"] .carousel-nav-btn.carousel-next {
        right: auto;
        left: 5px;
    }

    .team-nav-btn {
        width: 42px;
        height: 42px;
    }

    .team-nav-btn.team-prev {
        left: 5px;
    }

    [dir="rtl"] .team-nav-btn.team-prev {
        left: auto;
        right: 5px;
    }

    .team-nav-btn.team-next {
        right: 5px;
    }

    [dir="rtl"] .team-nav-btn.team-next {
        right: auto;
        left: 5px;
    }

    .slide-product-image {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .team-carousel-slide {
        flex: 0 0 calc(100% - 1.5rem);
    }

    .carousel-slide {
        flex: 0 0 calc(100% - 1rem);
        margin: 0 0.5rem;
    }

    .team-carousel-slide {
        flex: 0 0 calc(100% - 1rem);
        margin: 0 0.5rem;
    }

    .carousel-nav-btn,
    .team-nav-btn {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }
}

/* ============================================
   Animations
   ============================================ */

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.carousel-slide.animate-in-right {
    animation: slideInFromRight 0.5s ease forwards;
}

.carousel-slide.animate-in-left {
    animation: slideInFromLeft 0.5s ease forwards;
}

/* Glow effect on hover */
@keyframes cardGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.1); }
    50% { box-shadow: 0 0 40px rgba(59, 130, 246, 0.2); }
}

.slide-product-card:hover {
    animation: cardGlow 2s ease-in-out infinite;
}
