* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    color: #0c2d63;
}

.form-page {
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    padding: 60px;
    min-height: 100vh;
}

.page-1 {
    background-image: url("part1.png");
}

.page-2 {
    background-image: url("part2.png");
    padding-top: 0;
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
    margin-top: 100px;
}

.form-header h1 {
    font-size: 70px;
    font-weight: 800;
    color: #143b7d;
    margin: 20px;
    letter-spacing: 3px;
}

.form-header h2 {
    font-size: 70px;
    font-weight: 700;
    color: #c89b3c;
    margin: -10px 0 10px;
}

.hr {
    height: 3px;
    background-color: #0d3b78;
    width: 100%;
    margin: 10px 0 20px;
}

.name {
    display: flex;
    align-items: baseline;
    gap: 20px;
}

.brand-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 22px;
}

.logo-box {
    width: 150px;
    height: 150px;
    border: 4px solid #0d3b78;
    border-radius: 50%;
    padding: 0;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(13, 59, 120, 0.18);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.logo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.title-box {
    display: inline-block;
    background: #0d3b78;
    color: white;
    padding: 12px 40px;
    border-radius: 8px;
    font-size: 28px;
    font-weight: 700;
}

.section-title {
    background: #0d3b78;
    color: white;
    display: inline-block;
    padding: 10px 25px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: 600;
    margin: 25px 0 15px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 18px;
}

#M-error {
    color: red;
    display: none;
}

.gender-options {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 5px;
}

.gender-options label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.category-group,
.timing-group,
.S-T-group,
.academic-stream-group,
.course-class-group {
    margin-bottom: 0;
}

.category,
.Time-Slot,
.studyType,
.academicStream,
.course-class {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: rgb(255, 255, 255);
    cursor: pointer;
}

.category:focus {
    border-color: #007bff;
    outline: none;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 18px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

input,
textarea,
select {
    width: 100%;
    border: none;
    border-bottom: 2px solid #999;
    background: transparent;
    padding: 8px;
    font-size: 18px;
    color: #0c2d63;
    outline: none;
}

.Slot {
    display: block;
    width: fit-content;
    margin: 0 auto 15px;
}

.Time-Slot {
    width: 40%;
    display: block;
    margin: 10px auto 0;
}

textarea {
    height: 40px;
}

.terms-list {
    margin: 10px 0 5px 22px;
    line-height: 1.7;
    font-size: 15px;
}

.terms-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    font-weight: 600;
}

.terms-check input {
    width: auto;
    cursor: pointer;
}

/* ------- ADHAR / PHOTO / SIGNATURE ----------------------------*/
.upload-row {
    display: grid;
    grid-template-columns: 1fr 160px 1fr;
    align-items: end;
    gap: 35px;
    margin-top: 40px;
}

.upload-box {
    text-align: center;
}

.upload-label {
    margin-bottom: 8px;
    font-weight: 600;
}

.upload-preview {
    margin: 0 auto;
    border: 2px dashed #0d3b78;
    border-radius: 8px;
    background: rgba(13, 59, 120, 0.06);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: 0.3s ease;
    overflow: hidden;
}

.upload-preview:hover {
    background: rgba(13, 59, 120, 0.12);
    border-color: #c89b3c;
}

.aadhaar-preview {
    width: 210px;
    height: 125px;
}

.photo-preview {
    width: 130px;
    height: 160px;
}

.signature-preview {
    width: 210px;
    height: 90px;
}

.upload-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #0d3b78;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
}

.upload-text {
    font-size: 13px;
    font-weight: 600;
    color: #0d3b78;
}

.file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

.upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-name {
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #0d3b78;
    word-break: break-word;
}

/* -----------submit button-------------------------------------- */
.submit-row {
    display: flex;
    justify-content: center;
    margin-top: 35px;
}

