/* Registration and payment pages — aligned with the academy homepage system. */
body.enrollment-page {
    background: #f4f8f6;
    color: var(--ink);
    overflow-x: hidden;
}

/* Base direction driven by document direction */
.enrollment-main {
    direction: inherit;
    text-align: start;
}

/* English / LTR Layout Rules */
html[dir="ltr"] .enrollment-main {
    direction: ltr !important;
    text-align: left !important;
}
html[dir="ltr"] .register-page-container {
    direction: ltr !important;
}
html[dir="ltr"] .enrollment-hero {
    text-align: left !important;
}
html[dir="ltr"] .form-wrapper-card,
html[dir="ltr"] .offer-summary-card,
html[dir="ltr"] .payment-card,
html[dir="ltr"] .pay-step-card {
    text-align: left !important;
}
html[dir="ltr"] .form-card-heading {
    text-align: left !important;
}
html[dir="ltr"] .form-label {
    text-align: left !important;
}
html[dir="ltr"] .form-control {
    text-align: left !important;
}
html[dir="ltr"] .features-check-list li {
    text-align: left !important;
}
html[dir="ltr"] .submit-button svg {
    transform: rotate(180deg);
}

/* Arabic / RTL Layout Rules */
html[dir="rtl"] .enrollment-main {
    direction: rtl !important;
    text-align: right !important;
}
html[dir="rtl"] .register-page-container {
    direction: rtl !important;
}
html[dir="rtl"] .enrollment-hero {
    text-align: right !important;
}
html[dir="rtl"] .form-wrapper-card,
html[dir="rtl"] .offer-summary-card,
html[dir="rtl"] .payment-card,
html[dir="rtl"] .pay-step-card {
    text-align: right !important;
}
html[dir="rtl"] .form-card-heading {
    text-align: right !important;
}
html[dir="rtl"] .form-label {
    text-align: right !important;
}
html[dir="rtl"] .form-control {
    text-align: right !important;
}
html[dir="rtl"] .features-check-list li {
    text-align: right !important;
}
html[dir="rtl"] .submit-button svg {
    transform: rotate(0deg);
}

/* Technical inputs that must remain LTR */
input[type="tel"],
input[type="email"],
.payment-number {
    direction: ltr !important;
    text-align: left !important;
    unicode-bidi: embed;
}

