/* ============================================================
   ReferenceForMBA.com — Shared Stylesheet
   Theme: Professional Blue & Gold
   ============================================================ */

:root {
  --navy:       #0D2B6B;
  --blue:       #1A4BAE;
  --blue-light: #2563EB;
  --gold:       #D4A017;
  --gold-light: #F5C842;
  --gold-pale:  #FFF8E1;
  --white:      #FFFFFF;
  --gray-50:    #F8FAFC;
  --gray-100:   #F1F5F9;
  --gray-200:   #E2E8F0;
  --gray-400:   #94A3B8;
  --gray-600:   #475569;
  --gray-800:   #1E293B;
  --success:    #16A34A;
  --danger:     #DC2626;
  --radius:     10px;
  --shadow:     0 4px 24px rgba(13,43,107,0.10);
  --shadow-lg:  0 8px 40px rgba(13,43,107,0.16);
  --transition: 0.22s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.6;
  max-width: 100%;
  overflow-x: hidden;
}

/* Prevent long text, emails or referral links from stretching mobile layouts */
body, div, p, span, a, h1, h2, h3 {
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── TYPOGRAPHY ─────────────────────────────────────────── */
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.2; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem);   font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p  { color: var(--gray-600); }

.section-label {
  display: inline-block;
  background: var(--gold-pale);
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 20px;
  padding: 4px 14px;
  margin-bottom: 12px;
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 4px 14px rgba(212,160,23,0.35);
}
.btn-primary:hover { background: var(--gold-light); box-shadow: 0 6px 20px rgba(212,160,23,0.45); }

.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border: 2px solid var(--navy);
}
.btn-secondary:hover { background: var(--navy); color: var(--white); }

.btn-blue {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(26,75,174,0.3);
}
.btn-blue:hover { background: var(--navy); }

.btn-sm { padding: 9px 18px; font-size: 0.85rem; }
.btn-full { width: 100%; justify-content: center; }

/* ── NAVBAR ──────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--navy);
  box-shadow: 0 2px 16px rgba(0,0,0,0.18);
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.nav-logo span { color: var(--gold); }
.nav-logo .logo-icon {
  width: 38px; height: 38px;
  background: var(--gold);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--navy);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}
.nav-links a {
  color: rgba(255,255,255,0.82);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 7px;
  transition: background var(--transition), color var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  background: rgba(255,255,255,0.1);
  color: var(--white);
}
.nav-links .nav-cta a {
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
}
.nav-links .nav-cta a:hover { background: var(--gold-light); }

/* ── HERO ────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  color: var(--white);
  padding: 80px 24px 90px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; max-width: 720px; margin: 0 auto; }
.hero h1 { color: var(--white); margin-bottom: 18px; }
.hero h1 span { color: var(--gold); }
.hero p { color: rgba(255,255,255,0.85); font-size: 1.1rem; margin-bottom: 34px; max-width: 560px; margin-left: auto; margin-right: auto; }
.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.hero-badges {
  display: flex; gap: 20px; justify-content: center; flex-wrap: wrap;
  margin-top: 44px;
}
.hero-badge {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50px;
  padding: 8px 20px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.9);
  display: flex; align-items: center; gap: 7px;
}
.hero-badge strong { color: var(--gold-light); }

/* ── PAGE HEADER (inner pages) ────────────────────────────── */
.page-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  color: var(--white);
  padding: 56px 24px 60px;
  text-align: center;
}
.page-header h1 { color: var(--white); margin-bottom: 12px; }
.page-header h1 span { color: var(--gold); }
.page-header p { color: rgba(255,255,255,0.82); max-width: 560px; margin: 0 auto; font-size: 1.05rem; }

/* ── SECTION WRAPPER ─────────────────────────────────────── */
.section {
  padding: 72px 24px;
}
.section-center { text-align: center; }
.section-center h2 { margin-bottom: 14px; }
.section-center p  { max-width: 580px; margin: 0 auto 48px; }
.container { max-width: 1100px; margin: 0 auto; }

