/* Category Post Grid Styles */
.elkifahcharity-category-post-grid {
    position: relative;
    width: 100%;
}

/* Tabs */
.elkifahcharity-category-tabs {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    gap: 0.5rem;
}

.elkifahcharity-tab {
    padding: 0.5rem 1.25rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 999px;
    font-weight: 500;
    color: #475569;
    font-size: 0.95rem;
}

.elkifahcharity-tab:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

.elkifahcharity-tab.active {
    background: #10b981;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2), 0 2px 4px -1px rgba(16, 185, 129, 0.1);
}

/* Grid */
.elkifahcharity-posts-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
    min-height: 200px; /* Prevent collapse during loading */
}

@media (min-width: 768px) {
    .elkifahcharity-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .elkifahcharity-posts-grid.col-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    .elkifahcharity-posts-grid.col-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Post Card */
.elkifahcharity-post-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.elkifahcharity-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.elkifahcharity-card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
}

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

.elkifahcharity-post-card:hover .elkifahcharity-card-image img {
    transform: scale(1.05);
}

.elkifahcharity-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.elkifahcharity-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.75rem;
}

.elkifahcharity-card-meta i {
    margin-right: 0.25rem;
}

.elkifahcharity-card-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.25rem;
    line-height: 1.4;
    font-weight: 700;
}

.elkifahcharity-card-title a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.elkifahcharity-card-title a:hover {
    color: #10b981;
}

.elkifahcharity-card-excerpt {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.elkifahcharity-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.elkifahcharity-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #10b981;
    text-decoration: none;
    transition: gap 0.2s ease;
}

.elkifahcharity-read-more:hover {
    gap: 0.75rem;
}

/* Loading Overlay */
.elkifahcharity-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(2px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.elkifahcharity-loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.elkifahcharity-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(16, 185, 129, 0.3);
    border-radius: 50%;
    border-top-color: #10b981;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
