/* ==========================================================================
   PSB Luqman Al Hakim - Enroll Form Redesign (100% Match to Design Reference)
   ========================================================================== */

:root {
    --psb-teal-dark: #004b4e;
    --psb-teal: #005a5e;
    --psb-teal-medium: #00757a;
    --psb-teal-accent: #008489;
    --psb-teal-light: #28a2a8;
    --psb-teal-pastel: #bfebe4;
    --psb-teal-soft: #daf3ef;
    --psb-gold: #d4a946;
    --psb-gold-light: #f5eed3;
    --psb-bg-cream: #f8faf9;
    --psb-border-soft: #d6e3e5;
    --psb-border-card: #eaf0f0;
    --psb-text-dark: #0b393d;
    --psb-text-body: #1c3b40;
    --psb-text-muted: #6b8287;
    --psb-text-dim: #8b9ea2;
    --psb-card-shadow: 0 4px 18px rgba(0, 50, 50, 0.035);
    --psb-radius-card: 16px;
    --psb-radius-input: 10px;
}

* {
    box-sizing: border-box;
}

html, body.enroll-body {
    background-color: var(--psb-bg-cream);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--psb-text-body);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Base Pattern Background */
.enroll-bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../assets/psb/patterns/islamic-pattern-seamless.png');
    background-repeat: repeat;
    background-size: 380px 380px;
    opacity: 0.12;
    pointer-events: none;
    z-index: 0;
}

/* Top Subtle Rosettes */
.enroll-top-rosette-left {
    position: fixed;
    top: -60px;
    left: -60px;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(212, 169, 70, 0.14) 0%, rgba(212, 169, 70, 0) 70%);
    pointer-events: none;
    z-index: 0;
}

.enroll-top-rosette-right {
    position: fixed;
    top: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 90, 94, 0.09) 0%, rgba(0, 90, 94, 0) 70%);
    pointer-events: none;
    z-index: 0;
}

/* Bottom Architectural Ornaments */
.enroll-deco-bottom-left {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 285px;
    max-width: 21vw;
    height: auto;
    pointer-events: none;
    z-index: 1;
    display: block;
}

.enroll-deco-bottom-right {
    position: fixed;
    right: 0;
    bottom: 0;
    width: 268px;
    max-width: 19vw;
    height: auto;
    pointer-events: none;
    z-index: 1;
    display: block;
}

.enroll-deco-bottom-mosque {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 680px;
    max-width: 50vw;
    opacity: 0.38;
    pointer-events: none;
    z-index: 0;
}

/* Master Page Wrapper */
.enroll-page-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 34px 50px 34px;
    box-sizing: border-box;
}

/* ==========================================================================
   Top Navigation (Back Button)
   ========================================================================== */
.enroll-top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 0 4px;
}

.enroll-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    background-color: #ffffff;
    border: 1.5px solid var(--psb-border-soft);
    border-radius: 999px;
    color: var(--psb-teal);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 50, 50, 0.04);
    transition: all 0.2s ease;
}

.enroll-back-btn:hover {
    background-color: #e6f6f3;
    color: var(--psb-teal-dark);
    border-color: var(--psb-teal-light);
    transform: translateX(-2px);
    text-decoration: none;
}

.enroll-back-btn svg {
    transition: transform 0.2s ease;
}

.enroll-back-btn:hover svg {
    transform: translateX(-2px);
}

.enroll-footer-back {
    text-align: center;
    margin-top: 14px;
}

.enroll-footer-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--psb-text-muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.enroll-footer-back-link:hover {
    color: var(--psb-teal);
    text-decoration: underline;
}

/* ==========================================================================
   Header Section
   ========================================================================== */
.enroll-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 4px;
}

.enroll-header-brand {
    display: flex;
    align-items: center;
    gap: 18px;
}

.enroll-header-logo {
    width: 82px;
    height: 82px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 3px 8px rgba(0, 60, 64, 0.12));
}

.enroll-header-titles {
    display: flex;
    flex-direction: column;
}

.enroll-header-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--psb-teal-dark);
    line-height: 1.15;
    margin: 0;
    letter-spacing: -0.3px;
}

.enroll-header-subtitle {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--psb-teal-accent);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-top: 3px;
}

.enroll-header-desc {
    font-size: 13px;
    color: var(--psb-text-muted);
    margin: 3px 0 0 0;
    font-weight: 400;
}

.enroll-header-motto {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.enroll-header-star-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    justify-content: center;
}

.enroll-header-star-line {
    width: 56px;
    height: 1.5px;
    background: linear-gradient(90deg, transparent, rgba(212, 169, 70, 0.6));
}

.enroll-header-star-line.right {
    background: linear-gradient(90deg, rgba(212, 169, 70, 0.6), transparent);
}

