/* 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: 400px;
    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;
}

.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;
    overflow: hidden;
}

.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;
}

.event-box {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition:
        transform 0.2s,
        box-shadow 0.2s;
    background-color: #fff;
    width: 300px !important;
}
.event-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.event-box a {
    text-decoration: none;
    text-align: center;
    font-size: 20px;
    color: blue !important;
}

.event-boxes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.con-box {
    background-color: white;
    margin: 0px 20px;
    margin-bottom: 50px;
}
.con-box h1 {
    text-align: center;
}
.con-box-box {
    display: flex !important;
    justify-content: space-between;
}

.con-box1 {
    width: 95%;
    height: 240px;
    margin: 10px auto;
    padding: 10px;
    vertical-align: top;
    position: relative;
    display: flex;
    box-sizing: border-box;
    border-top: 2px solid #737878;
}

.con-box2 {
    width: 18%;
    margin: 10px;
}
.con-box3 {
    width: 60%;
    margin: 10px;
}
.con-box4 {
    width: 20%;
    margin: 10px;
}
/*
.con-box1 img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 5px 5px 0 0;
}
  */
.con-box1 h3 {
    margin: 10px 0 5px 0;
    font-size: 1.2rem;
    color: #333;
    font-weight: 600;
    text-align: left;
}
.con-box p {
    font-size: 1rem;
    color: #666;

    text-align: justify;
}
.con-box2 p {
    color: #000;
    font-size: 20px;
    font-weight: 600;
}
.con-box3 p {
    font-size: 17px;
    font-weight: 488;
    width: 90%;
}
.con-box a {
    margin-top: 10px;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s;
    position: absolute;
    top: 170px;
    right: 71.55%;
    font-size: 17px;
}
.con-box i {
    margin-left: 8px;
}
.main-heading {
    font-size: 2.5rem;
    margin-bottom: 40px;
}
.con-box1 img {
    width: 100%;
    height: 90%;
}

.hint-1 {
    display: flex;
    flex-direction: column;
    margin-bottom: 55px !important;
}
.hint-hint {
    margin-left: 50px !important;
}
.hint {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #2563eb;
    background: #f0f6ff;
    cursor: pointer;
    margin-right: 6px;
}

.event-box1 {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition:
        transform 0.2s,
        box-shadow 0.2s;
    background-color: #fff;
    width: 100%;
}
.event-box1:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.event-box1 a {
    text-decoration: none;
    text-align: center;
    font-size: 20px;
}

/* Events Details */

.con-boxes {
    padding: 20px;
}
.event-conten {
    background-color: ghostwhite;
    padding: 0px 10px 60px;
}
.event-conten h1 {
    color: blue;
    text-align: center;
    padding-top: 10px;
    font-size: 40px;
}
.event-conten span {
    padding: 0px 24px;
    font-size: 25px;
}
.event-conten span i {
    color: #2563eb;
    margin-right: 10px;
}
.gallery {
    margin-top: 30px !important;
    margin: 10px auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}
.glimg {
    background-color: white;
    border-radius: 5px;
    max-width: 440px;
    height: 280px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition:
        transform 0.2s,
        box-shadow 0.2s;
    margin: 10px 20px;
}
.glimg:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
    max-width: 500px;
    height: 280px;
}
.box-desc {
    margin-top: 60px !important;
    padding: 10px;
    text-align: justify;
    margin: 0px 60px;
    color: #434343;
    word-spacing: 0.1em;
    line-height: 1.6;
    font-size: 17px;
}

.event-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

/* CARD */
.event-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.event-card:hover {
    transform: translateY(-6px);
}

/* IMAGE */
.event-image {
    position: relative;
    height: 200px;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #2d7ef7;
    color: #fff;
    padding: 8px 15px;
    font-size: 16px;
    border-radius: 30px;
}

/* BODY */
.event-body {
    padding: 20px;
}

.event-body h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.event-body p {
    font-size: 14px;
    color: #666;
    margin-bottom: 14px;
}

/* INFO */
.event-info {
    display: flex;
    gap: 16px;
    font-size: 16px;
    color: #555;
    margin-bottom: 16px;
}

.event-info i {
    color: #2d7ef7;
    margin-right: 4px;
}

/* FOOTER */
.event-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 14px;
    position: relative;
}

.impact {
    color: #20a95b;
    font-weight: 600;
    font-size: 14px;
}

.event-footer a {
    color: #2d7ef7;
    font-weight: 600;
    text-decoration: none;
    position: absolute;
    right: 5px;
    top: -5px;
    font-size: 16px;
}

.event-card {
    width: 100%;
    max-width: 500px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
}

.event-card:hover {
    transform: translateY(-8px);
}

/* Image */
.event-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #2563eb;
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
}

/* Content */
.event-content {
    padding: 20px;
}

.event-content h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
}

.event-content p {
    color: #555;
    font-size: 15px;
    line-height: 1.6;
}

/* Meta */
.event-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #666;
    margin-top: 15px;
}

/* Footer */
.event-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.event-footer .impact {
    color: #16a34a;
    font-weight: 600;
}

.event-footer .learn-more {
    text-decoration: none;
    color: #2563eb;
    font-weight: 600;
}
