<?php if($ad): ?>
    <div class="ad-container my-8 flex justify-center">
        <a href="<?php echo e($ad->target_url ?? '#'); ?>" target="_blank" class="block overflow-hidden rounded-2xl shadow-sm hover:shadow-md transition-shadow duration-300">
            <?php if($ad->size === 'leaderboard'): ?>
                <div class="w-full max-w-[728px] aspect-[728/90] bg-slate-100 flex items-center justify-center overflow-hidden">
                    <img src="<?php echo e(asset('storage/' . $ad->image_path)); ?>" alt="<?php echo e($ad->title); ?>" class="w-full h-full object-cover">
                </div>
            <?php elseif($ad->size === 'rectangle'): ?>
                <div class="w-full max-w-[300px] aspect-[300/250] bg-slate-100 flex items-center justify-center overflow-hidden">
                    <img src="<?php echo e(asset('storage/' . $ad->image_path)); ?>" alt="<?php echo e($ad->title); ?>" class="w-full h-full object-cover">
                </div>
            <?php else: ?>
                <div class="w-full bg-slate-100 flex items-center justify-center overflow-hidden">
                    <img src="<?php echo e(asset('storage/' . $ad->image_path)); ?>" alt="<?php echo e($ad->title); ?>" class="w-full h-auto">
                </div>
            <?php endif; ?>
        </a>
    </div>
<?php endif; ?>
<?php /**PATH /Users/sajnush/Herd/StudyXnote/resources/views/components/ad-banner.blade.php ENDPATH**/ ?>