/* ============================================================
   ENROL.CSS — Course Enrollment Page
   Brand: #ff3239 (red) → #030858 (navy)
   ============================================================ */

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ── Body ─────────────────────────────────────────────────── */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    background: #f4f6fb;
    color: #1e2535;
    line-height: 1.6;
}
.radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

.radio-group.stack {
    display: grid; /* override stack */
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #ddd;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    background: #fff;
}

.radio-item:hover {
    border-color: #007bff;
    background: #f8f9ff;
}

.radio-item input {
    margin-right: 8px;
}

.method-note {
    display: block;
    font-size: 12px;
    color: #666;
}

/* ── Page wrapper ─────────────────────────────────────────── */
.enrollment-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 4rem;
}

.enrollment-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Page Header ──────────────────────────────────────────── */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.9rem;
    font-weight: 700;
    color: #030858;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    letter-spacing: -0.3px;
}

.page-header h1 i {
    color: #ff3239;
    font-size: 1.7rem;
}

/* ── Card ─────────────────────────────────────────────────── */
.form-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 28px rgba(3, 8, 88, 0.09);
    overflow: hidden;
}

/* ── Card Header ──────────────────────────────────────────── */
.card-header {
    background: linear-gradient(130deg, #ff3239 0%, #030858 100%);
    padding: 1.3rem 2rem;
    position: relative;
    overflow: hidden;
}

.card-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Ccircle cx='170' cy='30' r='75' fill='rgba(255,255,255,0.04)'/%3E%3Ccircle cx='10' cy='170' r='55' fill='rgba(255,255,255,0.04)'/%3E%3C/svg%3E") no-repeat right top;
    pointer-events: none;
}

.card-header h4 {
    color: #fff;
    font-weight: 600;
    font-size: 1.05rem;
    margin: 0;
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* ── Card Body ────────────────────────────────────────────── */
.card-body {
    padding: 2rem 2.25rem 2.5rem;
}

/* ── Form Sections ────────────────────────────────────────── */
.form-section {
    margin-bottom: 2rem;
}

.form-section:last-of-type {
    margin-bottom: 1.25rem;
}

.form-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #030858;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-bottom: 1.15rem;
    padding-bottom: 0.55rem;
    border-bottom: 2px solid #ffd3d5;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.form-section-title i {
    color: #ff3239;
    font-size: 0.85rem;
    width: 14px;
    text-align: center;
}

/* ── Grid Layouts ─────────────────────────────────────────── */
.form-grid {
    display: grid;
    gap: 1rem;
}

.form-grid.three-col {
    grid-template-columns: repeat(3, 1fr);
}

.form-grid.two-col {
    grid-template-columns: repeat(2, 1fr);
}

/* ── Field Group (label + input) ──────────────────────────── */
.field-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

/* Remove bottom margin when field-group is inside a grid */
.form-grid .field-group {
    margin-bottom: 0;
}

.field-group label,
.field-label {
    font-size: 0.835rem;
    font-weight: 600;
    color: #374151;
    display: block;
}

/* ── Inputs & Selects ─────────────────────────────────────── */
.form-control,
.form-select {
    width: 100%;
    padding: 0.68rem 0.95rem;
    border: 1.8px solid #dde3ef;
    border-radius: 9px;
    font-size: 0.9rem;
    font-family: inherit;
    color: #1e2535;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: auto;
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: #ff3239;
    box-shadow: 0 0 0 3px rgba(255, 50, 57, 0.1);
}

.form-control::placeholder {
    color: #b0bac8;
    font-size: 0.875rem;
}

