
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import PageRoutes from './src/Routes';
import Header from './src/Header/Header';

const rootElement = document.getElementById('root');
if (!rootElement) {
  throw new Error("Could not find root element to mount to");
}

const root = ReactDOM.createRoot(rootElement);
root.render(
  <React.StrictMode>
    {/* <App /> */}
    <Header />
    <PageRoutes />
    <footer className="bg-white py-12 border-t border-slate-100 mt-auto">
      <div className="container mx-auto px-4 text-center">
        <div className="flex justify-center mb-6 opacity-30 grayscale">
          <div className="flex flex-col leading-none text-left">
            <span className="text-xl font-bold" style={{ color: '#1a2b4b', fontFamily: 'serif' }}>nivesh</span>
            <span className="text-[8px] font-bold tracking-[0.2em] uppercase" style={{ color: '#1a2b4b' }}>Insurance</span>
          </div>
        </div>
        <div className="max-w-3xl mx-auto space-y-3">
          <p className="text-slate-500 text-[10px] font-medium leading-relaxed">
            A wholly owned subsidiary of Providential Platforms Private Limited (<a href="https://www.nivesh.com" target="_blank" rel="noopener noreferrer" className="text-[#e31e24] hover:underline">https://www.nivesh.com</a>)
          </p>
          <p className="text-slate-400 text-[10px] font-medium leading-relaxed">
            Nivesh Insurance BROKERS PRIVATE LIMITED is a Direct Broker (Life & General) registered by IRDAI vide Registration Code IRDA/DB856/21, Certificate of Registration No. 769 valid upto 02-09-2027.
          </p>
        </div>
      </div>
    </footer>
  </React.StrictMode>
);
