/* Bemanda Membership pages (0.2.0).
   Covers: index.php (3-card landing), family.php (plan/package picker),
   trial.php and school.php (lead-capture forms). Scoped under .bm-scene so
   nothing leaks into the rest of Moodle. */

:root {
    --bm-blue: #00689b;
    --bm-blue-dark: #06364f;
    --bm-terra: #d2622e;
    --bm-green: #2e9e6b;
    --bm-ink: #22313a;
}

/* ---- Full-bleed background scene wrapper, shared by every page ---- */
.bm-scene {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 30px 16px 60px;
    background-image:
        linear-gradient(rgba(214, 240, 252, .82), rgba(225, 245, 255, .92)),
        var(--bm-hero, none);
    background-repeat: no-repeat, no-repeat;
    background-position: center top, center bottom;
    background-size: cover, min(1100px, 100%) auto;
}

/* =========================================================
   1. LANDING PAGE (index.php) -- three audience cards
   ========================================================= */

/* Full-bleed hero band: photo background with a DENSE brand-blue mask
   (heavier tint than the previous flat gradient), wave curving into the
   white page below. Shared visual language across all 4 membership pages. */
.bm-hero-band {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 60px 16px 150px;
    background-image:
        linear-gradient(rgba(0, 68, 103, .8), rgba(0, 48, 74, .86)),
        url('https://bemandasolutions.com/pluginfile.php/724/mod_folder/content/0/About%20Us%20Images/Animation%20stem%20carousal%201.jpg?forcedownload=1');
    background-size: cover;
    background-position: center 20%;
    overflow: hidden;
    text-align: center;
}
.bm-hero-band--contains-cards { padding-bottom: 70px; }

