<?php

require_once __DIR__ . '/_cms_helpers.php';

$sectionConfig =
    ecms_get_section_config('cta');

if (empty($sectionConfig['enabled'])) {
    return;
}

$lang =
    $lang ?? 'en';

?>

<section
    data-cms-section="cta"
    class="ecms-managed-section ec-final-cta ec-section-shell ec-section-anchor"
    id="cta">

    <div class="ec-final-cta-grid">

        <div class="ec-final-cta-content">

            <div class="ec-ieee-badge mb-4">

                <i class="fa fa-paper-plane"></i>

                <?= $lang === 'ar'
                    ? 'المشاركة الأكاديمية'
                    : 'Academic Participation' ?>

            </div>

            <div class="ec-final-cta-title">

                <?= $lang === 'ar'
                    ? 'كن جزءاً من التجربة العلمية العالمية'
                    : 'Become Part of the Global Scholarly Experience' ?>

            </div>

            <div class="ec-final-cta-desc">

                <?= $lang === 'ar'
                    ? 'انضم إلى الباحثين والخبراء والمتخصصين من مختلف أنحاء العالم وشارك أبحاثك وأفكارك ضمن بيئة أكاديمية احترافية متقدمة.'
                    : 'Join researchers, experts, and innovators from around the world and present your work within a modern professional academic environment.'
                ?>

            </div>

            <div class="ec-final-cta-actions">

                <a
                    href="/easychair/author/submit?id=<?= (int)$conference['id'] ?>"
                    class="ec-final-btn ec-final-btn-primary">

                    <i class="fa fa-paper-plane"></i>

                    <?= $lang === 'ar'
                        ? 'إرسال بحث الآن'
                        : 'Submit Paper Now' ?>

                </a>

                <a
                    href="#program"
                    class="ec-final-btn ec-final-btn-secondary">

                    <i class="fa fa-calendar-days"></i>

                    <?= $lang === 'ar'
                        ? 'استعراض البرنامج'
                        : 'View Program' ?>

                </a>

            </div>

        </div>

        <div class="ec-final-cta-visual">

            <div class="ec-final-glass-card">

                <div class="ec-final-glass-top">

                    <div class="ec-final-live">

                        <span class="ec-final-live-dot"></span>

                        GLOBAL EVENT

                    </div>

                    <div class="ec-final-year">

                        <?= date('Y') ?>

                    </div>

                </div>

                <div class="ec-final-center">

                    <div class="ec-final-big-icon">

                        <i class="fa fa-globe"></i>

                    </div>

                    <div class="ec-final-big-title">

                        <?= pcb_h(
                            $conference['short_name']
                            ?? 'Conference'
                        ) ?>

                    </div>

                    <div class="ec-final-big-desc">

                        <?= $lang === 'ar'
                            ? 'مؤتمر أكاديمي دولي احترافي'
                            : 'Professional International Academic Conference' ?>

                    </div>

                </div>

                <div class="ec-final-stats">

                    <div class="ec-final-stat">

                        <div class="ec-final-stat-number">

                            <?= (int)($heroMetrics['submissions'] ?? 0) ?>

                        </div>

                        <div class="ec-final-stat-label">

                            <?= $lang === 'ar'
                                ? 'الأبحاث'
                                : 'Papers' ?>

                        </div>

                    </div>

                    <div class="ec-final-stat">

                        <div class="ec-final-stat-number">

                            <?= count($dynamicSpeakers ?? []) ?>

                        </div>

                        <div class="ec-final-stat-label">

                            <?= $lang === 'ar'
                                ? 'المتحدثون'
                                : 'Speakers' ?>

                        </div>

                    </div>

                    <div class="ec-final-stat">

                        <div class="ec-final-stat-number">
                            42+
                        </div>

                        <div class="ec-final-stat-label">

                            <?= $lang === 'ar'
                                ? 'الدول'
                                : 'Countries' ?>

                        </div>

                    </div>

                </div>

            </div>

        </div>

    </div>

</section>
