@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap');

body {
    font-family: 'Open Sans', sans-serif;
    background-color: #f1f1f1;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.form-container {
    background-color: #fff;
    max-width: 900px;
    width: 100%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    margin: auto;
}

.form-header {
    background-color: #fff;
    padding: 30px;
    border-bottom: 3px solid #0056b3;
    text-align: center;
}

.form-header h1 {
    font-size: 24px;
    color: #333;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    font-weight: 700;
}

.institute-name {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.info-box {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 15px;
    margin: 20px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
}

.info-box ul {
    margin-top: 10px;
    padding-left: 20px;
}

form {
    padding: 30px 40px;
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #ddd;
}

.form-section:last-child {
    border-bottom: none;
}

h2 {
    font-size: 18px;
    color: #444;
    margin-bottom: 20px;
    border-left: 4px solid #0056b3;
    padding-left: 10px;
    font-weight: 700;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.required {
    color: red;
}

/* Inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px;
    /* Larger hit area */
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    /* Prevents iOS zoom */
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
    background-color: #fafafa;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #0056b3;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
    background-color: #fff;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

small {
    display: block;
    margin-top: 5px;
    color: #777;
    font-size: 12px;
}

.radio-group {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
    /* Allows wrapping on small screens */
}

.radio-group label {
    font-weight: normal;
    margin-bottom: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-weight: normal;
    cursor: pointer;
    line-height: 1.5;
}

.checkbox-label input {
    margin-top: 4px;
    min-width: 16px;
    /* Ensure checkbox isn't too small */
    min-height: 16px;
}

.form-actions {
    text-align: center;
    margin-top: 40px;
}

.btn-primary {
    background-color: #28a745;
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
    transition: background 0.3s, transform 0.1s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background-color: #218838;
}

.btn-primary:active {
    transform: translateY(1px);
}

.form-footer {
    background-color: #f9f9f9;
    padding: 20px;
    text-align: center;
    font-size: 12px;
    color: #999;
    border-top: 1px solid #eee;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    body {
        padding: 0;
        background-color: #fff;
        /* White background on mobile looks app-like */
    }

    .form-container {
        border-radius: 0;
        box-shadow: none;
        max-width: 100%;
        margin: 0;
    }

    .form-header {
        padding: 20px;
        text-align: left;
        /* Alignment change for mobile readability */
    }

    .form-header h1 {
        font-size: 20px;
    }

    .info-box {
        margin: 15px;
    }

    form {
        padding: 15px 20px;
    }

    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
        /* Stack columns */
        gap: 15px;
    }

    .btn-primary {
        width: 100%;
        /* Full width button on mobile */
        padding: 15px;
    }

    .radio-group label {
        width: 45%;
        /* Make radio options bigger tap targets */
    }
}