/* =========================================================
   AI Security registration form
   Visual language: charcoal / olive / lime, aligned with hero
========================================================= */

section#form {
    position: relative;
    overflow: hidden;
    padding: 76px 20px 88px;
    background:
        radial-gradient(circle at 16% 12%, rgba(157, 166, 79, .10), transparent 28%),
        radial-gradient(circle at 86% 82%, rgba(226, 255, 89, .055), transparent 25%),
        linear-gradient(180deg, #090d13 0%, #0b1014 52%, #090d13 100%);
}

section#form::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent);
}

section#form .page {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
}

section#form .consult-copy {
    max-width: 780px;
    margin: 0 auto 30px;
    text-align: center;
}

section#form .consult-copy h2 {
    margin: 0 0 12px;
    color: #fff;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 900;
    line-height: 1.25;
    text-align: center;
}

section#form .consult-copy p {
    margin: 0;
    color: rgba(235, 242, 236, .78);
    font-size: 17px;
    line-height: 1.8;
    text-align: center;
}

/* Main form card */
section#form .Form {
    position: relative;
    padding: 40px;
    border: 1px solid rgba(200, 217, 122, .24);
    border-radius: 20px;
    background:
        linear-gradient(145deg, rgba(21, 28, 27, .97), rgba(12, 17, 21, .98));
    box-shadow:
        0 24px 60px rgba(0, 0, 0, .32),
        inset 0 1px 0 rgba(255, 255, 255, .035);
}

section#form .Form::before {
    content: "";
    position: absolute;
    top: 0;
    left: 28px;
    right: 28px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, #9da64f 20%, #e2ff59 50%, #9da64f 80%, transparent);
    opacity: .8;
}

section#form .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 23px 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

section#form .form-field,
section#form .course-interest,
section#form .send {
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: left;
}

/* Labels */
section#form .form-field > label,
section#form .form-field > p,
section#form .course-interest > p {
    display: block;
    margin: 0 0 9px;
    color: rgba(246, 248, 242, .93);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: .02em;
    text-align: left;
}

section#form .form-field > label span {
    margin-left: 4px;
    color: #e2ff59;
}

/* Inputs / select / textarea */
section#form .form-field > input[type="text"],
section#form .form-field > select,
section#form .form-field > textarea {
    display: block;
    width: 100%;
    border: 1px solid rgba(191, 204, 183, .24);
    border-radius: 10px;
    background: rgba(7, 12, 16, .72);
    color: #f2f5ee;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.5;
    text-align: left;
    outline: none;
    box-sizing: border-box;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

section#form .form-field > input[type="text"],
section#form .form-field > select {
    height: 52px;
    padding: 0 15px;
}

section#form .form-field > textarea {
    min-height: 132px;
    padding: 13px 15px;
    resize: vertical;
}

section#form .form-field > select option {
    background: #11171c;
    color: #f2f5ee;
}

section#form .form-field > input[type="text"]::placeholder,
section#form .form-field > textarea::placeholder {
    color: rgba(219, 229, 220, .45);
}

section#form .form-field > input[type="text"]:hover,
section#form .form-field > select:hover,
section#form .form-field > textarea:hover {
    border-color: rgba(200, 217, 122, .48);
    background: rgba(9, 15, 18, .88);
}

section#form .form-field > input[type="text"]:focus,
section#form .form-field > select:focus,
section#form .form-field > textarea:focus {
    border-color: #b9ce65;
    box-shadow: 0 0 0 4px rgba(185, 206, 101, .12);
    background: rgba(8, 13, 16, .96);
}

/* Course selection */
section#form .course-interest {
    grid-column: 1 / -1;
}

section#form .course-interest-heading {
    margin-bottom: 14px;
}

section#form .course-group {
    position: relative;
    overflow: hidden;
    margin-top: 14px;
    padding: 17px 18px 18px;
    border: 1px solid rgba(203, 213, 192, .15);
    border-radius: 13px;
    background: rgba(7, 12, 16, .52);
}

