@extends('layouts.app')
{{-- Ini akan memicu @if(!View::hasSection('hide_nav_bar')) di app.blade.php --}}
@section('hide_nav_bar', true)

@section('content')
<div class="news-detail-container">
    <a href="{{ route('news.index') }}" class="btn-back">
        <i class="fas fa-arrow-left"></i> Details
    </a>

    <header class="news-header-meta">
        <span class="news-tag">Berita Pamsimas</span>
        
        <h1 class="news-detail-title">{{ $news->title }}</h1>
        
        <div class="news-author-date">
            {{ $news->created_at->translatedFormat('F d, Y') }} by <strong>Admin</strong>
        </div>
    </header>

    @if($news->image)
        <img src="{{ rtrim(config('app.admin_url'), '/') . '/storage/' . $news->image }}" class="news-featured-image">
    @else
        <img src="https://via.placeholder.com/800x400?text=Pamsimas+News" class="news-featured-image">
    @endif

    <article class="news-body">
        {{ $news->content }}
    </article>
</div>
@endsection