/* Past Events Section */
.past-events {
    background: #fafbfc;
    padding: 40px 0 60px 0;
    text-align: center;
}

/* Loading State */
.events-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.events-loading p {
    font-size: 1.1rem;
    color: #64748b;
    margin: 0;
}

/* Error State */
.events-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 20px;
    text-align: center;
}

.events-error i {
    font-size: 3rem;
    color: #f59e0b;
    margin-bottom: 10px;
}

.events-error h3 {
    font-size: 1.5rem;
    color: #374151;
    margin: 0 0 10px 0;
}

.events-error p {
    font-size: 1rem;
    color: #64748b;
    margin: 0 0 20px 0;
    max-width: 400px;
}

.retry-btn {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.retry-btn:hover {
    background: #1e40af;
}

/* No Events State */
.no-events {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 20px;
    text-align: center;
}

.no-events i {
    font-size: 3rem;
    color: #94a3b8;
    margin-bottom: 10px;
}

.no-events h3 {
    font-size: 1.5rem;
    color: #374151;
    margin: 0 0 10px 0;
}

.no-events p {
    font-size: 1rem;
    color: #64748b;
    margin: 0;
    max-width: 400px;
}

.past-events h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #181c32;
}

.past-events p {
    font-size: 1.1rem;
    color: #444;
    margin-bottom: 32px;
}

.event-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: center;
}

.event-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(37,99,235,0.07);
    width: 340px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.event-card:hover {
    box-shadow: 0 6px 24px rgba(37,99,235,0.13);
}

.event-img {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.event-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

/* Slideshow Styles */
.slideshow-enabled {
    position: relative;
    overflow: hidden;
}

.slideshow-enabled img {
    transition: opacity 0.5s ease;
}

.slideshow-indicator {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 6px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 3;
    backdrop-filter: blur(4px);
}

.slideshow-indicator i {
    margin-right: 4px;
    font-size: 0.9rem;
}

/* Slideshow animation */
.slideshow-enabled:hover img {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* Slideshow loading state */
.slideshow-enabled img[src*="logo.webp"] {
    opacity: 0.8;
}

/* Slideshow progress indicator */
.slideshow-enabled::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #1e40af);
    transition: width 0.1s linear;
    z-index: 2;
}

.slideshow-enabled:hover::after {
    animation: slideshow-progress 2s linear infinite;
}

@keyframes slideshow-progress {
    0% { width: 0%; }
    100% { width: 100%; }
}

.event-tag {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 6px 16px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: #2563eb;
    z-index: 2;
}

.event-tag.water { background: #3b82f6; }
.event-tag.education { background: #a78bfa; }
.event-tag.healthcare { background: #f87171; }
.event-tag.environment { background: #34d399; }
.event-tag.empowerment { background: #f472b6; }
.event-tag.youth { background: #818cf8; }
.event-tag.default { background: #6b7280; }

.event-content {
    padding: 22px 22px 12px 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.event-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #181c32;
}

.event-content p {
    font-size: 1rem;
    color: #444;
    margin-bottom: 16px;
}

.event-meta {
    font-size: 0.98rem;
    color: #666;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.event-meta i {
    margin-right: 6px;
    color: #2563eb;
}

.event-footer {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
    margin-top: auto;
}

.event-success {
    color: #10b981;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.event-link {
    color: #2563eb;
    font-weight: 500;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s;
}

.event-link:hover {
    color: #1e40af;
}

/* Next Story CTA Section */
.next-story-cta {
    background: linear-gradient(90deg, #2563eb 0%, #16a34a 100%);
    color: #fff;
    text-align: center;
    padding: 80px 0 90px 0;
    margin-top: 0;
}

.next-story-cta .cta-icon {
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 28px auto;
    font-size: 2.5rem;
}

.next-story-cta h2 {
    font-size: 2.7rem;
    font-weight: 700;
    margin-bottom: 18px;
}

.next-story-cta p {
    font-size: 1.5rem;
    max-width: 900px;
    margin: 0 auto 38px auto;
    color: #e0e7ef;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 500;
    padding: 22px 44px;
    border-radius: 14px;
    border: 2px solid #fff;
    background: #fff;
    color: #2563eb;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    margin-bottom: 10px;
}

.cta-btn.donate {
    background: #fff;
    color: #2563eb;
}

.cta-btn.donate:hover {
    background: #2563eb;
    color: #fff;
}

.cta-btn.volunteer {
    background: transparent;
    color: #fff;
}

.cta-btn.volunteer:hover {
    background: #fff;
    color: #16a34a;
}

.cta-btn i {
    margin-left: 10px;
    font-size: 1.2em;
}