/* carousel.css */

/*----carosal section----*/

/* ✅ تحسين الصور */
img {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    min-height: 135vh;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(141, 220, 250, 0.2),
        inset 0 1px 1px rgba(141, 220, 250, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(141, 220, 250, 0.3);
    display: flex;
    column-gap: 1vh;
    align-items: center;
    justify-content: center;
    z-index: 1;
    background: rgba(0, 40, 90, 0.4);
}

.glass-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(141, 220, 250, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(141, 220, 250, 0.05) 1px, transparent 1px);
    background-size: 100px 100px;
    opacity: 0.3;
    z-index: 1;
    pointer-events: none;
}

/* Header */
.carousel-header {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
    width: 90%;
    max-width: 1200px;
}

.badge {
    display: inline-block;
    padding: clamp(8px, 2vw, 12px) clamp(20px, 4vw, 30px);
    background: linear-gradient(135deg, 
        rgba(141, 220, 250, 0.2), 
        rgba(202, 240, 250, 0.2)
    );
    border: 1px solid rgba(141, 220, 250, 0.3);
    border-radius: 50px;
    color: #8ddcfa;
    font-size: clamp(0.7rem, 2vw, 0.9rem);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 30px rgba(141, 220, 250, 0.3);
}

.carousel-title {
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    font-weight: 900;
    background: linear-gradient(135deg, 
        #8ddcfa 0%,
        #ccf2fb 25%,
        #caf0fa 50%,
        #8ddcfa 75%,
        #ccf2fb 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    letter-spacing: -1px;
    animation: qao-gradient-shift 4s ease infinite;
}

.carousel-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: rgba(204, 242, 251, 0.7);
    font-weight: 300;
}

/* 3D Carousel Container */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 100vw;
    height: 60vh;
    perspective: 2000px;
    z-index: 5;
}

.carousel-scene {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Carousel Items */
.carousel-item {
    position: absolute;
    width: 450px;
    height: 70vh;
    left: 50%;
    top: 50%;
    margin-left: -225px;
    margin-top: -275px;
    background: linear-gradient(135deg, 
        rgba(12, 35, 80, 0.95) 0%,
        rgba(20, 55, 120, 0.9) 50%,
        rgba(12, 35, 80, 0.88) 100%
    );
    backdrop-filter: blur(25px);
    border: 4px solid rgba(141, 220, 250, 0.2);
    border-radius: 30px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    cursor: pointer;
}

.carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(141, 220, 250, 0.1) 0%, 
        rgba(202, 240, 250, 0.1) 100%
    );
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 1;
    pointer-events: none;
}

.carousel-item:hover::before {
    opacity: 1;
}

.carousel-item.active {
    filter: brightness(1.2);
    border-color: rgba(141, 220, 250, 0.5);
    box-shadow: 
        0 40px 100px rgba(141, 220, 250, 0.4), 
        0 0 60px rgba(202, 240, 250, 0.3);
}

.carousel-item.active:hover {
    transform: scale(1.03) !important;
}

.carousel-item.prev,
.carousel-item.next {
    filter: brightness(0.6);
    opacity: 0.7;
}

/* Item Image */
.item-image {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    border-radius: 30px 30px 0 0;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s ease;
}

.carousel-item.active:hover .item-image img {
    transform: scale(1.05);
}

.item-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.8));
    pointer-events: none;
}

/* Item Content */
.item-content {
    position: relative;
    padding: 15px 15px;
    z-index: 2;
}

.item-category {
    display: inline-block;
    padding: 8px 10px;
    background: linear-gradient(135deg, 
        rgba(141, 220, 250, 0.3), 
        rgba(202, 240, 250, 0.3)
    );
    border: 1px solid rgba(141, 220, 250, 0.4);
    border-radius: 20px;
    color: #8ddcfa;
    font-size: clamp(0.65rem, 1.5vw, 0.75rem);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.item-title {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 800;
    color: #ccf2fb;
    margin-bottom: 10px;
    margin-top: 10px;
    line-height: 1.3;
}

.item-description {
    font-size: clamp(0.85rem, 2vw, 1rem);
    color: rgba(204, 242, 251, 0.7);
    line-height: 1.7;
}

.item-features {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.feature-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: rgba(141, 220, 250, 0.1);
    border: 1px solid rgba(141, 220, 250, 0.2);
    border-radius: 15px;
    font-size: clamp(0.75rem, 1.5vw, 0.85rem);
    color: rgba(204, 242, 251, 0.8);
}

.item-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: clamp(12px, 2vw, 15px) clamp(25px, 4vw, 35px);
    background: linear-gradient(135deg, #8ddcfa 0%, #012891 100%);
    color: #ffffff;
    font-size: clamp(0.9rem, 2vw, 1rem);
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.5s ease;
    box-shadow: 0 10px 30px rgba(141, 220, 250, 0.4);
    position: relative;
    overflow: hidden;
}

.item-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.6s;
}

