/* --- IMAGE CAROUSEL WIDGET --- */

/* Marquee Style */
.starter-carousel-marquee-wrap {
    position: relative;
    overflow: hidden;
    width: 100%;
    background-color: #fff;
    padding: 32px 0;
    border: 1px solid #f3f4f6;
    border-radius: 16px;
}

.starter-carousel-mask-left, .starter-carousel-mask-right {
    position: absolute;
    top: 0;
    width: 80px;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}
.starter-carousel-mask-left { left: 0; background: linear-gradient(to right, #fff, transparent); }
.starter-carousel-mask-right { right: 0; background: linear-gradient(to left, #fff, transparent); }

.starter-carousel-track {
    display: flex;
    gap: 48px;
    width: max-content;
    animation: starter-scroll-left 20s linear infinite;
}

.starter-carousel-marquee-wrap.direction-right .starter-carousel-track {
    animation-name: starter-scroll-right;
}

.starter-carousel-marquee-wrap:hover .starter-carousel-track { animation-play-state: paused; }

.starter-carousel-item {
    width: 120px;
    height: 80px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.starter-carousel-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
}

.starter-carousel-grayscale .starter-carousel-img { filter: grayscale(100%); opacity: 0.6; }
.starter-carousel-marquee-wrap:hover .starter-carousel-grayscale .starter-carousel-img { filter: grayscale(0); opacity: 1; }

@keyframes starter-scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-33.33%); } /* Assuming 3 loops */
}

@keyframes starter-scroll-right {
    0% { transform: translateX(-33.33%); }
    100% { transform: translateX(0); }
}

/* --- PERSPECTIVE STYLE --- */
.starter-carousel-perspective-wrap {
    position: relative;
    width: 100%;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    perspective: 1000px; 
    background-color: #f9fafb;
    border-radius: 16px;
    padding: 40px 0;
}

/* Mobile Adjustment */
@media (max-width: 768px) {
    .starter-carousel-perspective-wrap { height: 350px; }
}

.starter-perspective-stage {
    position: relative;
    width: 100%;
    max-width: 1000px; 
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
}

.starter-perspective-item {
    position: absolute;
    width: 280px;
    height: 350px;
    background: #fff;
    border-radius: 16px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-origin: center center;
    border: 1px solid #f3f4f6;
    will-change: transform, opacity, filter;
}

/* Mobile Adjustment */
@media (max-width: 768px) {
    .starter-perspective-item { width: 200px; height: 280px; }
}

.starter-perspective-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    background: #f3f4f6;
}

.starter-perspective-item.active {
    box-shadow: 0 20px 30px -10px rgba(79, 70, 229, 0.2);
    border-color: rgba(79, 70, 229, 0.1);
}

.starter-perspective-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: #1f2937;
}
.starter-perspective-nav:hover {
    background: #fff;
    color: #4f46e5;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}
.starter-nav-prev { left: 24px; }
.starter-nav-next { right: 24px; }

/* Mobile Nav Position */
@media (max-width: 768px) {
    .starter-nav-prev { left: 10px; width: 40px; height: 40px; }
    .starter-nav-next { right: 10px; width: 40px; height: 40px; }
}

/* --- STACKED STYLE --- */
.starter-carousel-stacked-wrap {
    position: relative;
    width: 100%;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #111827;
    border-radius: 16px;
    padding: 40px 16px;
}

/* Mobile Adjustment */
@media (max-width: 768px) {
    .starter-carousel-stacked-wrap { height: 400px; }
}

.starter-stacked-blob {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 384px;
    height: 384px;
    background-color: rgba(99, 102, 241, 0.2);
    filter: blur(100px);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.starter-stacked-stage {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.starter-stacked-item {
    position: absolute;
    top: 50%;
    width: 300px;
    height: 400px;
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform, opacity, left;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Mobile Adjustment */
@media (max-width: 768px) {
    .starter-stacked-item { width: 240px; height: 320px; }
}

.starter-stacked-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.starter-stacked-controls {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 16px;
    z-index: 60;
}

.starter-stacked-btn {
    padding: 12px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: none;
}

.starter-stacked-prev { background: rgba(255,255,255,0.1); backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.1); color: white; }
.starter-stacked-prev:hover { background: rgba(255,255,255,0.2); }
.starter-stacked-next { background: #4f46e5; color: white; box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3); }
.starter-stacked-next:hover { background: #4338ca; }

/* --- COVERFLOW STYLE (NEW) --- */
.starter-carousel-coverflow-wrap {
    position: relative;
    width: 100%;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #1f2937;
    border-radius: 16px;
    padding: 40px 0;
    perspective: 800px;
}

.starter-coverflow-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, #1f2937, #111827);
    z-index: 0;
}

.starter-coverflow-stage {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    z-index: 10;
}

.starter-coverflow-item {
    position: absolute;
    width: 260px;
    height: 360px;
    background: #374151;
    border: 2px solid #4b5563;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.5s ease-out;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    transform-origin: center center;
}

/* Mobile Adjustment */
@media (max-width: 768px) {
    .starter-coverflow-item { width: 200px; height: 300px; }
}

.starter-coverflow-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.starter-coverflow-reflection {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.6));
    pointer-events: none;
}

.starter-coverflow-nav {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 16px;
    z-index: 50;
}

/* --- PILL MARQUEE STYLE --- */
.starter-carousel-pill-wrap {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 40px 0;
    /* Optional bg color via controls */
}

/* Gradient Masks */
.starter-carousel-pill-wrap::before,
.starter-carousel-pill-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}
.starter-carousel-pill-wrap::before {
    left: 0;
    background: linear-gradient(to right, #fff, transparent);
}
.starter-carousel-pill-wrap::after {
    right: 0;
    background: linear-gradient(to left, #fff, transparent);
}

.starter-carousel-pill-track {
    display: flex;
    gap: 24px;
    width: max-content;
    animation: starter-scroll-pill-left 30s linear infinite;
    padding-left: 24px;
}

/* Right Direction Modifier */
.starter-carousel-pill-wrap.direction-right .starter-carousel-pill-track {
    animation-name: starter-scroll-pill-right;
}

.starter-carousel-pill-wrap:hover .starter-carousel-pill-track {
    animation-play-state: paused;
}

.starter-carousel-pill-item {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 999px; /* Pill shape */
    padding: 10px 32px 10px 10px; /* Space for text on right */
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    flex-shrink: 0;
    gap: 16px;
}

.starter-carousel-pill-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    border-color: #cbd5e1;
}

.starter-carousel-pill-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.starter-carousel-pill-text {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    white-space: nowrap;
}

@keyframes starter-scroll-pill-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-33.33%); } /* Assuming 3 sets cloned */
}

@keyframes starter-scroll-pill-right {
    0% { transform: translateX(-33.33%); }
    100% { transform: translateX(0); }
}