/* =====================================================================
   McAfee Membership Page Template Styles
   ===================================================================== */

.mcafee-membership {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1f2a37;
    line-height: 1.5;
}

.mcafee-membership * { box-sizing: border-box; }

.mcafee-membership sub,
.mcafee-membership sup {
    font-size: 70%;
    line-height: 0;            /* keep superscript from inflating the line box */
    position: relative;
    vertical-align: baseline;  /* override browser default super/sub so it sits tight to the copy */
}
.mcafee-membership sup { top: -0.5em; }
.mcafee-membership sub { bottom: -0.25em; }

.mcafee-membership .mm-plain-link,
.mcafee-membership .mm-plain-link:hover,
.mcafee-membership .mm-plain-link:focus,
.mcafee-membership .mm-plain-link:visited {
    color: inherit;
    text-decoration: none;
}

.mm-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Brand colors */
:root {
    --mm-red: #eb1c29;
    --mm-blue: #1f9fd6;
    --mm-blue-dark: #1b8bbf;
    --mm-blue-light: #e6f4fb;
    --mm-text: #1f2a37;
    --mm-grey: #555;
}

/* =====================================================================
   HERO — full-width background image
   ===================================================================== */
.mm-hero {
    position: relative;
    width: 100%;
    background-color: #cfeaf5; /* fallback while image loads */
    background-repeat: no-repeat;
    background-position: bottom center; /* anchor bg to bottom center */
    background-size: cover;             /* full screen width, no gaps */
    padding-top: 200px;     /* clearance for fixed nav above the hero */
    padding-bottom: 130px;  /* sits visually centered in the hero */
    min-height: 630px;      /* enough room for 500px foreground + nav clearance */
    /* no overflow:hidden — advantage box uses translateY(50%) to hang below */
}

/* Foreground hero image — centered, anchored to bottom, capped at 500px tall */
.mm-hero__foreground {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    /* "contain" behavior via max constraints: image scales down to fit
       so its full extent is always visible, never cropped */
    max-width: 100%;
    max-height: 500px;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: bottom center;
    z-index: 2;             /* above ground shadow, below gradient + copy */
    pointer-events: none;
}

/* Realistic ground-contact shadow beneath the truck — soft elongated ellipse */
.mm-hero::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 6px;
    transform: translateX(-50%);
    width: 60%;
    max-width: 900px;
    height: 60px;
    background: radial-gradient(
        ellipse at center,
        rgba(0, 0, 0, 0.55) 0%,
        rgba(0, 0, 0, 0.32) 35%,
        rgba(0, 0, 0, 0.12) 60%,
        rgba(0, 0, 0, 0) 80%
    );
    filter: blur(6px);
    pointer-events: none;
    z-index: 1;             /* under the truck */
}

/* Blue fade gradient (L→R) — starts slightly transparent on the left, fully clear at 50% (hero midpoint) */
.mm-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        rgba(31, 159, 214, 0.85) 0%,
        rgba(31, 159, 214, 0.85) 20%,
        rgba(31, 159, 214, 0.7)  32%,
        rgba(31, 159, 214, 0.35) 42%,
        rgba(31, 159, 214, 0)    50%);
    pointer-events: none;
    z-index: 3;             /* above the truck, below the headline copy */
}

.mm-hero__inner {
    position: absolute;       /* span full hero so vertical centering is true middle */
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: center;      /* true vertical middle of the hero (ignores hero padding) */
    justify-content: flex-start;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.mm-hero__text {
    max-width: 560px;
    text-align: left;
}

.mm-hero__text h1 {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: clamp(2rem, 5vw, 3.6rem);
    line-height: 1.05;
    letter-spacing: 0.5px;
    color: #fff;
    text-transform: uppercase;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
    margin: 0;
}

/* Advantage red box - sits on top of hero image, hangs below into next section */
.mm-hero__advantage {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    transform: translateY(50%);
    padding: 0 24px;
    z-index: 20;            /* always above the next section */
}

.mm-hero__advantage-inner {
    background: var(--mm-red);
    color: #fff;
    max-width: 880px;
    margin: 0 auto;
    padding: 40px 60px 44px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.32);
}

.mm-hero__advantage-inner h2 {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin: 0 0 12px;
}