section#form .course-group:first-of-type {
    margin-top: 0;
}

section#form .course-group::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    background: #b9ce65;
}

section#form .course-group:nth-of-type(1)::before { background: #e2ff59; }
section#form .course-group:nth-of-type(2)::before { background: #9da64f; }
section#form .course-group:nth-of-type(3)::before { background: #c8d97a; }

section#form .course-group-title {
    margin-bottom: 10px;
    color: #d7e893;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.45;
    text-align: left;
}

section#form .course-group:nth-of-type(1) .course-group-title { color: #e2ff59; }
section#form .course-group:nth-of-type(2) .course-group-title { color: #bcc86c; }
section#form .course-group:nth-of-type(3) .course-group-title { color: #d7e893; }

/* ASP.NET CheckBoxList renders a table */
section#form .course-interest .course-checkbox-list {
    width: calc(100% + 12px);
    margin: -6px;
    border-collapse: separate;
    border-spacing: 6px;
    table-layout: fixed;
}

section#form .course-interest .course-checkbox-list td {
    width: 50%;
    height: 66px;
    padding: 12px 14px;
    vertical-align: top;
    border: 1px solid rgba(193, 205, 186, .17);
    border-radius: 9px;
    background: rgba(18, 25, 29, .82);
    color: rgba(240, 244, 238, .86);
    font-size: 14px;
    line-height: 1.55;
    text-align: left;
    box-sizing: border-box;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

section#form .course-interest .course-checkbox-list td:hover {
    border-color: rgba(200, 217, 122, .5);
    background: rgba(32, 41, 34, .92);
}

@supports selector(td:has(input:checked)) {
    section#form .course-interest .course-checkbox-list td:has(input:checked) {
        border-color: rgba(226, 255, 89, .72);
        background: linear-gradient(135deg, rgba(126, 142, 60, .24), rgba(22, 29, 27, .94));
        box-shadow: inset 0 0 0 1px rgba(226, 255, 89, .07);
    }
}

section#form .course-interest input[type="checkbox"] {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin: 3px 8px 0 0;
    vertical-align: top;
    accent-color: #b9ce65;
}

section#form .course-interest label {
    display: inline-block;
    width: calc(100% - 30px);
    margin: 0;
    vertical-align: top;
    color: rgba(240, 244, 238, .88);
    font-size: 18px;
    line-height: 1.55;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
}

/* Branch selection */
section#form .branch-field,
section#form .remarks-field,
section#form .validation-field {
    grid-column: 1 / -1;
    width: 100%;
}

section#form .branch-field table {
    width: calc(100% + 12px);
    margin: -6px;
    border: 0;
    border-collapse: separate;
    border-spacing: 6px;
    table-layout: fixed;
    background: transparent;
}

section#form .branch-field table td {
    width: 25%;
    height: 50px;
    padding: 0 14px;
    vertical-align: middle;
    border: 1px solid rgba(193, 205, 186, .18);
    border-radius: 9px;
    background: rgba(18, 25, 29, .82);
    color: rgba(240, 244, 238, .88);
    font-size: 15px;
    text-align: left;
    white-space: nowrap;
    box-sizing: border-box;
    transition: border-color .18s ease, background .18s ease;
}

section#form .branch-field table td:hover {
    border-color: rgba(200, 217, 122, .5);
    background: rgba(32, 41, 34, .92);
}

@supports selector(td:has(input:checked)) {
    section#form .branch-field table td:has(input:checked) {
        border-color: rgba(226, 255, 89, .72);
        background: linear-gradient(135deg, rgba(126, 142, 60, .24), rgba(22, 29, 27, .94));
    }
}

section#form .branch-field input[type="radio"] {
    width: 16px;
    height: 16px;
    margin: 0 7px 0 0;
    vertical-align: middle;
    accent-color: #b9ce65;
}

section#form .branch-field label {
    margin: 0;
    color: rgba(240, 244, 238, .9);
    vertical-align: middle;
    cursor: pointer;
}

/* Validation image */
section#form .validation-field + li.send {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: -10px;
    text-align: left;
}

