/* Math hub, v3 layout (preview). Loaded after bergen-county-academies-v2.css and
   tutor-for-maths-v2.css. Only adds the new v3 components; everything is scoped
   under .mathv3-page or a .mathv3-* class. */

/* ===== Hero ===== */
.mathv3-page .bcav2-hero h1 .mathv3-h1-kicker {
    display: block;
    font-size: .95rem;
    font-weight: 800;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: #ffe08a;
    margin-bottom: 8px;
}
.mathv3-page .bcav2-hero h1 { color: #fff; }
.mathv3-page .bcav2-hero h1 .mathv3-h1-accent { color: #ffe08a; }
.mathv3-page .bcav2-hero-sub { margin-bottom: 12px; }
.mathv3-page .bcav2-hero-sub + .bcav2-hero-ctas { margin-top: 18px; }

/* One big, full-width, highlighted hero button (town pages) */
.mathv3-town .bcav2-hero-ctas { display: block; max-width: 560px; }
.mathv3-hero-big-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 18px 24px !important;
    font-size: 1.2rem !important;
    font-weight: 800 !important;
    letter-spacing: .2px;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(255, 196, 0, .35), 0 0 0 4px rgba(255, 224, 138, .25);
}
.mathv3-hero-big-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(255, 196, 0, .45), 0 0 0 4px rgba(255, 224, 138, .35); }
.mathv3-hero-big-btn .fa { transition: transform .2s ease; }
.mathv3-hero-big-btn:hover .fa { transform: translateY(3px); }
@media (max-width: 575px) {
    .mathv3-hero-big-btn { font-size: 1.05rem !important; padding: 16px 18px !important; }
}

/* ===== Section sub-headings ===== */
.mathv3-h3 {
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--bca-ink);
    margin: 26px 0 12px;
}

/* ===== Text + image intro ===== */
.mathv3-intro {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 26px;
    align-items: start;
    margin-top: 4px;
}
.mathv3-figure { margin: 0; }
.mathv3-figure img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--bca-line);
}

/* Card titles inside the trust grid are h4 on v3 (they sit under an h3) */
.mathv3-page .mathv2-trust-item h4 { font-size: 15px; font-weight: 800; margin: 0 0 4px; color: var(--bca-ink); }

/* ===== Diagnostic steps (numbered) ===== */
.mathv3-steps {
    list-style: none;
    padding: 0;
    margin: 6px 0 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    counter-reset: diag;
}
.mathv3-steps li {
    counter-increment: diag;
    position: relative;
    background: var(--math-remedial-bg);
    border-radius: 12px;
    padding: 16px 16px 18px;
}
.mathv3-steps li::before {
    content: counter(diag);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--math-remedial);
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    margin-bottom: 10px;
}
.mathv3-steps h4 { font-size: 15px; font-weight: 800; margin: 0 0 4px; color: var(--bca-ink); }
.mathv3-steps p { font-size: 13.5px; line-height: 1.55; color: #3a3f45; margin: 0; }

/* ===== Advanced learning path ===== */
.mathv3-path {
    list-style: none;
    padding: 0;
    margin: 6px 0 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.mathv3-path li {
    position: relative;
    border: 1px solid var(--bca-line);
    border-top: 4px solid var(--math-advanced);
    border-radius: 12px;
    padding: 18px 20px 18px;
    background: #fff;
}
.mathv3-path-num {
    position: absolute;
    top: 14px;
    right: 16px;
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--math-advanced-bg);
    -webkit-text-stroke: 1px #f0c7b6;
}
.mathv3-path-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--math-advanced);
    background: var(--math-advanced-bg);
    border-radius: 999px;
    padding: 3px 10px;
    margin-bottom: 8px;
}
.mathv3-path h4 { font-size: 1.08rem; font-weight: 800; margin: 0 0 8px; color: var(--bca-ink); padding-right: 40px; }
.mathv3-path p { font-size: 14px; line-height: 1.6; color: #3a3f45; margin: 0 0 8px; }
.mathv3-path p:last-child { margin-bottom: 0; }
.mathv3-path a { color: var(--math-advanced); font-weight: 700; }

/* ===== Math Kangaroo stats ===== */
.mathv3-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.mathv3-stat {
    background: var(--bca-bg);
    border: 1px solid var(--bca-line);
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
}
.mathv3-stat b { display: block; font-size: 1.5rem; font-weight: 800; color: var(--bca-primary); line-height: 1.2; }
.mathv3-stat span { display: block; font-size: 13px; color: var(--bca-muted); margin-top: 4px; }

/* ===== Check list (Why MindzQ for Math Kangaroo) ===== */
.mathv3-checks { list-style: none; padding: 0; margin: 0; }
.mathv3-checks li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--bca-line);
    font-size: 14.5px;
    line-height: 1.6;
    color: #3a3f45;
}
.mathv3-checks li:last-child { border-bottom: 0; }
.mathv3-checks i {
    width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: #e8eef9; color: var(--bca-primary); font-size: 15px;
}
.mathv3-checks b { color: var(--bca-ink); }

/* ===== Final CTA ===== */
.mathv3-final-cta { padding: 34px 26px; }
.mathv3-final-cta h2 { font-size: 1.6rem; font-weight: 800; color: #fff; margin: 0 0 10px; }
.mathv3-final-cta p { max-width: 640px; margin-left: auto; margin-right: auto; }
.mathv3-final-area { font-weight: 700; color: #ffe08a !important; }
.mathv3-final-ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* Current town in the locations chips (town pages) */
.mathv3-loc-current {
    background: var(--bca-primary);
    border: 1px solid var(--bca-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: 999px;
}

/* ===== Reviews ===== */
.mathv3-reviews {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.mathv3-review {
    display: flex;
    flex-direction: column;
    margin: 0;
    background: #fff;
    border: 1px solid var(--bca-line);
    border-radius: 12px;
    padding: 18px 18px 16px;
    box-shadow: 0 6px 16px rgba(0,0,0,.04);
}
.mathv3-review-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.mathv3-review-stars { color: #e0a800; letter-spacing: 1px; font-size: 15px; }
.mathv3-review-source { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--bca-muted); white-space: nowrap; }
.mathv3-review-source img { height: 15px; width: auto; }
.mathv3-review blockquote {
    flex: 1;
    margin: 0 0 14px;
    padding: 0;
    border: 0;
    font-size: 14.5px;
    line-height: 1.65;
    color: #3a3f45;
}
.mathv3-review figcaption { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--bca-line); }
.mathv3-review-avatar {
    width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: #e8eef9; color: var(--bca-primary); font-weight: 800; font-size: 15px;
}
.mathv3-review figcaption b { display: block; font-size: 14.5px; color: var(--bca-ink); }
.mathv3-review figcaption small { display: block; font-size: 12.5px; color: var(--bca-muted); }

/* ===== Responsive ===== */
@media (max-width: 991px) {
    .mathv3-intro { grid-template-columns: 1fr; }
    .mathv3-figure { max-width: 420px; }
    .mathv3-steps,
    .mathv3-stats { grid-template-columns: 1fr 1fr; }
    .mathv3-path { grid-template-columns: 1fr; }
    .mathv3-reviews { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767px) {
    .mathv3-reviews { grid-template-columns: 1fr; }
}
@media (max-width: 575px) {
    .mathv3-steps { grid-template-columns: 1fr; }
    .mathv3-page .bcav2-hero h1 .mathv3-h1-kicker { font-size: .8rem; }
    .mathv3-final-cta h2 { font-size: 1.3rem; }
    .mathv3-final-ctas .bcav2-btn { width: 100%; }
}
