<?php

$slug = basename($_SERVER['REQUEST_URI']);

$location = str_replace("nasha-mukti-kendra-in-", "", $slug);

$location = str_replace("-", " ", $location);

$location = ucwords($location);

if(empty($location)) {
    $location = "Delhi";
}

$image = "img/nasha-mukti-kendra-city.jpg";
?>

<style>
.hero-banner {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.hero-banner img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    filter: brightness(70%);
}

.hero-overlay {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    display: flex;
    align-items: end;
    padding: 30px;
}

.hero-box {
    background: rgba(255,255,255,0.95);
    padding: 20px;
    border-radius: 8px;
    max-width: 400px;
}

.hero-box h2 {
    font-size: 21px;
    margin-bottom: 10px;
    font-weight: 600;
}

.hero-box span {
    color: #962f35;
}

.cta-btn {
    background: #962f35;
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    display: inline-block;
}
</style>

<div class="hero-banner">
    <img src="<?php echo $image; ?>" alt="Nasha Mukti Kendra in <?php echo $location; ?>">

    <div class="hero-overlay">
        <div class="hero-box">
            <h2>Nasha Mukti Kendra in <span><?php echo $location; ?></span></h2>
            <a href="https://wa.me/919650968784" class="cta-btn" target="_blank">Enquiry Now →</a>
        </div>
    </div>
</div>