.enroll-header-star-icon {
    width: 18px;
    height: 18px;
    color: var(--psb-gold);
    display: flex;
    align-items: center;
    justify-content: center;
}

.enroll-header-motto-text {
    font-size: 13.5px;
    font-weight: 600;
    color: #4b676e;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* ==========================================================================
   Main Grid Layout (Stepper | Form | Sidebar)
   ========================================================================== */
.enroll-main-grid {
    display: grid;
    grid-template-columns: 165px 1fr 356px;
    gap: 26px;
    align-items: start;
    position: relative;
}

/* ==========================================================================
   Left Stepper (Vertical Flow Matched Exactly to Cards)
   ========================================================================== */
.enroll-stepper {
    position: relative;
    padding-top: 14px;
    display: flex;
    flex-direction: column;
}

.enroll-step-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

#stepIndicator1 {
    margin-bottom: 112px;
}

#stepIndicator2 {
    margin-bottom: 236px;
}

#stepIndicator3 {
    margin-bottom: 138px;
}

#stepIndicator4 {
    margin-bottom: 0;
}

.enroll-step-line {
    position: absolute;
    left: 17px;
    top: 36px;
    width: 2px;
    background-color: #dbe4e4;
    z-index: 1;
}

#stepLine1 {
    height: 112px;
}

#stepLine2 {
    height: 236px;
}

#stepLine3 {
    height: 138px;
}

.enroll-step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #e2ebec;
    color: #5b757b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    transition: all 0.25s ease;
}

.enroll-step-item.active .enroll-step-circle {
    background-color: var(--psb-teal);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 90, 94, 0.25);
}

.enroll-step-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #5b757b;
    line-height: 1.35;
    padding-top: 2px;
    transition: color 0.25s ease;
}

.enroll-step-item.active .enroll-step-label {
    color: var(--psb-teal);
    font-weight: 800;
}

/* ==========================================================================
   Middle Form Cards
   ========================================================================== */
.enroll-form-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.enroll-card {
    background-color: #ffffff;
    border: 1px solid var(--psb-border-card);
    border-radius: var(--psb-radius-card);
    box-shadow: var(--psb-card-shadow);
    padding: 18px 24px 20px 24px;
    position: relative;
    box-sizing: border-box;
    transition: box-shadow 0.2s ease;
}

.enroll-card:hover {
    box-shadow: 0 6px 22px rgba(0, 50, 50, 0.05);
}

.enroll-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.enroll-card-badge {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: var(--psb-teal-pastel);
    color: var(--psb-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    flex-shrink: 0;
}

.enroll-card-header-text {
    display: flex;
    flex-direction: column;
}

.enroll-card-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--psb-text-dark);
    margin: 0;
    line-height: 1.25;
}

.enroll-card-desc {
    font-size: 12.5px;
    color: var(--psb-text-muted);
    margin: 2px 0 0 0;
    font-weight: 400;
}

/* Form Groups & Controls */
.enroll-form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 12px;
}

.enroll-form-row-2col:last-child {
    margin-bottom: 0;
}

.enroll-form-col {
    display: flex;
    flex-direction: column;
}

.enroll-form-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--psb-text-body);
    margin-bottom: 5px;
}

.enroll-form-row-h {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 16px;
}

.enroll-form-row-h:last-child {
    margin-bottom: 0;
}

.enroll-form-row-h.align-top {
    align-items: flex-start;
}

.enroll-form-label-fixed {
    width: 145px;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--psb-text-body);
    margin: 0;
    padding-top: 2px;
}

.enroll-form-control-wrap {
    flex: 1;
    min-width: 0;
}

/* Clean Custom Input & Select */
.enroll-input,
.enroll-select,
.enroll-textarea {
    width: 100%;
    font-family: inherit;
    font-size: 13px;
    color: var(--psb-text-dark);
    background-color: #ffffff;
    border: 1.5px solid var(--psb-border-soft);
    border-radius: var(--psb-radius-input);
    padding: 8.5px 14px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    outline: none;
}

.enroll-input::placeholder,
.enroll-textarea::placeholder {
    color: #9cb1b5;
    font-weight: 400;
}

.enroll-input:focus,
.enroll-select:focus,
.enroll-textarea:focus {
    border-color: var(--psb-teal-light);
    box-shadow: 0 0 0 3px rgba(40, 162, 168, 0.15);
    background-color: #ffffff;
}

.enroll-input.is-invalid,
.enroll-select.is-invalid,
.enroll-textarea.is-invalid,
.enroll-captcha-input.is-invalid {
    border-color: #e53e3e !important;
    background-color: #fff9f9 !important;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.15) !important;
}

.enroll-error-feedback {
    color: #d93838;
    font-size: 11.5px;
    font-weight: 600;
    margin-top: 4px;
    display: none;
}

