.registration-container {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 92vh;
    padding-top: 4rem;
    padding-bottom: 4rem;
    position: relative;
}

.registration-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 1000px;
    margin: 0 auto;
}

.course-selection {
    background: linear-gradient(135deg, var(--primary) 0%, #a01e22 100%);
    color: white;
    padding: 2rem;
}

.course-selection .row {
    display: flex;
    flex-wrap: wrap;
}

.course-selection .row>[class*="col-"] {
    display: flex;
    flex-direction: column;
}

.course-card {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    padding: 2rem 1.5rem;
    /* Reduced horizontal padding for text fit */
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.course-card>div {
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.course-card:hover::before {
    left: 100%;
}

.course-card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

/* 
           STRICT no-hover state for when deselected but still hovering.
           This class acts as a "shield" that blocks the :hover effects below from happening even if the mouse is sitting right on top of the card.
        */
.course-card.no-hover {
    transform: translateY(0) !important;
    /* Force the card back down */
    background: rgba(255, 255, 255, 0.08) !important;
    /* Reset background opacity */
    border-color: rgba(255, 255, 255, 0.15) !important;
    /* Reset border */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08) !important;
    /* Reset shadow */
}

/* 
           The SHINE Animation Reset:
           The ::before element is a ghostly overlay that creates the "shine" effect. Normally, :hover moves it from left (-100%) to right (100%).
           When we deselect, we add .no-hover. This rule forces the shine to go BACK to the left (-100%), creating that "reverse shine" animation as the card falls down.
        */
.course-card.no-hover::before {
    left: -100% !important;
    transition: left 0.5s;
}

/* controls the shine animation when selected so it doesn't reverse when mousing off */
.course-card.selected::before {
    left: 100%;
}

.course-card.selected {
    background: rgba(255, 255, 255, 0.18);
    border-color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15), 0 0 20px rgba(255, 255, 255, 0.2);
}

.course-card.selected::after {
    content: '✓';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: #fff;
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    animation: checkmark 0.3s ease-in-out;
}

@keyframes checkmark {
    0% {
        transform: scale(0) rotate(180deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
    }
}

.course-price {
    font-size: 2.2rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
    margin: 0.8rem 0;
    position: relative;
    display: inline-block;
}

.original-price {
    text-decoration: line-through;
    opacity: 0.6;
    font-size: 1.1rem;
    margin-right: 0.5rem;
    position: relative;
    color: rgba(255, 255, 255, 0.7);
}

.course-card h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    min-height: 3.5rem;
    text-align: center;
    line-height: 1.3;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.course-card p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.course-card ul {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.course-card ul li {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.course-card ul li i {
    color: #fff;
    margin-right: 0.75rem;
    width: 16px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.form-section {
    padding: 2rem;
}

.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.step {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0.5rem;
    font-weight: 600;
    position: relative;
    transition: all 0.3s ease;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.step.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(206, 37, 42, 0.3);
}

.step.completed {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -28px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 2px;
    background: #e9ecef;
    transition: all 0.3s ease;
}

.step.completed:not(:last-child)::after {
    background: #28a745;
}

.form-floating-custom {
    position: relative;
    margin-bottom: 1.5rem;
}

#lessonQuantity .form-floating-custom {
    margin-bottom: 0;
}

.form-floating-custom .form-control {
    height: 58px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    color: #495057;
}

.form-floating-custom .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(206, 37, 42, 0.25);
}

.form-floating-custom .form-control.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dc3545' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3ccircle cx='12' cy='12' r='10'%3e%3c/circle%3e%3cline x1='15' y1='9' x2='9' y2='15'%3e%3c/line%3e%3cline x1='9' y1='9' x2='15' y2='15'%3e%3c/line%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-floating-custom .form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-floating-custom .form-control.is-valid {
    border-color: #28a745;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2328a745' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='20,6 9,17 4,12'%3e%3c/polyline%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-floating-custom .form-control.is-valid:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

.invalid-feedback {
    font-size: 0.85em;
    color: #d32f2f;
    margin-top: 2px;
    font-weight: 400;
    opacity: 0.95;
}

.form-floating-custom label {
    padding: 1rem 0.75rem;
    color: #6c757d;
}

.payment-section {
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.payment-summary {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
}

.summary-item:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary);
}

.btn-register {
    background: linear-gradient(135deg, var(--primary) 0%, #a01e22 100%);
    border: none;
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(206, 37, 42, 0.3);
    position: relative;
    overflow: hidden;
    color: white;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn-register::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-register:hover::before {
    left: 100%;
}

.btn-register:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(206, 37, 42, 0.4);
    background: linear-gradient(135deg, #d63031 0%, #c0392b 100%);
    color: white !important;
}

.btn-register:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 5px 15px rgba(206, 37, 42, 0.3);
}

.modern-btn {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(10px);
    border-radius: 50px !important;
    padding: 1rem 2rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
    overflow: hidden;
    color: var(--primary) !important;
    text-shadow: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

.modern-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(206, 37, 42, 0.1), transparent);
    transition: left 0.5s;
}

.modern-btn:hover::before {
    left: 100%;
}

.modern-btn:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    background: rgba(255, 255, 255, 1) !important;
}

.modern-btn:disabled {
    opacity: 0.5;
    transform: none !important;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.3) !important;
    color: rgba(255, 255, 255, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: none !important;
}

.modern-btn:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: rgba(255, 255, 255, 0.5) !important;
}

