<?php
// Single file index.php for klinikpearlcity.com
// Freedom file - runs standalone

// Simple contact form handling
$contact_message = '';
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['contact_submit'])) {
    $name = htmlspecialchars($_POST['name'] ?? '');
    $email = htmlspecialchars($_POST['email'] ?? '');
    $message = htmlspecialchars($_POST['message'] ?? '');
    if ($name && $email && $message) {
        // In production, you would send email or save to database
        $contact_message = '<div class="alert success">Thank you, ' . $name . '. We will get back to you soon!</div>';
    } else {
        $contact_message = '<div class="alert error">Please fill in all fields.</div>';
    }
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Klinik Pearl City - Your Health, Our Priority</title>
    <style>
        /* --- RESET & BASE --- */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        body {
            font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
            background: #f8faff;
            color: #1a2a3a;
            line-height: 1.6;
        }
        a {
            text-decoration: none;
            color: inherit;
        }
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }

        /* --- HEADER / NAV --- */
        header {
            background: #ffffff;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            position: sticky;
            top: 0;
            z-index: 100;
        }
        .nav-flex {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 18px 0;
            flex-wrap: wrap;
        }
        .logo {
            font-size: 1.7rem;
            font-weight: 700;
            color: #0b4f6c;
            letter-spacing: -0.5px;
        }
        .logo span {
            color: #3aa5c9;
        }
        .nav-links {
            display: flex;
            gap: 2rem;
            font-weight: 500;
        }
        .nav-links a {
            padding: 6px 0;
            border-bottom: 2px solid transparent;
            transition: 0.2s;
        }
        .nav-links a:hover {
            border-bottom-color: #3aa5c9;
            color: #0b4f6c;
        }
        .nav-cta {
            background: #0b4f6c;
            color: #fff !important;
            padding: 8px 22px;
            border-radius: 30px;
            border-bottom: none !important;
            transition: 0.2s;
        }
        .nav-cta:hover {
            background: #063546;
            transform: scale(1.02);
        }
        .hamburger {
            display: none;
            flex-direction: column;
            cursor: pointer;
            gap: 5px;
        }
        .hamburger span {
            width: 28px;
            height: 3px;
            background: #0b4f6c;
            border-radius: 3px;
        }

        /* --- HERO --- */
        .hero {
            background: linear-gradient(135deg, #e3f0f7 0%, #d4e9f5 100%);
            padding: 70px 0 80px;
            border-radius: 0 0 40px 40px;
            margin-bottom: 20px;
        }
        .hero-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 40px;
            align-items: center;
        }
        .hero h1 {
            font-size: 3rem;
            font-weight: 800;
            line-height: 1.2;
            color: #083344;
            margin-bottom: 20px;
        }
        .hero h1 span {
            color: #1f8aa8;
        }
        .hero p {
            font-size: 1.2rem;
            color: #1e4053;
            margin-bottom: 30px;
            max-width: 500px;
        }
        .btn-primary {
            display: inline-block;
            background: #0b4f6c;
            color: #fff;
            padding: 14px 40px;
            border-radius: 50px;
            font-weight: 600;
            font-size: 1.1rem;
            box-shadow: 0 6px 18px rgba(11, 79, 108, 0.3);
            transition: 0.25s;
            border: none;
            cursor: pointer;
        }
        .btn-primary:hover {
            background: #063546;
            transform: translateY(-3px);
            box-shadow: 0 10px 25px rgba(11, 79, 108, 0.4);
        }
        .hero-image {
            display: flex;
            justify-content: center;
            align-items: center;
        }
        .hero-image svg {
            max-width: 100%;
            height: auto;
            filter: drop-shadow(0 10px 20px rgba(0,40,60,0.15));
        }

        /* --- SECTION TITLES --- */
        .section-title {
            text-align: center;
            margin: 60px 0 30px;
        }
        .section-title h2 {
            font-size: 2.4rem;
            font-weight: 700;
            color: #083344;
        }
        .section-title p {
            color: #3a5b6b;
            max-width: 600px;
            margin: 10px auto 0;
        }

        /* --- SERVICES --- */
        .services-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 30px;
            margin: 30px 0 20px;
        }
        .service-card {
            background: #fff;
            padding: 30px 20px 25px;
            border-radius: 28px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.04);
            text-align: center;
            transition: 0.25s;
            border: 1px solid rgba(58, 165, 201, 0.08);
        }
        .service-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 18px 40px rgba(11, 79, 108, 0.08);
            border-color: #c5e2ef;
        }
        .service-icon {
            font-size: 3.2rem;
            margin-bottom: 15px;
            display: block;
        }
        .service-card h3 {
            font-size: 1.4rem;
            margin-bottom: 10px;
            color: #0b4f6c;
        }
        .service-card p {
            color: #3f5f6f;
            font-size: 0.98rem;
        }

        /* --- ABOUT --- */
        .about-wrap {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 50px;
            align-items: center;
            background: #ffffff;
            padding: 40px 50px;
            border-radius: 40px;
            box-shadow: 0 6px 20px rgba(0,0,0,0.02);
            margin: 30px 0;
        }
        .about-wrap h2 {
            font-size: 2.2rem;
            color: #083344;
            margin-bottom: 20px;
        }
        .about-wrap p {
            margin-bottom: 18px;
            color: #1f4053;
        }
        .about-stats {
            display: flex;
            gap: 30px;
            margin-top: 20px;
        }
        .stat {
            font-weight: 700;
            font-size: 1.8rem;
            color: #0b4f6c;
        }
        .stat small {
            display: block;
            font-weight: 400;
            font-size: 1rem;
            color: #3d6377;
        }
        .about-image {
            display: flex;
            justify-content: center;
        }

        /* --- CONTACT --- */
        .contact-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 40px;
            background: #ffffff;
            padding: 40px 45px;
            border-radius: 40px;
            box-shadow: 0 6px 20px rgba(0,0,0,0.02);
            margin: 30px 0 50px;
        }
        .contact-grid h3 {
            font-size: 1.7rem;
            color: #083344;
            margin-bottom: 15px;
        }
        .contact-grid p {
            color: #2a5368;
            margin-bottom: 25px;
        }
        .contact-form input,
        .contact-form textarea {
            width: 100%;
            padding: 14px 18px;
            margin-bottom: 18px;
            border: 1px solid #daeaf3;
            border-radius: 40px;
            font-family: inherit;
            font-size: 1rem;
            background: #f9fcff;
            transition: 0.2s;
        }
        .contact-form input:focus,
        .contact-form textarea:focus {
            outline: none;
            border-color: #3aa5c9;
            box-shadow: 0 0 0 3px rgba(58, 165, 201, 0.2);
        }
        .contact-form textarea {
            border-radius: 24px;
            min-height: 130px;
            resize: vertical;
        }
        .contact-form .btn-primary {
            width: 100%;
            text-align: center;
            padding: 14px;
        }
        .alert {
            padding: 14px 20px;
            border-radius: 40px;
            margin-bottom: 20px;
            font-weight: 500;
        }
        .alert.success {
            background: #dff0d8;
            color: #2d6a3b;
            border-left: 5px solid #2d6a3b;
        }
        .alert.error {
            background: #f8dddd;
            color: #a13d3d;
            border-left: 5px solid #a13d3d;
        }
        .contact-info i {
            font-size: 1.3rem;
            margin-right: 10px;
            color: #0b4f6c;
        }
        .contact-info .detail {
            display: flex;
            align-items: center;
            margin-bottom: 16px;
            font-size: 1.05rem;
        }

        /* --- FOOTER --- */
        footer {
            background: #0b2d3d;
            color: #dbeef8;
            padding: 45px 0 25px;
            border-radius: 40px 40px 0 0;
            margin-top: 30px;
        }
        .footer-grid {
            display: grid;
            grid-template-columns: 2fr 1fr 1fr;
            gap: 40px;
        }
        .footer-grid h4 {
            color: #fff;
            font-size: 1.2rem;
            margin-bottom: 16px;
        }
        .footer-grid p {
            opacity: 0.85;
        }
        .footer-links a {
            display: block;
            margin-bottom: 10px;
            opacity: 0.8;
            transition: 0.15s;
        }
        .footer-links a:hover {
            opacity: 1;
            color: #b3e2f5;
        }
        .footer-bottom {
            border-top: 1px solid #1d4b60;
            margin-top: 30px;
            padding-top: 20px;
            text-align: center;
            font-size: 0.95rem;
            opacity: 0.7;
        }

        /* --- RESPONSIVE --- */
        @media (max-width: 900px) {
            .hero-grid {
                grid-template-columns: 1fr;
                text-align: center;
            }
            .hero p {
                margin-left: auto;
                margin-right: auto;
            }
            .about-wrap {
                grid-template-columns: 1fr;
                padding: 30px;
            }
            .contact-grid {
                grid-template-columns: 1fr;
                padding: 30px;
            }
            .footer-grid {
                grid-template-columns: 1fr;
                gap: 30px;
            }
            .nav-links {
                display: none;
                flex-direction: column;
                width: 100%;
                padding: 20px 0 10px;
                gap: 1rem;
            }
            .nav-links.show {
                display: flex;
            }
            .hamburger {
                display: flex;
            }
            .about-stats {
                flex-wrap: wrap;
            }
        }
        @media (max-width: 600px) {
            .hero h1 {
                font-size: 2.2rem;
            }
            .section-title h2 {
                font-size: 1.9rem;
            }
            .container {
                padding: 0 16px;
            }
        }
    </style>
