/* MathMentor — Shared CSS */
/* Imported by all pages. Do not duplicate in individual pages. */

/* ─── BASE ─── */
*, *::before, *::after { box-sizing: border-box; }
html  { scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }
body  { margin: 0; font-family: var(--font-sans); background: var(--canvas-soft); -webkit-font-smoothing: antialiased; color: var(--ink-secondary); }
a     { text-decoration: none; color: inherit; }
img   { max-width: 100%; display: block; }
button { font-family: var(--font-sans); }
input, select, textarea { font-family: inherit; -webkit-appearance: none; appearance: none; }

/* ─── PAGE LAYOUT ─── */
.mm-page-container { max-width: 1200px; margin: 0 auto; padding: 0 48px; }
.mm-section        { padding: 80px 0; }
.mm-section-soft   { background: var(--canvas-soft); }
.mm-section-white  { background: #fff; }

/* ─── BREADCRUMB ─── */
.mm-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(255,255,255,0.6); flex-wrap: wrap; }
.mm-breadcrumb a { color: rgba(255,255,255,0.75); font-weight: 500; }
.mm-breadcrumb a:hover { color: #fff; }
.mm-breadcrumb .sep { opacity: 0.4; }

/* ─── PAGE HERO ─── */
.mm-page-hero { padding: 60px 0 64px; position: relative; overflow: hidden; }
.mm-page-hero h1 { font-size: clamp(28px,4vw,52px); font-weight: 800; color: #fff; letter-spacing: -1.5px; line-height: 1.08; margin: 16px 0 16px; }
.mm-page-hero p  { font-size: 17px; color: rgba(255,255,255,0.72); line-height: 1.65; max-width: 560px; margin: 0 0 28px; }

/* ─── SECTION HEADINGS ─── */
.mm-section-badge { display: inline-flex; align-items: center; gap: 7px; background: rgba(124,58,237,0.08); border: 1px solid rgba(124,58,237,0.18); border-radius: 999px; padding: 5px 16px; font-size: 13px; font-weight: 600; color: #7c3aed; margin-bottom: 14px; }
.mm-section-title { font-size: clamp(22px,3vw,38px); font-weight: 800; color: var(--ink-95); letter-spacing: -1px; line-height: 1.1; margin: 0 0 12px; }
.mm-section-sub   { font-size: 16px; color: var(--ink-muted); line-height: 1.65; max-width: 560px; }

/* ─── CARDS ─── */
.mm-card { background: #fff; border-radius: 18px; border: 1px solid #efefef; box-shadow: 0 2px 16px rgba(0,0,0,0.05); padding: 24px; transition: transform 180ms ease, box-shadow 180ms ease; }
.mm-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.09); }
.mm-card-grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.mm-card-grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 18px; }
.mm-card-grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }

/* ─── FEATURE LIST ─── */
.mm-feature-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.mm-feature-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; color: var(--ink-secondary); }
.mm-feature-list li::before { content: "✓"; color: #7c3aed; font-weight: 700; flex-shrink: 0; line-height: 1.5; }

/* ─── NAV ACTIVE STATE ─── */
.mm-nav-link.active { color: #7c3aed !important; font-weight: 700 !important; }
.mm-nav-link:hover  { color: #7c3aed; }

/* ─── FAQ ─── */
.mm-faq-item  { background: #fff; border: 1px solid #efefef; border-radius: 14px; overflow: hidden; margin-bottom: 8px; }
.mm-faq-btn   { width: 100%; background: none; border: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; gap: 16px; text-align: left; font-size: 16px; font-weight: 600; color: var(--ink-95); font-family: var(--font-sans); min-height: 56px; }
.mm-faq-icon  { font-size: 20px; color: var(--ink-faint); transition: transform 200ms ease, color 120ms ease; flex-shrink: 0; }
.mm-faq-icon.open { transform: rotate(45deg); color: #7c3aed; }
.mm-faq-body  { padding: 0 22px 18px; border-top: 1px solid var(--hairline); }
.mm-faq-body p { margin: 14px 0 0; font-size: 15px; color: var(--ink-muted); line-height: 1.65; }

/* ─── CTA STRIP ─── */
.mm-cta-strip { background: linear-gradient(135deg, #1a0845 0%, #312e81 50%, #1a0845 100%); padding: 72px 0; text-align: center; position: relative; overflow: hidden; }
.mm-cta-strip h2 { font-size: clamp(24px,3vw,40px); font-weight: 800; color: #fff; letter-spacing: -1px; margin: 0 0 12px; }
.mm-cta-strip p  { font-size: 16px; color: rgba(255,255,255,0.65); margin: 0 0 28px; }
.mm-cta-btns  { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ─── INTERNAL LINKS GRID ─── */
.mm-related-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.mm-related-card { border: 1px solid rgba(124,58,237,0.15); border-radius: 14px; padding: 18px 20px; background: #fff; transition: border-color 150ms, box-shadow 150ms; display: block; }
.mm-related-card:hover { border-color: #7c3aed; box-shadow: 0 4px 16px rgba(124,58,237,0.10); }
.mm-related-card h4 { margin: 0 0 4px; font-size: 15px; font-weight: 700; color: var(--ink-95); }
.mm-related-card p  { margin: 0; font-size: 13px; color: var(--ink-muted); }
.mm-related-card span { font-size: 12px; color: #7c3aed; font-weight: 600; }

/* ─── CROSS-BROWSER ─── */
* { scrollbar-width: thin; scrollbar-color: rgba(124,58,237,0.3) transparent; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.3); border-radius: 3px; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px !important; }

/* ─── ACCESSIBILITY ─── */
:focus-visible { outline: 3px solid #7c3aed; outline-offset: 3px; border-radius: 4px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #7c3aed !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
@media (forced-colors: active) { button, a { border: 1px solid ButtonText; } }

/* ─── TABLET ≤1024px ─── */
@media (max-width: 1024px) {
  .mm-page-container { padding: 0 32px; }
  .mm-card-grid-3    { grid-template-columns: 1fr 1fr; }
  .mm-card-grid-4    { grid-template-columns: 1fr 1fr; }
  .mm-related-grid   { grid-template-columns: 1fr 1fr; }
}

/* ─── MOBILE ≤768px ─── */
@media (max-width: 768px) {
  .mm-page-container { padding: 0 20px; }
  .mm-section        { padding: 56px 0; }
  .mm-card-grid-3, .mm-card-grid-4, .mm-card-grid-2 { grid-template-columns: 1fr; gap: 12px; }
  .mm-related-grid   { grid-template-columns: 1fr; }
  .mm-section-title  { font-size: 24px; }
  .mm-page-hero h1   { font-size: 30px; letter-spacing: -0.5px; }
  .mm-page-hero p    { font-size: 15px; }
  .mm-cta-strip h2   { font-size: 24px; }
  .mm-cta-btns       { flex-direction: column; align-items: center; }
  .mm-cta-btns > *   { width: 100%; max-width: 320px; justify-content: center; }
  body { padding-bottom: 76px; }
  .mm-mobile-bar     { display: flex !important; }
}
