/* =========================================
   OPPORTUNITIES.CSS (The Complete Seva Hub)
   ========================================= */

/* --- HERO SECTION --- */
.hub-hero {
    position: relative;
    color: white;
    min-height: 100vh;
    padding: 100px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-image: url('https://images.unsplash.com/photo-1517486808906-6ca8b3f04846?ixlib=rb-4.0.3&auto=format&fit=crop&w=1600&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hub-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 17, 32, 0.95) 0%, rgba(11, 17, 32, 0.7) 100%);
    z-index: 1;
}

.hub-hero-content {
    max-width: 800px;
    position: relative;
    z-index: 2;
}

.badge { display: inline-block; padding: 6px 16px; background: rgba(37,99,235,0.2); border: 1px solid rgba(37,99,235,0.4); color: #60A5FA; border-radius: 20px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 24px; }
.hub-hero h1 { font-size: 56px; margin-bottom: 24px; color: #F8FAFC; }
.hub-hero p { font-size: 18px; color: #CBD5E1; line-height: 1.8; margin-bottom: 40px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; }

/* --- SHARED SECTION STYLES --- */
.hub-section { padding: 100px 24px; max-width: var(--max-width); margin: 0 auto; }
.bg-surface { max-width: 100%; background: var(--bg-surface); padding: 100px 24px; }
.bg-surface > div { max-width: var(--max-width); margin: 0 auto; }

.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-size: 40px; margin-bottom: 16px; color: var(--text-main); }
.section-header p { color: var(--text-muted); font-size: 16px; max-width: 600px; margin: 0 auto; line-height: 1.6; }

.loading-state { text-align: center; padding: 40px; color: var(--text-muted); width: 100%; grid-column: 1 / -1; }


/* --- WAYS TO SERVE (Image Initiative Cards) --- */
.initiatives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}

.initiative-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.initiative-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.1);
    border-color: var(--accent-glow);
}

/* Image Container */
.init-img {
    height: 220px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

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

/* Hover Zoom Effect */
.initiative-card:hover .init-img img {
    transform: scale(1.08);
}

/* Small floating badge over the image */
.init-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.init-badge i {
    width: 14px;
    color: var(--accent-primary);
}

/* Text Content */
.init-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.init-content h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text-main);
}

.init-content p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    flex: 1; /* Pushes content evenly if descriptions vary in length */
}

@media (max-width: 768px) {
    .initiatives-grid {
        grid-template-columns: 1fr;
    }
}


/* --- UPCOMING EVENTS GRID --- */
.events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 32px; }

.event-card {
    background: white; border-radius: var(--radius-lg); border: 1px solid var(--border-light);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.05); overflow: hidden; display: flex; flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.event-card:hover { transform: translateY(-8px); box-shadow: 0 25px 50px -12px rgba(0,0,0,0.1); border-color: var(--accent-glow); }

.event-card-header { padding: 24px 24px 0; display: flex; justify-content: space-between; align-items: flex-start; }
.category-badge { padding: 6px 12px; border-radius: var(--radius-full); font-size: 12px; font-weight: 700; text-transform: uppercase; background: var(--bg-surface); color: var(--text-main); }
.date-box { text-align: right; }
.date-box .month { font-size: 13px; font-weight: 700; color: var(--accent-primary); text-transform: uppercase; }
.date-box .day { font-size: 24px; font-weight: 800; color: var(--text-main); line-height: 1; }

.event-card-body { padding: 20px 24px; flex: 1; }
.event-card-body h3 { font-size: 20px; margin-bottom: 12px; color: var(--text-main); }
.event-detail { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 14px; margin-bottom: 8px; font-weight: 500; }
.event-detail i { width: 16px; color: var(--accent-primary); }

.event-card-footer { padding: 24px; border-top: 1px solid var(--border-light); background: var(--bg-surface); }
.capacity-info { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--text-main); margin-bottom: 8px; }
.progress-bar-bg { width: 100%; height: 6px; background: var(--border-light); border-radius: 4px; overflow: hidden; margin-bottom: 20px; }
.progress-bar-fill { height: 100%; background: var(--accent-primary); }
.progress-full { background: #10B981; }
.text-full { color: #10B981; }

/* --- PAST EVENTS (Horizontal Scroll) --- */
.past-events-scroll { display: flex; gap: 24px; overflow-x: auto; padding-bottom: 32px; scroll-snap-type: x mandatory; -ms-overflow-style: none; scrollbar-width: none; }
.past-events-scroll::-webkit-scrollbar { display: none; } /* Hide scrollbar */

.past-card {
    min-width: 300px; background: white; border-radius: var(--radius-lg); border: 1px solid var(--border-light);
    padding: 24px; scroll-snap-align: start; opacity: 0.8; transition: opacity 0.3s;
}
.past-card:hover { opacity: 1; border-color: var(--text-muted); }
.past-card h4 { font-size: 18px; margin-bottom: 8px; color: var(--text-main); }
.past-card p { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.past-stats { display: flex; gap: 16px; font-size: 13px; font-weight: 600; color: var(--accent-primary); }
.past-stats div { display: flex; align-items: center; gap: 6px; }
.past-stats i { width: 14px; }

/* --- MASONRY GALLERY --- */
.masonry-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-auto-rows: 200px;
    gap: 16px;
    grid-auto-flow: dense;
}

.gallery-item { border-radius: var(--radius-lg); overflow: hidden; position: relative; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.gallery-item:hover img { transform: scale(1.05); }

/* Spanning logic for the beautiful irregular grid */
.gallery-item.large { grid-column: span 2; grid-row: span 2; }
.gallery-item.wide { grid-column: span 2; }

/* --- TESTIMONIALS --- */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }

.testimonial-card {
    background: white; padding: 40px 32px; border-radius: var(--radius-lg);
    border: 1px solid var(--border-light); box-shadow: 0 10px 30px -10px rgba(0,0,0,0.05);
    position: relative;
}

.quote-icon { width: 32px; height: 32px; color: var(--border-light); position: absolute; top: 32px; right: 32px; }
.quote-text { font-size: 16px; color: var(--text-main); line-height: 1.8; margin-bottom: 32px; font-style: italic; }

.student-info { display: flex; align-items: center; gap: 16px; }
.student-avatar { width: 48px; height: 48px; background: var(--accent-primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; }
.student-info h4 { font-size: 16px; color: var(--text-main); margin-bottom: 2px; }
.student-info span { font-size: 13px; color: var(--text-muted); font-weight: 600; }

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .hub-hero h1 { font-size: 40px; }
    .hero-actions { flex-direction: column; }
    .events-grid { grid-template-columns: 1fr; }
    .masonry-gallery { grid-template-columns: 1fr; grid-auto-rows: 250px; }
    .gallery-item.large, .gallery-item.wide { grid-column: span 1; grid-row: span 1; }
    .testimonials-grid { grid-template-columns: 1fr; }
}