@extends('layouts.app')

@section('title', $activeTitle)

@push('styles')
<link href="{{ asset('css/stage-academy.css') }}" rel="stylesheet">
@endpush

@section('content')
<div class="container-fluid">
    <div class="d-flex align-items-center justify-content-between gap-3 mb-4">
        <div class="flex-grow-1">
            <nav aria-label="breadcrumb">
                <ol class="breadcrumb mb-1">
                    <li class="breadcrumb-item"><a href="{{ route('dashboard') }}">{{ __('dashboard') }}</a></li>
                    <li class="breadcrumb-item"><a href="{{ route('settings') }}">{{ __('settings') }}</a></li>
                    <li class="breadcrumb-item">
                        <a href="{{ route('settings.website') }}">{{ __('settings.website.title') }}</a>
                    </li>
                    @if($sectionKey)
                        <li class="breadcrumb-item active" aria-current="page">{{ $activeTitle }}</li>
                    @endif
                </ol>
            </nav>
            <h4 class="fw-bold mb-0">{{ $activeTitle }}</h4>
            <div class="text-muted small">
                {{ $sectionKey ? __('settings.website.section_subtitle') : __('settings.website.subtitle') }}
            </div>
        </div>
        <a href="{{ $sectionKey ? route('settings.website') : route('settings') }}" class="btn btn-outline-secondary app-back-end">
            <i class="bi bi-arrow-{{ app()->getLocale() == 'ar' ? 'right' : 'left' }}"></i> {{ __('common.back') }}
        </a>
    </div>

    @if(! $sectionKey)
        <div class="row g-3 sa-grid">
            <div class="col-12 col-md-6 col-lg-4">
                <a href="{{ route('settings.website.hero') }}" class="text-decoration-none">
                    <div class="card sa-card h-100">
                        <div class="card-body d-flex align-items-center gap-3">
                            <div class="sa-icon"><i class="bi bi-layout-text-window"></i></div>
                            <div class="sa-text">
                                <h6 class="mb-1 fw-bold">{{ __('settings.website.sections.header') }}</h6>
                                <p class="mb-0 text-muted">{{ __('settings.website.sections.header_desc') }}</p>
                            </div>
                        </div>
                    </div>
                </a>
            </div>

            <div class="col-12 col-md-6 col-lg-4">
                <a href="{{ route('settings.website', ['section' => 'footer']) }}" class="text-decoration-none">
                    <div class="card sa-card h-100">
                        <div class="card-body d-flex align-items-center gap-3">
                            <div class="sa-icon"><i class="bi bi-layout-text-sidebar-reverse"></i></div>
                            <div class="sa-text">
                                <h6 class="mb-1 fw-bold">{{ __('settings.website.sections.footer') }}</h6>
                                <p class="mb-0 text-muted">{{ __('settings.website.sections.footer_desc') }}</p>
                            </div>
                        </div>
                    </div>
                </a>
            </div>

            <div class="col-12 col-md-6 col-lg-4">
                <a href="{{ route('settings.website.apps') }}" class="text-decoration-none">
                    <div class="card sa-card h-100">
                        <div class="card-body d-flex align-items-center gap-3">
                            <div class="sa-icon"><i class="bi bi-phone"></i></div>
                            <div class="sa-text">
                                <h6 class="mb-1 fw-bold">{{ __('settings.website.sections.apps') }}</h6>
                                <p class="mb-0 text-muted">{{ __('settings.website.sections.apps_desc') }}</p>
                            </div>
                        </div>
                    </div>
                </a>
            </div>

            <div class="col-12 col-md-6 col-lg-4">
                <a href="{{ route('settings.website.websites') }}" class="text-decoration-none">
                    <div class="card sa-card h-100">
                        <div class="card-body d-flex align-items-center gap-3">
                            <div class="sa-icon"><i class="bi bi-window"></i></div>
                            <div class="sa-text">
                                <h6 class="mb-1 fw-bold">{{ __('settings.website.sections.websites') }}</h6>
                                <p class="mb-0 text-muted">{{ __('settings.website.sections.websites_desc') }}</p>
                            </div>
                        </div>
                    </div>
                </a>
            </div>

            <div class="col-12 col-md-6 col-lg-4">
                <a href="{{ route('settings.website.programs') }}" class="text-decoration-none">
                    <div class="card sa-card h-100">
                        <div class="card-body d-flex align-items-center gap-3">
                            <div class="sa-icon"><i class="bi bi-grid"></i></div>
                            <div class="sa-text">
                                <h6 class="mb-1 fw-bold">{{ __('settings.website.sections.programs') }}</h6>
                                <p class="mb-0 text-muted">{{ __('settings.website.sections.programs_desc') }}</p>
                            </div>
                        </div>
                    </div>
                </a>
            </div>
        </div>
    @else
        <div class="card sa-card border-0">
            <div class="card-body">
                <div class="text-center py-5 text-muted">
                    <i class="bi bi-sliders fs-1 d-block mb-3"></i>
                    <div class="fw-semibold mb-1">{{ __('settings.website.coming_soon_title') }}</div>
                    <div>{{ __('settings.website.coming_soon_desc') }}</div>
                </div>
            </div>
        </div>
    @endif
</div>
@endsection