.bm-hero-band__wave {
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    width: 100%; height: 90px;
    display: block;
}
.bm-hero-band h1 { color: #fff; margin: 0 0 12px; font-size: clamp(28px, 4vw, 44px); font-weight: 800; text-shadow: 0 4px 14px rgba(0,0,0,.35); }
.bm-hero-band p, .bm-hero-band__facts, .bm-hero-band__subjects { color: #eaf5fa; }
.bm-hero-band__facts, .bm-hero-band__subjects { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; font-size: .95rem; font-weight: 600; }
.bm-hero-band .bm-checklist { color: #fff; text-align: left; display: inline-block; list-style: none; padding: 0; margin: 0; }
.bm-hero-band .bm-checklist li { padding: 5px 0 5px 26px; position: relative; }
.bm-hero-band .bm-checklist li::before { content: "✓"; position: absolute; left: 0; font-weight: 900; color: #7fdcb0; }

.bm-landing { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; }
.bm-landing__head { text-align: center; margin-bottom: 30px; }
.bm-landing__head h1 { color: #fff; margin: 0 0 10px; font-size: clamp(28px, 4vw, 44px); font-weight: 800; text-shadow: 0 4px 14px rgba(0,0,0,.35); }
.bm-landing__subjects { color: #eaf5fa; font-weight: 600; font-size: 1.05rem; }

.bm-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; align-items: stretch; margin-top: 10px; }

.bm-card {
    background: #fff;
    border-radius: 20px;
    padding: 42px 32px;
    text-align: center;
    box-shadow: 0 16px 40px rgba(0, 54, 79, .18);
    display: flex;
    flex-direction: column;
    min-height: 420px;
    transition: transform .2s ease, box-shadow .2s ease;
}
.bm-card:hover { transform: translateY(-6px); box-shadow: 0 24px 50px rgba(0, 54, 79, .24); }

.bm-card h2 { color: var(--bm-blue); margin: 6px 0 12px; font-size: 1.6rem; }
.bm-card p { color: #45566b; flex: 1; margin-bottom: 22px; font-size: 1rem; line-height: 1.55; }

.bm-card__icon {
    width: 100px; height: 100px; margin: 0 auto 16px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background-repeat: no-repeat; background-position: center; background-size: 66%;
}
/* Three shades of the SAME brand color, front to back: solid / white / faded. */
.bm-card--solid .bm-card__icon { background-color: #00689b; }
.bm-card--white .bm-card__icon { background-color: #eaf5fa; border: 2px solid #00689b; }
.bm-card--faded .bm-card__icon { background-color: #cfe4ee; }

.bm-card__icon--family { background-image: url('pix/families-icon.png'); }
.bm-card__icon--classroom { background-image: url('pix/classroom-icon.png'); }
.bm-card__icon--school { background-image: url('pix/school-icon.png'); }

.bm-card__btn {
    display: block; text-align: center; text-decoration: none;
    padding: 13px 18px; border-radius: 999px; font-weight: 800;
    margin-bottom: 10px; transition: transform .2s ease, opacity .2s ease;
    font-size: .98rem;
}
.bm-card__btn:hover { transform: translateY(-2px); text-decoration: none; }

/* Button styles -- same brand color at different intensities, used
   consistently across all cards rather than per-card colors. */
.bm-card__btn--primary { background: #00689b; color: #fff; }
.bm-card__btn--faded   { background: #7fb3cf; color: #fff; }
.bm-card__btn--outline { background: #fff; color: #00689b; border: 2px solid #00689b; }
.bm-card__btn--outline:hover { color: #00547f; }

.bm-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; margin: 40px 0 0; color: #3d5763; font-weight: 700; position: relative; z-index: 1; }
.bm-trust span::before { content: "✓ "; color: #00689b; }

/* =========================================================
   2. FAMILY PLAN PAGE (family.php)
   ========================================================= */
/* Full-bleed light brand-tint band sitting below the wave, behind the
   form cards, on the Family/Trial/School pages only -- NOT the landing
   page, which stays on plain white per request. */
.bm-below-wave {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background: #eaf5fa;
    padding-bottom: 60px;
}

.bm-family { position: relative; z-index: 1; max-width: 1000px; margin: 0 auto; padding: 40px 16px 0; }

.bm-steps--onhero { margin-top: 20px; }
.bm-steps--onhero .bm-step { color: rgba(255,255,255,.65); }
.bm-steps--onhero .bm-step__num { background: rgba(255,255,255,.25); color: #fff; }
.bm-steps--onhero .bm-step--active { color: #fff; }
.bm-steps--onhero .bm-step--active .bm-step__num { background: #fff; color: #00689b; }
.bm-steps--onhero .bm-step__sep { background: rgba(255,255,255,.35); }

.bm-steps { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 34px; flex-wrap: wrap; }
.bm-step { color: #7d94a0; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.bm-step__num { width: 26px; height: 26px; border-radius: 50%; background: #dbe7ee; color: #7d94a0;
    display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; }
.bm-step--active { color: var(--bm-blue-dark); }
.bm-step--active .bm-step__num { background: var(--bm-blue); color: #fff; }
.bm-step__sep { width: 40px; height: 2px; background: #dbe7ee; }

.bm-family__row { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-bottom: 28px; }
.bm-family h3 { color: var(--bm-blue-dark); margin: 0 0 12px; }

.bm-toggle { display: inline-flex; border-radius: 10px; overflow: hidden; border: 2px solid var(--bm-blue); }
.bm-toggle__btn { border: none; background: #fff; color: var(--bm-blue); font-weight: 700; padding: 10px 20px; cursor: pointer; position: relative; }
.bm-toggle__btn--active { background: var(--bm-blue); color: #fff; }
.bm-toggle__save { position: absolute; top: -12px; right: -6px; background: #ffc107; color: #7a5400; font-size: .65rem; font-weight: 800; padding: 2px 6px; border-radius: 999px; }

.bm-stepper { display: flex; align-items: center; gap: 14px; }
.bm-stepper__btn { width: 36px; height: 36px; border-radius: 8px; border: 2px solid var(--bm-blue); background: #fff; color: var(--bm-blue); font-weight: 900; font-size: 1.1rem; cursor: pointer; }
#bm-child-count { font-weight: 900; font-size: 1.3rem; color: var(--bm-blue-dark); min-width: 20px; text-align: center; }
.bm-stepper__hint { color: #5b7884; font-size: .85rem; }

.bm-packages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 20px; }
.bm-package {
    position: relative; display: block; background: #fff; border: 2px solid rgba(0,104,155,.28); border-radius: 14px;
    padding: 20px; cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease;
}
.bm-package--selected { border-color: var(--bm-blue); box-shadow: 0 8px 22px rgba(0,104,155,.18); }
.bm-package__radio { position: absolute; top: 16px; right: 16px; }
.bm-package__tag { position: absolute; top: -12px; left: 16px; background: #ffc107; color: #7a5400; font-size: .7rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.bm-package h4 { color: var(--bm-blue-dark); margin: 8px 0 10px; }
.bm-package ul { list-style: none; padding: 0; margin: 0 0 14px; }
.bm-package li { color: var(--bm-ink); font-size: .88rem; padding: 3px 0; }
.bm-package__price { font-size: 1.4rem; font-weight: 900; color: var(--bm-blue); }

.bm-fineprint { color: #5b7884; font-size: .82rem; margin: 10px 0 20px; }
.bm-family__submit { width: 100%; padding: 16px; font-size: 1.05rem; }

.bm-confirmation { text-align: center; max-width: 560px; margin: 60px auto; background: #fff; padding: 40px 30px; border-radius: 18px; box-shadow: 0 14px 34px rgba(0,54,79,.16); }
.bm-confirmation h1 { color: var(--bm-blue-dark); }
.bm-confirmation p { color: var(--bm-ink); margin-bottom: 24px; }

/* =========================================================
   3. SHARED FORM STYLES (trial.php, school.php)
   ========================================================= */
.bm-trialpage, .bm-schoolpage { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; padding: 40px 16px 0; }

.bm-form { background: #fff; border-radius: 18px; padding: 30px; border: 2px solid rgba(0,104,155,.28); border-top: 6px solid var(--bm-blue); box-shadow: 0 16px 40px rgba(0,54,79,.2); }
.bm-form h3 { color: var(--bm-blue-dark); border-bottom: 1px solid #e3eef4; padding-bottom: 8px; margin: 24px 0 16px; }
.bm-form h3:first-child { margin-top: 0; }
.bm-form__row { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.bm-form__row label { color: var(--bm-blue-dark); font-weight: 700; font-size: .92rem; }
.bm-form__row input[type="text"],
.bm-form__row input[type="email"],
.bm-form__row select,
.bm-form__row textarea {
    padding: 10px 12px; border: 1px solid #cfd9de; border-radius: 8px; font-size: 1rem; font-family: inherit;
}
.bm-form__row--checkboxes { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 16px; }
.bm-form__row--checkboxes label { font-weight: 500; color: var(--bm-ink); display: flex; align-items: center; gap: 6px; }
.bm-form__label { font-weight: 700; color: var(--bm-blue-dark); }

/* ---- Course selection inside package cards (family.php) ---- */
.bm-package__hint { color: #5b7884; font-size: .82rem; margin: 0 0 8px; }
.bm-package__course-select {
    width: 100%; padding: 8px 10px; margin-bottom: 14px; border: 1px solid #cfd9de;
    border-radius: 8px; font-size: .92rem; font-family: inherit; color: var(--bm-ink);
}
.bm-package__course-checks { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.bm-checkbox { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--bm-ink); font-weight: 500; cursor: pointer; }
.bm-checkbox input { accent-color: var(--bm-blue); }

/* ---- Alerts (family.php, wizard.php) ---- */
.bm-alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 20px; font-weight: 600; font-size: .92rem; }
.bm-alert--error { background: #fdeaea; color: #a12a2a; border: 1px solid #f3c6c6; }

/* =========================================================
   4. MEMBERSHIP WIZARD (wizard.php) -- MiAcademy-style step flow
   ========================================================= */
.bm-wizard { max-width: 760px; margin: 40px auto 60px; padding: 0 16px; }

.bm-wiztabs { display: flex; gap: 4px; margin-bottom: 0; flex-wrap: wrap; }
.bm-wiztab {
    flex: 1 1 0; min-width: 140px; background: #7fb8c4; color: #eaf6f8;
    padding: 14px 16px; display: flex; align-items: center; justify-content: space-between;
    font-weight: 800; letter-spacing: .02em; font-size: .82rem; text-transform: uppercase;
}
.bm-wiztab__num { font-size: 1.7rem; font-weight: 900; line-height: 1; }
.bm-wiztab--active { background: var(--bm-blue-dark); color: #fff; }
.bm-wiztab--done { background: #4d95a3; color: #fff; }

.bm-wizcard {
    background: #fff; border-radius: 0 0 14px 14px; padding: 34px 30px;
    border: 2px solid rgba(0,104,155,.28); border-top: 6px solid var(--bm-blue);
    box-shadow: 0 16px 40px rgba(0,54,79,.16);
}

.bm-wizrow { margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; max-width: 420px; }
.bm-wizrow label { color: var(--bm-blue-dark); font-weight: 700; font-size: .92rem; }
.bm-wizrow input, .bm-wizrow select {
    padding: 10px 12px; border: 1px solid #cfd9de; border-radius: 8px; font-size: 1rem; font-family: inherit;
}

.bm-wizfieldset { border: 1px solid rgba(0,104,155,.22); border-radius: 12px; padding: 18px 20px 4px; margin-bottom: 20px; }
.bm-wizfieldset legend { color: var(--bm-blue); font-weight: 800; padding: 0 8px; }

.bm-checkout-summary { background: #eaf5fa; border: 2px solid rgba(0,104,155,.28); border-radius: 12px; padding: 22px 24px; margin-bottom: 20px; }
.bm-checkout-summary h3 { color: var(--bm-blue-dark); margin: 0 0 10px; }
.bm-checkout-summary ul { list-style: none; padding: 0; margin: 0 0 12px; }
.bm-checkout-summary li { color: var(--bm-ink); font-size: .9rem; padding: 2px 0; }
.bm-checkout-summary__price { font-size: 1.8rem; font-weight: 900; color: var(--bm-blue); }
.bm-checkout-summary__price span { font-size: 1rem; font-weight: 700; color: #5b7884; }

.bm-optional { color: #8199a4; font-weight: 500; font-size: .82rem; }

/* Stack to a single column on small screens. */
@media (max-width: 860px) {
    .bm-cards, .bm-packages, .bm-family__row { grid-template-columns: 1fr; }
    .bm-scene { background-size: cover, 140% auto; }
    .bm-wiztabs { flex-direction: column; }
    .bm-wiztab { border-radius: 0; }
}
