<div>
    <div class="trainer-card uk-text-center">

        <div class="trainer-avatar">
            <img class="uk-border-circle" src="assets/svg/avatar-small.svg" width="100" height="100" alt="Noor Abdullah">
        </div>

        <h3 class="uk-card-title trainer-name">Noor Abdullah</h3>

        <p class="trainer-description f500">Sales Director</p>

        <div class="trainer-specialty">Sales & Marketing Expert</div>

        <div class="trainer-rating star-rate uk-flex uk-flex-center uk-flex-middle">
            <span uk-icon="icon: star-bold; ratio: .6" class="uk-icon" aria-hidden="true"></span>
            <span uk-icon="icon: star-bold; ratio: .6" class="uk-icon" aria-hidden="true"></span>
            <span uk-icon="icon: star-bold; ratio: .6" class="uk-icon" aria-hidden="true"></span>
            <span uk-icon="icon: star-bold; ratio: .6" class="uk-icon" aria-hidden="true"></span>
            <span uk-icon="icon: star; ratio: .6" class="uk-icon" aria-hidden="true"></span>
            <span class="trainer-rate f700 uk-text-secondary">(4.9) <small class="f400 uk-text-muted">(127 reviews)</small></span>
        </div>

        <p class="trainer-price trainer-price-large uk-text-primary f600">From 220 SAR - 704 SAR</p>

        <ul class="trainer-extra">
            <li><span uk-icon="icon: clock; ratio: .7" class="uk-icon uk-text-primary" aria-hidden="true"></span><span>15 min - 60 min sessions</span></li>
            <li><span uk-icon="icon: global; ratio: .7" class="uk-icon uk-text-primary" aria-hidden="true"></span><span>English - Arabic</span></li>
        </ul>


        <?php
        // Get the current page filename
        $current_page = basename($_SERVER['PHP_SELF']);

        // Check if we're on the favorite trainers page
        if ($current_page === 'user-dashboard-favorite-trainers.php'): ?>
            <div class="uk-flex gap-8">
                <a href="trainer-single.php" class="uk-button uk-button-primary btn-trainer-page uk-width-1-1">
                    View Profile
                </a>
                <button class="uk-button btn-remove-favorite" onclick="removeFavorite(this)" data-trainer-id="1" aria-label="Favorite">
                    <span uk-icon="icon: heart; ratio: 1" class="uk-icon" aria-hidden="true"></span>
                </button>
            </div>
        <?php else: ?>
            <a href="trainer-single.php" class="uk-button uk-button-primary btn-trainer-page uk-width-1-1">
                View Profile
            </a>
        <?php endif; ?>

    </div><!-- .trainer-card -->
</div>