section#form .validation-field + li.send img {
    display: inline-block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0;
    padding: 4px;
    border: 1px solid rgba(200, 217, 122, .25);
    border-radius: 8px;
    background: #fff;
}

/* Submit */
section#form .form-grid > li.send:last-child {
    grid-column: 1 / -1;
    width: 100%;
    padding-top: 4px;
    text-align: center;
}

section#form .form-grid > li.send:last-child input[type="submit"] {
    display: inline-block;
    width: 100%;
    max-width: 360px;
    min-height: 56px;
    padding: 0 30px;
    border: 1px solid rgba(226, 255, 89, .28);
    border-radius: 10px;
    background: linear-gradient(90deg, #d7e893 0%, #b9ce65 42%, #8f9e48 76%, #6f7d3e 100%);
    box-shadow: 0 10px 26px rgba(124, 140, 61, .2);
    color: #10150b;
    font-family: inherit;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: .08em;
    cursor: pointer;
    box-sizing: border-box;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

section#form .form-grid > li.send:last-child input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(138, 156, 66, .3);
    filter: brightness(1.07);
}

section#form .form-grid > li.send:last-child input[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 5px 14px rgba(124, 140, 61, .2);
}

section#form .form-grid > li.send:last-child input[type="submit"]:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(226, 255, 89, .12), 0 10px 26px rgba(124, 140, 61, .22);
}

/* Success panel */
section#form .thx {
    max-width: 640px;
    padding: 36px 24px;
    border: 1px solid rgba(200, 217, 122, .28);
    border-radius: 16px;
    background: rgba(16, 23, 22, .95);
    box-shadow: 0 20px 50px rgba(0,0,0,.28);
    text-align: center;
}

section#form .thx p {
    margin: 0 0 20px;
    color: #f6f8f2;
    text-align: center;
    font-size: 20px;
}

section#form .thx a {
    display: inline-block;
    margin-left: 0 !important;
    padding: 10px 30px;
    border-radius: 8px;
    background: linear-gradient(90deg, #d7e893, #9da64f);
    color: #10150b;
    font-size: 17px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}

@media (max-width: 767.98px) {
    section#form {
        padding: 52px 15px 62px;
    }

    section#form .consult-copy {
        margin-bottom: 22px;
    }

    section#form .consult-copy p {
        font-size: 15px;
        line-height: 1.75;
    }

    section#form .Form {
        padding: 27px 18px;
        border-radius: 15px;
    }

    section#form .Form::before {
        left: 18px;
        right: 18px;
    }

    section#form .form-grid {
        display: block;
    }

    section#form .form-field,
    section#form .course-interest,
    section#form .send {
        width: 100%;
        margin-bottom: 20px;
    }

    section#form .course-group {
        padding: 14px;
    }

    section#form .course-interest .course-checkbox-list,
    section#form .course-interest .course-checkbox-list tbody,
    section#form .course-interest .course-checkbox-list tr,
    section#form .course-interest .course-checkbox-list td {
        display: block;
        width: 100%;
    }

    section#form .course-interest .course-checkbox-list {
        margin: 0;
    }

    section#form .course-interest .course-checkbox-list td {
        height: auto;
        min-height: 0;
        margin-bottom: 8px;
        padding: 11px 12px;
    }

    section#form .course-interest .course-checkbox-list tr:last-child td:last-child {
        margin-bottom: 0;
    }

    section#form .branch-field table {
        width: 100%;
        margin: 0;
        border-spacing: 0 8px;
        table-layout: auto;
    }

    section#form .branch-field table,
    section#form .branch-field tbody,
    section#form .branch-field tr,
    section#form .branch-field td {
        display: block;
        width: 100%;
    }

    section#form .branch-field table td {
        height: 46px;
        margin-bottom: 8px;
        padding: 0 12px;
    }

    section#form .form-grid > li.send:last-child {
        margin-bottom: 0;
    }

    section#form .form-grid > li.send:last-child input[type="submit"] {
        max-width: none;
    }
}