.mm-hero__advantage-inner p {
    font-size: 1.1rem;
    line-height: 1.5;
    margin: 0;
    color: #fff;
}

/* =====================================================================
   4 BENEFITS
   ===================================================================== */
.mm-benefits {
    padding: 180px 0 60px;
    background: #fff;
}

.mm-benefits__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.mm-benefit {
    padding: 0 10px;
}

.mm-benefit__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
}

.mm-benefit__icon svg {
    width: 100%;
    height: 100%;
}

/* Masked external SVG icon — recolored to brand red */
.mm-benefit__icon-svg {
    display: block;
    width: 100%;
    height: 100%;
    background-color: var(--mm-red);
    -webkit-mask-image: var(--mm-icon-url);
            mask-image: var(--mm-icon-url);
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    -webkit-mask-position: center;
            mask-position: center;
    -webkit-mask-size: contain;
            mask-size: contain;
}

.mm-benefit h3 {
    color: var(--mm-red);
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 0.3px;
    margin: 0 0 10px;
}

.mm-benefit p {
    font-size: 1.1rem;
    line-height: 1.5;
    color: var(--mm-text);
    margin: 0;
}

/* =====================================================================
   WE HANDLE THE UPKEEP
   ===================================================================== */
.mm-upkeep {
    padding: 30px 0 70px;
    background: #fff;
}

/* Section title - with side lines */
.mm-section-title {
    text-align: center;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
    font-size: clamp(1.4rem, 2.8vw, 1.9rem);
    margin: 0 0 20px;
}

.mm-section-title--blue {
    color: var(--mm-blue);
    display: flex;
    align-items: center;
    gap: 18px;
    justify-content: center;
}

.mm-section-title--blue::before,
.mm-section-title--blue::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--mm-blue);
    max-width: 180px;
}

.mm-section-title--white { color: #fff; }
.mm-section-title--red { color: var(--mm-red); }

.mm-upkeep__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    margin: 30px auto 0;
    max-width: 650px;
}

.mm-upkeep__text {
    max-width: none;
    text-align: left;
}

.mm-upkeep__text p {
    font-size: 1.1rem;
    line-height: 1.5;
    margin: 0 0 22px;
    color: var(--mm-text);
    text-align: left;
}

.mm-upkeep__text .mm-btn {
    align-self: flex-start;
}

.mm-upkeep__icons {
    display: flex;
    justify-content: center;
    gap: 60px;
}

.mm-upkeep__icon {
    text-align: center;
}