/* ── Payment Section wrapper ──────────────────────────────── */
.payment-section {
    background: linear-gradient(135deg, #fff8f8 0%, #f2f4ff 100%);
    border: 1.5px solid #ffd6d8;
    border-radius: 14px;
    padding: 1.5rem 1.75rem;
}

/* ── Radio Groups ─────────────────────────────────────────── */
.radio-group {
    display: flex;
    gap: 0.55rem;
}

/* wrap: horizontal, wraps to next line */
.radio-group.wrap {
    flex-wrap: wrap;
    flex-direction: row;
}

/* stack: vertical list, full width items */
.radio-group.stack {
    flex-direction: column;
    gap: 0.4rem;
}

/* ── Radio Item ───────────────────────────────────────────── */
.radio-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border: 1.8px solid #dde3ef;
    border-radius: 9px;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
    user-select: none;
}

/* Stacked items take full row width */
.radio-group.stack .radio-item {
    width: 100%;
}

.radio-item:hover {
    border-color: #ff3239;
    background: #fff5f5;
}

.radio-item.active {
    border-color: #ff3239;
    background: #fff0f0;
    box-shadow: 0 1px 6px rgba(255, 50, 57, 0.12);
}

/* Native radio button */
.radio-item input[type="radio"] {
    accent-color: #ff3239;
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    cursor: pointer;
}

/* Icon next to radio button — direct child of label */
.radio-item > i {
    width: 15px;
    text-align: center;
    font-size: 0.88rem;
    color: #6b7280;
    flex-shrink: 0;
}

.radio-item.active > i {
    color: #ff3239;
}

/* Main label text */
.radio-item > span {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    flex: 1;
}

.radio-item.active > span {
    color: #b0001f;
}

/* Small note text (e.g. "Outside India only") */
.radio-item > .method-note {
    font-size: 0.75rem;
    color: #9ca3af;
    font-style: normal;
    white-space: nowrap;
    margin-left: auto;
    padding-left: 0.5rem;
}

/* ── Payment Detail Panels ────────────────────────────────── */
.payment-details-box {
    background: #fff;
    border: 1.5px solid #e4e9f5;
    border-radius: 12px;
    padding: 1.35rem 1.5rem;
    margin-top: 0.75rem;
    margin-bottom: 0;
}

/* QR section */
.scan-label {
    font-size: 0.88rem;
    color: #555;
    margin-bottom: 0.6rem;
}

.upi-id-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

#eazypayId {
    font-weight: 700;
    font-size: 0.93rem;
    color: #030858;
    background: #eef2ff;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    display: inline-block;
    letter-spacing: 0.3px;
}

.copy-btn {
    background: #fff;
    border: 1.5px solid #dde3ef;
    border-radius: 6px;
    padding: 0.28rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s;
}

.copy-btn:hover {
    border-color: #ff3239;
    color: #ff3239;
    background: #fff5f5;
}

.qr-img {
    display: block;
    margin: 0 auto;
    max-width: 260px;
    width: 100%;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

/* Bank details */
.bank-heading {
    display: block;
    color: #ff3239;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.bank-table {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.bank-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 0.5rem;
    font-size: 0.865rem;
    padding: 0.38rem 0.65rem;
    border-radius: 6px;
    background: #f9fbff;
}

.bank-row span:first-child {
    font-weight: 600;
    color: #4b5563;
}

.bank-row span:last-child {
    color: #1e2535;
}

/* Credit card info */
.cc-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #374151;
    flex-wrap: wrap;
}

.cc-info i {
    color: #030858;
    flex-shrink: 0;
}

.cc-info a {
    color: #ff3239;
    font-weight: 600;
    text-decoration: none;
}

.cc-info a:hover {
    text-decoration: underline;
}

/* ── Upload Area ──────────────────────────────────────────── */
.upload-area {
    border: 2px dashed #a5b4fc;
    border-radius: 12px;
    padding: 1.75rem 1.5rem;
    background: #f8faff;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.upload-area:hover {
    background: #eef2ff;
    border-color: #ff3239;
}

.upload-icon {
    font-size: 2rem;
    color: #667eea;
    display: block;
    margin-bottom: 0.5rem;
}