.item-button:hover::before {
    left: 100%;
}

.item-button:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, #caf0fa 0%, #8ddcfa 100%);
    color: #0c2350;
    box-shadow: 0 15px 40px rgba(202, 240, 250, 0.6);
}

/* Navigation Buttons */
.carousel-nav {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 15;
}

.nav-btn {
    width: clamp(55px, 10vw, 70px);
    height: clamp(55px, 10vw, 70px);
    background: rgba(141, 220, 250, 0.1);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(141, 220, 250, 0.3);
    border-radius: 50%;
    color: #8ddcfa;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    cursor: pointer;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.nav-btn:hover {
    background: rgba(141, 220, 250, 0.25);
    border-color: #8ddcfa;
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(141, 220, 250, 0.5);
}

.nav-btn:active {
    transform: scale(0.95);
}

/* Indicators */
.carousel-indicators {
    position: absolute;
    bottom: clamp(130px, 25vh, 150px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 15;
}

.indicator {
    width: clamp(10px, 2vw, 12px);
    height: clamp(10px, 2vw, 12px);
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(141, 220, 250, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.4s ease;
}

.indicator.active {
    background: #8ddcfa;
    border-color: #8ddcfa;
    box-shadow: 0 0 20px rgba(141, 220, 250, 0.8);
    transform: scale(1.3);
}

.indicator:hover {
    background: rgba(141, 220, 250, 0.5);
    transform: scale(1.2);
}

/* Auto-play progress */
.progress-ring {
    position: absolute;
    bottom: 45px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 14;
    width: 100px;
    height: 100px;
    pointer-events: none;
}

.progress-ring svg {
    width: 100%;
    height: 100%;
    display: block;
}

.progress-ring circle {
    transition: stroke-dashoffset 0.1s linear;
}

/* Tablet Responsive */
@media (max-width: 1024px) {
    .carousel-wrapper {
        min-height: 110vh;
    }

    .carousel-item {
        width: 380px;
        height: 520px;
        margin-left: -190px;
        margin-top: -260px;
    }

    .item-image {
        height: 240px;
    }

    .item-content {
        padding: 28px 24px;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .carousel-wrapper {
        min-height: 100vh;
        max-height: 100vh;
        overflow-x: hidden;
        overflow-y: auto !important;
        width: 100%;
        height: auto !important;
        padding: 0;
        z-index: 5;
    }

    .carousel-header {
        top: 20px;
        width: 80%;
        padding: 0;
    }

    .badge {
        font-size: 0.65rem;
        padding: 6px 15px;
        margin-bottom: 12px;
        letter-spacing: 1px;
    }

    .carousel-title {
        font-size: 2rem;
        margin-bottom: 10px;
    }

    .carousel-subtitle {
        font-size: 0.95rem;
    }

    .carousel-container {
        height: 500px;
        margin-top: 20px;
    }

    .carousel-item {
        width: 90%;
        max-width: 340px;
        height: auto;
        min-height: 480px;
        max-height: 520px;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        margin-left: 0;
        margin-top: 0;
        filter: none !important;
        -webkit-filter: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        opacity: 1 !important;
        background: linear-gradient(135deg, 
            rgb(12, 35, 80) 0%,
            rgb(20, 55, 120) 50%,
            rgb(12, 35, 80) 100%
        ) !important;
    }

    .carousel-item.active {
        background: linear-gradient(135deg, 
            rgb(15, 42, 90) 0%,
            rgb(25, 65, 135) 50%,
            rgb(15, 42, 90) 100%
        ) !important;
        border-color: rgba(141, 220, 250, 0.6) !important;
    }

    .carousel-item.prev,
    .carousel-item.next {
        filter: none !important;
        -webkit-filter: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        opacity: 1 !important;
    }

    .item-image {
        height: 180px;
    }

    .item-content {
        padding: 20px 18px;
    }

    .item-category {
        font-size: 0.65rem;
        padding: 6px 14px;
        margin-bottom: 10px;
    }

    .item-title {
        font-size: 1.25rem;
        margin-bottom: 10px;
        line-height: 1.3;
    }

    .item-description {
        font-size: 0.85rem;
        line-height: 1.5;
        margin-bottom: 15px;
        color: rgba(204, 242, 251, 0.9);
    }

    .item-features {
        gap: 8px;
        margin-bottom: 15px;
    }

    .feature-tag {
        padding: 6px 10px;
        font-size: 0.75rem;
        gap: 5px;
    }

    .item-button {
        padding: 11px 24px;
        font-size: 0.9rem;
        gap: 8px;
    }

    .nav-btn {
        width: 55px;
        height: 55px;
        font-size: 1.2rem;
    }

    .carousel-nav {
        bottom: 30px;
        gap: 15px;
    }

    .carousel-indicators {
        bottom: 90px;
        gap: 8px;
    }

    .indicator {
        width: 10px;
        height: 10px;
    }

    .progress-ring {
        bottom: 15px;
        width: 70px;
        height: 70px;
    }

    .glass-grid {
        background-size: 50px 50px;
        opacity: 0.2;
    }
}

@media (max-width: 480px) {
    .carousel-wrapper {
        min-height: 100vh;
        max-height: 100vh;
    }

    .carousel-header {
        top: 20px;
        width: 85%;
    }

    .carousel-title {
        font-size: 1.6rem;
    }

    .carousel-subtitle {
        font-size: 0.85rem;
    }

    .carousel-container {
        height: 480px;
         margin-top: -20vh;
         margin-bottom: -20vh;
    }

    .carousel-item {
        width: 90%;
        max-width: 300px;
        min-height: 450px;
        max-height: 480px;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        margin: 0;
        filter: none !important;
        -webkit-filter: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        opacity: 1 !important;
    }

    .item-image {
        height: 160px;
    }

    .item-content {
        padding: 18px 15px;
    }

    .item-category {
        font-size: 0.6rem;
        padding: 5px 12px;
    }

    .item-title {
        font-size: 1.15rem;
        margin-bottom: 8px;
    }

    .item-description {
        font-size: 0.8rem;
        margin-bottom: 12px;
    }

    .item-features {
        gap: 6px;
        margin-bottom: 12px;
    }

    .feature-tag {
        padding: 5px 8px;
        font-size: 0.7rem;
    }

    .item-button {
        padding: 10px 20px;
        font-size: 0.85rem;
    }

    .nav-btn {
        width: 50px;
        height: 50px;
        font-size: 1.1rem;
    }

    .carousel-nav {
        bottom: 25px;
        gap: 12px;
    }

    .carousel-indicators {
        bottom: 80px;
        gap: 6px;
    }

    .indicator {
        width: 8px;
        height: 8px;
    }

    .progress-ring {
        bottom: 12px;
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 360px) {
    .carousel-header {
        width: 90%;
    }

    .carousel-title {
        font-size: 1.4rem;
    }

    .carousel-item {
        width: 92vw;
        max-width: 280px;
        min-height: 420px;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        margin: 0;
    }

    .item-image {
        height: 140px;
    }

    .item-content {
        padding: 15px 12px;
    }

    .item-title {
        font-size: 1.1rem;
    }

    .item-description {
        font-size: 0.75rem;
    }

    .progress-ring {
        bottom: 10px;
        width: 55px;
        height: 55px;
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .carousel-wrapper {
        min-height: 140vh;
    }

    .carousel-header {
        top: 10px;
    }

    .carousel-container {
        height: 420px;
        margin-top: 10px;
    }

    .carousel-item {
        max-height: 400px;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }

    .carousel-nav {
        bottom: 30px;
    }

    .carousel-indicators {
        bottom: 90px;
    }
}