// Brosis Enstitü — Belgelendirme Sayfası
// Hızlı Erişim (4 büyük) + Bilgi Sayfaları (9 küçük kart)
// Stil: açık bg, grid düzeni, özel SVG ikonlar

function BelgelendirmePage() {
  const colors = {
    primary: '#0F2747',
    accent:  '#3DB8E8',
    soft:    '#EAF6FB',
    deep:    '#081530',
    bg:      '#F7F9FC',
    border:  '#E5E9F0',
  };

  const hizliErisim = [
    {
      id: 'online-basvuru',
      label: 'Online Başvuru',
      desc: 'Sınav başvurunuzu hızlıca online yapın, belge yükleyin.',
      href: 'https://brosisenstitu.voc-tester.com/giris',
      external: true,
      icon: <svg width="40" height="40" viewBox="0 0 40 40" fill="none">
        <rect x="6" y="5" width="22" height="30" rx="3" stroke="#0F2747" strokeWidth="1.8" strokeLinejoin="round"/>
        <path d="M22 5V11H28" stroke="#0F2747" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
        <path d="M12 19H24M12 24H18" stroke="#3DB8E8" strokeWidth="2" strokeLinecap="round"/>
        <circle cx="30" cy="30" r="7" fill="#EAF6FB" stroke="#3DB8E8" strokeWidth="1.6"/>
        <path d="M27.5 30H32.5M30 27.5V32.5" stroke="#3DB8E8" strokeWidth="1.8" strokeLinecap="round"/>
      </svg>,
      featured: true,
    },
    {
      id: 'sinav-takvimi',
      label: 'Sınav Takvimi',
      desc: 'Yaklaşan sınav tarihlerini ve kontenjanları görüntüleyin.',
      href: 'https://brosisenstitu.voc-tester.com/web',
      external: true,
      icon: <svg width="40" height="40" viewBox="0 0 40 40" fill="none">
        <rect x="5" y="8" width="30" height="26" rx="3" stroke="#0F2747" strokeWidth="1.8"/>
        <path d="M13 5V11M27 5V11M5 17H35" stroke="#0F2747" strokeWidth="1.8" strokeLinecap="round"/>
        <rect x="11" y="22" width="5" height="5" rx="1.5" fill="#3DB8E8"/>
        <rect x="18" y="22" width="5" height="5" rx="1.5" fill="#3DB8E8" fillOpacity="0.4"/>
        <rect x="25" y="22" width="5" height="5" rx="1.5" fill="#E5E9F0"/>
      </svg>,
    },
    {
      id: 'sinav-sonuclari',
      label: 'Sınav Sonuçları',
      desc: 'TC kimlik numaranızla sınav sonuçlarınızı sorgulayın.',
      href: 'https://brosisenstitu.voc-tester.com/giris',
      external: true,
      icon: <svg width="40" height="40" viewBox="0 0 40 40" fill="none">
        <rect x="5" y="5" width="30" height="30" rx="4" stroke="#0F2747" strokeWidth="1.8"/>
        <path d="M13 25L18 19L23 23L30 14" stroke="#3DB8E8" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
        <circle cx="30" cy="14" r="3" fill="#3DB8E8"/>
      </svg>,
    },
    {
      id: 'belge-sorgulama',
      label: 'Belge Sorgulama',
      desc: 'MYK sicil sistemi üzerinden belge geçerliliğini doğrulayın.',
      href: '/belge-sorgula',
      icon: <svg width="40" height="40" viewBox="0 0 40 40" fill="none">
        <circle cx="18" cy="18" r="11" stroke="#0F2747" strokeWidth="1.8"/>
        <path d="M27 27L34 34" stroke="#0F2747" strokeWidth="2.2" strokeLinecap="round"/>
        <path d="M14 18L17 21L23 14" stroke="#3DB8E8" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
      </svg>,
    },
  ];

  const bilgiSayfalar = [
    {
      id: 'basvuru-sartlari',
      label: 'Başvuru Şartları',
      desc: 'Kimler başvurabilir? Gerekli belgeler nelerdir?',
      href: '/basvuru-sartlari',
      icon: <svg width="28" height="28" viewBox="0 0 28 28" fill="none">
        <path d="M14 3L24 7V14C24 19.5 20 23.5 14 25C8 23.5 4 19.5 4 14V7L14 3Z" stroke="#0F2747" strokeWidth="1.7" strokeLinejoin="round"/>
        <path d="M10 14L13 17L18 11" stroke="#3DB8E8" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
      </svg>,
    },
    {
      id: 'sinav-ucretleri',
      label: 'Sınav Ücretleri',
      desc: 'Güncel sınav ve belgelendirme ücret tarifesi.',
      href: '/sinav-ucretleri',
      icon: <svg width="28" height="28" viewBox="0 0 28 28" fill="none">
        <rect x="3" y="6" width="22" height="16" rx="2.5" stroke="#0F2747" strokeWidth="1.7"/>
        <path d="M3 12H25" stroke="#0F2747" strokeWidth="1.7"/>
        <path d="M8 17H11M15 17H20" stroke="#3DB8E8" strokeWidth="1.8" strokeLinecap="round"/>
      </svg>,
    },
    {
      id: 'sinav-kurallari',
      label: 'Sınav Kuralları',
      desc: 'Sınav günü uyulması gereken kurallar ve prosedürler.',
      href: '/sinav-kurallari',
      icon: <svg width="28" height="28" viewBox="0 0 28 28" fill="none">
        <rect x="4" y="3" width="16" height="22" rx="2" stroke="#0F2747" strokeWidth="1.7" strokeLinejoin="round"/>
        <path d="M16 3V7H20" stroke="#0F2747" strokeWidth="1.7" strokeLinecap="round" strokeLinejoin="round"/>
        <path d="M8 12H16M8 16H13" stroke="#3DB8E8" strokeWidth="1.7" strokeLinecap="round"/>
        <path d="M21 18L24 21L28 15" stroke="#3DB8E8" strokeWidth="1.7" strokeLinecap="round" strokeLinejoin="round"/>
      </svg>,
    },
    {
      id: 'degerlendirme-sureci',
      label: 'Başvuru Değerlendirme Süreci',
      desc: 'Başvurunuz nasıl değerlendirilir? Adım adım süreç.',
      href: '/degerlendirme-sureci',
      icon: <svg width="28" height="28" viewBox="0 0 28 28" fill="none">
        <circle cx="14" cy="14" r="10" stroke="#0F2747" strokeWidth="1.7"/>
        <path d="M14 8V14L18 17" stroke="#3DB8E8" strokeWidth="2" strokeLinecap="round"/>
        <path d="M5 14H3M25 14H23M14 3V5M14 23V25" stroke="#0F2747" strokeWidth="1.5" strokeLinecap="round" strokeOpacity="0.3"/>
      </svg>,
    },
    {
      id: 'ilgili-dokumanlar',
      label: 'İlgili Dökümanlar',
      desc: 'Formlar, kılavuzlar ve indirilebilir belgeler.',
      href: '/ilgili-dokumanlar',
      icon: <svg width="28" height="28" viewBox="0 0 28 28" fill="none">
        <path d="M6 4H18L22 8V24H6V4Z" stroke="#0F2747" strokeWidth="1.7" strokeLinejoin="round"/>
        <path d="M18 4V8H22" stroke="#0F2747" strokeWidth="1.7" strokeLinecap="round" strokeLinejoin="round"/>
        <path d="M10 13H18M10 17H15" stroke="#3DB8E8" strokeWidth="1.7" strokeLinecap="round"/>
        <path d="M17 19L19 21L23 16" stroke="#3DB8E8" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round"/>
      </svg>,
    },
    {
      id: 'hesap-numaralari',
      label: 'Hesap Numaraları',
      desc: 'Ödeme yapılacak banka hesap numaraları ve IBAN.',
      href: '/hesap-numaralari',
      icon: <svg width="28" height="28" viewBox="0 0 28 28" fill="none">
        <rect x="3" y="8" width="22" height="14" rx="2.5" stroke="#0F2747" strokeWidth="1.7"/>
        <path d="M3 13H25" stroke="#0F2747" strokeWidth="1.7"/>
        <circle cx="8" cy="19" r="2" fill="#3DB8E8"/>
        <rect x="13" y="17.5" width="8" height="3" rx="1.5" fill="#3DB8E8" fillOpacity="0.4"/>
        <path d="M8 8V5M20 8V5" stroke="#0F2747" strokeWidth="1.5" strokeLinecap="round" strokeOpacity="0.4"/>
      </svg>,
    },
    {
      id: 'birim-birlestirme',
      label: 'Birim Birleştirme',
      desc: 'Farklı birimlerden alınan puanların birleştirilmesi.',
      href: '/birim-birlestirme',
      icon: <svg width="28" height="28" viewBox="0 0 28 28" fill="none">
        <circle cx="8" cy="8" r="4.5" stroke="#0F2747" strokeWidth="1.7"/>
        <circle cx="20" cy="8" r="4.5" stroke="#0F2747" strokeWidth="1.7"/>
        <path d="M12.5 8H15.5" stroke="#3DB8E8" strokeWidth="1.7" strokeLinecap="round"/>
        <path d="M8 12.5V16C8 18 9.5 20 14 20C18.5 20 20 18 20 16V12.5" stroke="#0F2747" strokeWidth="1.7" strokeLinecap="round"/>
        <path d="M11 24H17" stroke="#3DB8E8" strokeWidth="2" strokeLinecap="round"/>
        <path d="M14 20V24" stroke="#3DB8E8" strokeWidth="1.7" strokeLinecap="round"/>
      </svg>,
    },
    {
      id: 'itiraz-sikayet',
      label: 'İtiraz ve Şikayet',
      desc: 'Sınav sonuçlarına itiraz ve şikayet süreçleri.',
      href: '/itiraz-sikayet',
      icon: <svg width="28" height="28" viewBox="0 0 28 28" fill="none">
        <path d="M14 3L25 8V14C25 20 20.5 24.5 14 26C7.5 24.5 3 20 3 14V8L14 3Z" stroke="#0F2747" strokeWidth="1.7" strokeLinejoin="round"/>
        <path d="M14 10V16" stroke="#3DB8E8" strokeWidth="2.2" strokeLinecap="round"/>
        <circle cx="14" cy="20" r="1.2" fill="#3DB8E8"/>
      </svg>,
    },
    {
      id: 'engelli-hizmetler',
      label: 'Engellilere Sağlanan Hizmetler',
      desc: 'Engelli adaylara yönelik özel düzenlemeler ve haklar.',
      href: '/engelli-hizmetler',
      icon: <svg width="28" height="28" viewBox="0 0 28 28" fill="none">
        <circle cx="14" cy="6" r="3" stroke="#0F2747" strokeWidth="1.7"/>
        <path d="M10 11H18L16 17H11L10 11Z" stroke="#0F2747" strokeWidth="1.7" strokeLinejoin="round"/>
        <path d="M11 17L9 23" stroke="#0F2747" strokeWidth="1.7" strokeLinecap="round"/>
        <path d="M16 17L18 23" stroke="#0F2747" strokeWidth="1.7" strokeLinecap="round"/>
        <path d="M20 20C20 22 18.5 24 16 24" stroke="#3DB8E8" strokeWidth="1.7" strokeLinecap="round"/>
        <circle cx="22" cy="17" r="2" fill="#3DB8E8" fillOpacity="0.5"/>
      </svg>,
    },
  ];

  return (
    <PageShell activePage="belgelendirme" breadcrumb={[{label:'Ana Sayfa',href:'/'},{label:'Belgelendirme'}]}>
    <div style={{ width: '100%', background: colors.bg, fontFamily: "'Inter', sans-serif", color: colors.primary }}>

      {/* ── HERO HEADER ─────────────────────────────────────────── */}
      <div style={{
        background: `linear-gradient(135deg, ${colors.primary} 0%, ${colors.deep} 100%)`,
        padding: '80px 80px 72px',
        position: 'relative', overflow: 'hidden',
      }}>
        {/* Deco rings */}
        <svg style={{ position: 'absolute', right: -80, top: -80, opacity: 0.07, pointerEvents: 'none' }} width="520" height="520" viewBox="0 0 520 520">
          <circle cx="260" cy="260" r="250" stroke={colors.accent} strokeWidth="1" fill="none"/>
          <circle cx="260" cy="260" r="190" stroke={colors.accent} strokeWidth="1" fill="none"/>
          <circle cx="260" cy="260" r="130" stroke={colors.accent} strokeWidth="1" fill="none"/>
        </svg>

        <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 64, alignItems: 'center', position: 'relative', zIndex: 2 }}>
          <div>
            <div style={{ display: 'inline-flex', alignItems: 'center', gap: 8, padding: '6px 12px', background: `${colors.accent}20`, border: `1px solid ${colors.accent}40`, borderRadius: 999, marginBottom: 20 }}>
              <span style={{ width: 6, height: 6, borderRadius: '50%', background: colors.accent, display: 'inline-block' }}/>
              <span style={{ fontSize: 11, fontWeight: 700, color: colors.accent, letterSpacing: '0.12em' }}>MYK YETKİLİ · TÜRKAK AKREDİTE</span>
            </div>
            <h1 style={{
              fontFamily: "'Inter', sans-serif",
              fontSize: 56, fontWeight: 800, lineHeight: 1.0,
              letterSpacing: '-0.035em', color: '#fff', margin: '0 0 20px',
            }}>
              Belgelendirme<br/>
              <span style={{ fontFamily: "'Instrument Serif', serif", fontStyle: 'italic', fontWeight: 400, color: colors.accent }}>Hizmetleri</span>
            </h1>
            <p style={{ fontSize: 16, lineHeight: 1.65, color: 'rgba(255,255,255,0.65)', margin: 0, maxWidth: 480 }}>
              Online başvurudan sınav sonuçlarına, belge sorgulama ve bilgi sayfalarına kadar tüm belgelendirme hizmetlerine buradan ulaşabilirsiniz.
            </p>
          </div>

          {/* Trust kart */}
          <div style={{ display: 'flex', flexDirection: 'column', gap: 12, maxWidth: 380, marginLeft: 'auto' }}>
            {[
              { label: 'TÜRKAK Akreditasyon No', value: 'AB-0169-P', color: '#C8102E' },
              { label: 'MYK Yetki No', value: 'YB-0166', color: colors.accent },
              { label: 'ISO Standardı', value: 'ISO/IEC 17024', color: '#10B981' },
            ].map((b, i) => (
              <div key={i} style={{
                display: 'flex', alignItems: 'center', gap: 14,
                padding: '14px 18px', background: 'rgba(255,255,255,0.06)',
                border: '1px solid rgba(255,255,255,0.1)', borderRadius: 12,
              }}>
                <div style={{ width: 10, height: 10, borderRadius: '50%', background: b.color, flexShrink: 0 }}/>
                <div style={{ flex: 1 }}>
                  <div style={{ fontSize: 11, color: 'rgba(255,255,255,0.4)', fontWeight: 600, letterSpacing: '0.05em' }}>{b.label}</div>
                  <div style={{ fontSize: 14, color: '#fff', fontWeight: 700, marginTop: 2 }}>{b.value}</div>
                </div>
              </div>
            ))}
          </div>
        </div>
      </div>

      {/* ── HIZLI ERİŞİM ─────────────────────────────────────────── */}
      <div style={{ padding: '64px 80px', background: '#fff', borderBottom: `1px solid ${colors.border}` }}>
        <div style={{ marginBottom: 36 }}>
          <div style={{ fontSize: 11, letterSpacing: '0.18em', textTransform: 'uppercase', color: colors.accent, fontWeight: 700, marginBottom: 10 }}>Hızlı Erişim</div>
          <h2 style={{ fontSize: 36, fontWeight: 800, margin: 0, letterSpacing: '-0.025em' }}>
            En çok kullanılan{' '}
            <span style={{ fontFamily: "'Instrument Serif', serif", fontStyle: 'italic', fontWeight: 400, color: colors.accent }}>işlemler.</span>
          </h2>
        </div>

        <div style={{ display: 'grid', gridTemplateColumns: 'repeat(4, 1fr)', gap: 20 }}>
          {hizliErisim.map((item) => (
            <HizliErisimCard key={item.id} item={item} colors={colors} />
          ))}
        </div>
      </div>

      {/* ── BİLGİ SAYFALARI ──────────────────────────────────────── */}
      <div style={{ padding: '64px 80px 80px', background: colors.bg }}>
        <div style={{ marginBottom: 36 }}>
          <div style={{ fontSize: 11, letterSpacing: '0.18em', textTransform: 'uppercase', color: colors.accent, fontWeight: 700, marginBottom: 10 }}>Bilgi Sayfaları</div>
          <h2 style={{ fontSize: 36, fontWeight: 800, margin: 0, letterSpacing: '-0.025em' }}>
            Süreci{' '}
            <span style={{ fontFamily: "'Instrument Serif', serif", fontStyle: 'italic', fontWeight: 400, color: colors.accent }}>detaylıca</span>
            {' '}öğrenin.
          </h2>
        </div>

        <div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 16 }}>
          {bilgiSayfalar.map((item) => (
            <BilgiCard key={item.id} item={item} colors={colors} />
          ))}
        </div>
      </div>

    </div>
    </PageShell>
  );
}

