/* Main Page Cases Styling */
.services1-active {
    margin: 0 -15px; /* Offset Bootstrap's negative margins */
}

.services1-active .row {
    margin: 0;
}

.single-services {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.single-services:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.urgent-case {
    border: 2px solid #dc3545;
    position: relative;
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.2);
}

.urgent-case:hover {
    box-shadow: 0 8px 30px rgba(220, 53, 69, 0.25);
}

.features-img {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.features-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.single-services:hover .features-img img {
    transform: scale(1.05);
}

.urgent-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #dc3545;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    z-index: 10;
    animation: pulse 2s infinite;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.case-type-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 123, 255, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: bold;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.features-caption {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.features-caption h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
}

.features-caption h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.features-caption h3 a:hover {
    color: #007bff;
}

.features-caption p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    flex-grow: 1;
}

.beneficiary-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    margin-bottom: 20px;
}

.beneficiary-info small {
    color: #495057;
    font-weight: 500;
}

.progress-area {
    margin: 20px 0;
}

.progress {
    height: 12px;
    background-color: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-bar {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    transition: width 0.8s ease;
    border-radius: 6px;
}

.progress-details {
    font-size: 13px;
    margin-bottom: 8px;
}

.progress-details .raised {
    color: #28a745;
    font-weight: 600;
}

.progress-percentage {
    font-size: 12px;
    text-align: center;
}

.case-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 15px;
}

.case-actions .btn {
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    padding: 10px 16px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.case-actions .btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
}

.case-actions .btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
}

.case-actions .btn-outline-secondary {
    border-width: 2px;
    padding: 8px 12px;
}

.case-actions .btn-outline-secondary:hover {
    transform: translateY(-2px);
}

.loading-spinner {
    padding: 60px 20px;
    text-align: center;
}

.no-cases-message, .error-message {
    padding: 60px 20px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 20px;
}

.no-cases-message i, .error-message i {
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .services1-active {
        margin: 0;
    }
    
    .single-services {
        margin-bottom: 25px;
        border-radius: 8px;
    }
    
    .features-img {
        height: 200px !important;
    }
    
    .features-caption {
        padding: 20px;
    }
    
    .case-actions {
        flex-direction: column;
    }
    
    .case-actions .btn {
        text-align: center;
        margin-bottom: 8px;
    }
    
    .progress-details {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
    
    .beneficiary-info {
        font-size: 12px;
        padding: 10px;
    }
}

@media (max-width: 576px) {
    .features-caption h3 {
        font-size: 16px;
    }
    
    .case-type-badge, .urgent-badge {
        font-size: 9px;
        padding: 4px 8px;
    }
    
    .progress {
        height: 8px;
    }
}

/* Animation for pulse effect */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

.loading-spinner i {
    color: #007bff;
}

.no-cases-message,
.error-message {
    padding: 40px 20px;
}

.no-cases-message i,
.error-message i {
    display: block;
    margin: 0 auto 15px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .case-actions .btn {
        display: block;
        width: 100%;
        margin-bottom: 10px;
        margin-right: 0;
    }
    
    .progress-details {
        flex-direction: column;
        text-align: center;
    }
    
    .progress-details .target {
        margin-top: 5px;
    }
}