.submit-btn {
    min-width: 280px;
    border: none;
    border-radius: 999px;
    padding: 16px 42px;
    background: linear-gradient(135deg, #0d3b78, #1769aa);
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 12px 25px rgba(13, 59, 120, 0.32);
    transition: 0.3s ease;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #c89b3c, #e0b85c);
    color: #0d3b78;
    transform: translateY(-3px);
    box-shadow: 0 16px 30px rgba(200, 155, 60, 0.38);
}

.submit-btn:active {
    transform: translateY(0);
}

/* ---------- LAPTOP / SMALL DESKTOP ---------------------------------- */
@media (max-width: 1200px) {
    .form-page {
        padding: 50px;
    }

    .form-header h1,
    .form-header h2 {
        font-size: 58px;
    }

    .logo-box {
        width: 130px;
        height: 130px;
    }

    .title-box {
        font-size: 24px;
    }

    .Time-Slot {
        width: 55%;
        margin: 10px auto 0;
        display: block;
    }
}


/* ---------- TABLET ------------------------------------------------- */
@media (max-width: 900px) {
    .form-page {
        padding: 40px;
        background-size: cover;
    }

    .form-header {
        margin-top: 60px;
    }

    .brand-row {
        gap: 16px;
    }

    .logo-box {
        width: 110px;
        height: 110px;
    }

    .form-header h1,
    .form-header h2 {
        font-size: 46px;
    }

    .title-box {
        font-size: 20px;
        padding: 10px 28px;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr 1fr;
    }

    .gender-options {
        flex-wrap: wrap;
    }

    .Time-Slot {
        width: 70%;
        margin: 10px auto 0;
        display: block;
    }

    .upload-row {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .photo-preview {
        width: 130px;
        height: 160px;
    }

    .terms-list {
        font-size: 14px;
    }
}


/* ---------- PHONE ---------------------------------------------- */
@media (max-width: 600px) {
    .form-page {
        padding: 25px;
        min-height: auto;
        background-size: cover;
    }

    .form-header {
        margin-top: 35px;
        margin-bottom: 22px;
    }

    .brand-row {
        flex-direction: column;
        gap: 12px;
    }

    .logo-box {
        width: 105px;
        height: 105px;
    }

    .name {
        gap: 10px;
        flex-direction: column;
        align-items: center;
    }

    .form-header h1,
    .form-header h2 {
        font-size: 34px;
        margin: 0;
    }

    .title-box {
        font-size: 16px;
        padding: 9px 18px;
        width: 100%;
        max-width: 340px;
    }

    .section-title {
        font-size: 15px;
        padding: 8px 18px;
        margin: 22px 0 14px;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    input,
    textarea,
    select {
        font-size: 15px;
    }

    .gender-options {
        gap: 12px;
        flex-wrap: wrap;
    }

    .Slot {
        width: fit-content;
        margin: 0 auto 12px;
        text-align: center;
    }

    .Time-Slot {
        width: 100%;
        margin: 10px auto 0;
        display: block;
    }

    .upload-row {
        grid-template-columns: 1fr;
        gap: 28px;
        margin-top: 30px;
    }

    .aadhaar-preview,
    .signature-preview {
        width: 100%;
        max-width: 280px;
    }

    .photo-preview {
        width: 130px;
        height: 160px;
    }

    .terms-list {
        font-size: 13px;
        line-height: 1.6;
    }

    .terms-check {
        align-items: flex-start;
        font-size: 13px;
    }

    .submit-btn {
        width: 100%;
        min-width: auto;
        padding: 15px 24px;
        font-size: 16px;
    }
}


/* ---------- VERY SMALL PHONE ----------------------------------- */
@media (max-width: 400px) {
    .form-page {
        padding: 18px;
    }

    .form-header h1,
    .form-header h2 {
        font-size: 28px;
    }

    .logo-box {
        width: 90px;
        height: 90px;
    }

    .title-box {
        font-size: 14px;
        padding: 8px 14px;
    }

    .section-title {
        font-size: 14px;
    }
}