// ── HIZLI ERİŞİM KARTI ───────────────────────────────────────────────────────
function HizliErisimCard({ item, colors }) {
  const [hovered, setHovered] = React.useState(false);
  return (
    <a
      href={item.href}
      {...(item.external ? { target: '_blank', rel: 'noopener' } : {})}
      onMouseEnter={() => setHovered(true)}
      onMouseLeave={() => setHovered(false)}
      style={{
        display: 'flex', flexDirection: 'column',
        padding: '32px 28px',
        background: hovered ? colors.primary : '#fff',
        border: `1px solid ${hovered ? colors.primary : colors.border}`,
        borderRadius: 18,
        textDecoration: 'none',
        color: hovered ? '#fff' : colors.primary,
        transition: 'all 220ms cubic-bezier(0.2,0.7,0.2,1)',
        transform: hovered ? 'translateY(-6px)' : 'none',
        boxShadow: hovered ? `0 20px 48px ${colors.primary}25` : 'none',
        cursor: 'pointer',
        minHeight: 240,
        position: 'relative',
        overflow: 'hidden',
      }}
    >
      {hovered && (
        <svg style={{ position: 'absolute', right: -30, bottom: -30, opacity: 0.08 }} width="180" height="180" viewBox="0 0 180 180">
          <circle cx="90" cy="90" r="85" stroke={colors.accent} strokeWidth="1" fill="none"/>
          <circle cx="90" cy="90" r="55" stroke={colors.accent} strokeWidth="1" fill="none"/>
        </svg>
      )}

      {/* İkon */}
      <div style={{
        width: 72, height: 72, borderRadius: 16, marginBottom: 24,
        background: hovered ? 'rgba(255,255,255,0.1)' : colors.soft,
        display: 'flex', alignItems: 'center', justifyContent: 'center',
        transition: 'all 220ms ease',
        filter: hovered ? 'brightness(0) invert(1)' : 'none',
      }}>
        {item.icon}
      </div>

      <div style={{ flex: 1 }}>
        <div style={{ fontSize: 20, fontWeight: 800, letterSpacing: '-0.02em', marginBottom: 10, lineHeight: 1.2 }}>
          {item.label}
        </div>
        <p style={{ fontSize: 13, lineHeight: 1.6, margin: 0, color: hovered ? 'rgba(255,255,255,0.65)' : '#475569' }}>
          {item.desc}
        </p>
      </div>

      <div style={{
        marginTop: 24,
        display: 'inline-flex', alignItems: 'center', gap: 6,
        fontSize: 13, fontWeight: 700,
        color: hovered ? colors.accent : colors.accent,
      }}>
        Devam et
        <svg width="14" height="14" viewBox="0 0 14 14" fill="none">
          <path d="M3 7H11M11 7L7.5 3.5M11 7L7.5 10.5" stroke={colors.accent} strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round"/>
        </svg>
      </div>
    </a>
  );
}

