@extends('web.home.layout.master')

@section('content')

<section class="event-detail-section py-5">
    <div class="container-fluid">
        <div class="row justify-content-center">
            <div class="col-lg-8">
                <!-- Event Header -->
                <div class="event-header mb-5">
                    <div class="d-flex align-items-center mb-3">
                        <span class="badge bg-primary me-3">Event</span>

                    </div>
                    <h1 class="display-5 fw-bold mb-4">{{ $data->event_title }}</h1>
                    <div class="d-flex align-items-center">
                        <div class="avatar-sm me-3">
                            <span class="avatar-title bg-light text-dark rounded-circle">
                                <i class="fas fa-user"></i>
                            </span>
                        </div>
                        <div>
                            <p class="mb-0 fw-medium">Posted by American Plastics</p>
                        </div>
                    </div>
                </div>

                <!-- Featured Image -->
                <div class="event-featured-image mb-5">
                    <img src="{{ asset('admin/assets/img/event/' . $data->event_image) }}"
                         alt="{{ $data->event_title }}"
                         class="img-fluid rounded-4 shadow-lg w-100">
                </div>

                <!-- Event Content -->
                <div class="event-content mb-5">
                    <div class="content-text">
                        <p class="lead">{{ Str::limit($data->description, 200) }}</p>
                        <div class="py-4">
                            {!! $data->description !!}
                        </div>
                    </div>
                </div>

                <!-- Event Details Card -->
                <div class="card border-0 shadow-sm rounded-4 mb-5">
                    <div class="card-body p-4">
                        <h5 class="card-title fw-bold mb-4">Event Details</h5>
                        <div class="row">
                            <div class="col-md-6 mb-3">
                                <div class="d-flex align-items-start">
                                    <div class="me-3 text-primary">
                                        <i class="far fa-calendar-alt fs-5"></i>
                                    </div>
                                    <div>
                                        <h6 class="mb-1 fw-semibold">Date</h6>
                                        <p class="mb-0 text-muted">{{ $data->date }}</p>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6 mb-3">
                                <div class="d-flex align-items-start">
                                    <div class="me-3 text-primary">
                                        <i class="fas fa-map-marker-alt fs-5"></i>
                                    </div>
                                    <div>
                                        <h6 class="mb-1 fw-semibold">Location</h6>
                                        <p class="mb-0 text-muted">American Plastics Headquarters</p>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- Related Events -->

            </div>
        </div>
    </div>
</section>

@endsection

@push('styles')
<style>
    .event-detail-section {
        background-color: #f8f9fa;
    }

    .event-header {
        border-bottom: 1px solid #eee;
        padding-bottom: 1.5rem;
    }

    .event-featured-image {
        overflow: hidden;
        border-radius: 12px;
    }

    .event-content {
        line-height: 1.8;
        font-size: 1.1rem;
    }

    .avatar-sm {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
</style>
@endpush
