<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  {{-- ── SEO Core ──────────────────────────────────────── --}}
  <title>@yield('title', config('app.name', 'The Hindu'))</title>
  <meta name="description" content="@yield('meta_description', 'India\'s National Newspaper — breaking news, analysis and opinion on India, world, sport, science and more.')">
  <meta name="keywords"    content="@yield('meta_keywords', 'India news, world news, cricket, politics, business, science, health')">
  <link rel="canonical"   href="@yield('canonical', url()->current())">

  {{-- ── Robots ────────────────────────────────────────── --}}
  <meta name="robots" content="@yield('robots', 'index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1')">

  {{-- ── GEO Tags ───────────────────────────────────────── --}}
  <meta name="geo.region"      content="{{ env('SITE_REGION', 'IN-TN') }}">
  <meta name="geo.placename"   content="{{ env('SITE_GEO_PLACENAME', 'Chennai, Tamil Nadu, India') }}">
  <meta name="geo.position"    content="{{ env('SITE_ICBM', '13.0827, 80.2707') }}">
  <meta name="ICBM"            content="{{ env('SITE_ICBM', '13.0827, 80.2707') }}">

  {{-- ── Open Graph ─────────────────────────────────────── --}}
  <meta property="og:type"        content="@yield('og_type', 'website')">
  <meta property="og:title"       content="@yield('title', config('app.name'))">
  <meta property="og:description" content="@yield('meta_description', 'India\'s National Newspaper')">
  <meta property="og:url"         content="@yield('canonical', url()->current())">
  <meta property="og:image"       content="@yield('og_image', asset('img/thehindu-logo.svg'))">
  <meta property="og:site_name"   content="{{ config('app.name', 'The Hindu') }}">
  <meta property="og:locale"      content="en_IN">

  {{-- ── Twitter Card ────────────────────────────────────── --}}
  <meta name="twitter:card"        content="summary_large_image">
  <meta name="twitter:site"        content="@thehindu">
  <meta name="twitter:title"       content="@yield('title', config('app.name'))">
  <meta name="twitter:description" content="@yield('meta_description', 'India\'s National Newspaper')">
  <meta name="twitter:image"       content="@yield('og_image', asset('img/thehindu-logo.svg'))">

  {{-- ── AIO / AI Search Optimisation ──────────────────── --}}
  <meta name="news_keywords"       content="@yield('meta_keywords', 'India news, world news, politics, cricket')">
  <meta name="author"              content="@yield('article_author', 'The Hindu Bureau')">
  @if(View::hasSection('article_published'))
  <meta name="article:published_time" content="@yield('article_published')">
  <meta name="article:modified_time"  content="@yield('article_modified', now()->toIso8601String())">
  <meta name="article:section"        content="@yield('article_section', '')">
  @endif

  {{-- ── Structured Data (Schema.org) ─────────────────────── --}}
  @yield('schema_json')

  {{-- ── Fonts ───────────────────────────────────────────── --}}
  <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=Merriweather:ital,opsz,wght@0,18..144,300..900;1,18..144,300..900&family=Playfair:ital,opsz,wght@0,5..1200,300..900;1,5..1200,300..900&family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">

  {{-- ── Font Awesome ────────────────────────────────────── --}}
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">

  {{-- ── Site CSS ─────────────────────────────────────────── --}}
  <link rel="stylesheet" href="{{ asset('assets/css/style.css') }}">
  <link rel="stylesheet" href="{{ asset('assets/css/responsive.css') }}">

  {{-- ── Favicon ──────────────────────────────────────────── --}}
  <link rel="icon" type="image/svg+xml" href="{{ asset('img/thehindu-logo.svg') }}">

  @stack('head')
</head>

<body>

{{-- ════════════════════ HEADER ════════════════════════════════ --}}
@include('partials.header')

{{-- ════════════════════ MAIN CONTENT ═════════════════════════ --}}
<main id="main-content">
  @yield('content')
</main>

{{-- ════════════════════ FOOTER ════════════════════════════════ --}}
@include('partials.footer')

{{-- ── Scripts ─────────────────────────────────────────────── --}}
<script src="{{ asset('assets/js/script.js') }}"></script>
@stack('scripts')

</body>
</html>
