@extends('layouts.frontend')

@section('title', 'Downloads – Skyline International Contracting Company')
@section('meta_description', 'Downloadable company documents and resources from Skyline International Contracting Company.')

@section('content')
    <section class="page-hero">
        <img class="" src="{{ asset('images/hero-construction.jpg') }}" alt="Skyline Downloads">
        <div class="page-hero-overlay"></div>
        <div class="container page-hero-content">
            <p class="eyebrow light-eyebrow">Downloads</p>
            <h1>Company documents and resources.</h1>
        </div>
    </section>

    <section class="section">
        <div class="container">
            @forelse($downloads as $download)
                <div class="download-card" style="margin-bottom:34px">
                    <div class="download-cover">
                        <img src="{{ asset('images/download-cover.png') }}" alt="" onerror="this.style.display='none'">
                        <span>{{ $download->category }}</span>
                    </div>
                    <div class="download-content">
                        <p class="eyebrow">{{ $download->category }}</p>
                        <h2>{{ $download->title }}</h2>
                        <p>{{ $download->description }}</p>
                        <div class="download-actions">
                            <a class="button button-dark" href="{{ \App\Services\FileUploadService::url($download->file) }}" download target="_blank">Download {{ $download->category }}</a>
                        </div>
                    </div>
                </div>
            @empty
                <p class="text-muted">Downloads coming soon.</p>
            @endforelse
        </div>
    </section>
@endsection
