/* ==== FORUM-SPECIFIC STYLES ==== */
/* These styles are specific to the Forum page and extend the shared design system. */

/* Event Meta */
.event-meta {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
}

.meta-item i {
    font-size: 2rem;
    color: var(--primary);
}

.meta-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.meta-value {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-main);
}

/* Scrollytelling Layout */
.scrolly-layout {
    display: flex;
    gap: 4rem;
    position: relative;
    margin-top: 4rem;
}

.scrolly-visual-container {
    flex: 1;
    position: sticky;
    top: calc(50vh - 150px);
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
}

.scrolly-icon {
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(0, 150, 64, 0.1);
    box-shadow: 0 0 40px rgba(0, 150, 64, 0.2);
    border: 1px solid rgba(0, 150, 64, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 5rem;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scrolly-icon.active {
    opacity: 1;
    transform: scale(1);
    animation: pulseIcon 4s infinite alternate;
}

@keyframes pulseIcon {
    0% { box-shadow: 0 0 20px rgba(0, 150, 64, 0.2); transform: scale(1); }
    100% { box-shadow: 0 0 50px rgba(0, 150, 64, 0.5); transform: scale(1.05); }
}

.scrolly-steps-container {
    flex: 1;
    padding-bottom: 30vh;
}

.scrolly-step {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0.3;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.scrolly-step.active {
    opacity: 1;
    transform: translateX(0);
}

.activity-card {
    background: var(--glass-bg);
    border: 1px solid rgba(0, 150, 64, 0.3);
    border-radius: 20px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.activity-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

[data-theme="light"] .activity-card h3 {
    color: var(--primary-dark);
}

.activity-card p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.speaker-tag {
    display: inline-block;
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
    background: rgba(0, 150, 64, 0.08);
    border: 1px solid rgba(0, 150, 64, 0.2);
    border-radius: 20px;
    color: var(--text-muted);
}

/* Schedule / Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    width: 2px;
    background: var(--glass-border);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 2.5rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 2px solid var(--primary);
    box-shadow: 0 0 10px rgba(0, 150, 64, 0.5);
    z-index: 2;
}

[data-theme="light"] .timeline-item::before {
    background: var(--bg-dark);
}

.timeline-time {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.timeline-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 12px;
    transition: var(--transition);
}

.timeline-content:hover {
    border-color: rgba(0, 150, 64, 0.3);
}

[data-theme="dark"] .timeline-content:hover {
    background: rgba(255,255,255,0.05);
}

[data-theme="light"] .timeline-content:hover {
    background: rgba(0, 150, 64, 0.04);
}

.timeline-content h4 {
    color: var(--text-main);
}

.timeline-content p {
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

/* CTA Section */
.cta-section {
    padding: 8rem 0;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .cta-section {
    background: linear-gradient(
        135deg,
        rgba(0, 150, 64, 0.08),
        rgba(0, 159, 227, 0.08)
    );
}

[data-theme="light"] .cta-section {
    background: linear-gradient(
        135deg,
        rgba(0, 150, 64, 0.06),
        rgba(0, 159, 227, 0.06)
    );
}

.cta-section h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--text-main);
}

.cta-section p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Forum Hero overrides — keep the abstract glow style */
.forum-page .hero-bg {
    background: radial-gradient(circle at center, var(--bg-dark), var(--bg-darker));
}

/* Forum Responsive */
@media (max-width: 768px) {
    .event-meta {
        flex-direction: column;
        gap: 1.5rem;
    }

    .scrolly-layout {
        flex-direction: column;
    }

    .scrolly-visual-container {
        position: relative;
        top: auto;
        height: 150px;
    }

    .scrolly-icon {
        width: 120px;
        height: 120px;
        font-size: 3rem;
    }

    .scrolly-step {
        min-height: auto;
        padding: 2rem 0;
    }

    .scrolly-steps-container {
        padding-bottom: 0;
    }
}

/* ==== PHOTO GALLERY ==== */
.gallery-grid {
    columns: 3;
    column-gap: 1.2rem;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 1.2rem;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.gallery-item:hover {
    border-color: rgba(0, 150, 64, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 150, 64, 0.15);
}

.gallery-item:focus-visible {
    outline: 3px solid rgba(0, 159, 227, 0.5);
    outline-offset: 3px;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    font-size: 2rem;
    color: #fff;
    background: rgba(0, 150, 64, 0.5);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay i {
    transform: scale(1);
}

/* ==== LIGHTBOX ==== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content img {
    animation: lightboxZoomIn 0.4s ease forwards;
}

@keyframes lightboxZoomIn {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-caption {
    color: #94a3b8;
    font-size: 0.95rem;
    margin-top: 1rem;
    text-align: center;
    max-width: 600px;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-nav:hover {
    background: rgba(0, 150, 64, 0.4);
    border-color: rgba(0, 150, 64, 0.6);
}

.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

.lightbox-counter {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 2px;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Gallery Responsive */
@media (max-width: 992px) {
    .gallery-grid {
        columns: 2;
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        columns: 1;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .lightbox-prev { left: 0.5rem; }
    .lightbox-next { right: 0.5rem; }

    .lightbox-close {
        top: 0.8rem;
        right: 0.8rem;
        width: 40px;
        height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .scrolly-icon.active {
        animation: none;
    }

    .gallery-item,
    .gallery-item img,
    .gallery-overlay,
    .lightbox,
    .lightbox-content img,
    .lightbox-close,
    .lightbox-nav {
        transition: none !important;
    }
}

/* ==== FORUM LIGHT THEME OVERRIDES ==== */

[data-theme="light"] .hero-bg {
    background: linear-gradient(135deg, #e8f5e9, #e3f2fd);
}

[data-theme="light"] .activity-card {
    background: #fff;
    border-color: rgba(0, 150, 64, 0.15);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .activity-card h3 {
    color: var(--primary-dark);
}

[data-theme="light"] .speaker-tag {
    background: rgba(0, 150, 64, 0.06);
    border-color: rgba(0, 150, 64, 0.15);
}

[data-theme="light"] .scrolly-icon {
    background: rgba(0, 150, 64, 0.08);
    border-color: rgba(0, 150, 64, 0.2);
}

[data-theme="light"] .timeline-item::before {
    background: #fff;
}

[data-theme="light"] .timeline-content {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .timeline-content:hover {
    background: rgba(0, 150, 64, 0.03);
    border-color: rgba(0, 150, 64, 0.2);
}

[data-theme="light"] .timeline-content h4 {
    color: #1a2332;
}

[data-theme="light"] .cta-section {
    background: linear-gradient(135deg, rgba(0,150,64,0.05), rgba(0,159,227,0.05));
}

[data-theme="light"] .cta-section h2 {
    color: #1a2332;
}

[data-theme="light"] .meta-value {
    color: #1a2332;
}

/* ==== FORUM HERO LIGHT MODE FIX ==== */
/* Forum hero uses gradient bg, not photo, so text must be dark in light mode */
[data-theme="light"] .hero h1 {
    color: #1a2332;
}

[data-theme="light"] .hero-subtitle {
    color: #5a6a7a;
}

[data-theme="light"] .hero .badge {
    color: var(--primary-dark);
}

/* Forum navbar — the hero is light so navbar text must be dark */
[data-theme="light"] .navbar:not(.scrolled) .nav-links a {
    color: #1a2332;
}
[data-theme="light"] .navbar:not(.scrolled) .logo-text {
    color: #1a2332;
}
[data-theme="light"] .navbar:not(.scrolled) .hamburger {
    color: #1a2332;
}
[data-theme="light"] .navbar:not(.scrolled) .btn-outline {
    color: var(--primary);
    border-color: var(--primary);
}
[data-theme="light"] .navbar:not(.scrolled) .btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

/* Event meta card in light mode */
[data-theme="light"] .event-meta {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    backdrop-filter: none;
}
