<?php
// File: /esarthi/about.php (Public About Us Page)

include("config/db.php"); 

// --- 1. Fetch Metadata and Settings ---
$institute_name = 'eSarthi Education'; 
$q_settings = $conn->query("SELECT setting_key, setting_value FROM website_settings");
$website_settings = [];
while ($row = $q_settings->fetch_assoc()) {
    $website_settings[$row['setting_key']] = $row['setting_value'];
}
$institute_name = $website_settings['institute_name'] ?? 'eSarthi Education';

$page_title = "आमच्याबद्दल (About Us) | " . $institute_name;
$marathi_heading = "eSarthi एज्युकेशन बद्दल";
$marathi_motto = "गुणवत्तापूर्ण शिक्षणाचा हक्क—आता प्रत्येक घरात!"; 
$marathi_mission = "आमचे उद्दिष्ट आणि प्रेरणा";
$marathi_vision = "शिक्षण, प्रेरणा आणि आत्मविश्वास";
$marathi_founder_section = "संस्थापक: राहुल मिसाळ सर";
$marathi_digital_revolution = "शिक्षणाची डिजिटल क्रांती—महाराष्ट्रासाठी!";


// --- 2. HTML structure and output follow below ---
// NOTE: Assumes includes/header.php and includes/footer.php exist
include('includes/header.php'); 
?>

<style>
    /* Shared Public UI Styles */
    .content-container { max-width: 1200px; margin: 0 auto; padding: 20px; }
    .page-title-header { 
        background-color: #0f2b46; 
        color: white; 
        padding: 40px 0; 
        text-align: center; 
        margin-bottom: 30px;
    }
    .page-title-header h1 { margin: 0; font-size: 2.5em; font-weight: 700; }
    .about-section {
        background: white;
        padding: 30px;
        border-radius: 12px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.08);
        margin-bottom: 30px;
    }
    .founder-card {
        display: flex;
        gap: 30px;
        align-items: center;
        background: #f8f8f8;
        padding: 25px;
        border-radius: 12px;
        border-left: 5px solid #dc3545;
        margin-top: 30px;
    }
    .founder-card img {
        width: 150px;
        height: 150px;
        object-fit: cover;
        border-radius: 50%;
        border: 4px solid #ffc107;
        flex-shrink: 0;
    }
    .mission-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        margin-top: 20px;
    }
    .mission-item {
        background: #f4f4f9;
        padding: 20px;
        border-radius: 8px;
        border-left: 4px solid #0f2b46;
    }
    .btn-contact {
        background-color: #dc3545; 
        color: white; 
        padding: 12px 25px; 
        border-radius: 8px;
        font-weight: <b>bold</b>;
        display: inline-block;
        margin-top: 20px;
    }
    @media (max-width: 768px) {
        .founder-card { flex-direction: column; text-align: center; }
        .mission-grid { grid-template-columns: 1fr; }
    }
</style>

<div class="page-title-header">
    <h1><i class="fas fa-info-circle"></i> <?= htmlspecialchars($marathi_heading) ?></h1>
</div>

<div class="content-container">

    <div class="about-section">
        <h2 style="color: #dc3545;"><?= htmlspecialchars($marathi_motto) ?></h2>
        <p style="font-size: 1.1em;">
            eSarthi एज्युकेशनची स्थापना महाराष्ट्रातील प्रत्येक विद्यार्थ्याला, मग तो शहरात असो वा गावात, <b>उत्कृष्ट डिजिटल शिक्षण</b> उपलब्ध व्हावे या उद्देशाने झाली आहे. <b>शिक्षणाची डिजिटल क्रांती</b> घडवून आणणे हे आमचे ध्येय आहे.
        </p>

        <div class="founder-card">
            <img src="images/rahul-misal-sir.png" alt="Rahul Misal Sir" loading="lazy">
            <div>
                <h3 style="color: #0f2b46; margin-top: 0;"><?= htmlspecialchars($marathi_founder_section) ?></h3>
                <p>
                    गणित तज्ज्ञ राहुल मिसाळ, ज्यांनी स्वतः Competitive Exam उत्तीर्ण करूनही, मोठ्या करिअरकडे जाण्याऐवजी विद्यार्थ्यांचे जीवन घडवण्याचा मार्ग निवडला. हजारो मुलांना योग्य दिशा, आत्मविश्वास आणि भक्कम शैक्षणिक पाया देत त्यांचे करिअर घडवले.
                </p>
                <p>
                    <b>मोफत ऑनलाइन बॅचेस (1 Jan 2026 पासून)</b> उपलब्ध करून देण्याचा त्यांचा अभूतपूर्व निर्णय याच समाजकार्याची भावना दर्शवतो.
                </p>
            </div>
        </div>
    </div>

    <div class="about-section">
        <h2 style="color: #0f2b46;"><?= htmlspecialchars($marathi_mission) ?></h2>
        
        <div class="mission-grid">
            <div class="mission-item">
                <h4 style="color: #dc3545;"><i class="fas fa-bullseye"></i> आमचे उद्दिष्ट</h4>
                <p>
                    शहर-गाव यांच्यातील शिक्षणातील अंतर मिटवणे. उच्च दर्जाचे, <b>मराठी माध्यमातील कोचिंग</b> परवडणाऱ्या आणि मोफत पर्यायातून महाराष्ट्राच्या प्रत्येक घरात पोहोचवणे.
                </p>
            </div>
            <div class="mission-item">
                <h4 style="color: #dc3545;"><i class="fas fa-eye"></i> आमची दृष्टी</h4>
                <p>
                    प्रत्येक विद्यार्थ्याला 8वी, 9वी, 10वीच्या स्तरावरच **NEET/JEE/UPSC** स्पर्धा परीक्षांसाठी भक्कम पाया देणे, ज्यामुळे त्याचे भविष्य उज्ज्वल होईल.
                </p>
            </div>
        </div>
        
        <div style="text-align: center; margin-top: 40px;">
            <p style="font-size: 1.1em;">
                तुमच्या मुलाच्या उज्ज्वल भविष्यासाठी आमच्याशी संपर्क साधा!
            </p>
            <a href="contact.php" class="btn-contact">
                <i class="fas fa-phone-alt"></i> अधिक माहितीसाठी संपर्क करा
            </a>
            &nbsp;
            <a href="https://play.google.com/store/apps/details?id=com.kcjmof.jvxvpx" target="_blank" style="display:inline-flex; align-items:center; background:#000; color:#fff; padding:10px 20px; border-radius:8px; text-decoration:none; font-family:sans-serif; border:1px solid #444;"><i class="fab fa-google-play" style="color:#3DDC84; margin-right:10px; font-size:20px;"></i> <div style="display:flex; flex-direction:column; line-height:1.1;"><span style="font-size:10px;">GET IT ON</span><span style="font-size:16px; font-weight:bold;">Google Play</span></div></a>
        </div>
    </div>

</div>

<?php 
// Include the Footer file
include('includes/footer.php');
?>