:root {
    --text-color: #ffffff;
    --input-bg: #ffffff;
    --input-text: #000000;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
    pointer-events: none;
}

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

html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 16px !important; /* Override Bootstrap default to maintain original size */
    color: var(--text-color);
    background-color: #000;
    background-image: url('/static/background.png'); 
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2vh 0;
}

/* Ensure Bootstrap doesn't override our custom font sizes */
.form-section,
.form-group,
label,
input,
select,
button,
h2,
h3 {
    font-size: inherit;
}

.content-container {
    width: 100%;
    max-width: 1200px;
    padding: 2vh 3vw;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 4vh);
}

#registrationForm {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.form-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3vw;
    align-items: flex-start;
    margin-bottom: 3vh;
}

/* Typography refinement */
h2.section-title {
    margin: 0 0 18px 0;
    font-size: 1.3rem; 
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
    border-left: 4px solid #cc0000;
    padding-left: 12px;
    line-height: 1.2;
}

label {
    display: block;
    font-size: 0.9rem; 
    margin-bottom: 8px;
    font-weight: 500;
    color: #fff; 
    letter-spacing: 0.3px;
}

.required {
    color: #cc0000;
    font-weight: 700;
    margin-left: 2px;
}

/* Sections */
.form-section {
    margin-bottom: 25px;
    background: rgba(0, 0, 0, 0.3);
    padding: 18px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

/* Inputs Refined */
input[type="text"],
input[type="email"],
input[type="date"],
input[type="tel"],
select {
    width: 100%;
    height: 40px;
    margin-top: 0;
    background-color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px; 
    padding: 0 12px;
    font-size: 0.9rem; 
    color: #000;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23000' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
input[type="tel"]:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}

input[type="text"].error,
input[type="email"].error,
input[type="tel"].error {
    border-color: #cc0000;
    background-color: #fff5f5;
}

input[type="text"].error:focus,
input[type="email"].error:focus,
input[type="tel"].error:focus {
    box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.3);
}

.error-message {
    color: #cc0000;
    font-size: 0.8rem;
    margin-top: 4px;
    display: block;
    font-style: italic;
}

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

.row-inputs {
    display: flex;
    gap: 2vw;
    width: 100%;
}

.form-group.half-width {
    flex: 1;
    width: auto;
}

.note-text {
    display: block;
    margin-top: 8px;
    font-size: 0.8rem; 
    color: #ccc;
    font-style: italic;
    line-height: 1.4;
}

