/* Case List Enhanced - Frontend Styles */
.case-item-container .case-items-list-new {
    display: -ms-flexbox;
    display: flex;
    width: 100%;
    margin-top: 50px;
    margin-bottom: 50px;
    width: 100%;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}

@media screen and (max-width: 980px) {
        .case-item-container .case-items-list-new {
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
        -ms-flex-pack: distribute;
        justify-content: space-around;
    }
    .case-item-container .case-items-list-new .case-item {
        width: 40%;
        margin: 0px 5%;
        margin-bottom: 30px;
    }
}

@media screen and (max-width: 767px) {
    .case-item-container .case-items-list-new {
        -ms-flex-direction: column;
        flex-direction: column;
    }
    .case-item-container .case-items-list-new .case-item {
        width: 90%;
        margin: 30px auto;
    }
}

/* Filter Section */
.case-filter-section {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-dropdown {
    flex: 1;
    min-width: 200px;
}

#cat-select::placeholder{color:#fff}
.case-filter-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 25px;
    background-color: #fff;
    font-size: 16px;
    color: #333;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    transition: all 0.3s ease;
}

.case-filter-select:focus {
    outline: none;
    border-color: #cf473d;
    box-shadow: 0 0 0 3px rgba(207, 71, 61, 0.1);
}

.case-filter-select:hover {
    border-color: #cf473d;
}

/* Cases Grid */
.case-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.case-item {
    border: 1px solid rgba(127, 158, 172, 0.2);
    border-radius: 25px;
    padding: 20px;
    text-align: center;
    background: #fff;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.case-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: #cf473d;
}

.case-featured-image {
    width: 100%;
    height: 200px;
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: 15px;
}

.case-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.case-item:hover .case-featured-image img {
    transform: scale(1.05);
}

.case-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    border-radius: 15px;
}

.case-image-placeholder:before {
    content: "📄";
    font-size: 3em;
}

.case-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.case-title {
    font-size: 1.4em;
    margin: 0 0 10px 0;
    color: #333;
    word-wrap: break-word;
    line-height: 1.3;
}

.case-excerpt {
    flex: 1;
    margin-bottom: 20px;
    color: #666;
    line-height: 1.5;
    font-size: 14px;
}

.case-button-wrapper {
    margin-top: auto;
}

.case-view-button {
    display: inline-block;
    background: #cf473d;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #cf473d;
}

.case-view-button:hover {
    background: transparent;
    color: #cf473d;
    text-decoration: none;
    transform: translateY(-2px);
}

/* Loading and Error States */
.case-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.case-error {
    text-align: center;
    padding: 40px;
    color: #cf473d;
    background: #ffeaea;
    border: 1px solid #ffcdd2;
    border-radius: 15px;
}

.no-results-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #666;
    background: #f9f9f9;
    border-radius: 15px;
    border: 1px solid #e1e1e1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .case-filter-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-dropdown {
        min-width: auto;
    }
    
    .case-items-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .case-item {
        padding: 15px;
    }
    
    .case-featured-image {
        height: 150px;
    }
    
    .case-title {
        font-size: 1.2em;
    }
}