/**
 * Case Studies Widget Styles - Modern Dynamic Version
 *
 * @package PWZ_Theme
 * @since 1.0.0
 */

/* ============================================
   MAIN CONTAINER
   ============================================ */

.pwz-case-studies {
    padding: 100px 0;
    background: #000000;
    position: relative;
    overflow: hidden;
}

.pwz-case-studies::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(0, 255, 136, 0.03) 0%, transparent 60%);
    pointer-events: none;
}

/* ============================================
   CATEGORY FILTER
   ============================================ */

.pwz-cs-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 60px;
}

.pwz-cs-filter-btn {
    padding: 12px 30px;
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 30px;
    color: #CCCCCC;
    font-family: var(--pwz-font-body);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.pwz-cs-filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    background: rgba(0, 255, 136, 0.1);
    border-radius: 50%;
    transition: width 0.4s ease, height 0.4s ease;
}

.pwz-cs-filter-btn:hover::before {
    width: 200%;
    height: 200%;
}

.pwz-cs-filter-btn:hover {
    border-color: rgba(0, 255, 136, 0.4);
    color: #00FF88;
    transform: translateY(-2px);
}

.pwz-cs-filter-btn.active {
    background: rgba(0, 255, 136, 0.15);
    border-color: rgba(0, 255, 136, 0.5);
    color: #00FF88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

/* ============================================
   GRID LAYOUT
   ============================================ */

.pwz-cs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.pwz-cs-item {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: block;
}

.pwz-cs-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

/* ============================================
   CASE STUDY CARD
   ============================================ */

.pwz-cs-card {
    position: relative;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.02) 0%, transparent 100%), #000000;
    border-radius: 16px;
    border: 1px solid rgba(0, 255, 136, 0.15);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 0 rgba(0, 255, 136, 0.1), 0 4px 20px rgba(0, 0, 0, 0.5);
}

.pwz-cs-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 255, 136, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(0, 255, 136, 0.15);
}

/* ============================================
   IMAGE & OVERLAY
   ============================================ */

.pwz-cs-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #0A0A0A;
}

.pwz-cs-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.pwz-cs-card:hover .pwz-cs-image img {
    transform: scale(1.1);
}

.pwz-cs-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.pwz-cs-card:hover .pwz-cs-overlay {
    opacity: 1;
}

.pwz-cs-view-btn {
    padding: 15px 35px;
    background: #00FF88;
    border: none;
    border-radius: 30px;
    color: #000000;
    font-family: var(--pwz-font-body);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    transform: translateY(20px);
}

.pwz-cs-card:hover .pwz-cs-view-btn {
    transform: translateY(0);
}

.pwz-cs-view-btn:hover {
    background: #00CC6A;
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.3);
}

.pwz-cs-view-btn i {
    font-size: 18px;
}

/* ============================================
   CARD CONTENT
   ============================================ */

.pwz-cs-content {
    padding: 25px;
}

.pwz-cs-category {
    display: inline-block;
    padding: 6px 15px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 20px;
    color: #00FF88;
    font-family: var(--pwz-font-body);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.pwz-cs-title {
    font-family: var(--pwz-font-heading);
    font-size: 22px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 10px 0;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.pwz-cs-card:hover .pwz-cs-title {
    color: #00FF88;
}

.pwz-cs-client {
    font-family: var(--pwz-font-body);
    font-size: 14px;
    color: #999999;
    margin: 0;
}

/* ============================================
   NO RESULTS MESSAGE
   ============================================ */

.pwz-cs-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666666;
    font-family: var(--pwz-font-body);
    font-size: 18px;
    grid-column: 1 / -1;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1200px) {
    .pwz-cs-grid {
        padding: 0 15px;
    }
}

@media (max-width: 1024px) {
    .pwz-case-studies {
        padding: 80px 0;
    }

    .pwz-cs-filter {
        margin-bottom: 50px;
    }

    .pwz-cs-title {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .pwz-case-studies {
        padding: 60px 0;
    }

    .pwz-cs-filter {
        gap: 10px;
        margin-bottom: 40px;
    }

    .pwz-cs-filter-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .pwz-cs-content {
        padding: 20px;
    }

    .pwz-cs-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .pwz-cs-grid {
        padding: 0 10px;
    }

    .pwz-cs-view-btn {
        padding: 12px 25px;
        font-size: 14px;
    }
}

/* ============================================
   LIGHTBOX MODAL
   ============================================ */

.pwz-cs-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pwz-cs-lightbox.active {
    opacity: 1;
}

.pwz-cs-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.pwz-cs-lightbox-container {
    position: relative;
    width: 90%;
    max-width: 1400px;
    height: 90vh;
    margin: 5vh auto;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.02) 0%, transparent 100%), #0A0A0A;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 136, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(0, 255, 136, 0.1);
    overflow: hidden;
}

