<?php

require_once __DIR__ . '/_cms_helpers.php';

$lang =
    $lang ?? 'en';

?>

<section class="ec-trust-ribbon ec-reveal ec-hover-lift ec-glow-hover">

    <div class="ec-trust-header">

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

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

            <?= $lang === 'ar'
                ? 'شبكة التعاون الأكاديمي'
                : 'Academic Collaboration Network' ?>

        </div>

        <div class="ec-trust-title">

            <?= $lang === 'ar'
                ? 'شركاؤنا من الجامعات والمؤسسات العالمية'
                : 'Trusted by Leading Universities & Global Institutions' ?>

        </div>

        <div class="ec-trust-desc">

            <?= $lang === 'ar'
                ? 'يبني المؤتمر شراكات أكاديمية وبحثية مع مؤسسات وجامعات عالمية لدعم التميز العلمي والنشر الاحترافي.'
                : 'The conference establishes global academic partnerships and collaborations to support scientific excellence and professional publication.'
            ?>

        </div>

    </div>

    <div class="ec-logo-slider">

        <div class="ec-logo-track">

            <?php
            $sliderSponsors =
                array_merge(
                    ec_safe_array($sponsors ?? []),
                    ec_safe_array($sponsors ?? [])
                );

            foreach ($sliderSponsors as $sp):

                $logo =
                    $sp['logo']
                    ?? $sp['image']
                    ?? '';

                $name =
                    $lang === 'ar'
                    ? ($sp['name_ar'] ?? $sp['name_en'] ?? '')
                    : ($sp['name_en'] ?? $sp['name_ar'] ?? '');
            ?>

                <div class="ec-logo-card">

                    <?php if (!empty($logo)): ?>

                        <img
                            src="<?= pcb_h(
ec_media_url($logo)
) ?>"
                            alt="<?= pcb_h($name) ?>">

                    <?php else: ?>

                        <div class="ec-logo-placeholder">

                            <i class="fa fa-building-columns"></i>

                        </div>

                    <?php endif; ?>

                </div>

            <?php endforeach; ?>

        </div>

    </div>

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

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

            <i class="fa fa-building-columns"></i>

            120+

            <?= $lang === 'ar'
                ? 'جامعة ومؤسسة'
                : 'Institutions' ?>

        </div>

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

            <i class="fa fa-earth-americas"></i>

            42+

            <?= $lang === 'ar'
                ? 'دولة مشاركة'
                : 'Participating Countries' ?>

        </div>

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

            <i class="fa fa-book-open"></i>

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

            <?= $lang === 'ar'
                ? 'بحث علمي'
                : 'Research Papers' ?>

        </div>

    </div>

</section>
