/* =========================================================
   Myfolios — Global Design System
   Modern, clean, conversion-focused UI
   ========================================================= */

:root {
  /* Brand — Royal Blue (trust / financial) */
  --mf-primary:       #2563eb;
  --mf-primary-dark:  #1d4ed8;
  --mf-primary-600:   #1e40af;
  --mf-primary-tint:  #dbeafe;   /* very light blue for bg chips */
  --mf-primary-tint2: #bfdbfe;   /* border tint */
  --mf-primary-ink:   #1e3a8a;   /* deepest */
  --mf-accent:        #06b6d4;   /* cyan accent */
  /* Neutrals */
  --mf-ink:          #0f172a;
  --mf-text:         #1f2937;
  --mf-muted:        #64748b;
  --mf-border:       #e2e8f0;
  --mf-bg:           #f8fafc;
  --mf-bg-soft:      #eff6ff;
  /* Semantic */
  --mf-success:      #22c55e;
  --mf-warn:         #f59e0b;
  --mf-danger:       #ef4444;
  /* Elevation */
  --mf-shadow-sm:    0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.03);
  --mf-shadow-md:    0 4px 10px rgba(15,23,42,.05), 0 10px 20px rgba(15,23,42,.04);
  --mf-shadow-lg:    0 14px 28px rgba(15,23,42,.08), 0 20px 40px rgba(15,23,42,.06);
  --mf-ring:         0 0 0 3px rgba(37,99,235,.22);
  /* Radii */
  --mf-radius:       14px;
  --mf-radius-lg:    22px;
  --mf-nav-h:        72px;
  /* Font */
  --mf-font:         'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Inter, sans-serif;
  --mf-font-num:     'Plus Jakarta Sans', ui-monospace, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--mf-font);
  background-color: var(--mf-bg);
  color: var(--mf-text);
  margin: 0; padding: 0;
  font-size: 15px;             /* was browser default ~16px */
  line-height: 1.55;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
.lead { font-size: .96rem !important; line-height: 1.55; }
small, .small, .text-muted.small { font-size: .82rem; }

/* Tabular figures for prices / amounts */
.tabular, input[type="number"], .mf-stat-card .big, .nav-result strong {
  font-variant-numeric: tabular-nums;
}

/* Push content below fixed navbar */
body.has-fixed-nav { padding-top: var(--mf-nav-h); }

img { max-width: 100%; height: auto; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--mf-font); font-weight: 700;
  color: var(--mf-ink);
  letter-spacing: -0.018em;
}
h1 { font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.3rem); line-height: 1.15; letter-spacing: -0.025em; font-weight: 800; }
h2 { font-size: clamp(1.25rem, 1.05rem + 1vw, 1.65rem); line-height: 1.22; letter-spacing: -0.018em; }
h3 { font-size: 1.1rem; line-height: 1.3; }
h4 { font-size: 1rem; }
h5 { font-size: .95rem; }
h6 { font-size: .88rem; }

/* Don't globally force p color — let context (dark footer, hero) control it */
.text-muted { color: var(--mf-muted) !important; }

a { color: var(--mf-primary-dark); text-decoration: none; transition: color .2s; }
a:hover { color: var(--mf-primary-600); }

/* Focus visible (a11y) */
*:focus-visible { outline: none; box-shadow: var(--mf-ring); border-radius: 6px; }

/* =========================================================
   NAVBAR  (modern, sticky, glass effect on scroll)
   ========================================================= */
