/* ============================================================
   কাফেলা সদস্য ফরম — ইসলামিক ঘরানার ডিজাইন
   ============================================================ */

.form-page {
    max-width: 980px;
    margin: 0 auto;
    padding: 28px 18px 60px;
}

/* ── ভূমিকা ── */
.form-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(150deg, #0F5132 0%, #0a3622 65%, #062215 100%);
    color: #FFFFFF;
    border-radius: 18px;
    padding: 36px 26px 32px;
    text-align: center;
    margin-bottom: 26px;
    box-shadow: 0 14px 34px rgba(6, 34, 21, 0.22);
}
.form-hero::before,
.form-hero::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border: 1px solid rgba(255, 215, 0, 0.22);
    border-radius: 50%;
    pointer-events: none;
}
.form-hero::before { top: -120px; left: -80px; }
.form-hero::after { bottom: -130px; right: -70px; }
.form-bismillah {
    font-family: 'Amiri', 'Noto Naskh Arabic', serif;
    font-size: 26px;
    color: #FFD700;
    line-height: 1.9;
    margin-bottom: 6px;
}
.form-hero h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #FFFFFF;
}
.form-hero-text {
    max-width: 680px;
    margin: 0 auto 18px;
    font-size: 14.5px;
    color: #d8e8dd;
    line-height: 1.9;
}
.form-hero-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.form-hero-actions .btn { font-size: 14px; }
.form-hero-actions .btn-outline { color: #fff; border-color: rgba(255,255,255,0.55); }

/* ── ফরম কার্ড ── */
.kafela-form { display: block; }
.kafela-form[hidden] { display: none; }

.form-card {
    background: #FFFFFF;
    border: 1px solid #E3EDE6;
    border-radius: 16px;
    padding: 28px 26px;
    margin-bottom: 20px;
    box-shadow: 0 6px 22px rgba(15, 81, 50, 0.06);
    position: relative;
}
.form-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 26px;
    right: 26px;
    height: 3px;
    border-radius: 0 0 4px 4px;
    background: linear-gradient(90deg, #0F5132, #C9933B, #0F5132);
    opacity: 0.9;
}

.form-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
}
.sec-num {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #0F5132;
    color: #FFD700;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    box-shadow: 0 3px 8px rgba(15, 81, 50, 0.25);
}
.form-head h3 {
    margin: 2px 0 4px;
    font-size: 19px;
    color: #0F5132;
}
.form-head p {
    margin: 0;
    font-size: 13.5px;
    color: #6C757D;
}

/* ── ইনপুট গ্রিড ── */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 18px;
}
.field { display: flex; flex-direction: column; }
.field.full { grid-column: 1 / -1; }

