/* Tinitiyak na ang buong pahina ay nakasentro at may tamang spacing */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* Tandaan: Ang 'op.jpg' ay dapat available */
    background-image: url('op.jpg');
    background-size: cover; /* Para sumakop sa buong background */
    background-attachment: fixed; /* Para di gumalaw ang background pag nag-scroll */
    display: flex;
    justify-content: center; /* I-sentro ang container nang pahalang */
    align-items: center; /* I-sentro ang container nang patayo (kung sapat ang taas ng content) */
    min-height: 100vh; /* Tiyakin na ang body ay sumasakop sa buong taas ng viewport */
    padding: 20px;
    margin: 0; /* Alisin ang default margin */
}

/* Ang form container - ito ang magiging solong 'box' */
.container {
    /* Ginawang mas malinaw ang background at border */
    background-color: #b2b8c0e0; /* Mas transparent (e0) para makita pa rin ang background image */
    padding: 30px;
    border-radius: 12px;
    /* Pinalitan ang box-shadow ng mas malinis at mas nakikita */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3); 
    max-width: 800px;
    width: 100%;
    /* Tiyakin na nakahiwalay ito sa header at footer (kung mayroon) */
    margin: 20px auto; 
}

h1 {
    text-align: center;
    color: #0a0a0a;
    margin-bottom: 30px;
    /* Ginawa kong mas matingkad ang linya */
    border-bottom: 3px solid #000000; 
    padding-bottom: 15px;
}

fieldset {
    /* Ang border ng fieldset */
    border: 2px solid #cf389d;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 8px;
    transition: border-color 0.3s;
}

fieldset:hover {
    /* Mas matingkad na hover effect */
    border-color: #3c3d95; 
}

legend {
    font-size: 1.4em; /* Bahagyang nilakihan */
    font-weight: bold;
    color: #000000;
    padding: 0 10px;
    /* Idinagdag para mas mag-pop out */
    background-color: #b2b8c0; 
    border-radius: 4px;
}

.form-group {
    margin-bottom: 18px;
    position: relative;
}

.form-group.required label:after {
    content: " *";
    color: #dc3545; /* Ginawang mas matingkad na pula */
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #000000;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 10px;
    /* Pinalitan ang border color ng mas malinaw */
    border: 1px solid #cccccc2c; 
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus, select:focus, textarea:focus {
    border-color: #3c3d95; /* Ginawang kulay ng button */
    box-shadow: 0 0 5px rgba(60, 61, 149, 0.5);
    outline: none;
}

/* --- (Iba pang bahagi ng CSS tulad ng time-group, select, atbp. ay pinanatili) --- */

select {
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%233c3d95%22%20d%3D%22M287%20170.8L154.5%2038.3c-6.2-6.2-16.4-6.2-22.6%200L5.3%20170.8c-6.2%206.2-6.2%2016.4%200%2022.6l22.6%2022.6c6.2%206.2%2016.4%206.2%2022.6%200L143.2%20138l92.7%2092.7c6.2%206.2%2016.4%206.2%2022.6%200l22.6-22.6c6.2-6.2%206.2-16.4%200-22.6z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 12px auto;
}

.submit-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: #3c3d95;
    color: white; /* Ginawang white ang text para mas matingkad */
    border: none;
    border-radius: 6px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.3s, transform 0.1s;
}

.submit-btn:hover {
    background-color: #4d4fcf; /* Mas matingkad na hover */
}

.submit-btn:active {
    transform: scale(0.99);
}

small {
    color: #6c757d;
    font-size: 0.85em;
    display: block;
    margin-top: 4px;
}

input:invalid:not(:focus):not(:placeholder-shown),
select:invalid:not(:focus),
textarea:invalid:not(:focus):not(:placeholder-shown) {
    border: 2px solid #dc3545;
}

.validation-error {
    color: #dc3545;
    font-size: 0.9em;
    margin-top: 5px;
}