.pwz-cs-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 50%;
    color: #FFFFFF;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pwz-cs-lightbox-close:hover {
    background: rgba(255, 0, 0, 0.8);
    border-color: rgba(255, 0, 0, 0.5);
    transform: rotate(90deg);
}

.pwz-cs-lightbox-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    height: 100%;
    gap: 0;
}

/* ============================================
   LIGHTBOX GALLERY
   ============================================ */

.pwz-cs-lightbox-gallery {
    position: relative;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.pwz-cs-gallery-main {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pwz-cs-gallery-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.pwz-cs-gallery-prev,
.pwz-cs-gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 50%;
    color: #00FF88;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.pwz-cs-gallery-prev {
    left: 20px;
}

.pwz-cs-gallery-next {
    right: 20px;
}

.pwz-cs-gallery-prev:hover,
.pwz-cs-gallery-next:hover {
    background: rgba(0, 255, 136, 0.2);
    border-color: rgba(0, 255, 136, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.pwz-cs-gallery-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 20px;
    color: #FFFFFF;
    font-family: var(--pwz-font-body);
    font-size: 14px;
    font-weight: 600;
}

/* ============================================
   LIGHTBOX DETAILS
   ============================================ */

.pwz-cs-lightbox-details {
    padding: 50px 40px;
    overflow-y: auto;
    background: #0A0A0A;
}

.pwz-cs-details-header {
    margin-bottom: 30px;
}

.pwz-cs-details-title {
    font-family: var(--pwz-font-heading);
    font-size: 32px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 15px 0;
    line-height: 1.2;
}

.pwz-cs-details-category {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 20px;
    color: #00FF88;
    font-family: var(--pwz-font-body);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pwz-cs-details-content {
    font-family: var(--pwz-font-body);
    font-size: 16px;
    color: #CCCCCC;
    line-height: 1.8;
    margin-bottom: 30px;
}

.pwz-cs-details-content p {
    margin-bottom: 15px;
}

.pwz-cs-details-meta {
    padding: 25px 0;
    border-top: 1px solid rgba(0, 255, 136, 0.1);
    border-bottom: 1px solid rgba(0, 255, 136, 0.1);
    margin-bottom: 30px;
}

.pwz-cs-meta-item {
    margin-bottom: 15px;
    font-family: var(--pwz-font-body);
    font-size: 15px;
    color: #CCCCCC;
}

.pwz-cs-meta-item:last-child {
    margin-bottom: 0;
}

.pwz-cs-meta-item strong {
    color: #00FF88;
    margin-right: 10px;
}

.pwz-cs-project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 25px;
    color: #00FF88;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pwz-cs-project-link:hover {
    background: rgba(0, 255, 136, 0.2);
    border-color: rgba(0, 255, 136, 0.5);
    transform: translateX(5px);
}

/* ============================================
   GALLERY THUMBNAILS
   ============================================ */

.pwz-cs-gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.pwz-cs-thumb {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(0, 255, 136, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.pwz-cs-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pwz-cs-thumb:hover,
.pwz-cs-thumb.active {
    border-color: rgba(0, 255, 136, 0.6);
    opacity: 1;
    transform: scale(1.05);
}

/* ============================================
   BODY LOCK WHEN LIGHTBOX OPEN
   ============================================ */

body.pwz-lightbox-open {
    overflow: hidden;
}

/* ============================================
   LIGHTBOX RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .pwz-cs-lightbox-content {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto;
    }

    .pwz-cs-lightbox-details {
        max-height: 50vh;
        padding: 30px 25px;
    }

    .pwz-cs-details-title {
        font-size: 26px;
    }
}

@media (max-width: 768px) {
    .pwz-cs-lightbox-container {
        width: 95%;
        height: 95vh;
        margin: 2.5vh auto;
    }

    .pwz-cs-lightbox-close {
        width: 40px;
        height: 40px;
        font-size: 24px;
        top: 15px;
        right: 15px;
    }

    .pwz-cs-lightbox-gallery {
        padding: 20px;
    }

    .pwz-cs-gallery-prev,
    .pwz-cs-gallery-next {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .pwz-cs-details-title {
        font-size: 22px;
    }

    .pwz-cs-details-content {
        font-size: 15px;
    }
}

