.hidden {
    display: none !important;
    opacity: 0;
    height: 0;
    overflow: hidden;
    transition: opacity 0.5s ease, height 0.5s ease;
}

#preview {
    width: 110px;
    height: 110px;
    border: 2px solid #eaeaea;
    border-radius: 12px;
    object-fit: cover;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.container-bhim {
    width: 100%;
    height: auto;
    max-width: 800px;
    margin: 15px auto;
    padding: 0 5px;
    transition: all 0.4s ease-in-out;
}

.card {
    /* background-color: #ffffff; */
    /* border: 1px solid #eaeaea; */
    border-radius: 12px;
    height: auto;
    min-height: 200px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    align-items: center;
    transition: all 0.3s ease;
}

.card1 {
    border-radius: 10px;
    padding: 20px;
    width: 400px;
    height: 100%;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: white;
}

.card1:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#formStep2{
    padding-left: 15px;
    padding-right: 15px;
}

.btn-custom {
    color: #ffffff;
    background-color: #0d83fd;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-custom:hover {
    color: #ffffff;
    background-color: #0d83fd;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(78, 87, 255, 0.2);
}

.btn-secondary {
    background-color: #e6e6e6;
    color: #333;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #d9d9d9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Stepper container styling */
.stepper-container {
    position: relative;
    margin: 10px 0 30px;
    text-align: center;
}

/* Progress bar */
.progress-bar {
    position: absolute;
    left: 0;
    top: 12px;
    width: 100%;
    height: 4px;
    background: #e8eaff;
    z-index: 0;
    border-radius: 4px;
    overflow: hidden;
}

.progress {
    height: 100%;
    width: 0;
    background: linear-gradient(to right, #0d83fd, #2f30c9);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Circular steps */
.stepper {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 1;
    margin-bottom: 15px;
}

.step {
    text-align: center;
    flex: 1;
    position: relative;
    transition: all 0.3s ease;
}

/* Step circles with improved transitions */
.step .circle {
    width: 30px;
    height: 30px;
    line-height: 30px;
    background: #e8eaff;
    color: #8e8e8e;
    border-radius: 50%;
    display: inline-block;
    font-weight: bold;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.85rem;
    border: 2px solid transparent;
}

/* Active step color with animation */
.step.active .circle {
    background: #0d83fd;
    color: white;
    transform: scale(1.15);
    box-shadow: 0 3px 10px rgba(78, 87, 255, 0.3);
    border-color: #e8eaff;
}

.step p {
    margin-top: 8px;
    font-weight: 500;
    color: #757575;
    font-size: 0.8rem;
    transition: color 0.3s ease;
}

.step.active p {
    color: #0d83fd;
    font-weight: 600;
}

.card-header {
    background-color: #0d83fd !important;
    color: white;
    padding: 6px;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 6px;
}

/* Form adjustments */
.form-control, .form-select {
    padding: 8px 12px;
    height: calc(2em + 0.5rem + 2px);
    font-size: 0.9rem;
    border-radius: 8px;
    border: 1px solid #d0d0d0;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #0d83fd;
    box-shadow: 0 0 0 0.2rem rgba(78, 87, 255, 0.15);
}

.btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
}

label {
    margin-bottom: 5px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #444;
}

/* Required field indicator */
label.required:after {
    content: " *";
    color: #0d83fd;
}

.mb-3 {
    margin-bottom: 0.5rem !important;
}

.mb-2 {
    margin-bottom: 0.4rem !important;
}

.mb-1 {
    margin-bottom: 0.2rem !important;
}

.mt-2 {
    margin-top: 0.4rem !important;
}

h4 {
    font-size: 1rem;
    margin-bottom: 6px;
}

/* Image upload area */
#dropArea {
    border: 2px dashed #c8d0ff;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    margin-top: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    background-color: #f5f7ff;
    transition: all 0.3s ease;
}

#dropArea:hover {
    background-color: #eef1ff;
    border-color: #0d83fd;
}

/* Responsive layout adjustments */
@media (max-width: 768px) {
    .container-bhim {
        margin: 10px auto;
        padding: 0;
    }
    
    .card {
        padding: 15px;
        border-radius: 10px;
    }
    
    .card1 {
        width: 100%;
        max-width: 350px;
        margin: 0 auto;
    }
    
    #preview {
        width: 90px;
        height: 90px;
    }
    
    .form-control, .form-select {
        font-size: 0.85rem;
    }
}

/* Snackbar styles */
#snackbar {
    visibility: hidden;
    min-width: 250px;
    margin-left: -125px;
    background-color: #0d83fd;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 12px;
    position: fixed;
    z-index: 2000;
    left: 50%;
    top: 20px;
    font-size: 0.85rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#snackbar.show {
    visibility: visible;
    animation: snackbarFadeIn 0.5s, snackbarFadeOut 0.5s 2.5s;
}

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

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

#mobileVerification {
    margin-bottom: 15px;
    min-height: 320px;
    width: 100%;
}

/* Form step transitions */
#formStep1, #formStep2 {
    opacity: 1;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(0);
}

#formStep1.hidden, #formStep2.hidden {
    opacity: 0;
    transform: translateX(-30px);
}

#formStep1.slide-in, #formStep2.slide-in {
    animation: slideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

#formStep1.slide-out, #formStep2.slide-out {
    animation: slideOut 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateX(40px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-40px);
    }
}

/* Container fade effects */
#mobileVerification, #membershipForm {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobileVerification.hidden, #membershipForm.hidden {
    display: none;
    opacity: 0;
    transform: translateY(30px);
}

/* Loading overlay enhancement */
#loadingOverlay {
    background-color: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(3px);
    transition: all 0.3s ease;
}

#loadingOverlay .spinner-border {
    width: 3rem;
    height: 3rem;
}

.join-now-btn:hover {
    background-color: #0d83fd !important;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(78, 87, 255, 0.25) !important;
}

/* Input validation states */
.form-control.is-invalid {
    border-color: #d32f2f;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-valid {
    border-color: #4CAF50;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Style for Aadhaar number input in the "in progress" state */
#aadhaar_number.is-invalid[style*="border-color: #FFA500"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23FFA500' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23FFA500' stroke='none'/%3e%3c/svg%3e");
}

/* Initial state for containers when loaded with member ID */
.container-bhim:not(.hidden) {
    min-height: auto;
    opacity: 1;
    transition: opacity 0.3s ease;
}

#membershipForm:not(.hidden) {
    opacity: 1;
    height: auto;
    overflow: visible;
    display: block;
    transform: none;
}

/* Fix for black space */
.container > .row {
    margin-bottom: 20px;  /* Add consistent bottom margin */
}