/* Wiser Style Collections Animation */
.wiser-collections-container {
    position: relative;
    height: 750px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 60px 0;
    overflow: visible;
    perspective: 1000px;
}

.wiser-phone-center {
    position: relative;
    z-index: 10;
    width: 280px;
    height: auto;
    border-radius: 40px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
    background: #000;
    transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
}

.wiser-phone-center .phone-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 40px;
    /* Simulate border */
    border: 8px solid #1a1a1a;
}

/* Base style for collection items */
.wiser-col-item {
    position: absolute;
    width: 120px;
    height: 160px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    z-index: 5;
    background: var(--bg-secondary);

    /* Initial State: Centered behind/near phone */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0;

    transition: all 1.2s cubic-bezier(0.19, 1, 0.22, 1);
    will-change: transform, opacity;
    cursor: pointer;
}

.wiser-col-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.wiser-col-item:hover {
    z-index: 20;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    /* Pause floating on hover */
    animation-play-state: paused;
}

.wiser-col-item:hover img {
    transform: scale(1.1);
}

.wiser-col-item .col-label {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 12px 8px;
    text-align: center;
    color: white;
    font-size: 13px;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    z-index: 2;
}

/* Active States - triggered when container has .visible class */
.wiser-collections-container.visible .wiser-phone-center {
    transform: scale(1);
}

/* Stagger delays for explosion - irregular timing */
.wiser-collections-container.visible .item-1 {
    transition-delay: 0.12s;
}

.wiser-collections-container.visible .item-2 {
    transition-delay: 0.18s;
}

.wiser-collections-container.visible .item-3 {
    transition-delay: 0.05s;
}

.wiser-collections-container.visible .item-4 {
    transition-delay: 0.22s;
}

.wiser-collections-container.visible .item-5 {
    transition-delay: 0.30s;
}

.wiser-collections-container.visible .item-6 {
    transition-delay: 0.15s;
}


.wiser-collections-container.visible .wiser-col-item {
    opacity: 1;
    animation: floating ease-in-out infinite alternate;
}

/* Floating Animation Keyframes */
@keyframes floating {
    from {
        margin-top: 0px;
    }

    to {
        margin-top: 15px;
    }
}

/* Individual Floating Timings (Randomness) */
.wiser-collections-container.visible .item-1 {
    animation-duration: 3.5s;
    animation-delay: 0.1s;
}

.wiser-collections-container.visible .item-2 {
    animation-duration: 4.2s;
    animation-delay: 0.5s;
}

.wiser-collections-container.visible .item-3 {
    animation-duration: 3.8s;
    animation-delay: 0.2s;
}

.wiser-collections-container.visible .item-4 {
    animation-duration: 4.5s;
    animation-delay: 0.7s;
}

.wiser-collections-container.visible .item-5 {
    animation-duration: 4.0s;
    animation-delay: 0.3s;
}

.wiser-collections-container.visible .item-6 {
    animation-duration: 3.2s;
    animation-delay: 0.6s;
}


/* Final Positions - Irregular Fan Out - Further Away */

/* Top Left Layer - Economics (Angled more, further out) */
.wiser-collections-container.visible .item-1 {
    transform: translate(-230%, -110%) rotate(-15deg) scale(0.95);
}

/* Top Right Layer - Personal Growth (Less angled, closer) */
.wiser-collections-container.visible .item-2 {
    transform: translate(110%, -105%) rotate(8deg) scale(1.05);
}

/* Middle Left Layer - Bedtime (Very spread out) */
.wiser-collections-container.visible .item-3 {
    transform: translate(-260%, 15%) rotate(-5deg) scale(0.9);
}

/* Middle Right Layer - Romance (Tighter, more tilted) */
.wiser-collections-container.visible .item-4 {
    transform: translate(170%, 10%) rotate(10deg) scale(1);
}

/* Bottom Left Layer - Thriller (Angled opposite) */
.wiser-collections-container.visible .item-5 {
    transform: translate(-190%, 120%) rotate(4deg) scale(0.95);
}

/* Bottom Right Layer - Lifestyle (Deep tilt) */
.wiser-collections-container.visible .item-6 {
    transform: translate(90%, 130%) rotate(-6deg) scale(1.05);
}



/* Responsive adjustments */
@media (max-width: 900px) {
    .wiser-collections-container {
        height: 600px;
    }

    .wiser-phone-center {
        width: 220px;
    }

    .wiser-col-item {
        width: 100px;
        height: 135px;
    }

    /* Slightly tighter but still irregular for tablet/small laptop */
    .wiser-collections-container.visible .item-1 {
        transform: translate(-170%, -90%) rotate(-12deg) scale(1);
    }

    .wiser-collections-container.visible .item-2 {
        transform: translate(70%, -90%) rotate(10deg) scale(1);
    }

    .wiser-collections-container.visible .item-3 {
        transform: translate(-190%, 0%) rotate(-5deg) scale(0.95);
    }

    .wiser-collections-container.visible .item-4 {
        transform: translate(100%, 0%) rotate(5deg) scale(1);
    }

    .wiser-collections-container.visible .item-5 {
        transform: translate(-130%, 90%) rotate(3deg) scale(0.95);
    }

    .wiser-collections-container.visible .item-6 {
        transform: translate(50%, 100%) rotate(-4deg) scale(1);
    }
}

@media (max-width: 600px) {
    .wiser-collections-container {
        height: 500px;
        margin: 30px 0;
    }

    .wiser-phone-center {
        width: 160px;
    }

    .wiser-col-item {
        width: 80px;
        height: 110px;
        border-radius: 12px;
    }

    .col-label {
        font-size: 10px;
        padding: 6px 4px;
    }

    /* Mobile: Tighter spread, alternating tilts */
    .wiser-collections-container.visible .item-1 {
        transform: translate(-130%, -100%) rotate(-8deg) scale(0.95);
    }

    .wiser-collections-container.visible .item-2 {
        transform: translate(30%, -100%) rotate(8deg) scale(1.05);
    }

    .wiser-collections-container.visible .item-3 {
        transform: translate(-140%, -10%) rotate(-4deg) scale(0.9);
    }

    .wiser-collections-container.visible .item-4 {
        transform: translate(40%, -10%) rotate(4deg) scale(1);
    }

    .wiser-collections-container.visible .item-5 {
        transform: translate(-100%, 80%) rotate(3deg) scale(0.95);
    }

    .wiser-collections-container.visible .item-6 {
        transform: translate(10%, 80%) rotate(-3deg) scale(1.05);
    }
}

/* Testimonial Avatars Update */
.testimonial-header img.testimonial-avatar-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 2px solid var(--border-color);
}

/* Hide old avatar div if present (or just style it out) */
.testimonial-avatar {
    display: none;
}