.mf-navbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1040;
  background: rgba(255,255,255,0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(15,23,42,.06);
  transition: box-shadow .25s, background .25s, border-color .25s;
  height: var(--mf-nav-h);
  display: flex; align-items: center;
}
.mf-navbar.scrolled {
  background: rgba(255,255,255,0.96);
  box-shadow: 0 6px 20px rgba(15,23,42,.06);
  border-bottom-color: rgba(15,23,42,.08);
}
.mf-navbar .logo-img { height: 40px; width: auto; }
.mf-navbar .nav-link {
  font-weight: 500;
  color: var(--mf-text) !important;
  padding: 7px 12px !important;
  border-radius: 8px;
  font-size: .88rem;
  transition: color .2s, background .2s;
  position: relative;
}
.mf-navbar .nav-link:hover {
  color: var(--mf-primary) !important;
  background: rgba(37, 99, 235, 0.06);
}
.mf-navbar .nav-link.active {
  color: var(--mf-primary) !important;
  background: rgba(37, 99, 235, 0.08);
}
.mf-navbar .nav-link.active::after {
  content: ''; position: absolute;
  bottom: 0; left: 14px; right: 14px; height: 3px;
  background: var(--mf-primary); border-radius: 3px 3px 0 0;
}
.mf-navbar .btn-login {
  background: var(--mf-primary);
  color: #fff !important;
  border: none;
  padding: 7px 18px;
  border-radius: 9px;
  font-weight: 600;
  font-size: .88rem;
  transition: transform .2s, box-shadow .2s;
}
.mf-navbar .btn-login:hover {
  background: var(--mf-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.35);
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn-mf-primary {
  background: linear-gradient(135deg, var(--mf-primary) 0%, var(--mf-primary-dark) 100%);
  color: #fff;
  padding: 10px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .88rem;
  border: none;
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 6px 16px rgba(37,99,235,.28);
  transition: transform .18s, box-shadow .18s, filter .18s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-mf-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(255,255,255,.3) inset, 0 12px 24px rgba(37,99,235,.36);
  filter: brightness(1.03);
}
.btn-mf-primary:active { transform: translateY(0); }

.btn-mf-outline {
  background: #fff;
  color: var(--mf-primary-dark);
  padding: 9px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .88rem;
  border: 1.5px solid var(--mf-primary);
  transition: all .18s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-mf-outline:hover {
  background: var(--mf-primary);
  color: #fff;
  border-color: var(--mf-primary);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(37,99,235,.28);
}

/* =========================================================
   BREADCRUMBS
   ========================================================= */
.mf-breadcrumbs {
  padding: 14px 0;
  font-size: .9rem;
  background: #fff;
  border-bottom: 1px solid var(--mf-border);
}
.mf-breadcrumbs ol {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.mf-breadcrumbs li {
  color: var(--mf-muted);
  display: flex; align-items: center;
}
.mf-breadcrumbs li + li::before {
  content: '/'; margin: 0 8px; color: var(--mf-border);
}
.mf-breadcrumbs a { color: var(--mf-muted); }
.mf-breadcrumbs a:hover { color: var(--mf-primary); }
.mf-breadcrumbs li[aria-current="page"] { color: var(--mf-text); font-weight: 500; }

/* =========================================================
   SECTIONS / HERO
   ========================================================= */
.mf-hero {
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(37,99,235,.22), transparent 62%),
    radial-gradient(700px 400px at -5% 110%, rgba(6,182,212,.12), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
  padding: 72px 0 64px;
  position: relative;
  overflow: hidden;
}
/* Subtle dot-grid overlay for depth */
.mf-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(37,99,235,.14) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.55), transparent 70%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.55), transparent 70%);
  pointer-events: none;
}
.mf-hero > .container { position: relative; z-index: 1; }
/* Hero stat card (right side) */
.mf-stat-card {
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(37,99,235,.18);
  border-radius: 18px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 8px 20px rgba(15,23,42,.05);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.mf-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(15,23,42,.09);
  border-color: rgba(37,99,235,.35);
}
.mf-stat-card .ic {
  flex: 0 0 46px; height: 46px; border-radius: 12px;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: var(--mf-primary-dark);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 10px rgba(37,99,235,.18);
}
.mf-stat-card .big {
  font-size: 1.15rem; font-weight: 800; color: var(--mf-ink); line-height: 1.12;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.mf-stat-card .lbl { font-size: .78rem; color: var(--mf-muted); margin-top: 3px; }
/* Compact hero — used on tool pages: just H1 + 1-line subtitle, minimal vertical space */
.mf-hero-compact {
  padding: 30px 0 24px;
  background:
    radial-gradient(500px 200px at 50% 0%, rgba(37,99,235,.14), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
  border-bottom: 1px solid rgba(37,99,235,.12);
}
.mf-hero-compact h1 { font-size: clamp(1.55rem, 1.1rem + 1.4vw, 2.1rem); line-height: 1.22; margin-bottom: 6px; letter-spacing: -0.02em; }
.mf-hero-compact .lead { font-size: 1rem; margin-top: 4px !important; margin-bottom: 0 !important; color: var(--mf-muted); }

/* Section padding reduced so tool appears closer to top */
.mf-section      { padding: 36px 0; }
.mf-section-alt  { padding: 40px 0; background: #fff; }
.mf-section-soft { padding: 40px 0; background: #f0f4f8; }

/* When a section follows .mf-hero-compact, tighten top padding further */
.mf-hero-compact + .mf-section,
.mf-hero-compact + .mf-section-alt,
.mf-hero-compact + .mf-section-soft { padding-top: 24px; }

.mf-title-underline {
  height: 4px; width: 64px;
  background: linear-gradient(90deg, var(--mf-primary), var(--mf-success));
  margin: 12px auto 22px; border-radius: 3px;
}

/* =========================================================
   CARDS
   ========================================================= */
.mf-card {
  background: #fff;
  border-radius: var(--mf-radius);
  padding: 24px;
  box-shadow: var(--mf-shadow-sm);
  border: 1px solid var(--mf-border);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.mf-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--mf-shadow-lg);
  border-color: #dbeafe;
}

/* Cards with a stretched-link = whole card clickable */
.mf-card:has(> .stretched-link),
.mf-card:has(.stretched-link) { cursor: pointer; }
.mf-card:has(.stretched-link):hover h2 a,
.mf-card:has(.stretched-link):hover h3 a { color: var(--mf-primary) !important; }
.mf-card:has(.stretched-link):hover .btn-mf-outline {
  background: var(--mf-primary);
  color: #fff;
  border-color: var(--mf-primary);
}

.mf-card-featured {
  border: 1px solid #dbeafe;
  background:
    radial-gradient(400px 200px at 90% 0%, rgba(37,99,235,.08), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
}

/* =========================================================
   FOOTER
   ========================================================= */
.mf-footer {
  background: #111827;
  color: #cbd5e1;
  padding: 64px 0 0;
  margin-top: 48px;
}
.mf-footer a { color: #cbd5e1; }
.mf-footer a:hover { color: #fff; }
.mf-footer h3, .mf-footer h4 {
  color: #fff; font-size: 1rem; font-weight: 700;
  letter-spacing: .5px; text-transform: uppercase;
  margin-bottom: 18px; position: relative; padding-bottom: 10px;
}
.mf-footer h3::after, .mf-footer h4::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 36px; height: 3px; background: var(--mf-primary); border-radius: 3px;
}
.mf-footer .brand {
  font-size: 1.5rem; font-weight: 700; color: #fff;
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.mf-footer .brand img { height: 34px; filter: brightness(0) invert(1); }
.mf-footer ul { list-style: none; padding: 0; margin: 0; }
.mf-footer ul li { margin-bottom: 10px; font-size: .93rem; }
.mf-footer .contact-item { display: flex; gap: 10px; margin-bottom: 10px; font-size: .92rem; align-items: flex-start; }
.mf-footer .contact-item i { color: var(--mf-primary); margin-top: 4px; }
.mf-footer .social {
  display: flex; gap: 12px; margin-top: 14px;
}
.mf-footer .social a {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .25s;
}
.mf-footer .social a:hover {
  background: var(--mf-primary); color: #fff;
  transform: translateY(-3px);
}
.mf-footer .amfi-box {
  background: rgba(37, 99, 235, 0.1);
  border-left: 3px solid var(--mf-primary);
  padding: 12px 16px; border-radius: 8px;
  font-size: .88rem; margin-top: 14px;
}
.mf-footer .amfi-box strong { color: #fff; }
.mf-footer-bottom {
  margin-top: 36px;
  padding: 20px 0;
  background: #0b1220;
  text-align: center;
  font-size: .88rem; color: #94a3b8;
}
.mf-footer-bottom a { color: var(--mf-primary); }

/* ========== MEGA FOOTER (tabbed category grid) ========== */
.mf-mega-footer {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 28px;
}
.mf-mega-tabs {
  display: flex; flex-wrap: wrap; gap: 6px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 20px;
}
.mf-mega-tab {
  background: transparent; border: none;
  color: #94a3b8; font-weight: 600;
  padding: 10px 18px; cursor: pointer;
  font-size: .95rem;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: color .2s, border-color .2s;
  font-family: inherit;
}
.mf-mega-tab:hover { color: #cbd5e1; }
.mf-mega-tab.active {
  color: #fff;
  border-bottom-color: var(--mf-primary);
}
.mf-mega-panel {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px 22px;
}
.mf-mega-panel.show { display: grid; }
.mf-mega-panel a {
  color: #cbd5e1;
  text-decoration: none;
  padding: 6px 0;
  font-size: .92rem;
  transition: color .15s, transform .15s;
  display: inline-flex; align-items: center;
}
.mf-mega-panel a::before {
  content: "›";
  color: var(--mf-primary);
  margin-right: 8px;
  font-weight: 700;
  transition: transform .15s;
}
.mf-mega-panel a:hover {
  color: #fff;
}
.mf-mega-panel a:hover::before {
  transform: translateX(3px);
}

@media (max-width: 640px) {
  .mf-mega-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .mf-mega-tab { white-space: nowrap; padding: 10px 14px; font-size: .88rem; }
}

/* =========================================================
   FLOATING CHAT WIDGET
   ========================================================= */
.mf-chat-btn {
  position: fixed; bottom: 20px; right: 20px; z-index: 9998;
  background: linear-gradient(135deg, var(--mf-primary), var(--mf-success));
  color: #fff; border: none;
  padding: 12px 22px; border-radius: 50px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.4);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  animation: mfPulse 2.5s infinite;
  transition: transform .2s;
}
.mf-chat-btn:hover { transform: scale(1.05); color: #fff; }
@keyframes mfPulse {
  0%, 100% { box-shadow: 0 10px 30px rgba(37, 99, 235, 0.4); }
  50%      { box-shadow: 0 10px 30px rgba(37, 99, 235, 0.7), 0 0 0 12px rgba(37,99,235,0.0); }
}
.mf-chat-popup {
  position: fixed; bottom: 90px; right: 20px; z-index: 9999;
  width: 320px; max-width: calc(100vw - 40px);
  background: #fff; border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.18);
  overflow: hidden; display: none;
}
.mf-chat-popup.open { display: block; animation: mfSlideUp .25s ease; }
@keyframes mfSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mf-chat-header {
  background: linear-gradient(135deg, var(--mf-primary), var(--mf-primary-dark));
  color: #fff; padding: 14px 18px;
  display: flex; justify-content: space-between; align-items: center;
}
.mf-chat-header h5 { color: #fff; margin: 0; font-size: 1rem; }
.mf-chat-header .close-btn {
  background: transparent; border: none; color: #fff; font-size: 1.2rem;
  cursor: pointer; opacity: .8;
}
.mf-chat-body { padding: 18px; font-size: .93rem; }
.mf-chat-body .btn-wa {
  display: block; text-align: center;
  background: #25d366; color: #fff; font-weight: 600;
  padding: 10px; border-radius: 10px; margin-top: 14px;
}
.mf-chat-body .btn-wa:hover { background: #1ebe5a; color: #fff; }
.mf-chat-body .btn-call {
  display: block; text-align: center;
  border: 2px solid var(--mf-text); color: var(--mf-text); font-weight: 600;
  padding: 10px; border-radius: 10px; margin-top: 10px;
}
.mf-chat-body .btn-call:hover { background: var(--mf-text); color: #fff; }

/* Scroll-to-top */
.mf-to-top {
  position: fixed; bottom: 90px; left: 20px; z-index: 9997;
  width: 44px; height: 44px; border-radius: 50%;
  background: #fff; color: var(--mf-primary); border: 1px solid var(--mf-border);
  box-shadow: var(--mf-shadow-md);
  display: none; align-items: center; justify-content: center; cursor: pointer;
  transition: transform .2s;
}
.mf-to-top.visible { display: inline-flex; }
.mf-to-top:hover { transform: translateY(-3px); color: var(--mf-primary-dark); }

/* =========================================================
   UTILITIES
   ========================================================= */
.text-mf-primary { color: var(--mf-primary) !important; }
.bg-mf-primary   { background: var(--mf-primary) !important; }
.shadow-mf       { box-shadow: var(--mf-shadow-md); }
.rounded-mf      { border-radius: var(--mf-radius); }

/* Mobile tweaks */
@media (max-width: 991.98px) {
  .mf-navbar .navbar-collapse {
    background: #fff;
    margin: 0 -12px;
    padding: 14px 16px;
    border-top: 1px solid var(--mf-border);
    box-shadow: 0 8px 20px rgba(0,0,0,.05);
  }
  .mf-navbar .nav-link.active::after { display: none; }
}

/* SEO content blocks — for readability on text-heavy pages */
.seo-content { line-height: 1.75; color: #374151; }
.seo-content h2, .seo-content h3 { margin-top: 2rem; color: var(--mf-text); }
.seo-content p { margin-bottom: 1rem; }
.seo-content ul { padding-left: 1.2rem; }
.seo-content ul li { margin-bottom: .5rem; }

/* Cookie banner */
.mf-cookie {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9996;
  background: #111827; color: #e5e7eb;
  padding: 14px 18px;
  display: none; gap: 14px; align-items: center; justify-content: space-between;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.2); flex-wrap: wrap;
}
.mf-cookie.show { display: flex; }
.mf-cookie p { margin: 0; font-size: .9rem; flex: 1 1 280px; }
.mf-cookie button { padding: 8px 18px; border-radius: 8px; border: none; cursor: pointer; font-weight: 600; }
.mf-cookie .accept { background: var(--mf-primary); color: #fff; }
.mf-cookie .decline { background: transparent; color: #cbd5e1; border: 1px solid #475569; }
