<?php echo view ('header.php') ?>
    
    <main class="pt-28">
        <section class="hero-section relative h-80 overflow-hidden">
    <div class="absolute inset-0 bg-gradient-to-r from-primary to-secondary"></div>
    <div class="hero-gradient absolute inset-0"></div>
    <div class="relative z-10 h-full flex items-center">
        <div class="max-w-7xl mx-auto px-4 w-full">
            <div class="max-w-2xl">
                <h2 class="text-3xl font-bold text-white mb-3">Medical Excellence Since 1854</h2>
                <p class="text-lg text-gray-200 mb-4">From Hatkhola Dispensary to modern medical college - serving North 24 Parganas for over 170+ years.</p>
                <div class="flex space-x-3">
                    <button class="bg-white text-primary px-6 py-2 rounded-button font-semibold hover:bg-gray-100 text-sm">
                        Learn More
                    </button>
                    <button class="border border-white text-white px-6 py-2 rounded-button font-semibold hover:bg-white hover:text-primary text-sm">
                        MBBS Admission
                    </button>
                </div>
            </div>
        </div>
    </div>
</section>

<!-- Marquee -->
<section class="bg-red-600 text-white py-2 overflow-hidden">
    <div class="flex items-center">
        <div class="bg-red-700 px-3 py-1 flex items-center space-x-2 flex-shrink-0">
            <i class="ri-megaphone-line"></i>
            <span class="font-semibold text-sm">IMPORTANT</span>
        </div>
        <div class="flex-1 overflow-hidden">
            <div class="animate-pulse text-sm px-6">
                🔴 MBBS & DNB Admission 2022-23 awaiting NMC approval | 📢 Senior Resident recruitment notice published | 📢 House Staff recruitment notice available            </div>
        </div>
    </div>
