:root {
    --container-max: 1400px;
    --pad-x: clamp(15px, 3.2vw, 40px);
    --section-space: 60px;
}

@media screen and (max-width: 1024px) {
    :root { --section-space: 45px; }
}

@media screen and (max-width: 767px) {
    :root { --section-space: 40px; }
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

/* ===================== BANNER ===================== */

.rg-banner {
    position: relative;
    width: 100%;
    height: clamp(180px, 22vw, 320px);
    background-image: url("../photos/register-background.webp");
    
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rg-banner-overlay {
    position: absolute;
    inset: 0;
    background: rgba(4, 32, 59, .60);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 var(--pad-x);
}

.rg-banner-overlay h1 {
    color: #fff;
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: clamp(20px, 4vw + 8px, 56px);
    font-weight: 800;
    margin: 0;
    text-align: center;
    letter-spacing: -1px;
    text-shadow: 0 5px 15px rgba(0, 0, 0, .35);
    padding: 0 20px;
    line-height: 1.15;
}

/* ===================== CONTAINER / TITLE ===================== */

.rg-container {
    width: 100%;
    max-width: var(--container-max);
    margin: var(--section-space) auto;
    padding: 0 var(--pad-x);
}

.rg-title {
    text-align: center;
    margin-bottom: clamp(24px, 4vw, 50px);
}

.rg-title p {
    max-width: 720px;
    margin: auto;
    color: #666;
    line-height: 1.8;
}

/* ===================== FORM CARD ===================== */

.rg-form {
    position: relative;
    overflow: hidden;
    background: #fff;
    max-width: 1100px;
    margin: 0 auto;
    padding: clamp(16px, 3vw, 40px);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, .08);
    box-sizing: border-box;
}

.rg-form::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: #082A4D;
}

.rg-section {
    margin-bottom: clamp(24px, 3vw, 36px);
}

.rg-section:last-of-type {
    margin-bottom: 8px;
}

.rg-section-head {
    background: #082A4D;
    color: #fff;
    font-family: "Bricolage Grotesque", sans-serif;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: .3px;
    padding: clamp(12px, 1.6vw, 16px) clamp(16px, 2vw, 22px);
    border-radius: 12px;
    margin-bottom: clamp(18px, 2.4vw, 28px);
}

/* ===================== GRID / INPUTS ===================== */

.rg-grid {
    display: grid;
    gap: clamp(16px, 2vw, 24px) clamp(16px, 2.4vw, 28px);
}

.rg-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.rg-span-3 {
    grid-column: 1 / -1;
}

.rg-input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 600;
    color: #082A4D;
    font-family: "Poppins", sans-serif;
}

.rg-req {
    color: #d9534f;
}

.rg-form input[type="text"],
.rg-form input[type="email"],
.rg-form input[type="tel"],
.rg-form input[type="date"],
.rg-form select {
    width: 100%;
    height: clamp(46px, 3.4vw, 54px);
    padding: 0 clamp(12px, 1.6vw, 16px);
    border: 1px solid #d9d9d9;
    border-radius: 12px;
    outline: none;
    font-size: 18px;
    font-family: "Poppins", sans-serif;
    color: #082A4D;
    box-sizing: border-box;
    transition: .3s;
    background: #fff;
}

.rg-form textarea {
    width: 100%;
    min-height: clamp(90px, 8vw, 120px);
    padding: clamp(11px, 1.6vw, 14px) clamp(12px, 1.6vw, 16px);
    border: 1px solid #d9d9d9;
    border-radius: 12px;
    outline: none;
    font-size: clamp(12.5px, 0.4vw + 13px, 15px);
    font-family: "Poppins", sans-serif;
    color: #082A4D;
    box-sizing: border-box;
    transition: .3s;
    background: #fff;
    resize: vertical;
}

.rg-form input[type="date"] {
    color: #082A4D;
    cursor: pointer;
}

.rg-form select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23082A4D' stroke-width='1.7' fill='none' fill-rule='evenodd' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 36px;
}

.rg-form input::placeholder {
    color: #999;
}

.rg-form input:focus,
.rg-form select:focus,
.rg-form textarea:focus {
    border-color: #082A4D;
    box-shadow: 0 0 0 4px rgba(8, 42, 77, .10);
}

/* ===================== FILE UPLOAD ===================== */

.rg-file-group {
    display: flex;
    flex-direction: column;
}

.rg-file-btn{
    position:relative;
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:14px;
    min-height:54px;
    padding:12px 18px;
    border:1px dashed #d9d9d9;
    border-radius:12px;
    background:#fafbfc;
    cursor:pointer;
}