.modern-btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #a01e22 100%) !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 1rem 2rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
    overflow: hidden;
    color: white !important;
    box-shadow: 0 8px 25px rgba(206, 37, 42, 0.3) !important;
    white-space: nowrap;
}

.modern-btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.modern-btn-primary:hover::before {
    left: 100%;
}

.modern-btn-primary:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 15px 35px rgba(206, 37, 42, 0.4) !important;
    background: linear-gradient(135deg, #d63031 0%, #c0392b 100%) !important;
}

.modern-btn-secondary {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(10px);
    border-radius: 50px !important;
    padding: 0.8rem 1.5rem !important;
    font-weight: 500 !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    color: rgba(108, 117, 125, 0.8) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
}

.modern-btn-secondary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    background: rgba(255, 255, 255, 0.2) !important;
    color: #6c757d !important;
}

.modern-btn-link {
    color: #6c757d !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    padding: 0.5rem 1rem !important;
    border-radius: 25px !important;
    position: relative;
    overflow: hidden;
}

.modern-btn-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(108, 117, 125, 0.1), transparent);
    transition: left 0.5s;
}

.modern-btn-link:hover::before {
    left: 100%;
}

.modern-btn-link:hover {
    color: var(--primary) !important;
    transform: translateY(-1px) !important;
    text-decoration: none !important;
}

.stripe-card-element {
    min-height: 300px;
    padding: 30px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    margin-bottom: 20px;
}

.security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.security-badge i {
    margin-right: 0.5rem;
    color: #28a745;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-content {
    background: white;
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.success-message {
    display: none;
    text-align: center;
    padding: 2rem;
}

.success-icon {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .registration-container {
        padding-top: 2rem;
        padding-bottom: 2rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    }

    .registration-card {
        margin: 0.5rem;
        border-radius: 15px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    }

    .course-selection {
        padding: 1.5rem 1rem;
    }

    .form-section {
        padding: 1.5rem 1rem;
    }

    .step-indicator {
        margin-bottom: 1.5rem;
    }

    .step {
        width: 35px;
        height: 35px;
        font-size: 0.85rem;
        margin: 0 0.3rem;
        border: 2px solid #e9ecef;
    }

    .step:not(:last-child)::after {
        right: -20px;
        width: 18px;
    }

    .course-card {
        padding: 1.2rem;
        margin-bottom: 1rem;
        border-radius: 15px;
    }

    .course-price {
        font-size: 1.8rem;
        margin: 0.5rem 0;
    }

    .course-card h4 {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }

    .course-card p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .course-card ul li {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
    }

    .modern-btn,
    .btn-register {
        padding: 0.8rem 1.2rem !important;
        font-size: 0.9rem !important;
        border-radius: 25px !important;
    }

    .modern-btn-secondary {
        padding: 0.7rem 1rem !important;
        font-size: 0.85rem !important;
    }

    .modern-btn-primary {
        padding: 0.8rem 1.2rem !important;
        font-size: 0.9rem !important;
    }

    .d-flex.gap-3 {
        gap: 1rem !important;
    }

    .form-floating-custom .form-control {
        height: 50px;
        font-size: 14px;
    }

    .form-floating-custom label {
        padding: 0.8rem 0.75rem;
        font-size: 14px;
    }

    .payment-summary {
        padding: 1rem;
        margin-top: 1rem;
    }

    .stripe-card-element {
        min-height: 100px;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .registration-container {
        padding-top: 2rem;
        padding-bottom: 2rem;
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }

    .registration-card {
        margin: 0.25rem;
        border-radius: 12px;
    }

    .course-selection {
        padding: 1rem 0.8rem;
    }

    .form-section {
        padding: 1rem 0.8rem;
    }

    .course-card {
        padding: 1rem;
        margin-bottom: 0.8rem;
        border-radius: 12px;
    }

    .course-price {
        font-size: 1.6rem;
        margin: 0.4rem 0;
    }

    .course-card h4 {
        font-size: 1rem;
        margin-bottom: 0.6rem;
        padding-top: 1rem;
    }

    .course-card p {
        font-size: 0.85rem;
        margin-bottom: 0.8rem;
    }

    .course-card ul li {
        font-size: 0.8rem;
        margin-bottom: 0.3rem;
    }

    .step {
        width: 30px;
        height: 30px;
        margin: 0 0.25rem;
        font-size: 0.75rem;
    }

    .step:not(:last-child)::after {
        right: -17px;
        width: 15px;
    }

    .modern-btn,
    .btn-register {
        padding: 0.7rem 1rem !important;
        font-size: 0.85rem !important;
    }

    .modern-btn-secondary {
        padding: 0.6rem 0.8rem !important;
        font-size: 0.8rem !important;
        min-width: 80px;
    }

    .modern-btn-primary {
        padding: 0.7rem 1rem !important;
        font-size: 0.85rem !important;
        min-width: 140px;
    }

    .d-flex.gap-3 {
        gap: 0.8rem !important;
    }

    .d-flex.flex-column.flex-sm-row {
        flex-direction: column !important;
        width: 100%;
    }

    .d-flex.flex-column.flex-sm-row button {
        width: 100%;
        max-width: 200px;
    }

    .form-floating-custom .form-control {
        height: 45px;
        font-size: 13px;
    }

    .form-floating-custom label {
        padding: 0.7rem 0.6rem;
        font-size: 13px;
    }

    h1.display-4 {
        font-size: 2rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }
}