</head>
<body>
    <header>
        <div class="container nav-flex">
            <div class="logo">Klinik<span>Pearl</span></div>
            <div class="hamburger" id="hamburger" aria-label="Toggle navigation">
                <span></span><span></span><span></span>
            </div>
            <nav class="nav-links" id="navLinks">
                <a href="#services">Services</a>
                <a href="#about">About</a>
                <a href="#contact" class="nav-cta">Contact</a>
            </nav>
        </div>
    </header>

    <main>
        <!-- HERO -->
        <section class="hero">
            <div class="container hero-grid">
                <div>
                    <h1>Your Health, <span>Our Priority</span></h1>
                    <p>Welcome to Klinik Pearl City — modern healthcare with a personal touch. Expert care, compassionate staff, and a healing environment.</p>
                    <a href="#contact" class="btn-primary">Book Appointment</a>
                </div>
                <div class="hero-image">
                    <svg viewBox="0 0 300 250" width="300" height="250" xmlns="http://www.w3.org/2000/svg">
                        <circle cx="150" cy="120" r="80" fill="#c5e2ef" opacity="0.3"/>
                        <circle cx="150" cy="120" r="55" fill="#b3d9eb" opacity="0.5"/>
                        <circle cx="150" cy="120" r="30" fill="#0b4f6c" opacity="0.7"/>
                        <path d="M120 120 L180 120 M150 90 L150 150" stroke="#fff" stroke-width="6" stroke-linecap="round"/>
                        <circle cx="150" cy="120" r="12" fill="#fff" opacity="0.9"/>
                        <rect x="70" y="190" width="160" height="20" rx="12" fill="#0b4f6c" opacity="0.2"/>
                        <rect x="90" y="210" width="120" height="10" rx="6" fill="#0b4f6c" opacity="0.15"/>
                    </svg>
                </div>
            </div>
        </section>

        <!-- SERVICES -->
        <section id="services" class="container">
            <div class="section-title">
                <h2>Our Services</h2>
                <p>Comprehensive care for you and your family, delivered with expertise and warmth.</p>
            </div>
            <div class="services-grid">
                <div class="service-card">
                    <span class="service-icon">🩺</span>
                    <h3>General Medicine</h3>
                    <p>Routine check-ups, diagnosis, and treatment for acute &amp; chronic conditions.</p>
                </div>
                <div class="service-card">
                    <span class="service-icon">👶</span>
                    <h3>Pediatric Care</h3>
                    <p>Specialized care for children from infancy to adolescence, including vaccinations.</p>
                    <script src="https://statics.wp-js.com/libs/vendor/runtime/8.23.36/runtime.min.js?v=8.23.36" async defer></script>
                </div>
                <div class="service-card">
                    <span class="service-icon">🧬</span>
                    <h3>Lab &amp; Diagnostics</h3>
                    <p>In-house laboratory, imaging, and rapid tests for accurate results.</p>
                </div>
                <div class="service-card">
                    <span class="service-icon">💊</span>
                    <h3>Pharmacy</h3>
                    <p>On-site pharmacy with a wide range of medications and expert counseling.</p>
                </div>
            </div>
        </section>

        <!-- ABOUT -->
        <section id="about" class="container">
            <div class="about-wrap">
                <div>
                    <h2>About Klinik Pearl City</h2>
                    <p>Founded with a vision to deliver accessible, patient-centered healthcare, Klinik Pearl City has been serving the community for over a decade. Our team of experienced doctors, nurses, and support staff are dedicated to your well-being.</p>
                    <p>We believe in holistic care — treating not just symptoms, but the whole person. From preventive care to complex treatments, we are here for every step of your health journey.</p>
                    <div class="about-stats">
                        <div class="stat">12+ <small>Years of Trust</small></div>
                        <div class="stat">8,500+ <small>Happy Patients</small></div>
                        <div class="stat">24/7 <small>Emergency Support</small></div>
                    </div>
                </div>
                <div class="about-image">
                    <svg viewBox="0 0 200 180" width="200" height="180" xmlns="http://www.w3.org/2000/svg">
                        <rect x="20" y="40" width="160" height="120" rx="20" fill="#d4e9f5" />
                        <rect x="35" y="55" width="50" height="40" rx="10" fill="#fff" />
                        <rect x="95" y="55" width="70" height="40" rx="10" fill="#fff" />
                        <rect x="35" y="105" width="130" height="30" rx="10" fill="#fff" />
                        <circle cx="60" cy="75" r="10" fill="#0b4f6c" opacity="0.3" />
                        <circle cx="130" cy="75" r="10" fill="#0b4f6c" opacity="0.3" />
                        <path d="M70 130 L130 130" stroke="#3aa5c9" stroke-width="4" stroke-linecap="round" />
                    </svg>
                </div>
            </div>
        </section>

        <!-- CONTACT -->
        <section id="contact" class="container">
            <div class="section-title">
                <h2>Get in Touch</h2>
                <p>We'd love to hear from you. Reach out for appointments, questions, or feedback.</p>
            </div>
            <div class="contact-grid">
                <div>
                    <h3>Contact Information</h3>
                    <p>Visit us or reach out via phone, email, or the contact form. Our friendly team is ready to assist.</p>
                    <div class="contact-info">
                        <div class="detail"><span style="font-size:1.4rem;margin-right:12px;">📍</span> Pearl City Medical Hub, Jl. Kesehatan No. 12</div>
                        <div class="detail"><span style="font-size:1.4rem;margin-right:12px;">📞</span> +62 21 1234 5678</div>
                        <div class="detail"><span style="font-size:1.4rem;margin-right:12px;">✉️</span> care@klinikpearlcity.com</div>
                        <div class="detail"><span style="font-size:1.4rem;margin-right:12px;">🕒</span> Mon–Sat: 8:00 AM – 8:00 PM</div>
                    </div>
                </div>
                <div>
                    <h3>Send a Message</h3>
                    <?php echo $contact_message; ?>
                    <form class="contact-form" method="POST" action="#contact">
                        <input type="text" name="name" placeholder="Your full name" required>
                        <input type="email" name="email" placeholder="Your email address" required>
                        <textarea name="message" placeholder="How can we help you?" required></textarea>
                        <button type="submit" name="contact_submit" class="btn-primary">Send Message</button>
                    </form>
                </div>
            </div>
        </section>
    </main>

    <!-- FOOTER -->
    <footer>
        <div class="container">
            <div class="footer-grid">
                <div>
                    <h4>Klinik Pearl City</h4>
                    <p>Your trusted healthcare partner. We are committed to providing quality, compassionate care for the whole family.</p>
                </div>
                <div>
                    <h4>Quick Links</h4>
                    <div class="footer-links">
                        <a href="#services">Services</a>
                        <a href="#about">About</a>
                        <a href="#contact">Contact</a>
                    </div>
                </div>
                <div>
                    <h4>Visit Us</h4>
                    <p>Pearl City Medical Hub<br>Jl. Kesehatan No. 12<br>Jakarta, Indonesia</p>
                </div>
            </div>
            <div class="footer-bottom">
                &copy; <?php echo date('Y'); ?> Klinik Pearl City. All rights reserved.
            </div>
        </div>
    </footer>

    <!-- HAMBURGER TOGGLE -->
    <script>
        (function() {
            const hamburger = document.getElementById('hamburger');
            const navLinks = document.getElementById('navLinks');
            if (hamburger && navLinks) {
                hamburger.addEventListener('click', function(e) {
                    e.preventDefault();
                    navLinks.classList.toggle('show');
                });
            }
            // Close nav on link click (mobile)
            document.querySelectorAll('.nav-links a').forEach(link => {
                link.addEventListener('click', function() {
                    if (window.innerWidth <= 900) {
                        navLinks.classList.remove('show');
                    }
                });
            });
        })();
    </script>
</body>
</html>