/* Left Column - Scrollable Content */
.left-column {
    
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* Right Column - Sticky Content */
.right-column {
    display: flex;
    flex-direction: column;
    position: relative;
    padding-left: 3vw;
    border-left: 2px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 100px;
    box-sizing: border-box;
    align-self: flex-start;
    z-index: 10; /* Base z-index, will be higher when sticky */
    width: 100%;
}

.right-column-content {
    position: relative;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 100%;
    z-index: 6;
    padding-right: 5px;
    margin-top: 20px;
    align-self: flex-start;
}

/* Desktop/Laptop only - sticky positioning */
@media (min-width: 1025px) {
    .form-grid {
        align-items: start;
    }
    
    .right-column {
        position: relative;
        align-self: start;
        height: fit-content;
        transition: none;
        margin-bottom: 100px;
        padding-top: 0; /* Remove any top padding */
    }
    
    .right-column.sticky-active {
        position: fixed;
        top: 120px; /* Sticky position from top */
        z-index: 100; /* Only high enough to stay above scrolling content */
        max-width: calc((100% - 1200px) / 2 + (1200px * 0.45)); /* Limit to grid column width */
    }
    
    .right-column-content {
        position: relative;
        
        margin-top: 0px; /* Negative margin to move sections higher */
        margin-bottom: 0;
        margin-left: 0;
        margin-right: 0;
        padding: 0;
        width: 100%;
    }
    
    .document-uploads-section {
        padding:0px;
        
        width: 100%;
        box-sizing: border-box;
    }
    
    .info-box {
        padding:0px;
       
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 100px;
    }
}

.document-uploads-section {
    background: rgba(255, 255, 255, 0.1); 
    padding: 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    box-sizing: border-box;
    width: 100%;
}

.info-box {
    padding: 10px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    font-size: 0.9rem; 
    line-height: 1.6;
    border-left: 4px solid #cc0000; 
    color: #eee;
    backdrop-filter: blur(5px);
    box-sizing: border-box;
    width: 100%;
}

.upload-row {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.upload-row:last-child {
    margin-bottom: 0;
}

.upload-label {
    flex: 1;
    min-width: 0;
}

.main-label {
    font-size: 1rem; 
    font-weight: 600;
    display: block;
    color: #fff;
    margin-bottom: 4px;
}

.sub-label {
    font-size: 0.75rem; 
    font-style: italic;
    opacity: 0.85;
    margin-top: 2px;
    display: block;
    color: #ddd;
}

.file-input-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.file-input {
    display: none; /* Hide the default file input */
}

.upload-btn {
    padding: 12px;
    font-size: 0.9rem; 
    background: white;
    color: #000;
    border-radius: 6px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 140px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.upload-btn:hover {
    background: #f0f0f0;
    transform: translateY(-1px);
}

.file-name {
    font-size: 0.85rem;
    color: #fff;
    font-style: italic;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0.9;
}

/* Submit Button */
.submit-section {
    margin-top: 0px;
    
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px ;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
    clear: both;
}

/* Desktop view - align submit button to left */
@media (min-width: 1025px) {
    .submit-section {
        justify-content: flex-start;
        margin-left: 50px;
    }
}

.submit-btn {
    padding: 20px;
    font-size: 1.1rem;
    background: #cc0000;
    color: #fff;
    margin-left: 100px;
    
    
    
    border-radius: 8px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.3s ease;
    min-height: 54px;
    box-shadow: 0 4px 15px rgba(204, 0, 0, 0.3);
}

.submit-btn:hover {
    background: #aa0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(204, 0, 0, 0.4);
}

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

/* Flash Messages */
.flash-messages {
    margin-bottom: 20px;
    z-index: 1000;
}

.flash-message {
    padding: 14px 20px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-weight: 500;
    font-size: 0.95rem;
    animation: slideIn 0.3s ease;
}

.flash-success {
    background: rgba(76, 175, 80, 0.9);
    color: #fff;
    border-left: 4px solid #4caf50;
}

.flash-error {
    background: rgba(244, 67, 54, 0.9);
    color: #fff;
    border-left: 4px solid #f44336;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Info Box */
.info-box h3 {
    text-transform: uppercase;
    font-size: 1rem;
    margin-bottom: 12px;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Checkboxes */
.checkbox-section {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid rgba(255,255,255,0.2);
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 8px;
    position: relative;
}

.checkbox-group {
    display: flex;
    align-items: flex-start; 
    margin-bottom: 15px;
}

.checkbox-group input {
    width: 20px; 
    height: 20px;
    margin-right: 12px;
    margin-top: 2px;
    accent-color: #cc0000;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-group label {
    font-size: 0.9rem; 
    line-height: 1.4;
    cursor: pointer;
    color: #fff;
}

.checkbox-group.error {
    background: rgba(204, 0, 0, 0.2);
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid #cc0000;
    animation: shake 0.3s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Mobile Responsive Styles */
@media (max-width: 1024px) {
    body {
        padding: 1vh 0;
    }
    
    .content-container {
        padding: 2vh 4vw;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 30px;
        display: flex;
        flex-direction: column;
    }
    
    .left-column {
        display: contents;
    }
    
    .left-column > .form-section {
        order: 1;
    }
    
    .right-column {
        order: 2;
        position: relative;
        border-left: none;
        border-top: 2px solid rgba(255, 255, 255, 0.3);
        padding-left: 0;
        padding-top: 15px;
        min-height: auto;
        height: auto;
    }
    
    .right-column-content {
        position: relative;
        top: 0;
        max-height: none;
        overflow-y: visible;
        overflow: visible;
        margin-top: 0;
    }
    
    /* Move checkbox section to appear after right-column (upload files) */
    .checkbox-section {
        order: 3;
        margin-top: 30px;
        margin-bottom: 0;
    }
    
    .form-section {
        padding: 18px;
        margin-bottom: 25px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 0;
    }
    
    .content-container {
        padding: 20px 12px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .form-grid {
        gap: 25px;
        margin-bottom: 25px;
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    
    .left-column {
        display: contents;
        width: 100%;
    }
    
    .left-column > .form-section {
        order: 1;
        width: 100%;
        box-sizing: border-box;
        margin-left: 0;
        margin-right: 0;
    }
    
    .right-column {
        order: 2;
        position: relative;
        height: auto;
        min-height: auto;
        width: 100%;
        padding-left: 0;
        padding-top: 10px;
    }
    
    .right-column-content {
        position: relative;
        top: 0;
        max-height: none;
        overflow-y: visible;
        overflow: visible;
        width: 100%;
        margin-top: 0;
    }
    
    /* Move checkbox section to appear after right-column (upload files) */
    .checkbox-section {
        order: 3;
        margin-top: 30px;
        margin-bottom: 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    h2.section-title {
        font-size: 1.25rem;
        margin-bottom: 15px;
    }
    
    label {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="date"],
    input[type="tel"],
    select {
        height: 48px;
        font-size: 16px;
        padding: 0 14px;
        width: 100%;
        box-sizing: border-box;
    }
    
    select {
        padding-right: 40px;
    }
    
    .form-group {
        margin-bottom: 18px;
        width: 100%;
    }
    
    .form-section {
        padding: 18px 15px;
        margin-bottom: 25px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .row-inputs {
        width: 100%;
        box-sizing: border-box;
    }
    
    .row-inputs {
        flex-direction: column;
        gap: 0;
    }
    
    .row-inputs .form-group.half-width {
        width: 100%;
    }
    
    .document-uploads-section {
        padding: 20px;
        margin-top: 0;
    }
    
    .upload-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .file-input-wrapper {
        width: 100%;
        align-items: flex-start;
    }
    
    .upload-btn {
        width: 100%;
        padding: 14px;
        font-size: 14px;
        min-height: 48px;
        height: 48px;
        min-width: auto;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .file-name {
        font-size: 12px;
        max-width: 100%;
        margin-top: 6px;
    }
    
    .main-label {
        font-size: 0.95rem;
    }
    
    .sub-label {
        font-size: 0.85rem;
    }
    
    .submit-section {
        margin-top: 30px;
        padding: 25px 0;
        margin-bottom: 100px;
        justify-content: center; /* Center on tablet */
    }
    
    .submit-btn {
        width: 100%;
        padding: 16px;
        font-size: 1rem;
        min-height: 52px;
    }
    
    .flash-message {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .info-box {
        padding: 20px;
        font-size: 0.9rem;
    }
    
    .info-box h3 {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    .checkbox-section {
        padding: 20px;
        margin-top: 30px;
        margin-bottom: 20px;
        order: 3;
        position: relative;
        background: rgba(0, 0, 0, 0.9);
        backdrop-filter: blur(10px);
        border-top: 2px solid rgba(255, 255, 255, 0.3);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    }
    
    .checkbox-group {
        margin-bottom: 15px;
    }
    
    .checkbox-group label {
        font-size: 0.85rem;
    }
    
    .note-text {
        font-size: 0.8rem;
        margin-top: 6px;
    }
    
    .submit-section {
        margin-top: 0;
        padding-top: 20px;
        order: 1000;
        justify-content: center; /* Center on mobile */
    }
}

@media (max-width: 480px) {
    .content-container {
        padding: 15px 10px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    h2.section-title {
        font-size: 16px;
        margin: 12px 0;
        padding-left: 8px;
    }
    
    label {
        font-size: 13px;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="date"],
    input[type="tel"],
    select {
        height: 48px; /* Even larger touch target for small screens */
        font-size: 16px;
        width: 100%;
        box-sizing: border-box;
    }
    
    select {
        padding-right: 40px;
    }
    
    .upload-btn {
        padding: 16px;
        font-size: 14px;
        min-height: 48px;
        height: 48px;
        min-width: auto;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .file-name {
        font-size: 11px;
    }
    
    .document-uploads-section {
        padding: 16px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .info-box {
        padding: 16px;
        font-size: 13px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .form-section {
        margin-bottom: 20px;
        padding: 15px 12px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .form-group {
        margin-bottom: 18px;
        width: 100%;
    }
    
    .submit-btn {
        padding: 18px;
        font-size: 15px;
        min-height: 52px;
    }
    
    .form-section {
        margin-bottom: 20px;
    }
    
    .form-group {
        margin-bottom: 18px;
    }
}

/* Responsive fallback for very short screens */
@media (max-height: 700px) {
    .content-container {
        height: auto;
        padding-top: 20px;
        padding-bottom: 20px;
    }
    body {
        overflow-y: auto;
        height: auto;
        display: block;
    }
}