.field label,
.field-group legend {
    font-size: 14px;
    font-weight: bold;
    color: #24382d;
    margin-bottom: 7px;
}
.req { color: #C0392B; }

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 11px 13px;
    font-size: 14.5px;
    font-family: inherit;
    color: #1e293b;
    background: #FBFDFB;
    border: 1px solid #D8E5DC;
    border-radius: 10px;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field textarea { resize: vertical; min-height: 58px; }
.field input::placeholder,
.field textarea::placeholder { color: #9aa8a1; }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: #b9d2c1; }
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    background: #FFFFFF;
    border-color: #0F5132;
    box-shadow: 0 0 0 3px rgba(15, 81, 50, 0.12);
}
.field input:invalid:not(:placeholder-shown) { border-color: #E4A29A; }

/* ── রেডিও কার্ড ── */
.field-group { border: 0; padding: 0; margin: 0 0 22px; }
.field-group legend { display: block; margin-bottom: 10px; }
.choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
}
.choice-grid.three { grid-template-columns: repeat(3, 1fr); }

.choice { position: relative; cursor: pointer; }
.choice input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}
.choice > span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    border: 1px solid #D8E5DC;
    background: #FBFDFB;
    border-radius: 10px;
    padding: 11px 14px 11px 34px;
    position: relative;
    transition: all 0.2s;
}
.choice > span::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 15px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 2px solid #B9CFC1;
    background: #FFFFFF;
}
.choice strong { font-size: 14px; color: #24382d; font-weight: bold; }
.choice small { font-size: 12px; color: #6C757D; }
.choice:hover > span { border-color: #0F5132; }
.choice input:checked + span {
    background: #EEF7F1;
    border-color: #0F5132;
    box-shadow: inset 0 0 0 1px #0F5132;
}
.choice input:checked + span::before {
    border-color: #0F5132;
    background: #0F5132;
    box-shadow: inset 0 0 0 3px #FFFFFF;
}
.choice input:focus-visible + span { outline: 3px solid rgba(15, 81, 50, 0.2); outline-offset: 2px; }

/* ── অঙ্গীকার ── */
.pledge-card { background: #FCFEFC; }
.pledge-note {
    background: #F1F8E9;
    border-right: 4px solid #0F5132;
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 14.5px;
    color: #2f4035;
    line-height: 1.9;
    margin-bottom: 16px;
}
.pledge-note i { color: #C9933B; margin-left: 6px; }

.pledge-list {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: grid;
    gap: 9px;
}
.pledge-list li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 14px;
    color: #33463b;
    line-height: 1.8;
}
.pledge-list li i {
    color: #C9933B;
    font-size: 13px;
    margin-top: 5px;
}

.oath-details {
    border: 1px dashed #C9DCCF;
    border-radius: 12px;
    padding: 0;
    margin-bottom: 18px;
    background: #FFFFFF;
}
.oath-details summary {
    cursor: pointer;
    padding: 12px 16px;
    font-weight: bold;
    font-size: 14px;
    color: #0F5132;
    list-style: none;
}
.oath-details summary::-webkit-details-marker { display: none; }
.oath-details summary i { margin-right: 7px; color: #C9933B; }
.oath-details[open] summary { border-bottom: 1px dashed #E3EDE6; }
.oath-body { padding: 14px 18px; font-size: 14px; color: #33463b; line-height: 1.9; }
.oath-body p { margin-bottom: 10px; }
.oath-body ol { padding-left: 20px; margin-bottom: 10px; }
.oath-body li { margin-bottom: 7px; }

/* ── সম্মতি বক্স ── */
.agree-box {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #EEF7F1;
    border: 2px solid #0F5132;
    border-radius: 12px;
    padding: 16px 18px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}
.agree-box:hover { background: #E6F3EB; }
.agree-box input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}
.agree-check {
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    border: 2px solid #0F5132;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: 13px;
    margin-top: 2px;
    transition: all 0.2s;
}
.agree-box input:checked ~ .agree-check {
    background: #0F5132;
    color: #FFD700;
}
.agree-box input:focus-visible ~ .agree-check {
    box-shadow: 0 0 0 3px rgba(15, 81, 50, 0.25);
}
.agree-text strong { display: block; font-size: 15px; color: #0F5132; margin-bottom: 3px; }
.agree-text small { font-size: 13px; color: #456152; line-height: 1.7; display: block; }

.submit-hint {
    margin: 14px 0 0;
    font-size: 13.5px;
    color: #7a6a45;
    background: #FFF8E1;
    border-radius: 8px;
    padding: 10px 14px;
    transition: all 0.25s;
}
.submit-hint.ready {
    color: #0F5132;
    background: #E8F5EC;
}
.submit-hint i { margin-right: 6px; }

/* ── জমা বাটন ── */
.form-submit {
    text-align: center;
    padding: 6px 0 4px;
}
.required-note { font-size: 13px; color: #6C757D; margin-bottom: 12px; }
.btn-gold {
    background: linear-gradient(135deg, #C9933B, #E2B65C);
    color: #0a3622;
    font-size: 16px;
    font-weight: bold;
    padding: 14px 40px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(201, 147, 59, 0.3);
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 9px;
}
.btn-gold:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(201, 147, 59, 0.38); }
.btn-gold:disabled {
    background: #DCE3DE;
    color: #8a9990;
    box-shadow: none;
    cursor: not-allowed;
}

.btn-outline-dark {
    background: transparent;
    color: #0F5132;
    border: 2px solid #0F5132;
}

/* ── সফলতা ── */
.form-success {
    background: linear-gradient(160deg, #0F5132, #0a3622);
    color: #FFFFFF;
    border-radius: 18px;
    padding: 34px 26px;
    text-align: center;
    box-shadow: 0 14px 34px rgba(6, 34, 21, 0.22);
}
.form-success[hidden] { display: none; }
.success-icon { font-size: 44px; color: #FFD700; line-height: 1; margin-bottom: 8px; }
.success-arabic {
    font-family: 'Amiri', serif;
    font-size: 26px;
    color: #FFD700;
    margin-bottom: 8px;
}
.form-success h3 { font-size: 21px; margin-bottom: 10px; color: #FFFFFF; }
.form-success > p { color: #d8e8dd; max-width: 620px; margin: 0 auto 18px; font-size: 14.5px; line-height: 1.9; }
.success-summary {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 16px 20px;
    max-width: 560px;
    margin: 0 auto 20px;
    text-align: left;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 7px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.14);
    font-size: 14px;
}
.summary-row:last-child { border-bottom: 0; }
.summary-row span { color: #b9d0c2; }
.summary-row strong { color: #FFFFFF; text-align: right; }
.success-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.success-actions .btn { font-size: 14px; }
.success-note { font-size: 12.5px !important; color: #a9c2b2 !important; margin-bottom: 0 !important; }

/* ── রেসপন্সিভ ── */
@media (max-width: 720px) {
    .form-page { padding: 20px 14px 44px; }
    .form-grid { grid-template-columns: 1fr; }
    .choice-grid.three { grid-template-columns: 1fr; }
    .form-card { padding: 22px 18px; }
    .form-hero { padding: 28px 18px; }
    .form-hero h2 { font-size: 20px; }
    .form-bismillah { font-size: 22px; }
    .btn-gold { width: 100%; justify-content: center; }
}

/* ── প্রিন্ট ── */
@media print {
    #header-placeholder,
    #footer-placeholder,
    .page-header,
    .form-hero,
    .form-card,
    .form-submit,
    .success-actions {
        display: none !important;
    }
    .form-page { padding: 0; max-width: none; }
    .form-success {
        background: none;
        color: #000;
        box-shadow: none;
        padding: 0;
    }
    .form-success h3 { color: #000; }
    .form-success > p { color: #333; }
    .success-summary { background: none; border-color: #999; }
    .summary-row span { color: #333; }
    .summary-row strong { color: #000; }
    .success-arabic, .success-icon { color: #0F5132; }
    .success-note { color: #444 !important; }
}
