/* Device Carousel Wrapper */
.pj-device-carousel-element {
    --pj-screen-bg: #111;
    --pj-device-color: #222;
    --pj-stand-color: #e0e0e0;
    --pj-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    width: 100%;
    overflow: hidden;
}

.pj-device-carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

/* Base Device Screen (Monitor & Mobile) */
.pj-device-screen {
    background: var(--pj-screen-bg);
    overflow: hidden;
    position: relative;
    display: flex;
}

/* Carousel Tracks */
.pj-carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}

.pj-carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.pj-carousel-slide img {
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: top;
}

.pj-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-family: sans-serif;
    font-size: 1.2rem;
    background: #f0f0f0;
}

/* Desktop Mockup */
.pj-device-desktop {
    position: relative;
    width: 85%;
    max-width: 800px;
    aspect-ratio: 16 / 10;
    z-index: 1;
}

.pj-device-desktop .pj-device-screen {
    width: 100%;
    height: 100%;
    border: 24px solid var(--pj-device-color);
    border-radius: 20px;
    box-shadow: var(--pj-shadow);
    /* For a sleeker look, slight inner shadow */
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5), var(--pj-shadow);
}

/* Monitor Stand */
.pj-device-stand {
    width: 15%;
    height: 12%;
    background: var(--pj-stand-color);
    margin: 0 auto;
    position: relative;
    z-index: 0;
    background: linear-gradient(to right, #ccc, #eee 20%, #eee 80%, #ccc);
}

.pj-device-base {
    width: 30%;
    height: 3%;
    background: var(--pj-stand-color);
    margin: 0 auto;
    border-radius: 5px 5px 0 0;
    position: relative;
    z-index: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Mobile Mockup */
.pj-device-mobile {
    position: absolute;
    bottom: -5%;
    right: 0%;
    width: 22%;
    max-width: 250px;
    aspect-ratio: 9 / 19;
    z-index: 2;
    transform: translateY(-10%);
}

.pj-device-mobile .pj-device-screen {
    width: 100%;
    height: 100%;
    border: 12px solid var(--pj-device-color);
    border-radius: 36px;
    box-shadow: -10px 15px 30px rgba(0, 0, 0, 0.4);
}

/* iPhone style notch */
.pj-device-mobile::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 20px;
    background: var(--pj-device-color);
    border-radius: 0 0 10px 10px;
    z-index: 3;
}

/* Navigation Controls */
.pj-carousel-nav {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    z-index: 10;
    pointer-events: none; /* Let clicks pass through if they miss buttons */
}

.pj-carousel-nav button {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    color: #333;
    transition: all 0.2s ease;
    transform: translateX(-50%); /* For left button */
}

.pj-carousel-nav button.pj-nav-next {
    transform: translateX(50%);
}

.pj-carousel-nav button:hover {
    background: #fff;
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.pj-carousel-nav button.pj-nav-next:hover {
    transform: translateX(50%) scale(1.1);
}

@media (max-width: 768px) {
    .pj-device-desktop {
        width: 100%;
    }
    
    .pj-device-mobile {
        width: 28%;
        right: -5%;
        bottom: -10%;
    }
    
    .pj-carousel-nav button {
        width: 40px;
        height: 40px;
    }
    
    .pj-carousel-nav button {
        transform: translateX(-20%);
    }

    .pj-carousel-nav button.pj-nav-next {
        transform: translateX(20%);
    }
}

/* Titles and Subtitles */
.pj-carousel-text {
    width: 100%;
    max-width: 800px;
    margin: 40px auto 0;
    position: relative;
    text-align: center;
    min-height: 120px;
}

.pj-text-slide {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 30px;
    padding: 0 20px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
    text-align: left;
}

.pj-slide-text-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    flex: 1; /* allows the text to take up remaining space if needed, or 0 1 auto */
}

.pj-text-slide.is-active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.pj-slide-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: #111;
}

.pj-slide-client {
    font-size: 1rem;
    color: #666;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pj-project-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 0; /* removed margin-top since it's side-by-side now */
    padding: 10px 24px;
    background-color: #ffffff;
    color: #000000;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    flex-shrink: 0; /* prevent button from squishing */
}

.pj-project-btn:hover {
    background-color: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    color: #000;
}

.pj-icon-eye {
    display: inline-block;
}

