'use client';

import { Skeleton } from '@/components/ui/skeleton';

/**
 * Skeleton Loading عام لجميع الصفحات الداخلية - استراتيجية تحميل احترافية (10/10 UX)
 * يُستخدم أثناء التنقل بين الصفحات أو تحميل المحتوى.
 */
const ContentPageSkeleton = () => {
  return (
    <div className='overflow-x-hidden bg-white min-h-[60vh]'>
      {/* Hero Strip */}
      <section
        className='relative w-full bg-[#092346] h-[40vh] min-h-[280px] max-h-[400px] flex items-center justify-center'
        aria-hidden='true'>
        <div className='w-full max-w-4xl px-4 flex flex-col items-center gap-3'>
          <Skeleton className='h-10 sm:h-12 w-2/3 max-w-md bg-white/10' />
          <Skeleton className='h-5 w-full max-w-xl bg-white/10' />
          <div className='flex gap-3 mt-2'>
            <Skeleton className='h-11 w-32 rounded-lg bg-white/10' />
            <Skeleton className='h-11 w-28 rounded-lg bg-white/10' />
          </div>
        </div>
      </section>

      {/* Back + Content Area */}
      <div className='container mx-auto px-4 sm:px-6 lg:px-10 py-6 sm:py-8'>
        <Skeleton className='h-9 w-24 mb-6 rounded-md' />

        <Skeleton className='h-14 w-full rounded-lg mb-6' />
        <div className='grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 mb-8'>
          {[1, 2, 3].map((i) => (
            <Skeleton key={i} className='h-48 rounded-xl' />
          ))}
        </div>
        <Skeleton className='h-64 w-full rounded-xl mb-6' />
        <div className='space-y-4'>
          <Skeleton className='h-5 w-full' />
          <Skeleton className='h-5 w-4/5' />
          <Skeleton className='h-5 w-3/4' />
        </div>
      </div>
    </div>
  );
};

export default ContentPageSkeleton;
