@extends('layouts.app')
@php
use App\Helpers\SeoHelper;
use App\Helpers\ServiceContentKeys;
use Illuminate\Support\Str;
$locale = app()->getLocale();
$isLocationPage = isset($withLocation) && $withLocation;
$locationSuffix = $locationSuffix ?? '';
$contactServiceSlug = ServiceContentKeys::canonicalPublicSlug((string) $slug);
$usesDarkHero = ($navState['heroTheme'] ?? '') === 'dark'
|| in_array($slug ?? '', ['branding-creative', 'branding'], true);
$heroCards = $heroCards ?? \App\Helpers\ServiceHeroCards::forSlug($slug, $service);
$localizedRoute = function($routeName, $params = []) use ($locale) {
return SeoHelper::localizedRoute($routeName, $params, $locale);
};
$metaKeywordsBase = $service["metaKeywords"] ?? ($service["name"] . ", " . __("messages.service_detail.meta_keywords_extra") . ", " . implode(", ", array_slice($service["features"], 0, 5)));
$metaKeywordsSafe = $metaKeywordsBase . ($isLocationPage && isset($locationData["keywords"]) ? ", " . implode(", ", $locationData["keywords"]) : "");
$metaDescRaw = $metaDescription ?? ($isLocationPage ? ($metaDescription ?? "") : ($service["metaDescription"] ?? $service["heroDescription"] ?? ""));
$metaDescriptionSafe = trim(strip_tags($metaDescRaw));
$titleSafe = $metaTitle ?? ($isLocationPage ? ($pageTitle . __('messages.meta.title_suffix')) : __('messages.service_detail.page_title', ['name' => $service['name'], 'location_suffix' => '']));
@endphp
@section('title', $titleSafe)
@section('meta_description', $metaDescriptionSafe)
@section('meta_keywords', $metaKeywordsSafe)
@section('og_title', $service['ogTitle'] ?? $titleSafe)
@section('og_description', $service['ogDescription'] ?? $metaDescriptionSafe)
@section('twitter_title', $service['ogTitle'] ?? $titleSafe)
@section('twitter_description', $service['ogDescription'] ?? $metaDescriptionSafe)
@section('robots', ! empty($agencyNoIndex) ? 'noindex, nofollow' : 'index, follow')
@section('og_image', asset($service['listingImage'] ?? 'images/portfolio/promoto-service/ux-ui-web-development-hero-developed-by-criazo-for-promoto-service.webp'))
@push('head')
@if($isLocationPage && isset($locationData))
{{-- Geo meta is output by layout from controller $geo_region, $geo_placename, $geo_position --}}
@endif
@php
$serviceSchemaName = $service["schemaName"] ?? ($isLocationPage && isset($locationDisplayName) ? $service["name"] . " " . __("messages.service_location.in") . " " . $locationDisplayName : $service["name"]);
$serviceDescription = $isLocationPage ? ($metaDescription ?? "") : ($service["schemaDescription"] ?? $service["metaDescription"] ?? $service["heroDescription"] ?? "");
$serviceDescriptionMeta = trim(strip_tags($serviceDescription));
$serviceImageUrl = $service['listingImage'] ? asset($service['listingImage']) : asset('images/portfolio/promoto-service/ux-ui-web-development-hero-developed-by-criazo-for-promoto-service.webp');
$serviceImageAbs = (str_starts_with($serviceImageUrl, 'http') || str_starts_with($serviceImageUrl, '//')) ? $serviceImageUrl : url($serviceImageUrl);
@endphp
@endpush
@section('content')
{{-- HERO: Homepage-style layout with category image cards --}}
@once
@push('styles')
@endpush
@push('scripts')
@endpush
@endonce
{{-- CAPABILITIES: Scroll-synced premium narrative --}}
{{-- Locations hub (location pages only) --}}
@if($isLocationPage && ((isset($sameCountryLocations) && count($sameCountryLocations) > 0) || (isset($otherCountriesLocations) && count($otherCountriesLocations) > 0)))
@endif
@include('components.explore-site-section')
@include('components.sticky-cta-bar', [
'stickyCtaTitle' => $service['ctaText'] ?? __('messages.service_detail.start_your_project', ['location_suffix' => '']),
'stickyCtaContactUrl' => $localizedRoute('contact.index'),
'stickyCtaServiceSlug' => $contactServiceSlug,
'editorial' => true,
])
@endsection