@extends('web.layouts.container')

@section('content')
    <!----------- new section ----------->
    <section class="accreditation-pg section bg-babyBlue nursing_2">
        <div class="container">
            <div class="inner mb-0">
                <div class="row align-items-center">
                    <div class="col-lg-12 order_sm_1">
                        <div class="img">
                            <img src="{{asset($pages->image)}}" alt="" class="sec-img"/>
                        </div>
                    </div>
                    <div class="col-lg-12">
                        <div class="text-box des_container bg-white">
                            <div class="head mb-4">
                                <h6 class="color-primary mb-3 text-capitalize">{{$pages->page_title}}</h6>
                                <h1 class="color-dark fw-bold text-capitalize">{{$pages->title}}</h1>
                            </div>
                        <div class="accordion accordion-flush" id="accordionFlushExample">

                        @if(count($titleMatches))
                            @foreach($titleMatches as $key => $titleMatch)
                            <div class="accordion-item">
                                <h2 class="accordion-header" id="flush-headingOne">
                                    <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#flush-collapse{{$loop->iteration}}" aria-expanded="false" aria-controls="flush-collapseOne">
                                        {{$titleMatch}}
                                    </button>
                                </h2>
                                <div id="flush-collapse{{$loop->iteration}}" class="accordion-collapse collapse" aria-labelledby="flush-headingOne" data-bs-parent="#accordionFlushExample">
                                    <div class="accordion-body">
                                        <div class="text">
{{--                                            {{stripText(($descMatches[$key] ?? null))}}--}}
                                            {!! $descMatches[$key] ?? null !!}
                                        </div>
                                    </div>
                                </div>
                            </div>
                            @endforeach
                        @endif
                  </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
@endsection

@section('inner_js')

    <script>
        $(document).ready(function () {
            $('.des_container p ').addClass('det');
        })
    </script>

@endsection