.upload-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
}

.upload-hint {
    font-size: 0.8rem;
    color: #9ca3af;
    margin: 0;
}

.upload-area input[type="file"] {
    display: none;
}

/* ── Terms Row ────────────────────────────────────────────── */
.terms-row {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin-bottom: 1.25rem;
}

.terms-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 3px;
    accent-color: #ff3239;
    flex-shrink: 0;
    cursor: pointer;
}

.terms-row label {
    font-size: 0.86rem;
    color: #555;
    line-height: 1.5;
    cursor: pointer;
}

.terms-row a {
    color: #ff3239;
    font-weight: 600;
    text-decoration: none;
}

.terms-row a:hover {
    text-decoration: underline;
}

/* ── Submit Button ────────────────────────────────────────── */
.submit-btn {
    width: 100%;
    background: linear-gradient(130deg, #ff3239 0%, #030858 100%);
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    letter-spacing: 0.2px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    transition: left 0.5s;
}

.submit-btn:hover::before { left: 100%; }

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(255, 50, 57, 0.32);
}

.submit-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ── Utility ──────────────────────────────────────────────── */
.hidden        { display: none !important; }
.text-center   { text-align: center; }

/* ── Responsive — Tablet (≤ 900px) ───────────────────────── */
@media (max-width: 900px) {
    .enrollment-page {
        padding: 1.75rem 1rem 3rem;
    }

    .card-body {
        padding: 1.75rem 1.5rem 2rem;
    }

    /* 3-col → 2-col at tablet */
    .form-grid.three-col {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 2-col stays as-is at tablet — enough room */
    .form-grid.two-col {
        grid-template-columns: repeat(2, 1fr);
    }

    .payment-section {
        padding: 1.35rem 1.5rem;
    }
}

/* ── Responsive — Mobile (≤ 640px) ───────────────────────── */
@media (max-width: 640px) {
    .enrollment-page {
        padding: 1rem 0.75rem 2.5rem;
    }

    .page-header h1 {
        font-size: 1.4rem;
    }

    .page-header h1 i {
        font-size: 1.25rem;
    }

    .card-header {
        padding: 1.1rem 1.25rem;
    }

    .card-body {
        padding: 1.25rem 1rem 1.75rem;
    }

    /* All grids → single column on mobile */
    .form-grid.three-col,
    .form-grid.two-col {
        grid-template-columns: 1fr;
    }

    .payment-section {
        padding: 1.1rem 1rem;
    }

    /* Wrap radio group → stack on mobile too */
    .radio-group.wrap {
        flex-direction: column;
    }

    .radio-group.wrap .radio-item {
        width: 100%;
    }

    /* method-note: move below on narrow screens */
    .radio-item > .method-note {
        margin-left: 0;
        padding-left: 0;
        white-space: normal;
        font-size: 0.72rem;
    }

    .bank-row {
        grid-template-columns: 95px 1fr;
        font-size: 0.82rem;
    }

    .qr-img {
        max-width: 210px;
    }

    .upload-area {
        padding: 1.25rem 1rem;
    }

    .submit-btn {
        font-size: 0.95rem;
        padding: 0.9rem 1.25rem;
    }

    .form-section {
        margin-bottom: 1.5rem;
    }
}

/* ── Responsive — Small phones (≤ 400px) ─────────────────── */
@media (max-width: 400px) {
    .page-header h1 {
        font-size: 1.2rem;
        flex-direction: column;
        gap: 0.2rem;
    }

    .form-section-title {
        font-size: 0.76rem;
    }

    .bank-row {
        grid-template-columns: 1fr;
        gap: 0.1rem;
    }

    .bank-row span:first-child {
        font-size: 0.72rem;
        color: #9ca3af;
        text-transform: uppercase;
        letter-spacing: 0.4px;
    }

    .radio-item > .method-note {
        display: block;
        margin-top: 0.2rem;
    }
}