.enrollment-hero {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 78% 22%, #0b4331 0%, transparent 36%), linear-gradient(135deg, var(--navy), var(--navy-2));
    color: #fff;
    padding: 82px 0 74px;
}
.enrollment-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(#fff1 1px, transparent 1px), linear-gradient(90deg, #fff1 1px, transparent 1px);
    background-size: 76px 76px;
    opacity: .24;
    mask-image: linear-gradient(90deg, transparent 10%, #000);
}
.enrollment-hero .shell {
    position: relative;
    z-index: 1;
}
.enrollment-hero .eyebrow {
    color: var(--gold-light);
    margin-bottom: 16px;
}
.enrollment-hero h1 {
    font-size: clamp(2.7rem, 5vw, 5rem);
    max-width: 830px;
    margin: 0 0 18px;
    color: #fff;
}
.enrollment-hero h1 em {
    color: var(--gold-light);
}
.enrollment-hero p:last-child {
    max-width: 760px;
    margin: 0;
    color: #d6e3dc;
    font-size: clamp(1rem, 1.5vw, 1.18rem);
}
.enrollment-section {
    padding: 78px 0 100px;
    background: linear-gradient(180deg, #f4f8f6 0%, #fff 58%);
}

/* Two-column layout: Form is ~65%, Summary is ~35% */
.register-page-container {
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(320px, 1fr);
    gap: 32px;
    align-items: start;
    width: 100%;
}

.form-wrapper-card,
.offer-summary-card,
.payment-card,
.pay-step-card {
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 18px 45px rgba(6, 48, 34, .06);
}
.form-wrapper-card {
    padding: 36px;
    border-top: 4px solid var(--blue);
    border-radius: 10px;
}
.form-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    padding-bottom: 24px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--line);
}
.form-card-heading span {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    height: 44px;
    border-radius: 50%;
    background: #edf6f2;
    color: var(--blue);
    font: 800 .78rem Manrope, Arial, sans-serif;
}
.form-card-heading h2 {
    font-size: clamp(1.55rem, 2.5vw, 2.15rem);
    margin: 0 0 7px;
}
.form-card-heading p {
    color: var(--muted);
    margin: 0;
    font-size: .9rem;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 18px;
    margin-bottom: 8px;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
.form-group.full-width {
    grid-column: 1 / -1;
}
.form-label {
    font-size: .83rem;
    font-weight: 800;
    color: var(--ink);
}
.form-label .req {
    color: #b4234b;
}
.form-control {
    width: 100%;
    min-height: 52px;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fbfcfe;
    color: var(--ink);
    font: 600 .9rem 'DM Sans', Arial, sans-serif;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.form-control::placeholder {
    color: #8b9aae;
    font-weight: 500;
}
.form-control:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(6, 48, 34, .12);
    background: #fff;
}
select.form-control {
    cursor: pointer;
}
#bundleTracks[hidden] {
    display: none !important;
}
#bundleTracks {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--paper);
}
#bundleTracks legend {
    padding: 0 7px;
    color: var(--blue);
    font-weight: 800;
    font-size: .82rem;
}
#bundleTracks label,
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--ink);
    font-size: .84rem;
    font-weight: 700;
    cursor: pointer;
}
#bundleTracks input,
.checkbox-label input {
    accent-color: var(--blue);
    width: 17px;
    height: 17px;
    flex: none;
    margin-top: 2px;
}
.checkbox-label {
    padding: 16px 18px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 6px;
}
.form-alert {
    display: none;
    padding: 14px 16px;
    margin-bottom: 22px;
    border-radius: 6px;
    font-size: .88rem;
    font-weight: 700;
}
.form-alert.error {
    display: block;
    color: #9f1239;
    background: #fff1f4;
    border: 1px solid #fecdd8;
}
.form-alert.success {
    display: block;
    color: #065f46;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}
.alert-whatsapp-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 16px;
    background: #25D366;
    color: #fff !important;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.15s ease;
    box-shadow: 0 2px 6px rgba(37, 211, 102, 0.3);
}
.alert-whatsapp-link:hover {
    background: #1eb956;
    color: #fff !important;
    transform: translateY(-1px);
}
.alert-whatsapp-link svg {
    flex-shrink: 0;
}
.submit-button {
    width: 100%;
    border: 0;
    cursor: pointer;
    margin-top: 20px;
    min-height: 56px;
    border-radius: 5px;
    font-family: 'DM Sans', Arial, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 700;
}
.submit-button:disabled {
    cursor: wait;
    opacity: .72;
    transform: none;
}
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: enrollment-spin .8s linear infinite;
}
@keyframes enrollment-spin {
    to {
        transform: rotate(360deg);
    }
}
.offer-summary-card {
    position: sticky;
    top: 102px;
    border-top: 4px solid var(--gold);
    border-radius: 10px;
    padding: 30px;
    overflow: hidden;
}
.offer-summary-card::after {
    content: "";
    position: absolute;
    width: 90px;
    height: 90px;
    border-radius: 0 0 100% 0;
    left: 0;
    top: 0;
    background: #c5a86c1f;
    pointer-events: none;
}
.offer-badge-pill {
    display: inline-flex;
    padding: 7px 10px;
    background: #f7f0e0;
    color: #775a22;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
    border-radius: 3px;
    margin-bottom: 18px;
}
.offer-summary-card h3 {
    font-size: clamp(1.45rem, 2.2vw, 1.9rem);
    margin: 0 0 10px;
    color: var(--ink);
}
.offer-summary-card > p {
    color: var(--muted);
    font-size: .88rem;
    line-height: 1.5;
}
.pricing-callout-box {
    background: radial-gradient(circle at 15% 20%, #0b4331, var(--navy) 63%);
    color: #fff;
    padding: 26px 22px;
    margin: 24px 0;
    border: 1px solid #d7b87566;
    border-radius: 8px;
    text-align: center;
    box-shadow: 15px 18px 35px rgba(6, 48, 34, .14);
}
.price-kicker {
    color: #d6e3dc;
    font-size: .7rem;
    letter-spacing: .1em;
    font-weight: 800;
}
.pricing-callout-amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 9px;
    margin: 8px 0;
    direction: ltr;
}
#selectedRegularPrice {
    font-size: 1rem;
    text-decoration: line-through;
    color: #9ab4a9;
    font-weight: 700;
}
#selectedAmount {
    font: 800 clamp(2.6rem, 5vw, 3.7rem) Manrope, Arial, sans-serif;
    color: var(--gold-light);
    line-height: 1;
}
.price-currency {
    color: #fff;
    font-size: .9rem;
    font-weight: 800;
}
.price-note {
    color: #8ce0bd;
    font-size: .72rem;
    font-weight: 700;
}
.offer-summary-card h4 {
    font: 800 .78rem 'DM Sans', Arial, sans-serif;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--blue);
    margin: 28px 0 14px;
}
.features-check-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}
.features-check-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--muted);
    font-size: .84rem;
    font-weight: 600;
    line-height: 1.45;
}
.features-check-list svg {
    color: var(--blue);
    flex: none;
    margin-top: 2px;
}
.offer-support {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .75rem;
    text-align: center;
}
.payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}
.payment-card {
    position: relative;
    padding: 30px;
    border-radius: 9px;
    border-top: 4px solid var(--blue);
}
.payment-card.instapay {
    border-top-color: var(--gold);
}
.payment-logo-badge {
    display: inline-flex;
    padding: 6px 9px;
    margin-bottom: 20px;
    background: #edf6f2;
    color: var(--blue);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .06em;
    border-radius: 3px;
}
.payment-logo-badge.insta {
    background: #f7f0e0;
    color: #775a22;
}
.payment-card h3 {
    font-size: 1.5rem;
    margin: 0 0 7px;
}
.payment-card > p {
    color: var(--muted);
    font-size: .88rem;
}
.payment-card > span {
    display: block;
    color: var(--muted);
    font-size: .78rem;
}
.payment-number-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 20px 0;
    padding: 14px;
    background: var(--navy);
    color: #fff;
    border-radius: 6px;
    direction: ltr;
}
.payment-number {
    font: 800 clamp(1.05rem, 2.5vw, 1.45rem) Manrope, Arial, sans-serif;
    letter-spacing: .05em;
}
.btn-copy {
    border: 1px solid #ffffff4d;
    background: #ffffff12;
    color: #fff;
    padding: 8px 11px;
    border-radius: 4px;
    font: 700 .74rem 'DM Sans', Arial, sans-serif;
    cursor: pointer;
}
.btn-copy:hover {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
}
.payment-steps-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 22px 0 34px;
}
.pay-step-card {
    padding: 22px 18px;
    border-radius: 7px;
    box-shadow: none;
}
.pay-step-num {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #edf6f2;
    color: var(--blue);
    font-weight: 800;
    font-size: .76rem;
    margin-bottom: 24px;
}
.pay-step-card h5 {
    font: 800 .92rem Manrope, Arial, sans-serif;
    margin: 0 0 8px;
    color: var(--ink);
}
.pay-step-card p {
    margin: 0;
    color: var(--muted);
    font-size: .78rem;
}
.pay-step-card code {
    font-family: inherit;
    color: var(--blue);
    font-weight: 800;
}
.payment-form-card {
    max-width: 880px;
    margin: 0 auto;
    border-top-color: var(--gold);
}
.payment-form-heading {
    text-align: center;
    padding-bottom: 24px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--line);
}
.payment-form-heading h2 {
    font-size: clamp(1.55rem, 2.5vw, 2.15rem);
    margin: 0 0 8px;
}
.payment-form-heading p {
    color: var(--muted);
    font-size: .9rem;
    margin: 0;
}
.upload-note {
    font-size: .72rem;
    color: var(--muted);
    margin-top: 2px;
}
.payment-success {
    text-align: center;
    padding: 28px 12px;
}
.payment-success-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 20px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #edf6f2;
    color: var(--blue);
}
.payment-success h3 {
    font-size: 1.8rem;
    margin-bottom: 12px;
}
.payment-success p {
    max-width: 610px;
    margin: 0 auto 24px;
    color: var(--muted);
}
.enrollment-page .site-footer {
    margin-top: 0;
}

