/* ============================================================
   iMortgage4U Funnel – Brand-Compliant Styles
   Fonts   : Poppins 400/500/600
   Colors  : Deep Navy #323b60 | Title #0A2540 | Text #2E3440/#3A3F45
   BG      : gradient #F7F8FA → #EAF1F8
   ============================================================ */

/* ---------- Wrapper ---------- */
.im4u-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 40px;
    min-height: 60vh;
    background: linear-gradient(180deg, #F7F8FA 0%, #EAF1F8 100%);
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* ---------- Screens ---------- */
.im4u-screen {
    display: none;
    width: 100%;
    text-align: center;
    animation: im4uFade .35s ease-out;
}
.im4u-screen.active { display: block; }

@keyframes im4uFade {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Back button ---------- */
.im4u-back {
    position: absolute;
    top: 30px;
    left: 40px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #fff;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    color: #3A3F45;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all .25s;
    z-index: 10;
}
.im4u-back:hover {
    border-color: #323b60;
    color: #323b60;
    background: #F7F8FA;
}

/* ---------- Typography ---------- */
.im4u-h1 {
    font-size: 48px;
    font-weight: 600;
    color: #0A2540;
    line-height: 1.2;
    margin: 0 0 24px;
    padding: 0 20px;
}
.im4u-sub {
    font-size: 20px;
    color: #3A3F45;
    margin: 0 0 12px;
}
.im4u-q {
    font-size: 18px;
    color: #3A3F45;
    margin: 32px 0 56px;
}
.im4u-body { margin-bottom: 56px; }

/* ---------- Buttons ---------- */
.im4u-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    max-width: 960px;
    margin: 0 auto;
}

.im4u-btn {
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: #ffffff;
    background: #1B4FBE;
    border: none;
    border-radius: 50px;
    padding: 18px 44px;
    min-width: 220px;
    cursor: pointer;
    transition: background .2s ease, box-shadow .2s ease;
    box-shadow: 0 4px 14px rgba(27,79,190,.28);
    line-height: 1.3;
}
.im4u-btn:hover {
    background: #163FA0;
    box-shadow: 0 6px 18px rgba(27,79,190,.38);
}
.im4u-btn:active { 
    background: #0F318A;
    box-shadow: 0 2px 8px rgba(27,79,190,.25);
}

/* ---------- Spinner ---------- */
.im4u-spinner {
    width: 56px; height: 56px;
    margin: 36px auto 0;
    border: 5px solid #DDE5F0;
    border-top-color: #1B4FBE;
    border-radius: 50%;
    animation: im4uSpin 1s linear infinite;
}
@keyframes im4uSpin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   Landing-page styles (used inside post content)
   ============================================================ */
.im4u-lp {
    font-family: 'Poppins', sans-serif;
    max-width: 960px;
    margin: 60px auto;
    padding: 0 20px;
}

/* Hero */
.im4u-lp-hero {
    text-align: center;
    margin-bottom: 60px;
}
.im4u-lp-hero h1 {
    font-size: 40px;
    font-weight: 600;
    color: #0A2540;
    margin-bottom: 16px;
    line-height: 1.25;
}
.im4u-lp-hero p {
    font-size: 18px;
    color: #3A3F45;
    margin-bottom: 8px;
}

/* Form card */
.im4u-form-card {
    background: #fff;
    padding: 52px 60px;
    border-radius: 16px;
    box-shadow: 0 6px 28px rgba(50,59,96,.10);
    max-width: 620px;
    margin: 0 auto;
}
.im4u-form-card h2 {
    font-size: 26px;
    font-weight: 600;
    color: #0A2540;
    text-align: center;
    margin-bottom: 32px;
}

/* Form elements */
.im4u-field { margin-bottom: 20px; }
.im4u-field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #2E3440;
    margin-bottom: 7px;
}
.im4u-field input,
.im4u-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 13px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    color: #2E3440;
    transition: border-color .2s;
}
.im4u-field input:focus,
.im4u-field textarea:focus {
    outline: none;
    border-color: #1B4FBE;
    box-shadow: 0 0 0 3px rgba(27,79,190,.12);
}

