/* Wrapper */
.portfolio-carousel-wrapper {
    position: relative;
    width: 100%;
    background-color: transparent;
}

/* Header */
.portfolio-carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
}

.portfolio-view-all-link,
.portfolio-view-all-text {
    color: #F78F20;
    text-decoration: none;
    border-bottom: 1px solid #F78F20;
    padding-bottom: 5px;
    font-size: 18px;
    font-weight: 400;
    transition: all 0.3s ease;
    display: inline-block;
}

.portfolio-view-all-link:hover {
    color: #10712c;
    border-bottom: 1px solid #10712c;
}

/* Navigation Buttons */
.portfolio-carousel-nav {
    display: flex;
    gap: 15px;
}

.portfolio-carousel-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #F78F20;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background 0.3s ease;
}

.portfolio-carousel-btn:hover:not(:disabled) {
    background: #e67f10;
    transform: scale(1.1);
}

.portfolio-carousel-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Carousel Container */
.portfolio-carousel-container {
    overflow: visible;
    width: 100%;
}

.portfolio-carousel-track {
    display: flex;
    gap: 0;
    transition: transform 0.5s ease;
    cursor: grab;
    user-select: none;
}

.portfolio-carousel-track:active {
    cursor: grabbing;
}

/* Carousel Item */
.portfolio-carousel-item {
    flex: 0 0 calc(100% - 200px);
    min-width: calc(100% - 200px);
    max-width: calc(100% - 200px);
    height: 50vh;
    min-height: 500px;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 16px;
    will-change: transform;
    margin-right: 30px;
}

.portfolio-carousel-item:last-child {
    margin-right: 0;
}

.portfolio-carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.1));
    border-radius: 16px;
    pointer-events: none;
    z-index: 1;
}

.portfolio-carousel-item-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
    color: inherit;
    z-index: 2;
}

/* Top Left: Excerpt */
.portfolio-carousel-excerpt {
    position: absolute;
    top: 30px;
    left: 30px;
    max-width: 450px;
    color: #F8F9EF;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
}

/* Top Right: Stats */
.portfolio-carousel-stats {
    position: absolute;
    top: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 280px;
}

.portfolio-stat-box {
    background: #0F712C;
    padding: 20px 20px;
    border-radius: 16px;
    min-width: 200px;
}

.portfolio-stat-number {
    color: #F8F9EF;
    font-size: 48px;
    font-weight: 500;
    margin: 0 0 8px 0;
    line-height: 1;
}

.portfolio-stat-text {
    color: #F8F9EF;
    font-size: 16px;
    line-height: 1.4;
    margin: 0;
}

/* Bottom Left: Title */
.portfolio-carousel-title {
    position: absolute;
    bottom: 30px;
    left: 30px;
    max-width: 600px;
    color: #F8F9EF;
    font-size: 36px;
    font-weight: 500;
    margin: 0;
    line-height: 1.2;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .portfolio-carousel-item {
        flex: 0 0 calc(100% - 150px);
        min-width: calc(100% - 150px);
        max-width: calc(100% - 150px);
    }
}

@media (max-width: 1024px) {
    .portfolio-carousel-item {
        flex: 0 0 calc(100% - 100px);
        min-width: calc(100% - 100px);
        max-width: calc(100% - 100px);
        height: 45vh;
        min-height: 350px;
    }
    
    .portfolio-carousel-title {
        font-size: 32px;
        padding: 20px 25px;
    }
    
    .portfolio-stat-number {
        font-size: 40px;
    }
    
    .portfolio-carousel-excerpt {
        font-size: 15px;
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .portfolio-carousel-header {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    .portfolio-carousel-item {
        flex: 0 0 calc(100% - 20px);
        min-width: calc(100% - 20px);
        max-width: calc(100% - 20px);
        height: auto;
        min-height: 500px;
        padding-bottom: 20px;
        margin-right: 20px;
    }
    
    .portfolio-carousel-item:last-child {
        gap: 0;
    }
    
    /* Title positioned higher to make room for excerpt below */
    .portfolio-carousel-title {
        font-size: 24px;
        bottom: 110px;
        left: 20px;
        max-width: calc(100% - 40px);
        line-height: 1.3;
        margin: 0;
        padding: 0;
    }
    
    /* Move excerpt BELOW title on mobile */
    .portfolio-carousel-excerpt {
        position: absolute;
        bottom: 20px;
        left: 20px;
        top: auto;
        font-size: 13px;
        line-height: 1.5;
        max-width: calc(100% - 40px);
        margin: 0;
        padding-top: 12px;
    }
    
    /* Stats scaled down and repositioned */
    .portfolio-carousel-stats {
        top: 20px;
        right: 20px;
        gap: 10px;
        max-width: 140px;
        flex-direction: column;
    }
    
    .portfolio-stat-box {
        padding: 10px 12px;
        min-width: 120px;
        border-radius: 12px;
    }
    
    .portfolio-stat-number {
        font-size: 24px;
        margin: 0 0 4px 0;
    }
    
    .portfolio-stat-text {
        font-size: 11px;
        line-height: 1.3;
    }
}