/* Case Study Page Styles */
html, body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    color: #1e293b;
    background-color: #f8fafc;
}

/* Hero Section */
.case-hero {
    position: relative;
    padding: 70px 20px 50px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #004d40 100%);
    color: #ffffff;
    text-align: center;
    overflow: hidden;
}

.case-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(0, 121, 107, 0.25) 0%, transparent 60%),
                radial-gradient(circle at 80% 20%, rgba(72, 128, 218, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

.case-hero-container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.case-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: #ffdd00;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.case-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 16px 0;
    letter-spacing: -0.5px;
}

.case-hero p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #cbd5e1;
    max-width: 760px;
    margin: 0 auto 36px;
}

/* Stats Counter */
.case-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #ffdd00;
}

.stat-text {
    font-size: 0.85rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Controls Section */
.case-controls-section {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 24px 20px;
    position: sticky;
    top: 75px;
    z-index: 99;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.case-controls-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.search-bar-wrapper {
    position: relative;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}

.search-bar-wrapper i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.1rem;
}

.search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 20px 14px 48px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 1rem;
    font-family: inherit;
    color: #0f172a;
    background: #f8fafc;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #00796b;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 121, 107, 0.1);
}

.filter-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-tab {
    padding: 8px 18px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
}

.filter-tab:hover {
    background: #edf2f7;
    color: #0f172a;
    border-color: #cbd5e1;
}

.filter-tab.active {
    background: #00796b;
    color: #ffffff;
    border-color: #00796b;
    box-shadow: 0 4px 10px rgba(0, 121, 107, 0.25);
}

/* Event Results Info */
.results-info-bar {
    max-width: 1280px;
    margin: 30px auto 10px;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #64748b;
    font-size: 0.95rem;
}

/* Main Cards Grid */
.events-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 20px 80px;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 30px;
}

/* Event Card */
.event-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    height: 230px;
    overflow: hidden;
    background-color: #e2e8f0;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.event-card:hover .card-img {
    transform: scale(1.06);
}

.card-category-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.badge-edu { background-color: #2563eb; }
.badge-women { background-color: #db2777; }
.badge-relief { background-color: #ea580c; }
.badge-community { background-color: #059669; }
.badge-animal { background-color: #7c3aed; }

.card-date-badge {
    position: absolute;
    bottom: 14px;
    right: 14px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-location {
    font-size: 0.85rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.card-location i {
    color: #ef4444;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-description {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 20px 0;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.read-case-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #00796b;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.read-case-btn:hover {
    background-color: #004d40;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 121, 107, 0.3);
}

.no-case-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #f1f5f9;
    color: #475569;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.no-case-btn:hover {
    background-color: #e2e8f0;
    color: #0f172a;
}

/* No Results State */
.no-results-msg {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.no-results-msg i {
    font-size: 3rem;
    color: #94a3b8;
    margin-bottom: 16px;
}

.no-results-msg h3 {
    font-size: 1.4rem;
    color: #0f172a;
    margin-bottom: 8px;
}

/* CTA Section */
.case-cta-section {
    background: linear-gradient(135deg, #004d40 0%, #00796b 100%);
    color: #ffffff;
    padding: 60px 20px;
    text-align: center;
}

.case-cta-container {
    max-width: 800px;
    margin: 0 auto;
}

.case-cta-container h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.case-cta-container p {
    font-size: 1.1rem;
    color: #e2e8f0;
    line-height: 1.7;
    margin-bottom: 30px;
}

.cta-btn-group {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.cta-donate-btn {
    background-color: #ffdd00;
    color: #0f172a;
    font-weight: 700;
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.25s ease;
}

.cta-donate-btn:hover {
    background-color: #fadb14;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.cta-volunteer-btn {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
    font-weight: 700;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.25s ease;
}

.cta-volunteer-btn:hover {
    background-color: #ffffff;
    color: #004d40;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .case-controls-section {
        top: 65px;
    }
}

@media (max-width: 768px) {
    .case-hero h1 {
        font-size: 2.2rem;
    }
    .events-grid {
        grid-template-columns: 1fr;
    }
    .case-stats {
        gap: 20px;
    }
    .filter-tabs {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
    }
    .filter-tab {
        white-space: nowrap;
    }
}