/* Submit */
.im4u-submit {
    display: block;
    width: 100%;
    padding: 17px;
    background: #1B4FBE;
    color: #fff !important;
    border: none;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: background .25s, transform .2s;
    box-shadow: 0 4px 14px rgba(27,79,190,.30);
    margin-top: 8px;
}
.im4u-submit:hover {
    background: #163FA0;
    transform: translateY(-2px);
}

/* Success message */
.im4u-success {
    background: #F0FDF4;
    border: 2px solid #22C55E;
    border-radius: 14px;
    padding: 40px 28px;
    text-align: center;
    color: #15803D;
}
.im4u-success-icon {
    width: 60px;
    height: 60px;
    background: #22C55E;
    color: #fff;
    border-radius: 50%;
    font-size: 28px;
    font-weight: 700;
    line-height: 60px;
    margin: 0 auto 20px;
}
.im4u-success strong {
    display: block;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 14px;
    color: #15803D;
}
.im4u-success p {
    font-size: 16px;
    line-height: 1.8;
    margin: 0 0 28px;
    color: #166534;
}
.im4u-return {
    display: inline-block;
    padding: 13px 32px;
    background: #1B4FBE;
    color: #fff !important;
    border-radius: 50px;
    text-decoration: none !important;
    font-weight: 500;
    font-size: 15px;
    transition: background .2s;
}
.im4u-return:hover { background: #163FA0; }

/* Error message */
.im4u-error-msg {
    background: #FEF2F2;
    border: 2px solid #EF4444;
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 20px;
    color: #991B1B;
    font-size: 15px;
}
.im4u-error-msg a { color: #1B4FBE; }

/* ============================================================
   Realtor Hub
   ============================================================ */
.im4u-realtor {
    font-family: 'Poppins', sans-serif;
    max-width: 960px;
    margin: 60px auto;
    padding: 0 20px;
    text-align: center;
}
.im4u-realtor h1 {
    font-size: 40px;
    font-weight: 600;
    color: #0A2540;
    margin-bottom: 14px;
}
.im4u-realtor .sub { font-size: 18px; color: #3A3F45; margin-bottom: 8px; }

.im4u-video-box {
    background: #F7F8FA;
    border: 3px dashed #1B4FBE;
    border-radius: 14px;
    padding: 80px 40px;
    margin: 48px auto;
    max-width: 820px;
}
.im4u-video-box p { color: #1B4FBE; font-size: 18px; font-weight: 600; margin: 0 0 10px; }
.im4u-video-box small { color: #6B7280; font-size: 14px; }

/* Hub action buttons - equal width, clearly visible */
.im4u-hub-btns {
    display: flex;
    gap: 28px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 48px;
}
.im4u-hub-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 260px;
    min-height: 64px;
    padding: 16px 24px;
    background: #1B4FBE !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    border-radius: 50px;
    box-shadow: 0 4px 14px rgba(27,79,190,.35);
    transition: background .25s, transform .2s, box-shadow .25s;
    border: none;
    cursor: pointer;
}
.im4u-hub-btn:hover {
    background: #163FA0 !important;
    transform: translateY(-3px);
    color: #ffffff !important;
    text-decoration: none !important;
    box-shadow: 0 8px 22px rgba(27,79,190,.45);
}
.im4u-hub-btn:visited,
.im4u-hub-btn:focus,
.im4u-hub-btn:active {
    color: #ffffff !important;
    text-decoration: none !important;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
    .im4u-wrap   { padding: 70px 20px 56px; }
    .im4u-h1     { font-size: 30px; }
    .im4u-back   { top: 16px; left: 20px; padding: 8px 14px; font-size: 13px; }
    .im4u-btns   { flex-direction: column; align-items: center; }
    .im4u-btn    { width: 100%; max-width: 380px; font-size: 16px; padding: 16px 28px; }
    .im4u-form-card { padding: 36px 28px; }
    .im4u-lp-hero h1 { font-size: 30px; }
    .im4u-hub-btns { flex-direction: column; align-items: center; }
    .im4u-hub-btn  { width: 100%; max-width: 360px; text-align: center; }
}
@media (max-width: 480px) {
    .im4u-h1     { font-size: 26px; }
    .im4u-sub, .im4u-q { font-size: 16px; }
    .im4u-lp-hero h1 { font-size: 26px; }
}