/* ── CARDS ───────────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.card {
  background: var(--white);
  border-radius: 14px;
  padding: 28px 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.card-icon {
  width: 52px; height: 52px;
  background: var(--gold-pale);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}
.card h3 { margin-bottom: 8px; color: var(--navy); }

/* ── STAT BOXES ──────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}
.stat-box {
  background: var(--white);
  border-radius: 14px;
  padding: 24px 20px;
  box-shadow: var(--shadow);
  text-align: center;
  border-top: 4px solid var(--gold);
}
.stat-box .stat-num { font-size: 2rem; font-weight: 800; color: var(--navy); }
.stat-box .stat-label { font-size: 0.82rem; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px; }

/* ── STEPS ───────────────────────────────────────────────── */
.steps { display: flex; gap: 0; flex-wrap: wrap; }
.step {
  flex: 1; min-width: 200px;
  text-align: center;
  padding: 28px 20px;
  position: relative;
}
.step:not(:last-child)::after {
  content: '→';
  position: absolute;
  right: -10px; top: 38px;
  font-size: 1.4rem;
  color: var(--gold);
}
.step-num {
  width: 52px; height: 52px;
  background: var(--navy);
  color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; font-weight: 800;
  margin: 0 auto 14px;
  border: 3px solid var(--gold);
}
.step h3 { color: var(--navy); margin-bottom: 6px; }

/* ── FORM ────────────────────────────────────────────────── */
.form-card {
  background: var(--white);
  border-radius: 16px;
  padding: 36px;
  box-shadow: var(--shadow-lg);
  max-width: 600px;
  margin: 0 auto;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 540px) { .form-row { grid-template-columns: 1fr; } }

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 7px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--gray-800);
  background: var(--gray-50);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,75,174,0.12);
  background: var(--white);
}
.form-group textarea { resize: vertical; min-height: 100px; }

/* ── REFERRAL LINK BOX ───────────────────────────────────── */
.ref-link-box {
  background: var(--gray-100);
  border: 2px dashed var(--gold);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}
.ref-link-box input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.9rem;
  color: var(--navy);
  font-weight: 600;
  outline: none;
}
.ref-link-box button { flex-shrink: 0; }

