/* ============================================================
   PharmaTALKS — Onboarding Visual Section (v2)
   File: pharmatalks-onboarding.css
   Self-contained: includes fallback CSS variables
   ============================================================ */

/* ---------- CSS Variable fallbacks ---------- */
:root {
    --pharma-primary: #10465f;
    --pharma-secondary: #ed302f;
    --pharma-accent: #10b981;
}

/* ---------- Section shell ---------- */
.pharma-onboarding {
    padding: 5rem 0 5.5rem;
    background:
        linear-gradient(160deg, rgba(237, 48, 47, 0.07), transparent 25%),
        linear-gradient(20deg, rgba(16, 185, 129, 0.1), transparent 36%),
        linear-gradient(180deg, #ffffff 0%, #f4faf9 55%, #eaf3f5 100%);
    position: relative;
    overflow: hidden;
}

.pharma-onboarding::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.28;
    background-image:
        radial-gradient(circle at 14px 14px, rgba(16, 70, 95, 0.13) 1.6px, transparent 2px),
        radial-gradient(circle at 40px 40px, rgba(237, 48, 47, 0.1) 1.2px, transparent 2px);
    background-size: 60px 60px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,0.55), transparent 78%);
    pointer-events: none;
}

.pob-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 2;
}

/* ---------- Section header ---------- */
.pob-header {
    text-align: center;
    margin-bottom: 2rem;
}

.pob-eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--pharma-secondary, #ed302f);
    margin-bottom: 0.5rem;
}

