*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
}

body * {
    outline: none; /* Used for debugging if needed */
}
/* Header Styling */

/* Header */
header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    padding: 30px 20px;
    background: hsl(145, 100%, 95%);
    box-sizing: border-box;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    gap: 15px;
}

.wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Background */
.background-container {
    position: fixed; /* unified from two definitions */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    object-fit: cover;
    display: block;
    filter: brightness(80%);
   
}

#logo {
    font-size: 25px;
    font-weight: bold;
    color: #0161a5;
}

.plus {
    color: #C62E2E;
}

#contact_number {
    font-size: 14px;
    color: #0161a5;
}

/* Centered Form Box Styling */
main {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    flex-grow: 1;
    padding: 20px;
    box-sizing: border-box;
    margin-top: 100px; /* Ensures even spacing between header and form */
    margin-bottom: 25px; /* Matches footer spacing */
}

.form-box {
    background: rgba(255, 255, 255, 0.9);
    animation: fadeIn 1s ease-in-out;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    padding: 30px;
    border-radius: 8px;
    width: 100%;
    max-width: 600px;
    text-align: center;
}

h2 {
    margin-bottom: 20px;
    color: #333;
}

form {
    display: flex;
    flex-direction: column;
}

label {
    font-size: 14px;
    margin-bottom: 5px;
    color: #333;
    text-align: left;
    display: block;
}

input, textarea {
    padding: 10px;
    margin-bottom: 15px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
}

input:focus, textarea:focus, .password-container input:focus {
    border-color: #6a7dff;
    outline: none;
}

button {
    width: 100%;
    padding: 12px;
    background: #0D92F4;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
    margin-top: 10px;
    box-sizing: border-box;
}

button:hover {
    background: #0161a5;
}

/* Flexbox for First Name & Last Name */
.name-container {
    display: flex;
    gap: 10px;
}

.name-container div {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Flexbox for Password & Confirm Password */
.password-wrapper {
    display: flex;
    gap: 10px;
    width: 100%;
}

.password-field {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Password container styling */
.password-container {
    display: flex;
    align-items: center;
    width: 100%;
}

.password-container input {
    width: 80%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
}

.password-container button {
    width: 20%;
    height: 70%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #0D92F4;
    border-left: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    padding: 0;
    margin: 0 0 15px 0;
}

.password-container button:hover {
    background-color: #0161a5;
}

/* Footer Styling */
footer {
    background: hsl(147, 64%, 95%);
    padding: 10px;
    text-align: center;
    width: 100%;
    margin-top: auto;
    box-sizing: border-box;
}
.socials a {
    margin: 0 10px;
    text-decoration: none;
    font-weight: bold;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding: 15px;
        gap: 10px;
    }

    #logo {
        font-size: 20px;
    }

    #contact_number {
        font-size: 12px;
    }

    main {
        margin-top: 80px; /* Adjusted for mobile */
        margin-bottom: 20px;
    }

    .form-box {
        padding: 20px;
        max-width: 90%;
    }

    .name-container,
    .password-wrapper {
        flex-direction: column;
        gap: 5px;
    }

    .password-container input {
        width: 100%;
        border-radius: 4px;
    }

    .password-container button {
        width: 40px;
        height: 40px;
        border-radius: 4px;
    }

    button {
        font-size: 14px;
        padding: 10px;
    }

    footer {
        font-size: 14px;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    main {
        margin-top: 60px; /* Further reduces space for smaller screens */
        margin-bottom: 15px;
    }
    .form-box {
        padding: 15px;
    }

    h2 {
        font-size: 18px;
    }

    label {
        font-size: 12px;
    }

    input, textarea {
        padding: 8px;
        font-size: 14px;
    }

    button {
        font-size: 14px;
        padding: 10px;
    }

    .password-container button {
        width: 35px;
        height: 35px;
    }
}

/* Success Modal Styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
}

.recaptcha-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 10px;
    overflow: hidden;
}

.g-recaptcha {
    transform-origin: 0 0;
}

@media (max-width: 480px) {
    .g-recaptcha {
        transform: scale(0.85); /* Shrinks for small screens */
    }
}

@media (max-width: 360px) {
    .g-recaptcha {
        transform: scale(0.75);
    }
}
