<?php require_once 'config.php'; ?>

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <?php

    //Title and Seo Section
    $current_page = basename($_SERVER['PHP_SELF']);

    $page_titles = [
        'index.php' => 'Where Engineering Meets Excellence',
        'about.php' => 'About Us',
        'service.php' => 'Our Services',
        'contact.php' => 'Contact Us'
    ];

    $page_seo = [
        'index.php' => [
            'keyword' => 'Where Engineering Meets Excellence',
            'description' => 'We provide innovative engineering solutions that stand the test of time.'
        ],
        'about.php' => [
            'keyword' => 'About Us',
            'description' => 'Learn more about Birlon Engineering’s history, mission, and leadership team.'
        ],
        'service.php' => [
            'keyword' => 'Our Services',
            'description' => 'Discover the wide range of industrial and engineering services we offer.'
        ],
        'contact.php' => [
            'keyword' => 'Contact Us',
            'description' => 'Reach out to Birlon Engineering for inquiries, quotes, or support.'
        ]
    ];

    $page_meta = [
        'index.php' => [
            'title' => 'Where Engineering Meets Excellence',
            'description' => 'We provide innovative engineering solutions that stand the test of time.'
        ],
        'about.php' => [
            'title' => 'About Us',
            'description' => 'Learn more about Birlon Engineering’s history, mission, and leadership team.'
        ],
        'service.php' => [
            'title' => 'Our Services',
            'description' => 'Discover the wide range of industrial and engineering services we offer.'
        ],
        'contact.php' => [
            'title' => 'Contact Us',
            'description' => 'Reach out to Birlon Engineering for inquiries, quotes, or support.'
        ]
    ];

    // Set fallback/default if not found
    $og_title = isset($page_meta[$current_page]['title']) ? $page_meta[$current_page]['title'] : 'Birlon Engineering';
    $og_description = isset($page_meta[$current_page]['description']) ? $page_meta[$current_page]['description'] : 'Reliable engineering excellence tailored to your needs.';
    $page_title_suffix = isset($page_titles[$current_page]) ? $page_titles[$current_page] : '';
    $seo_keyword = isset($page_meta[$current_page]['keyword']) ? $page_meta[$current_page]['keyword'] : 'Birlon Engineering';
    $seo_description = isset($page_meta[$current_page]['description']) ? $page_meta[$current_page]['description'] : 'Reliable engineering excellence tailored to your needs.';

    //End Title and Seo Section
    ?>

    <title>Birlon Engineering<?= $page_title_suffix ? ' - ' . $page_title_suffix : '' ?></title>
    <meta content="width=device-width, initial-scale=1.0" name="viewport">
    <meta content="<?= $seo_keyword ?>" name="keywords">
    <meta content="<?= $seo_description ?>" name="description">
    <meta property="og:title" content="Birlon Engineering<?= $og_title ? ' - ' . $og_title : '' ?>" />
    <meta property="og:description" content="<?= $og_description ?>" />
    <meta property="og:image" content="<?= url('img/logo.png') ?>" />
    <meta property="og:type" content="website" />


    <!-- Favicon -->
    <link href="img/favicon.ico" rel="icon">

    <!-- Google Web Fonts -->
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500&family=Roboto:wght@500;700;900&display=swap" rel="stylesheet">

    <!-- Icon Font Stylesheet -->
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.10.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.4.1/font/bootstrap-icons.css" rel="stylesheet">

    <!-- Libraries Stylesheet -->
    <link href="lib/animate/animate.min.css" rel="stylesheet">
    <link href="lib/owlcarousel/assets/owl.carousel.min.css" rel="stylesheet">
    <link href="lib/lightbox/css/lightbox.min.css" rel="stylesheet">

    <!-- Customized Bootstrap Stylesheet -->
    <link href="css/bootstrap.min.css" rel="stylesheet">

    <!-- Template Stylesheet -->
    <link href="css/style.css" rel="stylesheet">

    <!--Font Awesome-->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css" integrity="sha512-yz3Vz+1HfzVcn+IVvdyUeQn+I3MZRH6zAVlOPPymr4O8YQx3cD9mK0owT9Z1QnAcOZJTPjBlY9ov5c5jV7V0VQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <!-- jQuery and Validation Scripts -->
    <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/jquery-validation@1.19.5/dist/jquery.validate.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/jquery-validation@1.19.5/dist/additional-methods.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script> <!-- For swal alerts -->

</head>

<body>
    <!-- Spinner Start -->
    <div id="spinner" class="show bg-white position-fixed translate-middle w-100 vh-100 top-50 start-50 d-flex align-items-center justify-content-center">
        <div class="spinner-border text-primary" style="width: 3rem; height: 3rem;" role="status">
            <span class="sr-only">Loading...</span>
        </div>
    </div>
    <!-- Spinner End -->


    <!-- Topbar Start -->
    <div class="container-fluid bg-dark p-0">
        <div class="row gx-0 d-none d-lg-flex">
            <div class="col-lg-7 px-4 text-start">
                <div class="h-100 d-inline-flex align-items-center me-4">
                    <small class="fa fa-map-marker-alt text-primary me-2"></small>
                    <small class="text-white">Office 2.19, First Floor, Block 2, Plot 6, M‑45, Mussafah Industrial Area, Abu Dhabi – UAE</small>
                </div>
            </div>
            <div class="col-lg-5 px-4 text-end">
                <div class="h-100 d-inline-flex align-items-center me-4">
                    <small class="fa fa-phone-alt text-primary me-2"></small>
                    <small class="text-white">+971-567311500</small>
                </div>
                <div class="h-100 d-inline-flex align-items-center mx-n2">
                    <a class="btn btn-square btn-link rounded-0 border-0 border-end border-secondary" href=""><i class="fab fa-facebook-f"></i></a>
                    <a class="btn btn-square btn-link rounded-0 border-0 border-end border-secondary" href=""><i class="fab fa-twitter"></i></a>
                    <a class="btn btn-square btn-link rounded-0 border-0 border-end border-secondary" href=""><i class="fab fa-linkedin-in"></i></a>
                    <a class="btn btn-square btn-link rounded-0" href=""><i class="fab fa-instagram"></i></a>
                </div>
            </div>
        </div>
    </div>
    <!-- Topbar End -->


    <!-- Navbar Start -->
    <nav class="navbar navbar-expand-lg navbar-light sticky-top p-0  navbar-styling">
        <a href="index.php" class="align-items-center nav-bar-left-item px-4">
            <img src="img/logo.png" class="logo-img">
        </a>
        <button type="button" class="navbar-toggler me-4 " data-bs-toggle="collapse" data-bs-target="#navbarCollapse">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse nav-bar-right-items" id="navbarCollapse">
            <?php $current_page = basename($_SERVER['PHP_SELF']); ?>
            <div class="navbar-nav ms-auto p-4 p-lg-0">
                <a href="index.php" class="nav-item nav-link <?= ($current_page == 'index.php') ? 'active' : '' ?>">Home</a>
                <a href="about.php" class="nav-item nav-link <?= ($current_page == 'about.php') ? 'active' : '' ?>">About</a>
                <a href="service.php" class="nav-item nav-link <?= ($current_page == 'service.php') ? 'active' : '' ?>">Services</a>
                <a href="contact.php" class="nav-item nav-link <?= ($current_page == 'contact.php') ? 'active' : '' ?>">Contact</a>

            </div>
            <a href="contact.php" class="btn btn-primary rounded-0 py-4 px-lg-5 d-none d-lg-block">Get A Quote<i class="fa fa-arrow-right ms-3"></i></a>
        </div>
    </nav>
    <!-- Navbar End -->