.pob-heading {
    font-size: clamp(1.4rem, 2.8vw, 2rem);
    font-weight: 800;
    color: var(--pharma-primary, #10465f);
    margin: 0;
    line-height: 1.15;
}

.pob-heading span {
    color: var(--pharma-secondary, #ed302f);
}

/* ---------- Formula / stats cards (3-col) ---------- */
.pob-formula {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.pob-formula-card {
    min-height: 100px;
    padding: 1.25rem 1.5rem;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(16, 70, 95, 0.1);
    box-shadow: 0 8px 24px rgba(16, 70, 95, 0.08);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.pob-formula-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(16, 70, 95, 0.14);
}

.pob-formula-card--dark {
    background: var(--pharma-primary, #10465f);
    color: #fff;
    border-color: transparent;
}

.pob-formula-card--red {
    background: var(--pharma-secondary, #ed302f);
    color: #fff;
    border-color: transparent;
}

.pob-f-label {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--pharma-primary, #10465f);
    opacity: 0.72;
    display: block;
}

.pob-formula-card--dark .pob-f-label,
.pob-formula-card--red .pob-f-label {
    color: rgba(255, 255, 255, 0.72);
    opacity: 1;
}

.pob-f-value {
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--pharma-primary, #10465f);
}

.pob-formula-card--dark .pob-f-value,
.pob-formula-card--red .pob-f-value {
    color: #fff;
}

/* =============================================================
   STAGE — Phone + Floating Cards
   Default: stacked (mobile-first), upgraded to 3-col on desktop
   ============================================================= */

.pob-stage {
    position: relative;
    margin-bottom: 2.5rem;
}

/* ---- Phone column ---- */
.pob-phone-col {
    display: flex;
    justify-content: center;
    margin-bottom: 1.75rem;
}

.pob-phone {
    width: 230px;
    border: 9px solid #122d38;
    border-radius: 32px;
    background: #102a35;
    box-shadow: 0 28px 64px rgba(16, 70, 95, 0.22);
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.pob-notch {
    position: absolute;
    left: 50%;
    top: 9px;
    transform: translateX(-50%);
    width: 72px;
    height: 16px;
    background: #122d38;
    border-radius: 0 0 12px 12px;
    z-index: 4;
}

.pob-phone-screen {
    background: linear-gradient(180deg, rgba(255,255,255,0.97), rgba(242,251,247,0.99));
    padding: 42px 18px 20px;
    position: relative;
    z-index: 3;
}

.pob-app-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.pob-app-logo {
    background: var(--pharma-secondary, #ed302f);
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    padding: 4px 9px;
    border-radius: 5px;
    letter-spacing: 0.5px;
}

.pob-skip {
    font-size: 10px;
    color: #657581;
    font-weight: 700;
}

.pob-rx-badge {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #dff8ef, #fff 68%);
    border: 1px solid rgba(16, 70, 95, 0.14);
    box-shadow: 0 12px 28px rgba(16, 70, 95, 0.14);
    margin: 0 auto 10px;
    color: var(--pharma-primary, #10465f);
    font-size: 32px;
    font-weight: 900;
    position: relative;
    z-index: 2;
}

.pob-rx-badge::before,
.pob-rx-badge::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: var(--pharma-secondary, #ed302f);
    transform: rotate(-22deg);
}

.pob-rx-badge::before {
    width: 48px;
    height: 16px;
    right: -6px;
    bottom: 16px;
}

.pob-rx-badge::after {
    width: 16px;
    height: 48px;
    right: 11px;
    bottom: -3px;
    opacity: 0.92;
}

.pob-screen-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--pharma-primary, #10465f);
    text-align: center;
    line-height: 1.2;
    margin: 0 0 5px;
}

.pob-screen-title strong {
    color: var(--pharma-secondary, #ed302f);
}

.pob-screen-copy {
    font-size: 0.65rem;
    color: #385967;
    text-align: center;
    line-height: 1.4;
    margin: 0 0 12px;
    font-weight: 600;
}

.pob-dots {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 10px;
}

.pob-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(16, 70, 95, 0.2);
}

.pob-dot.active {
    width: 18px;
    border-radius: 999px;
    background: var(--pharma-secondary, #ed302f);
}

.pob-cta-btn {
    display: block;
    text-align: center;
    padding: 9px 10px;
    background: var(--pharma-primary, #10465f);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    border-radius: 7px;
    box-shadow: 0 8px 18px rgba(16, 70, 95, 0.2);
    text-decoration: none;
}

/* ---- Onboarding info cards ---- */
.pob-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem;
}

/* On mobile, full width single column */
@media (max-width: 480px) {
    .pob-cards-grid {
        grid-template-columns: 1fr;
    }
}

.pob-card {
    padding: 1.1rem 1rem;
    border-radius: 10px;
    background: #fff;
    border: 1px solid rgba(16, 70, 95, 0.1);
    box-shadow: 0 6px 20px rgba(16, 70, 95, 0.08);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.pob-card:hover {
    box-shadow: 0 12px 30px rgba(16, 70, 95, 0.13);
    transform: translateY(-2px);
}

.pob-card--dark {
    background: var(--pharma-primary, #10465f);
    color: #fff;
    border-color: transparent;
}

.pob-card--full {
    grid-column: 1 / -1;
}

.pob-card-label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--pharma-secondary, #ed302f);
    display: block;
    margin-bottom: 0.4rem;
}

.pob-card--dark .pob-card-label {
    color: rgba(255, 255, 255, 0.7);
}

.pob-card h4 {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--pharma-primary, #10465f);
    margin: 0 0 0.3rem;
    line-height: 1.3;
}

.pob-card--dark h4 {
    color: #fff;
}

.pob-card p {
    font-size: 0.78rem;
    color: #566070;
    margin: 0;
    line-height: 1.5;
}

.pob-card--dark p {
    color: rgba(255, 255, 255, 0.78);
}

/* ---- Chat snippet ---- */
.pob-chat-snip {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(16, 70, 95, 0.12);
    box-shadow: 0 8px 24px rgba(16, 70, 95, 0.1);
    margin-top: 0.9rem;
}

.pob-chat-bar {
    background: #075e54;
    color: #fff;
    padding: 0.65rem 0.9rem;
    font-size: 0.78rem;
    font-weight: 700;
}

.pob-bubble {
    padding: 0.6rem 0.85rem;
    font-size: 0.8rem;
    line-height: 1.4;
    font-weight: 600;
}

.pob-bubble--white {
    background: #fff;
    color: #172d35;
    margin-right: 2rem;
}

.pob-bubble--green {
    background: #d9fdd3;
    color: #172d35;
    margin-left: 2rem;
}

/* ---------- Footer claim cards (2-col) ---------- */
.pob-footer-claims {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2.5rem;
}

.pob-claim {
    padding: 1.25rem 1.5rem;
    border-radius: 10px;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.14);
    transition: transform 0.2s ease;
}

.pob-claim:hover {
    transform: translateY(-2px);
}

.pob-claim--red {
    background: var(--pharma-secondary, #ed302f);
}

.pob-claim--navy {
    background: var(--pharma-primary, #10465f);
}

.pob-claim-label {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    opacity: 0.75;
    display: block;
    margin-bottom: 0.4rem;
}

.pob-claim-value {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.25;
}

/* =============================================================
   DESKTOP LAYOUT: 3-col phone stage (≥ 960px)
   ============================================================= */
@media (min-width: 960px) {
    .pob-stage {
        display: grid;
        /* Left column | Phone (fixed 260px) | Right column */
        grid-template-columns: 1fr 260px 1fr;
        grid-template-rows: 1fr;
        gap: 1.5rem;
        align-items: center;
    }

    /* Left cards column — flex column so 2 cards stack */
    .pob-cards-left {
        grid-column: 1;
        grid-row: 1;
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
        align-self: stretch;
    }

    /* Phone stays in the middle */
    .pob-phone-col {
        grid-column: 2;
        grid-row: 1;
        margin-bottom: 0;
        display: flex;
        justify-content: center;
        align-self: center;
    }

    /* Right cards column — flex column so card + chat snippet stack */
    .pob-cards-right {
        grid-column: 3;
        grid-row: 1;
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
        align-self: stretch;
    }

    /* Chat snippet resets (no margin-top needed inside flex parent) */
    .pob-chat-snip {
        margin-top: 0;
    }

    /* Full-width card modifier: on desktop it's just 1-col already */
    .pob-card--full {
        grid-column: 1;
    }
}

/* =============================================================
   TABLET LAYOUT (481px – 959px) — stacked, phone centred
   ============================================================= */
@media (min-width: 481px) and (max-width: 959px) {
    .pharma-onboarding {
        padding: 3.75rem 0 4.25rem;
    }

    /* Stage: phone centred above cards */
    .pob-stage {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .pob-phone-col {
        order: 1;
        margin-bottom: 1.5rem;
    }

    /* Merge left + right into one unified grid */
    .pob-cards-left {
        order: 2;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.9rem;
        width: 100%;
    }

    .pob-cards-right {
        order: 3;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.9rem;
        width: 100%;
    }

    .pob-chat-snip {
        order: 4;
        margin-top: 0;
        width: 100%;
    }

    /* Formula grid: 3-col still fits on tablet */
    .pob-formula {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.8rem;
    }

    .pob-f-value {
        font-size: 1rem;
    }

    /* Footer claims: 2-col */
    .pob-footer-claims {
        grid-template-columns: 1fr 1fr;
    }
}

/* =============================================================
   MOBILE LAYOUT (≤ 480px)
   ============================================================= */
@media (max-width: 480px) {
    .pharma-onboarding {
        padding: 3rem 0 3.5rem;
    }

    .pob-container {
        padding: 0 1rem;
    }

    .pob-header {
        margin-bottom: 1.5rem;
    }

    .pob-heading {
        font-size: 1.4rem;
    }

    /* Formula: 2-col on small mobile */
    .pob-formula {
        grid-template-columns: 1fr 1fr;
        gap: 0.7rem;
        margin-bottom: 1.75rem;
    }

    /* Last card (red) spans full width */
    .pob-formula-card:last-child {
        grid-column: 1 / -1;
    }

    .pob-formula-card {
        min-height: auto;
        padding: 1rem 1.1rem;
    }

    .pob-f-value {
        font-size: 0.95rem;
    }

    /* Stage: stacked, phone first */
    .pob-stage {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .pob-phone-col {
        order: 1;
        margin-bottom: 1.5rem;
    }

    .pob-phone {
        width: 200px;
    }

    /* Cards: single column */
    .pob-cards-left {
        order: 2;
        display: flex;
        flex-direction: column;
        gap: 0.8rem;
    }

    .pob-cards-right {
        order: 3;
        display: flex;
        flex-direction: column;
        gap: 0.8rem;
    }

    .pob-card--full {
        grid-column: 1;
    }

    .pob-chat-snip {
        order: 4;
        margin-top: 0.8rem;
    }

    /* Footer claims: single col */
    .pob-footer-claims {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin-top: 1.75rem;
    }

    .pob-claim {
        padding: 1rem 1.25rem;
    }

    .pob-claim-value {
        font-size: 0.92rem;
    }
}

/* =============================================================
   VERY SMALL MOBILE (≤ 360px)
   ============================================================= */
@media (max-width: 360px) {
    .pob-formula {
        grid-template-columns: 1fr;
    }

    .pob-formula-card:last-child {
        grid-column: 1;
    }

    .pob-phone {
        width: 185px;
    }

    .pob-f-value {
        font-size: 0.88rem;
    }
}

/* ---------- RTL (Arabic) support ---------- */
[dir="rtl"] .pob-card-label { letter-spacing: 0; }
[dir="rtl"] .pob-chat-snip { direction: rtl; }
[dir="rtl"] .pob-bubble--white { margin-right: 0; margin-left: 2rem; }
[dir="rtl"] .pob-bubble--green { margin-left: 0; margin-right: 2rem; }
[dir="rtl"] .pob-app-top { flex-direction: row-reverse; }