/* ==========================================================================
   CertsPoint homepage — "Turn Your Preparation Into Progress" hero + feature strip
   Loaded only by frontend/certspoint/pages/home.blade.php. Every selector is cpx-*.
   Desktop geometry is taken from the owner's 1672px-wide reference (values in vw
   = px / 1672 * 100), clamped so text stays readable on smaller and larger screens.
   ========================================================================== */

.cpx-hero,
.cpx-features {
    --cpx-crimson:      #087F8C;   /* teal CTA (name kept): white text 4.75:1 */
    --cpx-crimson-dark: #066874;
    --cpx-icon:         #087E83;
    --cpx-badge-bg:     #E3F2F3;
    --cpx-badge-ink:    #142B45;
    --cpx-badge-icon:   #087F8C;
    --cpx-ink:          #142B45;
    --cpx-ink-soft:     #087E83;   /* "Progress" accent word: 4.46:1 on the hero (large text) */
    --cpx-body:         #526174;
    --cpx-muted:        #64748B;
    --cpx-circle:       #E3F2F3;
    --cpx-rule:         #E2E8F0;
    --cpx-wrap:         min(1572px, 94vw);
}

/* The site stylesheet sets Roboto and #2d3e51 directly on p/div/span/h*; re-assert Inter for both sections. */
.cpx-hero, .cpx-hero *,
.cpx-features, .cpx-features * {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */
.cpx-hero {
    background-color: #f5f5f5;
    overflow: hidden;
    position: relative;
}

.cpx-hero__media {
    background-image: var(--cpx-hero-img);
    background-position: right center;
    background-repeat: no-repeat;
    background-size: cover;
    inset: 0;
    position: absolute;
}

.cpx-hero__inner {
    align-items: flex-start;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    min-height: max(41.39vw, 520px);   /* 692 / 1672 — the image's own aspect */
    padding: clamp(48px, 5.56vw, 108px) 0 clamp(44px, 3.8vw, 72px) 48px;
    position: relative;
    width: var(--cpx-wrap);
    z-index: 1;
}

.cpx-hero__badge {
    align-items: center;
    background: var(--cpx-badge-bg);
    border-radius: 999px;
    color: var(--cpx-badge-ink);
    display: inline-flex;
    font-size: clamp(13px, 1.02vw, 19px);
    font-weight: 600;
    gap: 0.55em;
    letter-spacing: -0.005em;
    line-height: 1.2;
    margin: 0;
    padding: 0.445em 0.95em 0.445em 0.85em;
}

.cpx-hero__badge svg {
    color: var(--cpx-badge-icon);
    flex: 0 0 auto;
    height: 1.75em;
    width: 1.75em;
}

.cpx-hero__title {
    color: var(--cpx-ink);
    font-size: clamp(36px, 3.87vw, 74px);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.067;
    margin: clamp(14px, 1.56vw, 30px) 0 0;
}

.cpx-hero__title span { color: inherit; display: block; }

.cpx-hero .cpx-hero__title .cpx-hero__title-accent { color: var(--cpx-ink-soft); }

.cpx-hero__text {
    color: var(--cpx-body);
    font-size: clamp(15px, 1.245vw, 23px);
    font-weight: 400;
    line-height: 1.585;
    margin: clamp(16px, 1.67vw, 32px) 0 0;
    max-width: 26.9em;
}

.cpx-hero__cta {
    align-items: center;
    background: var(--cpx-crimson);
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(8, 127, 140, 0.18);
    color: #ffffff;
    display: inline-flex;
    font-size: clamp(15px, 1.2vw, 22px);
    font-weight: 600;
    gap: 0.75em;
    justify-content: center;
    letter-spacing: -0.005em;
    line-height: 1;
    margin-top: clamp(20px, 1.79vw, 36px);
    min-height: clamp(50px, 4.07vw, 76px);
    padding: 0 clamp(24px, 2.03vw, 38px);
    text-decoration: none;
    transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.cpx-hero__cta svg { flex: 0 0 auto; height: 1.15em; transition: transform .18s ease; width: 1.15em; }

.cpx-hero__cta:hover,
.cpx-hero__cta:focus {
    background: var(--cpx-crimson-dark);
    box-shadow: 0 10px 24px rgba(8, 127, 140, 0.26);
    color: #ffffff;
    text-decoration: none;
}

.cpx-hero__cta:hover svg { transform: translateX(3px); }

.cpx-hero__cta:focus-visible {
    outline: 3px solid #142B45;
    outline-offset: 3px;
}

/* ── Feature strip ────────────────────────────────────────────────────── */
.cpx-features {
    background: #ffffff;
    padding: 52px 0 56px;
}

.cpx-features__grid {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    list-style: none;
    margin: 0 auto;
    padding: 0 0 0 8px;
    width: var(--cpx-wrap);
}

.cpx-feature {
    align-items: flex-start;
    box-sizing: border-box;
    display: flex;
    gap: 30px;
    padding: 0 20px 0 53px;
    position: relative;
}

.cpx-feature:first-child { padding-left: 42px; }

.cpx-feature + .cpx-feature::before {
    background: var(--cpx-rule);
    content: '';
    height: 90px;
    left: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
}

.cpx-feature__icon {
    align-items: center;
    background: var(--cpx-circle);
    border-radius: 50%;
    color: var(--cpx-icon);
    display: inline-flex;
    flex: 0 0 66px;
    height: 66px;
    justify-content: center;
    width: 66px;
}

.cpx-feature__icon svg { height: 31px; width: 31px; }

.cpx-feature__body { padding-top: 7px; min-width: 0; }

.cpx-feature__title {
    color: var(--cpx-ink);
    font-size: 18.5px;
    font-weight: 600;
    letter-spacing: -0.005em;
    line-height: 1.25;
    margin: 0 0 10px;
}

.cpx-feature__text {
    color: var(--cpx-muted);
    font-size: 16.25px;
    line-height: 1.6;
    margin: 0;
}

/* Reference line breaks for the descriptions on wide layouts; natural wrapping elsewhere. */
.cpx-feature__br { display: none; }
@media (min-width: 1280px) { .cpx-feature__br { display: inline; } }

/* ── Laptop 1024–1279: same split layout, tighter copy column ─────────── */
@media (min-width: 1024px) and (max-width: 1279.98px) {
    .cpx-hero__inner { min-height: 500px; padding-top: 44px; }
    .cpx-hero__title { font-size: 40px; }
    .cpx-hero__text { font-size: 15px; max-width: 24em; }
    .cpx-features { padding: 44px 0 48px; }
    .cpx-feature, .cpx-feature:first-child { flex-direction: column; gap: 14px; padding-left: 28px; }
    .cpx-feature__body { padding-top: 0; }
    .cpx-feature__icon { flex-basis: auto; height: 56px; width: 56px; }
    .cpx-feature__icon svg { height: 26px; width: 26px; }
    .cpx-feature__title { font-size: 17px; }
    .cpx-feature__text { font-size: 15px; }
}

/* ── Tablet & mobile (<1024): copy first, then the full image ─────────── */
@media (max-width: 1023.98px) {
    .cpx-hero { background: linear-gradient(180deg, #f7f7f7 0%, #f5f5f5 100%); }
    .cpx-hero__inner {
        min-height: 0;
        padding: 48px 32px 36px;
        width: 100%;
    }
    .cpx-hero__title { font-size: clamp(34px, 5.6vw, 52px); }
    .cpx-hero__text { font-size: 17px; max-width: 34em; }
    .cpx-hero__media {
        aspect-ratio: 1.6;
        background-position: 100% center;
        inset: auto;
        position: relative;
        width: 100%;
    }

    .cpx-features { padding: 40px 0 44px; }
    .cpx-features__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; width: 100%; padding: 0 32px; }
    .cpx-feature, .cpx-feature:first-child { gap: 18px; padding: 0 16px 0 0; }
    .cpx-feature + .cpx-feature::before { display: none; }
    .cpx-feature__icon { flex-basis: 58px; height: 58px; width: 58px; }
    .cpx-feature__icon svg { height: 27px; width: 27px; }
}

@media (max-width: 767.98px) {
    .cpx-hero__inner { padding: 36px 20px 28px; }
    .cpx-hero__title { font-size: clamp(30px, 9vw, 40px); }
    .cpx-hero__text { font-size: 16px; }
    .cpx-hero__cta { min-height: 52px; padding: 0 26px; font-size: 16px; }
    .cpx-hero__media { aspect-ratio: 1.22; background-position: 91% center; }

    .cpx-features { padding: 32px 0 36px; }
    .cpx-features__grid { grid-template-columns: 1fr; padding: 0 20px; row-gap: 22px; }
    .cpx-feature, .cpx-feature:first-child { padding: 0; }
    .cpx-feature__title { font-size: 17px; margin-bottom: 6px; }
    .cpx-feature__text { font-size: 15px; }
}

@media (max-width: 359.98px) {
    .cpx-hero__badge { font-size: 12.5px; }
    .cpx-hero__cta { padding: 0 20px; font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
    .cpx-hero__cta,
    .cpx-hero__cta svg { transition: none; }
    .cpx-hero__cta:hover svg { transform: none; }
}
