/*
 Theme Name:   Divi Child
 Theme URI:    https://www.elegantthemes.com/
 Description: Child theme for Divi
 Author:       Your Name
 Author URI:   https://yourwebsite.com
 Template:     Divi
 Version:      1.0.0
*/

/* Add your custom CSS below this line */
.case-studies-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
    max-width: 1400px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .case-studies-section {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

/* Individual Case Card */
.case-card {
    background-color: #1a1f2e;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.case-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Image Wrapper - Positioned Container for Badges */
.case-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 3:2 aspect ratio */
    overflow: hidden;
    background-color: #0f1419;
}

.case-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Category Badge - Top Left */
.case-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: #0584c7;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    line-height: 1.2;
}

/* Metric Label - Bottom Right */
.case-metric {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background-color: rgba(15, 20, 25, 0.85);
    color: #38bdf8;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
    line-height: 1.2;
    backdrop-filter: blur(4px);
}

/* Content Section */
.case-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: #1a1f2e;
}

/* Title */
.case-title {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1;
}
/* Meta Information (Location + Units) */
.case-meta {
    color: #9ca3af;
    font-size: 0.875rem;
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

/* Description */
.case-description {
    color: #e5e7eb;
    font-size: 0.9375rem;
    line-height: 1.6;
    margin: 0 0 1.25rem 0;
    flex-grow: 1;
    border-bottom: 1px solid #cccccc33;
    padding-bottom: 15px !important;
}
/* Call to Action Link */
.case-cta {
    color: #38bdf8;
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: color 0.2s ease;
    margin-top: auto;
}

.case-cta:hover {
    color: #60a5fa;
    text-decoration: none;
}

.case-cta:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Responsive Adjustments */
@media (max-width: 767px) {
    .case-studies-section {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .case-content {
        padding: 1.25rem;
    }
    
    .case-title {
        font-size: 1.25rem;
    }
    
    .case-badge,
    .case-metric {
        font-size: 0.6875rem;
        padding: 5px 12px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .case-studies-section {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Dark Theme Adjustments (if needed) */
@media (prefers-color-scheme: dark) {
    .case-card {
        background-color: #1a1f2e;
    }
    
    .case-image-wrapper {
        background-color: #0f1419;
    }
}

/* Print Styles */
@media print {
    .case-studies-section {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .case-badge,
    .case-metric {
        background-color: #ffffff;
        color: #000000;
        border: 1px solid #000000;
    }
    
    .case-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