</section>
        <!-- Quick Services Portal -->
        <section class="compact-section">
            <div class="max-w-7xl mx-auto px-4">
                <div class="text-center mb-8">
                    <h2 class="text-2xl font-bold text-gray-900 mb-2">Quick Services Portal</h2>
                    <p class="text-gray-600">Select your role for relevant information</p>
                </div>
                
                <div class="flex justify-center mb-8">
                    <select id="userTypeSelector" class="bg-white border border-gray-300 text-gray-900 px-4 py-2 !rounded-button text-sm">
                        <option value="">Select User Type</option>
                        <option value="patient">Patient</option>
                        <option value="student">Student</option>
                        <option value="researcher">Researcher</option>
                        <option value="visitor">Visitor</option>
                        <option value="nirf">NIRF Data</option>
                    </select>
                </div>

                <div id="userContent">
                    <!-- Default Content -->
                    <div id="defaultContent" class="grid md:grid-cols-4 gap-4">
                        <div class="bg-white border border-gray-200 compact-card rounded-lg hover-lift">
                            <h3 class="font-semibold text-gray-900 mb-2">MBBS Admission</h3>
                            <p class="text-gray-600 text-sm">100 seats through NEET</p>
                        </div>
                        <div class="bg-white border border-gray-200 compact-card rounded-lg hover-lift">
                            <h3 class="font-semibold text-gray-900 mb-2">DNB Courses</h3>
                            <p class="text-gray-600 text-sm">16 seats allocated by NBE</p>
                        </div>
                        <div class="bg-white border border-gray-200 compact-card rounded-lg hover-lift">
                            <h3 class="font-semibold text-gray-900 mb-2">Hospital Services</h3>
                            <p class="text-gray-600 text-sm">600-bed capacity</p>
                        </div>
                        <div class="bg-white border border-gray-200 compact-card rounded-lg hover-lift">
                            <h3 class="font-semibold text-gray-900 mb-2">Emergency</h3>
                            <p class="text-primary font-semibold text-sm">033-25523228</p>
                        </div>
                    </div>

                    <!-- Dynamic User Content -->
                    <div id="patientContent" class="hidden grid md:grid-cols-3 gap-4">
                        <div class="bg-white border border-gray-200 compact-card rounded-lg">
                            <h3 class="font-semibold text-gray-900 mb-2">Emergency Services</h3>
                            <p class="text-red-600 font-semibold">📞 033-25523228</p>
                            <p class="text-gray-600 text-sm">24/7 emergency care</p>
                        </div>
                        <div class="bg-white border border-gray-200 compact-card rounded-lg">
                            <h3 class="font-semibold text-gray-900 mb-2">OPD Services</h3>
                            <p class="text-gray-600 text-sm">Consultation services</p>
                            <button class="text-primary text-sm hover:underline mt-2">Book Appointment</button>
                        </div>
                        <div class="bg-white border border-gray-200 compact-card rounded-lg">
                            <h3 class="font-semibold text-gray-900 mb-2">Diagnostics</h3>
                            <p class="text-gray-600 text-sm">Complete diagnostic facilities</p>
                        </div>
                    </div>

                    <div id="studentContent" class="hidden grid md:grid-cols-3 gap-4">
                        <div class="bg-white border border-gray-200 compact-card rounded-lg">
                            <h3 class="font-semibold text-gray-900 mb-2">Admission Queries</h3>
                            <p class="text-primary font-semibold">📞 8001611612</p>
                            <p class="text-gray-600 text-sm">MBBS admission support</p>
                        </div>
                        <div class="bg-white border border-gray-200 compact-card rounded-lg">
                            <h3 class="font-semibold text-gray-900 mb-2">Student Portal</h3>
                            <p class="text-gray-600 text-sm">Results, routines, resources</p>
                            <button class="text-primary text-sm hover:underline mt-2">Access Portal</button>
                        </div>
                        <div class="bg-white border border-gray-200 compact-card rounded-lg">
                            <h3 class="font-semibold text-gray-900 mb-2">Dean of Students</h3>
                            <p class="text-green-600 font-semibold">📞 7003955245</p>
                            <p class="text-gray-600 text-sm">Student affairs support</p>
                        </div>
                    </div>

                    <div id="researcherContent" class="hidden grid md:grid-cols-3 gap-4">
                        <div class="bg-white border border-gray-200 compact-card rounded-lg">
                            <h3 class="font-semibold text-gray-900 mb-2">Faculty Publications</h3>
                            <p class="text-gray-600 text-sm">Research from last year</p>
                            <a href="research-portal.html" class="text-primary text-sm hover:underline mt-2 block">View Publications</a>
                        </div>
                        <div class="bg-white border border-gray-200 compact-card rounded-lg">
                            <h3 class="font-semibold text-gray-900 mb-2">Research Facilities</h3>
                            <p class="text-gray-600 text-sm">Modern laboratories</p>
                        </div>
                        <div class="bg-white border border-gray-200 compact-card rounded-lg">
                            <h3 class="font-semibold text-gray-900 mb-2">Collaboration</h3>
                            <p class="text-gray-600 text-sm">Research partnerships</p>
                        </div>
                    </div>

                    <div id="nirfContent" class="hidden grid md:grid-cols-3 gap-4">
                        <div class="bg-white border border-gray-200 compact-card rounded-lg">
                            <h3 class="font-semibold text-gray-900 mb-2">NIRF Data Portal</h3>
                            <p class="text-blue-600 font-semibold">🏆 Ranking Framework</p>
                            <p class="text-gray-600 text-sm">Complete institutional metrics</p>
                            <a href="nirf-data-portal.html" class="text-primary text-sm hover:underline mt-2 block">Access NIRF Portal</a>
                        </div>
                        <div class="bg-white border border-gray-200 compact-card rounded-lg">
                            <h3 class="font-semibold text-gray-900 mb-2">NMC Compliance</h3>
                            <p class="text-gray-600 text-sm">Regulatory compliance data</p>
                            <a href="nmc-compliance.html" class="text-primary text-sm hover:underline mt-2 block">View Compliance</a>
                        </div>
                        <div class="bg-white border border-gray-200 compact-card rounded-lg">
                            <h3 class="font-semibold text-gray-900 mb-2">Annual Reports</h3>
                            <p class="text-gray-600 text-sm">Institutional performance data</p>
                            <a href="annual-reports.html" class="text-primary text-sm hover:underline mt-2 block">Download Reports</a>
                        </div>
                    </div>

                    <div id="visitorContent" class="hidden grid md:grid-cols-3 gap-4">
                        <div class="bg-white border border-gray-200 compact-card rounded-lg">
                            <h3 class="font-semibold text-gray-900 mb-2">Visiting Hours</h3>
                            <p class="text-gray-600 text-sm">10AM-12PM, 4PM-6PM</p>
                        </div>
                        <div class="bg-white border border-gray-200 compact-card rounded-lg">
                            <h3 class="font-semibold text-gray-900 mb-2">Location</h3>
                            <p class="text-gray-600 text-sm">8 km from airport</p>
                        </div>
                        <div class="bg-white border border-gray-200 compact-card rounded-lg">
                            <h3 class="font-semibold text-gray-900 mb-2">Information</h3>
                            <p class="text-gray-600 text-sm">ID proof required</p>
                        </div>
                    </div>
                </div>
            </div>
        </section>  
        <?= $services['content'];//html_entity_decode($services['content']) ?>
  
        <!-- Academic Excellence Compact Section -->
       
        <!-- Leadership Section - Using JSON Data -->
       

        <!-- Tenders & Notices - Using JSON Data -->
        <section id="tenders" class="compact-section bg-gray-50">
            <div class="max-w-7xl mx-auto px-4">
                <h2 class="text-2xl font-bold text-center text-gray-900 mb-6">Tenders & Notices</h2>
                <div class="grid lg:grid-cols-2 gap-6">
                    <!-- Active Tenders -->
                    <div class="border border-blue-200 bg-blue-50 compact-card rounded-lg">
                        <h3 class="font-semibold text-gray-900 mb-4 flex items-center">
                            <i class="ri-article-line text-blue-600 mr-2"></i>Active Tenders
                        </h3>
                        <div class="space-y-3">
                            <?php
                            if(!empty($notices)){
                                foreach($notices as $row){
                                    if($row['type']=='Tender'){
                                        ?>
                                        <?= $row['content']; ?>
                                        <?php
                                    }
                                }
                            }
                            ?>
                                                                   
                            </div>
                        <button class="bg-blue-600 text-white px-4 py-2 !rounded-button text-sm mt-4 w-full">View All Tenders</button>
                    </div>

                    <!-- Latest Notices -->
                    <div class="border border-orange-200 bg-orange-50 compact-card rounded-lg">
                        <h3 class="font-semibold text-gray-900 mb-4 flex items-center">
                            <i class="ri-notification-line text-orange-600 mr-2"></i>Latest Notices
                        </h3>
                        <div class="space-y-3">
                            <?php
                            if(!empty($notices)){
                                foreach($notices as $row){
                                    if($row['type']=='Notice'){
                                        ?>
                                        <?= $row['content']; ?>
                                        <?php
                                    }
                                }
                            }
                            ?>                                                          
                            </div>
                        <button class="bg-orange-600 text-white px-4 py-2 !rounded-button text-sm mt-4 w-full">View All Notices</button>
                    </div>
                </div>
            </div>
        </section>

       <?= $academic['content'];?>

        <!-- Contact - Using JSON Data -->
        <section id="contact" class="compact-section bg-primary text-white">
            <div class="max-w-7xl mx-auto px-4">
                <h2 class="text-2xl font-bold text-center mb-6">Contact Information</h2>
                <div class="grid md:grid-cols-3 gap-6">
                    <div class="text-center">
                        <h3 class="font-semibold mb-2">Emergency</h3>
                        <p class="text-gray-200 text-sm">
                            Emergency: 033-25523228<br>
                            Main: 033-25523228                        </p>
                    </div>
                    <div class="text-center">
                        <h3 class="font-semibold mb-2">Student Services</h3>
                        <p class="text-gray-200 text-sm">
                            Dean: 7003955245<br>
                            Admission: 8001611612                        </p>
                    </div>
                    <div class="text-center">
                        <h3 class="font-semibold mb-2">Email</h3>
                        <p class="text-gray-200 text-sm">
                            Info: info@barasatgmch.ac.in<br>
                            Support: support@barasatgmch.ac.in                        </p>
                    </div>
                </div>
            </div>
        </section>
    </main>
    
  <?php echo view ('footer.php') ?>