<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0" />
        
        <!-- Primary Meta Tags -->
        <title>{{{$event->title}}} - Buy Tickets Online | TamashaTix Tanzania</title>
        <meta name="title" content="{{{$event->title}}} - Buy Tickets Online | TamashaTix" />
        <meta name="description" content="Get your tickets for {{{$event->title}}} at {{{$event->venue_name}}}. Buy online, get instant confirmation. Secure mobile money payments. {{{Str::words(md_to_str($event->description), 25)}}}" />
        <meta name="keywords" content="{{$event->title}}, tickets, tiketi, event, tukio, {{$event->venue_name}}, Tanzania, buy tickets online, mobile money, M-Pesa, TamashaTix" />
        <meta name="author" content="TamashaTix" />
        <meta name="robots" content="index, follow" />
        <meta name="language" content="English" />
        <meta name="revisit-after" content="7 days" />
        <link rel="canonical" href="{{$event->event_url}}" />
        
        <!-- Open Graph / Facebook -->
        <meta property="og:type" content="event" />
        <meta property="og:url" content="{{$event->event_url}}" />
        <meta property="og:title" content="{{{$event->title}}} - TamashaTix" />
        <meta property="og:description" content="Get your tickets for {{{$event->title}}}. {{{Str::words(md_to_str($event->description), 30)}}}" />
        @if($event->images->count())
        <meta property="og:image" content="{{config('attendize.cdn_url_user_assets').'/'.$event->images->first()['image_path']}}" />
        <meta property="og:image:width" content="1200" />
        <meta property="og:image:height" content="630" />
        <meta property="og:image:alt" content="{{{$event->title}}} Event Image" />
        @endif
        <meta property="og:site_name" content="TamashaTix - Tanzania Event Tickets" />
        <meta property="og:locale" content="en_TZ" />
        <meta property="event:start_time" content="{{$event->start_date->toIso8601String()}}" />
        <meta property="event:end_time" content="{{$event->end_date->toIso8601String()}}" />
        <meta property="event:location" content="{{{$event->venue_name}}}" />
        
        <!-- Twitter Card -->
        <meta name="twitter:card" content="summary_large_image" />
        <meta name="twitter:url" content="{{$event->event_url}}" />
        <meta name="twitter:title" content="{{{$event->title}}} - TamashaTix" />
        <meta name="twitter:description" content="Get your tickets for {{{$event->title}}}. Buy online, instant confirmation!" />
        @if($event->images->count())
        <meta name="twitter:image" content="{{config('attendize.cdn_url_user_assets').'/'.$event->images->first()['image_path']}}" />
        @endif
        
        <!-- Structured Data / JSON-LD -->
        <script type="application/ld+json">
        {
            "@context": "https://schema.org",
            "@type": "Event",
            "name": "{{{$event->title}}}",
            "description": "{{{Str::words(md_to_str($event->description), 50)}}}",
            "startDate": "{{$event->start_date->toIso8601String()}}",
            "endDate": "{{$event->end_date->toIso8601String()}}",
            @if($event->images->count())
            "image": "{{config('attendize.cdn_url_user_assets').'/'.$event->images->first()['image_path']}}",
            @endif
            "location": {
                "@type": "Place",
                "name": "{{{$event->venue_name}}}",
                "address": {
                    "@type": "PostalAddress",
                    "addressLocality": "Tanzania"
                }
            },
            "organizer": {
                "@type": "Organization",
                "name": "{{{$event->organiser->name}}}",
                "url": "{{$event->organiser->organiser_url ?? $event->event_url}}"
            },
            "offers": {
                "@type": "AggregateOffer",
                "url": "{{$event->event_url}}",
                "priceCurrency": "TZS",
                "availability": "https://schema.org/InStock",
                "validFrom": "{{$event->created_at->toIso8601String()}}"
            },
            "eventStatus": "https://schema.org/EventScheduled",
            "eventAttendanceMode": "https://schema.org/OfflineEventAttendanceMode"
        }
        </script>
        
        <!-- Additional SEO -->
        <meta name="theme-color" content="#8B5CF6" />
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
        <meta name="apple-mobile-web-app-title" content="TamashaTix" />
        <!--[if lt IE 9]>
          <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
          <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->
        @yield('head')

       {!!Html::style(config('attendize.cdn_url_static_assets').'/assets/stylesheet/frontend.css')!!}

        <!--Bootstrap placeholder fix-->
        <style>
            ::-webkit-input-placeholder { /* WebKit browsers */
                color:    #ccc !important;
            }
            :-moz-placeholder { /* Mozilla Firefox 4 to 18 */
                color:    #ccc !important;
                opacity:  1;
            }
            ::-moz-placeholder { /* Mozilla Firefox 19+ */
                color:    #ccc !important;
                opacity:  1;
            }
            :-ms-input-placeholder { /* Internet Explorer 10+ */
                color:    #ccc !important;
            }

            input, select {
                color: #999 !important;
            }

            .btn {
                color: #fff !important;
            }

        </style>
        @if ($event->bg_type == 'color' || Request::input('bg_color_preview'))
            <style>body {background-color: {{(Request::input('bg_color_preview') ? '#'.Request::input('bg_color_preview') : $event->bg_color)}} !important; }</style>
        @endif

        @if (($event->bg_type == 'image' || $event->bg_type == 'custom_image' || Request::input('bg_img_preview')) && !Request::input('bg_color_preview'))
            <style>
                body {
                    background: url({{(Request::input('bg_img_preview') ? URL::to(Request::input('bg_img_preview')) :  asset(config('attendize.cdn_url_static_assets').'/'.$event->bg_image_path))}}) no-repeat center center fixed;
                    background-size: cover;
                }
            </style>
        @endif

    </head>
    <body class="attendize">
        <div id="event_page_wrap" vocab="http://schema.org/" typeof="Event">
            @yield('content')

            {{-- Push for sticky footer--}}
            @stack('footer')
        </div>

        {{-- Sticky Footer--}}
        @yield('footer')

        <a href="#intro" style="display:none;" class="totop"><i class="ico-angle-up"></i>
            <span style="font-size:11px;">@lang("basic.TOP")</span></a>

        @include("Shared.Partials.LangScript")
        {!!Html::script(config('attendize.cdn_url_static_assets').'/assets/javascript/frontend.js')!!}


        @if(isset($secondsToExpire))
        <script>if($('#countdown')) {setCountdown($('#countdown'), {{$secondsToExpire}});}</script>
        @endif

        @include('Shared.Partials.GlobalFooterJS')
    </body>
</html>
