@extends('web.layouts.app')

@section('content')
    <!-- Breadcrumb Area Start -->
    <div class="breadcrumb__area" style="background-image: url('/web/assets/img/page/breadcrumb.jpg');">
		<div class="container">
			<div class="row">
				<div class="col-xl-12">
					<div class="breadcrumb__area-content">
						<h2>{{ $success->title }}</h2>
						<ul>
							<li><a href="{{ route('home') }}">Home</a><i class="fa-regular fa-angle-right"></i></li>
							<li><a href="{{ route('success.index') }}">Success Stories</a><i class="fa-regular fa-angle-right"></i></li>
							<li>{{ $success->title }}</li>
						</ul>
					</div>
				</div>
			</div>
		</div>
	</div>
    <!-- Breadcrumb Area End -->

    <!-- Blog Details Area Start -->
    <div class="blog__details section-padding">
        <div class="container">
            <div class="row">
                <div class="col-lg-8 lg-mb-25">
                    <div class="blog__details-area">
                        <img src="/storage/{{ $success->image }}" alt="image">
                        <h3 class="mt-25 mb-20">{{ $success->title }}</h3>
						<p>{!! $success->content !!}</p>
                    </div>
				</div>
                <div class="col-lg-4 columns_sticky">
                    <div class="all__sidebar">
                        
                        <div class="all__sidebar-item">
                            <h4>Recent Success Stories</h4>
                            <div class="all__sidebar-item-post dark_image">
                                @foreach($recentSuccesses as $success)
                                <div class="post__item">
                                    <div class="post__item-image">
                                        <a href="{{ route('success.show', $success->slug) }}"><img src="/storage/{{ $success->image }}" alt="post-image"></a>
                                    </div>
                                    <div class="post__item-title">
                                        <h6><a href="{{ route('success.show', $success->slug) }}">{{ $success->title }}</a></h6>
                                        <span><i class="far fa-calendar-alt"></i>{{ \Carbon\Carbon::parse($success->published_at)->format('d M Y') }}</span>
                                    </div>
                                </div>
                                @endforeach
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- Blog Details Area End -->
@endsection 