/* Desktop Two-Column Layout (Explicit LTR & RTL placement) */
@media(min-width: 901px) {
    .register-page-container {
        display: grid !important;
        grid-template-columns: minmax(0, 1.85fr) minmax(320px, 1fr) !important;
        gap: 32px !important;
        align-items: start !important;
        width: 100% !important;
    }
    /* English LTR: Form on Column 1 (Left), Summary on Column 2 (Right) */
    html[dir="ltr"] .register-page-container {
        direction: ltr !important;
    }
    html[dir="ltr"] .form-wrapper-card {
        grid-column: 1 !important;
        grid-row: 1 !important;
    }
    html[dir="ltr"] .offer-summary-card {
        grid-column: 2 !important;
        grid-row: 1 !important;
    }

    /* Arabic RTL: Form on Column 1 (Right in RTL flow), Summary on Column 2 (Left in RTL flow) */
    html[dir="rtl"] .register-page-container {
        direction: rtl !important;
    }
    html[dir="rtl"] .form-wrapper-card {
        grid-column: 1 !important;
        grid-row: 1 !important;
    }
    html[dir="rtl"] .offer-summary-card {
        grid-column: 2 !important;
        grid-row: 1 !important;
    }
}

/* Responsive Breakpoints */
@media(max-width:900px){
    .register-page-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .offer-summary-card {
        position: static;
        grid-row: 1; /* Price and program summary clearly placed near top on mobile & tablet */
    }
    .form-wrapper-card {
        grid-row: 2; /* Form fields below summary */
    }
    .payment-steps-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width:640px){
    .enrollment-hero {
        padding: 56px 0 48px;
    }
    .enrollment-hero h1 {
        font-size: clamp(2.2rem, 9vw, 3.2rem);
    }
    .enrollment-section {
        padding: 36px 0 60px;
    }
    .form-wrapper-card,
    .offer-summary-card,
    .payment-card {
        padding: 24px 18px;
    }
    .form-card-heading {
        gap: 14px;
    }
    .form-grid,
    .payment-methods-grid,
    .payment-steps-list {
        grid-template-columns: 1fr;
    }
    .form-group.full-width {
        grid-column: auto;
    }
    .payment-number-box {
        align-items: stretch;
        flex-direction: column;
        text-align: center;
    }
    .btn-copy {
        min-height: 44px;
    }
    .pricing-callout-box {
        padding: 22px 16px;
    }
    .form-control {
        min-height: 48px;
        font-size: 16px;
    }
    .submit-button {
        min-height: 52px;
        font-size: 1rem;
    }
    .site-footer .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .site-footer .footer-grid > div:first-child {
        grid-column: 1 / -1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .spinner {
        animation: none;
    }
}