/* ── TABLE ───────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: 14px; box-shadow: var(--shadow); }
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
}
thead { background: var(--navy); }
thead th {
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 14px 18px;
  text-align: left;
}
tbody tr { border-bottom: 1px solid var(--gray-100); transition: background var(--transition); }
tbody tr:hover { background: var(--gray-50); }
tbody td { padding: 14px 18px; font-size: 0.9rem; }
.badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}
.badge-success { background: #DCFCE7; color: var(--success); }
.badge-pending { background: #FEF9C3; color: #92400E; }
.badge-blue    { background: #DBEAFE; color: var(--blue); }

/* ── LEADERBOARD ─────────────────────────────────────────── */
.leaderboard-item {
  display: flex; align-items: center; gap: 16px;
  background: var(--white);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  transition: transform var(--transition);
}
.leaderboard-item:hover { transform: translateX(4px); }
.leaderboard-item.rank-1 { border-left: 5px solid #FFD700; }
.leaderboard-item.rank-2 { border-left: 5px solid #C0C0C0; }
.leaderboard-item.rank-3 { border-left: 5px solid #CD7F32; }
.rank-badge {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-weight: 800;
  font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.rank-1 .rank-badge { background: #FFD700; color: var(--navy); }
.rank-2 .rank-badge { background: #C0C0C0; color: var(--navy); }
.rank-3 .rank-badge { background: #CD7F32; color: var(--white); }
.lb-info { flex: 1; }
.lb-info strong { display: block; font-size: 0.95rem; color: var(--navy); }
.lb-info span   { font-size: 0.8rem; color: var(--gray-400); }
.lb-earn { font-size: 1.05rem; font-weight: 800; color: var(--success); }

/* ── OFFER CARDS ─────────────────────────────────────────── */
.offer-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.offer-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.offer-card-header {
  background: linear-gradient(135deg, var(--navy), var(--blue));
  padding: 22px 22px 18px;
  color: var(--white);
}
.offer-card-header h3 { color: var(--white); font-size: 1rem; }
.offer-card-header .cashback-amt {
  font-size: 2rem; font-weight: 900;
  color: var(--gold-light);
  margin: 8px 0 2px;
}
.offer-card-header .cashback-label { font-size: 0.78rem; opacity: 0.8; }
.offer-card-body { padding: 20px 22px; flex: 1; }
.offer-card-body ul { list-style: none; }
.offer-card-body ul li {
  padding: 6px 0;
  font-size: 0.88rem;
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; gap: 8px;
}
.offer-card-body ul li::before { content: '✓'; color: var(--success); font-weight: 700; }
.offer-card-footer { padding: 16px 22px; border-top: 1px solid var(--gray-100); }
.timer { font-size: 0.8rem; color: var(--gold); font-weight: 600; text-align: center; margin-top: 8px; }

/* ── ALERT / TOAST ───────────────────────────────────────── */
.alert {
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}
.alert.show { display: flex; }
.alert-success { background: #DCFCE7; color: var(--success); border: 1px solid #BBF7D0; }
.alert-info    { background: #DBEAFE; color: var(--blue);    border: 1px solid #BFDBFE; }

/* ── FOOTER ──────────────────────────────────────────────── */
footer {
  background: var(--gray-800);
  color: rgba(255,255,255,0.7);
  padding: 48px 24px 28px;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 40px;
}
@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-brand p { margin-top: 10px; font-size: 0.85rem; max-width: 240px; }
.footer-brand strong { color: var(--white); font-size: 1.05rem; }
.footer-brand strong span { color: var(--gold); }
footer h4 { color: var(--white); font-size: 0.88rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 14px; }
footer ul { list-style: none; }
footer ul li { margin-bottom: 9px; }
footer ul li a { font-size: 0.875rem; transition: color var(--transition); }
footer ul li a:hover { color: var(--gold); }
.footer-bottom {
  max-width: 1100px; margin: 28px auto 0;
  padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  font-size: 0.8rem;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
/* 1. Global Tablet & Mobile Grid Normalizer */
@media (max-width: 992px) {
  /* Force all inline styled 2-column or sidebar grids to collapse to single column */
  div[style*="display:grid"][style*="grid-template-columns"],
  div[style*="display: grid"][style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
}

/* 2. Mobile & Tablet Navbar and Layout Optimizations */
@media (max-width: 768px) {
  /* Expand navbar to allow row scroll */
  .navbar {
    position: sticky;
    top: 0;
  }
  .nav-inner {
    flex-direction: column;
    height: auto;
    padding: 12px 16px;
    gap: 10px;
  }
  .nav-logo {
    font-size: 1.12rem;
  }
  /* Elegant horizontal scrollable menu bar */
  .nav-links {
    display: flex !important;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    gap: 2px;
  }
  .nav-links::-webkit-scrollbar {
    display: none; /* Hide scrollbar for seamless touch-swipes */
  }
  .nav-links li {
    display: inline-block;
    flex-shrink: 0;
  }
  .nav-links a {
    padding: 6px 11px;
    font-size: 0.8rem;
  }

  /* Typography scale corrections */
  h1 { font-size: 1.8rem !important; }
  h2 { font-size: 1.35rem !important; }

  /* Compact section sizes */
  .hero { padding: 50px 16px 60px; }
  .section { padding: 44px 16px; }
  .page-header { padding: 40px 16px 44px; }
  .form-card { padding: 24px 18px; }

  /* Steps list orientation */
  .steps { flex-direction: column; align-items: center; }
  .step:not(:last-child)::after { display: none; }

  /* Responsive stats elements */
  .stats-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
  
  /* Center dashboard welcome */
  div[style*="background:var(--navy);padding:30px 24px 36px;"] > div {
    flex-direction: column !important;
    text-align: center !important;
    align-items: center !important;
  }

  /* Compact timeline elements */
  .timeline {
    padding-left: 22px !important;
  }
  .timeline::before {
    left: 7px !important;
  }
  .timeline-icon {
    left: -22px !important;
    width: 16px !important;
    height: 16px !important;
    top: 5px !important;
    font-size: 0.52rem !important;
  }
  .timeline-content {
    padding: 12px 14px !important;
  }
}

@media (max-width: 480px) {
  /* Collapse stats row to 1-column on very tiny devices */
  .stats-row {
    grid-template-columns: 1fr !important;
  }
}