.enroll-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2347686d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    padding-right: 34px;
    cursor: pointer;
    transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.enroll-select.is-loading {
    opacity: 0.75;
    background-color: #f7faf9 !important;
    cursor: wait !important;
}

@keyframes ajaxHighlightPulse {
    0% { border-color: #0b5c60; box-shadow: 0 0 0 3px rgba(11, 92, 96, 0.25); background-color: #f0faf8; }
    50% { border-color: #14b8a6; box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.2); background-color: #f5fcfb; }
    100% { border-color: var(--psb-border-soft); box-shadow: none; background-color: #ffffff; }
}

.enroll-select.ajax-updated {
    animation: ajaxHighlightPulse 1s ease-out;
}

.enroll-textarea {
    resize: vertical;
    min-height: 56px;
    line-height: 1.45;
}

.enroll-input-phone {
    max-width: 250px;
}

/* Card 3 Multi Inline Controls */
.enroll-form-inline-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.enroll-form-label-inline {
    font-size: 13px;
    font-weight: 700;
    color: var(--psb-text-body);
    margin: 0;
    white-space: nowrap;
    padding-left: 8px;
    padding-right: 4px;
}

.enroll-form-label-inline.fixed-w {
    width: 90px;
    text-align: right;
}

.enroll-input-year {
    width: 90px;
    flex-shrink: 0;
}

/* Card 4 - Captcha Box */
.enroll-captcha-box {
    background-color: #fff9e6;
    border: 1px solid #faeed0;
    border-radius: 12px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 2px;
}

.enroll-captcha-formula {
    font-size: 19px;
    font-weight: 800;
    color: var(--psb-text-dark);
    letter-spacing: 0.5px;
}

.enroll-captcha-input {
    width: 105px;
    height: 38px;
    background-color: #ffffff;
    border: 2px solid var(--psb-teal-light);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    color: var(--psb-text-dark);
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.enroll-captcha-input:focus {
    box-shadow: 0 0 0 3px rgba(40, 162, 168, 0.25);
}

/* Submit Button */
.enroll-submit-btn {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #026065 0%, #034b4f 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 15.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 20px rgba(3, 75, 79, 0.25);
    transition: all 0.25s ease;
    margin-top: 2px;
}

.enroll-submit-btn:hover {
    background: linear-gradient(135deg, #026f75 0%, #03575c 100%);
    box-shadow: 0 10px 24px rgba(3, 75, 79, 0.35);
    transform: translateY(-1px);
}

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

.enroll-submit-btn svg {
    flex-shrink: 0;
}

/* ==========================================================================
   Right Sidebar Card
   ========================================================================== */
.enroll-sidebar-card {
    background-color: #ffffff;
    border: 1px solid var(--psb-border-card);
    border-radius: 18px;
    box-shadow: var(--psb-card-shadow);
    overflow: hidden;
    position: sticky;
    top: 20px;
}

.enroll-sidebar-banner-img {
    width: 100%;
    height: auto;
    display: block;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
}

.enroll-sidebar-content {
    padding: 20px 20px 22px 20px;
}

.enroll-sidebar-title {
    font-size: 16.5px;
    font-weight: 800;
    color: var(--psb-text-dark);
    margin: 0 0 16px 0;
    line-height: 1.2;
}

.enroll-tips-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.enroll-tip-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.enroll-tip-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #daf3ef;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.enroll-tip-text {
    display: flex;
    flex-direction: column;
    padding-top: 1px;
}

.enroll-tip-heading {
    font-size: 13.5px;
    font-weight: 700;
    color: #11393e;
    margin: 0 0 2px 0;
    line-height: 1.3;
}

.enroll-tip-desc {
    font-size: 12px;
    color: var(--psb-text-muted);
    margin: 0;
    line-height: 1.45;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 1200px) {
    .enroll-main-grid {
        grid-template-columns: 145px 1fr 320px;
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .enroll-main-grid {
        grid-template-columns: 1fr;
    }
    .enroll-stepper {
        display: none;
    }
    .enroll-sidebar-card {
        position: static;
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    .enroll-page-wrapper {
        padding: 16px 14px 60px 14px;
    }
    .enroll-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
    .enroll-header-motto {
        align-self: flex-start;
    }
    .enroll-form-row-2col {
        grid-template-columns: 1fr;
    }
    .enroll-form-row-h {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .enroll-form-label-fixed {
        width: 100%;
    }
    .enroll-form-inline-group {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    .enroll-form-label-inline {
        padding-left: 0;
    }
    .enroll-input-phone {
        max-width: 100%;
    }
    .enroll-input-year {
        width: 100%;
    }
    .enroll-deco-bottom-left,
    .enroll-deco-bottom-right,
    .enroll-deco-bottom-mosque {
        display: none;
    }
}