.mm-circle {
    width: 110px;
    height: 110px;
    border: 2px solid var(--mm-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    background: #fff;
}

.mm-circle svg,
.mm-circle img {
    width: 60px;
    height: 60px;
    display: block;
}

/* Recolor external SVG icons to match the blue circle border */
.mm-circle__svg {
    display: block;
    width: 60px;
    height: 60px;
    background-color: var(--mm-blue);
    -webkit-mask-image: var(--mm-icon-url);
            mask-image: var(--mm-icon-url);
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    -webkit-mask-position: center;
            mask-position: center;
    -webkit-mask-size: contain;
            mask-size: contain;
}

.mm-upkeep__icon span {
    display: block;
    color: var(--mm-blue);
    font-weight: 700;
    font-size: 1.1rem;
}

/* =====================================================================
   BUTTONS
   ===================================================================== */
.mm-btn {
    display: inline-block;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.3px;
    padding: 10px 26px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    cursor: pointer;
    text-transform: none;
    font-family: inherit;
}

.mm-btn--outline-blue {
    color: var(--mm-blue);
    border-color: var(--mm-blue);
    background: transparent;
}

.mm-btn--outline-blue:hover {
    background: var(--mm-blue);
    color: #fff;
}

.mm-btn--red {
    background: var(--mm-red);
    color: #fff;
    border-color: var(--mm-red);
    padding: 16px 40px;
    font-size: 1.15rem;
    border-radius: 6px;
}

.mm-btn--red:hover {
    background: #c91622;
    border-color: #c91622;
    color: #fff;
}

.mm-btn--blue-pill {
    background: var(--mm-blue);
    color: #fff;
    border-color: var(--mm-blue);
    padding: 14px 44px;
    font-size: 1.1rem;
    border-radius: 999px;
}

.mm-btn--blue-pill:hover {
    background: var(--mm-blue-dark);
    border-color: var(--mm-blue-dark);
    color: #fff;
}

.mm-btn--phone {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.mm-btn__phone-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* =====================================================================
   FULL VALUE TABLE
   ===================================================================== */
.mm-value {
    position: relative;
    background: linear-gradient(
        to bottom,
        var(--mm-blue) 0,
        var(--mm-blue) calc(100% - 170px),
        #fff calc(100% - 170px),
        #fff 100%
    );
    color: #fff;
    padding: 100px 0 0;  /* 100px above titles; no bottom — table-wrap controls section end */
    overflow: visible;   /* allow table to extend past blue section */
}

.mm-value__bg {
    position: absolute;
    top: 40px;
    left: 0;
    right: 0;
    pointer-events: none;
    display: flex;
    justify-content: center;
    opacity: 0.08;
    z-index: 0;
}

.mm-value__mark {
    width: 380px;
    height: auto;
    filter: brightness(0) invert(1);
}

.mm-value .mm-container { position: relative; z-index: 1; }

.mm-value__sub {
    text-align: center;
    font-size: 1.1rem;
    margin: 0 auto 50px;
    max-width: 740px;
    color: #fff;
}

/* =====================================================================
   FULL VALUE — pure CSS Grid (replaces former <table> implementation)
   ===================================================================== */
.mm-value__grid {
    background: #fff;
    border-radius: 30px;
    overflow: hidden;
    margin-bottom: -200px;     /* bridge 200px into the white section below */
    position: relative;
    z-index: 5;
    box-shadow: 0 24px 40px -12px rgba(0, 0, 0, 0.22);
    color: var(--mm-text);
    font-size: 1.1rem;
}

/* Each row (header + body) shares the same column template */
.mm-value__head,
.mm-value__row {
    display: grid;
    grid-template-columns: 130px repeat(5, 1fr);
}

/* Header row — red bar with column titles */
.mm-value__head-cell {
    padding: 25px 12px;
    text-align: center;
    font-weight: 800;
    font-size: 1.1rem;
    line-height: 1.25;
    color: #fff;
    background: var(--mm-red);
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(255, 255, 255, 0.35);
}

.mm-value__head-cell:last-child {
    border-right: none;
}

/* Footnote markers in the flex-centered, two-line header cells (Membership
   Pays You Back / Extended Warranty): the global sup rule's negative `top`
   + baseline alignment lifts the marker up beside the FIRST line, leaving it
   visually unanchored. Re-anchor it as a proper superscript on its own line. */
.mm-value__head-cell sup {
    top: auto;
    vertical-align: super;
}

/* Row label (A/C & Furnace, Plumbing & Drains) */
.mm-value__row-label {
    padding: 24px 12px;
    text-align: center;
    font-weight: 800;
    font-size: 1.1rem;
    line-height: 1.25;
    color: var(--mm-red);
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid #d4e3f5;
    border-bottom: 1px solid #d4e3f5;
    border-right: 1px solid #d3e2eb;  /* separator between label and data cells */
}

/* Data cell */
.mm-value__cell {
    padding: 22px 18px;
    font-size: 1.1rem;
    line-height: 1.5;
    border-right: 1px solid #d3e2eb;
    border-bottom: 1px solid #d3e2eb;
}

.mm-value__cell:last-child {
    border-right: none;
}

/* Row background variants */
.mm-value__row--blue .mm-value__row-label,
.mm-value__row--blue .mm-value__cell {
    background: #e6f1fe;
}

.mm-value__row--white .mm-value__row-label,
.mm-value__row--white .mm-value__cell {
    background: #ffffff;
}

/* Last row — drop bottom borders */
.mm-value__grid > .mm-value__row:last-child .mm-value__row-label,
.mm-value__grid > .mm-value__row:last-child .mm-value__cell {
    border-bottom: none;
}

/* Inline text styles inside cells */
.mm-value__cell strong {
    display: block;
    font-weight: 800;
    margin-bottom: 6px;
    font-size: 1.1rem;
}

.mm-value__cell .mm-red { color: var(--mm-red); }

.mm-value__cell ul {
    list-style: disc;
    margin: 0 0 10px 18px;
    padding: 0;
}

.mm-value__cell ul li {
    margin-bottom: 4px;
}

/* Check cell — centered SVG */
.mm-value__cell--check {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px 12px;
}

.mm-value__cell--check img {
    display: block;
    width: 36px;
    height: auto;
}

/* =====================================================================
   FULL VALUE — Mobile/tablet pivoted card layout (hidden on desktop)
   Pivots the table to cards-by-benefit instead of rows-by-product
   ===================================================================== */
.mm-value__mobile { display: none; }

.mm-value__mcard {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.18);
    color: var(--mm-text);
}

.mm-value__mcard + .mm-value__mcard { margin-top: 14px; }

.mm-value__mcard-head {
    background: var(--mm-red);
    color: #fff;
    font-weight: 800;
    text-transform: uppercase;
    text-align: center;
    padding: 14px 16px;
    font-size: 1rem;
    letter-spacing: 0.4px;
    line-height: 1.2;
}

.mm-value__mcard-row {
    display: grid;
    grid-template-columns: 105px 1fr;
}

.mm-value__mcard-row--light { background: #ffffff; }
.mm-value__mcard-row--tint  { background: #e6f1fe; }

.mm-value__mcard-row + .mm-value__mcard-row {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.mm-value__mcard-label {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mm-red);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.9rem;
    line-height: 1.2;
    text-align: center;
    padding: 18px 8px;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.mm-value__mcard-body {
    padding: 18px 18px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.mm-value__mcard-body strong {
    display: block;
    font-weight: 800;
    margin-bottom: 6px;
}

.mm-value__mcard-body strong.mm-red { color: var(--mm-red); }

.mm-value__mcard-body ul {
    list-style: disc;
    margin: 0 0 12px 18px;
    padding: 0;
}

.mm-value__mcard-body ul li { margin-bottom: 4px; }

.mm-value__mcard-body ul li::marker { color: var(--mm-red); }

.mm-value__mcard-body > *:last-child { margin-bottom: 0; }

/* Bottom compact red pill cards: Priority Service + Extended Warranty */
.mm-value__mpills {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;   /* checked-benefit pills lead the mobile stack; space them off the cards below */
}

.mm-value__mpill {
    background: var(--mm-red);
    color: #fff;
    border-radius: 16px;
    padding: 22px 12px;
    text-align: center;
    box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.18);
}

.mm-value__mpill h4 {
    color: #fff;
    font-weight: 800;
    text-transform: uppercase;
    margin: 0 0 14px;
    font-size: 1rem;
    line-height: 1.2;
    letter-spacing: 0.4px;
}

.mm-value__mpill img {
    width: 28px;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: brightness(0) invert(1); /* check renders white on red bg */
}

/* =====================================================================
   SAVE YOUR SYSTEMS
   ===================================================================== */
.mm-save {
    padding: 270px 0 70px;  /* 200px to clear overlapping value-table + 70px breathing room */
    background: #fff;
}

.mm-save__sub {
    text-align: center;
    font-size: 1.1rem;
    max-width: 740px;
    margin: 0 auto 50px;
    color: var(--mm-text);
}

.mm-save__list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.mm-save__item {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 26px;
    align-items: flex-start;
}

.mm-save__icon {
    width: 80px;
    height: 80px;
    background: var(--mm-red);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(235, 28, 41, 0.25);
}

.mm-save__icon svg {
    width: 44px;
    height: 44px;
}

/* External SVG (pipes) recolored white via mask */
.mm-save__icon-svg {
    display: block;
    width: 44px;
    height: 44px;
    background-color: #fff;
    -webkit-mask-image: var(--mm-icon-url);
            mask-image: var(--mm-icon-url);
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    -webkit-mask-position: center;
            mask-position: center;
    -webkit-mask-size: contain;
            mask-size: contain;
}

.mm-save__copy h3 {
    color: var(--mm-red);
    font-weight: 800;
    font-size: 1.1rem;
    margin: 0 0 8px;
}

.mm-save__copy p {
    font-size: 1.1rem;
    line-height: 1.5;
    color: var(--mm-text);
    margin: 0;
}

/* =====================================================================
   CTA
   ===================================================================== */
.mm-cta {
    padding: 40px 0 70px;
    text-align: center;
    background: #fff;
}

.mm-cta .mm-section-title {
    margin-bottom: 28px;
}

/* =====================================================================
   FOOTNOTES
   ===================================================================== */
.mm-footnotes {
    padding: 30px 0 70px;
    background: #fff;
    color: #666;
    font-size: 1.1rem;
    line-height: 1.55;
}

.mm-footnotes ol {
    list-style: none;
    counter-reset: footnotes;
    padding: 0;
    margin: 0 0 18px;
}

.mm-footnotes ol li {
    counter-increment: footnotes;
    margin-bottom: 6px;
    padding-left: 12px;
    position: relative;
}

.mm-footnotes ol li::before {
    content: counter(footnotes);
    position: absolute;
    left: 0;
    top: -2px;
    font-size: .7rem;
    vertical-align: super;
}

.mm-footnotes p {
    margin: 0 0 14px;
    font-size: 1.1rem;
    line-height: 1.55;
}

.mm-footnotes__cta {
    text-align: center;
    margin-top: 30px;
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 900px) {
    /* Hero — overlapping layout, just shrunk + headline pulled to the top */
    .mm-hero {
        background-size: cover;
        background-position: bottom center;
        min-height: 380px;           /* shorter than desktop */
        padding-top: 24px;           /* visual tightening — content uses absolute positioning */
        padding-bottom: 16px;
    }

    .mm-hero::before {
        /* vertical gradient on mobile — fully clear by 50% (hero midpoint) */
        background: linear-gradient(180deg,
            rgba(31, 159, 214, 0.95) 0%,
            rgba(31, 159, 214, 0.65) 25%,
            rgba(31, 159, 214, 0.25) 40%,
            rgba(31, 159, 214, 0)    50%);
    }

    /* Foreground sits within hero bounds; keep contained, anchored bottom */
    .mm-hero__foreground {
        max-height: 60%;             /* leave breathing room for headline at top */
    }

    /* Headline — top-aligned, 75px from hero top */
    .mm-hero__inner {
        padding: 75px 24px 0;
        align-items: flex-start;     /* override desktop center → top-align the text */
        justify-content: center;
        text-align: center;
    }

    .mm-hero__text {
        max-width: 100%;
        text-align: center;
    }

    .mm-hero__text h1 { font-size: 2.2rem; }

    .mm-hero__advantage { transform: translateY(50%); }
    .mm-hero__advantage-inner {
        padding: 30px 30px;
        margin-top: 200px;          /* push the red box down past the shortened hero */
    }

    .mm-benefits { padding-top: 320px; } /* extra clearance for the lowered red box */
    .mm-benefits__grid { grid-template-columns: repeat(2, 1fr); gap: 36px 20px; }

    .mm-upkeep__row { grid-template-columns: 1fr; }
    .mm-upkeep__text {
        margin: 0 auto;
        text-align: center;          /* center copy on mobile */
    }
    .mm-upkeep__text p { text-align: center; }
    .mm-upkeep__text .mm-btn {
        align-self: center;          /* center the Learn More button */
        display: inline-block;
    }
    .mm-upkeep__icons { gap: 40px; }

    .mm-section-title--blue::before,
    .mm-section-title--blue::after { max-width: 50px; }

    /* === Full Value — swap views: hide desktop grid, show mobile cards === */
    .mm-value__grid { display: none; }

    .mm-value__mobile {
        display: block;
        margin-bottom: -100px;     /* keep bridge into the save section below */
    }

    /* Save section — less padding-top now that mobile bridge is shorter */
    .mm-save { padding-top: 170px; }

    .mm-save__item { grid-template-columns: 70px 1fr; gap: 18px; }
    .mm-save__icon { width: 64px; height: 64px; }
    .mm-save__icon svg { width: 34px; height: 34px; }
}

@media (max-width: 560px) {
    .mm-benefits__grid { grid-template-columns: 1fr; gap: 30px; }
    .mm-upkeep__icons { gap: 24px; flex-wrap: wrap; }
    .mm-hero__text h1 { font-size: 1.8rem; }
    .mm-btn--red { padding: 14px 28px; font-size: 1.1rem; }
}
