<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="csrf-token" content="{{ csrf_token() }}">
<meta name="description" content="{{ $seo['description'] ?? 'Nexatech delivers innovative technology solutions including web development, digital transformation, and creative design services.' }}">
<meta name="keywords" content="{{ $seo['keywords'] ?? 'Nexatech, technology solutions, digital services, web development company, software development' }}">
<link rel="canonical" href="{{ $seo['canonical'] ?? url()->current() }}">

<meta property="og:title" content="{{ $seo['og_title'] ?? $seo['title'] ?? 'Nexatech | Innovative Technology & Digital Solutions' }}">
<meta property="og:description" content="{{ $seo['og_description'] ?? $seo['description'] ?? 'Discover Nexatech cutting-edge technology services including web development, digital strategy, and business solutions.' }}">
<meta property="og:image" content="{{ $seo['og_image'] ?? asset('images/og-img.jpg') }}">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:type" content="{{ str_ends_with($seo['og_image'] ?? '', '.png') ? 'image/png' : 'image/jpeg' }}">
<meta property="og:url" content="{{ url()->current() }}">
<meta property="og:type" content="website">
<meta property="og:locale" content="en_US">
<meta property="og:site_name" content="Nexatech">

<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@nexatech">
<meta name="twitter:title" content="{{ $seo['og_title'] ?? $seo['title'] ?? 'Nexatech | Innovative Technology & Digital Solutions' }}">
<meta name="twitter:description" content="{{ $seo['og_description'] ?? $seo['description'] ?? 'Discover Nexatech cutting-edge technology services including web development, digital strategy, and business solutions.' }}">
<meta name="twitter:image" content="{{ $seo['og_image'] ?? asset('images/og-img.jpg') }}">

<link rel="alternate" hreflang="en" href="{{ url()->current() }}">
<link rel="alternate" hreflang="x-default" href="{{ url()->current() }}">

<title>{{ $seo['title'] ?? 'Nexatech — Innovative Technology & Digital Solutions' }}</title>

{{-- JSON-LD Structured Data --}}
@hasSection('jsonld')
@yield('jsonld')
@else
<script type="application/ld+json">
{!! json_encode([
    '@context' => 'https://schema.org',
    '@type' => 'BreadcrumbList',
    'itemListElement' => array_values(array_filter([
        [
            '@type' => 'ListItem',
            'position' => 1,
            'name' => 'Home',
            'item' => url('/'),
        ],
        isset($seo['breadcrumb']) ? [
            '@type' => 'ListItem',
            'position' => 2,
            'name' => $seo['breadcrumb'],
            'item' => url()->current(),
        ] : null,
    ])),
], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) !!}
</script>
@endif

<!-- Favicon -->
<link rel="icon" href="{{ asset('images/favicon.ico') }}">

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">

<link rel="stylesheet" href="{{ asset('css/main.css') }}">
@stack('styles')
</head>
<body class="@yield('body_class')">
<script>document.fonts.ready.then(function(){document.body.classList.add('fonts-ready')});</script>

<div class="grain" aria-hidden="true"></div>

@yield('before_nav')

@include('partials.navbar')

<main id="main-content">
@yield('content')
</main>

@include('partials.footer')

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
<script src="{{ asset('js/app.js') }}"></script>
@stack('scripts')
</body>
</html>