.rg-file-btn:hover {
    border-color: #082A4D;
    background: #f3f6fa;
}

.rg-file-choose {
    flex-shrink: 0;
    background: #082A4D;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 8px;
    margin-right: 12px;
    white-space: nowrap;
}

.rg-file-name {
    color: #666;
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rg-file-btn input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
}

/* ===================== CAPTCHA ===================== */

.rg-captcha-box {
    display: flex;
    align-items: center;
    gap: clamp(10px, 2vw, 15px);
    margin: clamp(20px, 2.6vw, 28px) 0 10px;
    /* flex-wrap: wrap; */
    max-width: 100%;
}

#rg-captchaImg {
    border: 1px solid #d9d9d9;
    border-radius: 12px;
    height: 55px;
    width: auto;
    max-width: 100%;
    display: block;
    object-fit: contain;
}

#rg-captchaInput {
    min-width: 180px;
    height: 55px;
    padding: 0 18px;
    border: 1px solid #d9d9d9;
    border-radius: 12px;
    font-size: 18px;
    outline: none;
    font-family: "Poppins", sans-serif;
    transition: .3s;
    box-sizing: border-box;
}

#rg-captchaInput:focus {
    border-color: #082A4D;
    box-shadow: 0 0 0 4px rgba(8, 42, 77, .10);
}

.rg-captcha-help {
    color: #666;
    font-size: 18px;
    margin: 0 0 22px;
}

.rg-captcha-help a {
    color: #082A4D;
    font-weight: 600;
    text-decoration: none;
}

.rg-captcha-help a:hover {
    color: #FEB73E;
}

/* ===================== TERMS ===================== */

.rg-terms {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 18px;
    color: #555;
    margin-bottom: 26px;
    cursor: pointer;
    font-family: "Poppins", sans-serif;
}

.rg-terms input[type="checkbox"] {
    width: 25px;
    height: 25px;
    min-width: 18px;
    margin-top: 2px;
    accent-color: #082A4D;
    cursor: pointer;
}

.rg-terms a {
    color: #082A4D;
    font-weight: 600;
    text-decoration: none;
}

.rg-terms a:hover {
    color: #FEB73E;
}

/* ===================== SUBMIT BUTTON ===================== */

.rg-form button[type="submit"] {
    border: none;
    padding: clamp(14px, 1.6vw, 17px);
    border-radius: 12px;
    background: #082A4D;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    font-family: "Bricolage Grotesque", sans-serif;
    cursor: pointer;
    transition: .35s;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.rg-form button[type="submit"]:hover {
    background: #FEB73E;
    color: #082A4D;
    transform: translateY(-2px);
}

.rg-form button[type="submit"]:disabled {
    cursor: not-allowed;
    transform: none;
    opacity: .8;
}

.rg-btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    animation: rg-spin 0.7s linear infinite;
}

#rg-submit-btn.rg-loading .rg-btn-text {
    opacity: 0.75;
}

#rg-submit-btn.rg-loading .rg-btn-spinner {
    display: inline-block;
}

@keyframes rg-spin {
    to { transform: rotate(360deg); }
}

/* ===================== ALERTS ===================== */

.rg-alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 22px;
    font-size: 14.5px;
    line-height: 1.6;
}

.rg-alert-top {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.rg-alert-success {
    background: #e6f7ed;
    color: #1b7a43;
    border: 1px solid #b7e4c7;
}

.rg-alert-error {
    background: #fdeaea;
    color: #b3261e;
    border: 1px solid #f3b8b5;
}

.rg-alert-error ul {
    margin: 0;
    padding-left: 18px;
}

/* ===================== RESPONSIVE ===================== */

@media screen and (max-width: 991px) {
    .rg-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 767px) {
    .rg-grid-3 {
        grid-template-columns: 1fr;
    }

    /* .rg-section-head {
        font-size: 18px;
    } */
}

@media screen and (max-width: 480px) {
    .rg-captcha-box {
        flex-direction: column;
        align-items: stretch;
    }

    #rg-captchaImg {
        width: 100%;
        max-width: 160px;
        height: 55px;
    }

    .rg-file-choose {
        font-size: 18px;
        padding: 6px 10px;
    }
     .rg-file-btn{
    max-width: 336px;
    overflow: hidden;
}

}
@media screen and (max-width: 400px) {
   
        .rg-file-btn{
    max-width: 306px;
    overflow: hidden;
}
}
@media screen and (max-width: 320px) {
    .rg-form {
        padding: 14px;
    }

    .rg-section-head {
        padding: 10px 14px;
    }

}