// ── BİLGİ SAYFASI KARTI ──────────────────────────────────────────────────────
function BilgiCard({ item, colors }) {
  const [hovered, setHovered] = React.useState(false);
  return (
    <a
      href={item.href}
      {...(item.external ? { target: '_blank', rel: 'noopener' } : {})}
      onMouseEnter={() => setHovered(true)}
      onMouseLeave={() => setHovered(false)}
      style={{
        display: 'flex', alignItems: 'flex-start', gap: 18,
        padding: '24px 24px',
        background: hovered ? '#fff' : '#fff',
        border: `1px solid ${hovered ? colors.accent + '70' : colors.border}`,
        borderRadius: 14,
        textDecoration: 'none',
        color: colors.primary,
        transition: 'all 200ms ease',
        transform: hovered ? 'translateY(-3px)' : 'none',
        boxShadow: hovered ? `0 10px 28px ${colors.primary}10` : 'none',
        cursor: 'pointer',
      }}
    >
      {/* İkon */}
      <div style={{
        width: 52, height: 52, borderRadius: 12, flexShrink: 0,
        background: hovered ? colors.soft : '#F7F9FC',
        border: `1px solid ${hovered ? colors.accent + '40' : colors.border}`,
        display: 'flex', alignItems: 'center', justifyContent: 'center',
        transition: 'all 200ms ease',
      }}>
        {item.icon}
      </div>

      <div style={{ flex: 1, minWidth: 0 }}>
        <div style={{
          fontSize: 15, fontWeight: 700, letterSpacing: '-0.01em',
          marginBottom: 5, color: colors.primary, lineHeight: 1.3,
        }}>
          {item.label}
        </div>
        <p style={{ fontSize: 12, lineHeight: 1.55, margin: '0 0 10px', color: '#475569' }}>
          {item.desc}
        </p>
        <div style={{
          display: 'inline-flex', alignItems: 'center', gap: 4,
          fontSize: 12, fontWeight: 600, color: colors.accent,
        }}>
          İncele
          <svg width="12" height="12" viewBox="0 0 12 12" fill="none">
            <path d="M2.5 6H9.5M9.5 6L6.5 3M9.5 6L6.5 9" stroke={colors.accent} strokeWidth="1.4" strokeLinecap="round" strokeLinejoin="round"/>
          </svg>
        </div>
      </div>
    </a>
  );
}

window.BelgelendirmePage = BelgelendirmePage;
