/* Lightbox Styles */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    display: block;
    opacity: 1;
}

.lightbox-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    cursor: default;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: background 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Lightbox Navigation */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 24px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001;
    border-radius: 50%;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-nav.hidden {
    display: none;
}

/* Lightbox Counter */
.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    z-index: 10001;
}

/* Make portfolio images clickable */
.sw-work-preview img {
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.sw-work-preview img:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

/* Mobile Portfolio Selector - Card Based */
.mobile-portfolio-selector {
    background: transparent;
    padding: 0;
    margin-bottom: 30px;
    position: sticky;
    top: 70px;
    z-index: 100;
}

.mobile-portfolio-selector .selector-label {
    color: var(--black-color-0);
    font-size: 18px;
    margin-bottom: 15px;
    display: block;
    font-weight: 600;
    text-align: center;
}

.mobile-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.mobile-portfolio-grid.active {
    max-height: 1000px;
    opacity: 1;
}

.portfolio-card {
    background: var(--white-color);
    border: 2px solid var(--bs-gray-300);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    position: relative;
    overflow: hidden;
}

.portfolio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--orange-color) 0%, rgba(255, 87, 36, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-card:hover,
.portfolio-card.active {
    border-color: var(--orange-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 87, 36, 0.2);
}

.portfolio-card:hover::before,
.portfolio-card.active::before {
    opacity: 1;
}

.portfolio-card.active {
    background: linear-gradient(135deg, var(--orange-color) 0%, rgba(255, 87, 36, 0.95) 100%);
    border-color: var(--orange-color);
    color: var(--white-color);
}

.portfolio-card-icon {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--orange-color);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.portfolio-card.active .portfolio-card-icon {
    color: var(--white-color);
    transform: scale(1.1);
}

.portfolio-card-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    position: relative;
    z-index: 1;
    line-height: 1.3;
}

.portfolio-card.active .portfolio-card-title {
    color: var(--white-color);
}

.portfolio-toggle-btn {
    width: 100%;
    background: var(--white-color);
    border: 2px solid var(--orange-color);
    border-radius: 12px;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 600;
    color: var(--orange-color);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.portfolio-toggle-btn:hover {
    background: var(--orange-color);
    color: var(--white-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 87, 36, 0.3);
}

.portfolio-toggle-btn i {
    transition: transform 0.3s ease;
}

.portfolio-toggle-btn.active i {
    transform: rotate(180deg);
}

/* Mobile responsive improvements */
@media only screen and (max-width: 991px) {
    /* Hide desktop sidebar on mobile */
    .sw-tabs-links.stickyposition-sw {
        display: none !important;
    }
    
    /* Make portfolio content full width on mobile */
    .industry-work .row.justify-content-between .col-lg-3 {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }
    
    .industry-work .row.justify-content-between .col-lg-8 {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }
    
    .mobile-portfolio-selector {
        margin-bottom: 20px;
        position: sticky;
        top: 70px;
        z-index: 100;
    }
}

@media only screen and (max-width: 767px) {
    .lightbox-content {
        max-width: 100%;
        max-height: 100%;
        padding: 10px;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        transform: none;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .lightbox-content img {
        max-width: 100%;
        max-height: 100vh;
        width: auto;
        height: auto;
        object-fit: contain;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }
    
    .lightbox-nav {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-counter {
        bottom: 15px;
        font-size: 13px;
        padding: 6px 16px;
    }
    
    .sw-work-preview {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .sw-left-slot,
    .sw-right-slot {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .sw-right-slot {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .sw-work-preview img {
        width: 100% !important;
        height: auto !important;
        max-height: 300px;
        object-fit: cover;
        border-radius: 8px;
    }
    
    /* Better text sizing on mobile */
    .work-title-block h3 {
        font-size: 22px;
        line-height: 30px;
        margin-bottom: 15px;
    }
    
    .work-title-block p {
        font-size: 15px;
        line-height: 24px;
        margin-bottom: 15px;
    }
    
    .work-title-block p.mt20 {
        margin-top: 15px;
    }
    
    .servicetags {
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 20px !important;
    }
    
    .servicetags .btgs {
        font-size: 13px;
        padding: 8px 15px;
    }
    
    /* Shorten long text on mobile */
    .work-title-block p:first-of-type {
        display: -webkit-box;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .mobile-portfolio-selector {
        top: 60px;
    }
    
    .mobile-portfolio-selector .selector-label {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .portfolio-toggle-btn {
        padding: 12px 15px;
        font-size: 15px;
    }
    
    .mobile-portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .portfolio-card {
        padding: 12px;
        min-height: 90px;
    }
    
    .portfolio-card-icon {
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    .portfolio-card-title {
        font-size: 13px;
    }
}

@media only screen and (max-width: 575px) {
    .lightbox-content {
        max-width: 100%;
        padding: 5px;
        width: 100%;
        height: 100%;
    }
    
    .lightbox-content img {
        max-width: 100%;
        max-height: 100vh;
        width: auto;
        height: auto;
        object-fit: contain;
    }
    
    .work-title-block h3 {
        font-size: 20px;
        line-height: 28px;
        margin-bottom: 12px;
    }
    
    .work-title-block p {
        font-size: 14px;
        line-height: 22px;
        margin-bottom: 12px;
    }
    
    .sw-work-preview img {
        max-height: 250px;
    }
    
    /* Even shorter text on small phones */
    .work-title-block p:first-of-type {
        -webkit-line-clamp: 3;
    }
}

