/* =============================================
   SELF MADE SOCIETY — Custom Stylesheet
   Color Palette: Navy #2B3A6B | Orange #E07B39 | Green #2D7A4F
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Poppins:wght@400;500;600;700;800;900&display=swap');

/* ===== ROOT TOKENS ===== */
:root {
  --navy:       #2B3A6B;
  --navy-dark:  #1e2a50;
  --navy-light: #3D4F89;
  --orange:     #E07B39;
  --orange-dark:#c96a28;
  --green:      #2D7A4F;
  --green-2:    #4A9B6F;
  --accent:     #F5A623;
  --bg:         #F4F6FB;
  --surface:    #FFFFFF;
  --text:       #1A2540;
  --text-muted: #6B7280;
  --border:     #E5E7EB;
  --shadow-xs:  0 1px 4px rgba(43,58,107,.06);
  --shadow-sm:  0 2px 10px rgba(43,58,107,.09);
  --shadow-md:  0 6px 24px rgba(43,58,107,.13);
  --shadow-lg:  0 12px 40px rgba(43,58,107,.16);
  --radius:     12px;
  --tr:         all .28s ease;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; }
input, select, textarea { font-family: inherit; outline: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--navy); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--orange); }

/* ===== TYPOGRAPHY ===== */
h1,h2,h3,h4,h5,h6 { font-family: 'Poppins', sans-serif; font-weight: 700; line-height: 1.3; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--surface); box-shadow: var(--shadow-xs);
  transition: box-shadow .3s ease;
}
.navbar.scrolled { box-shadow: var(--shadow-md); }
.nav-link {
  font-size: .88rem; font-weight: 500; color: var(--text);
  transition: var(--tr); position: relative; padding: 2px 0;
}
.nav-link::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 0; height: 2px; background: var(--orange); transition: width .28s ease;
}
.nav-link:hover, .nav-link.active { color: var(--orange); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

/* ===== MOBILE BOTTOM NAV ===== */
.bottom-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 1000; background: var(--surface);
  box-shadow: 0 -3px 20px rgba(43,58,107,.12);
  padding: 6px 0 env(safe-area-inset-bottom, 4px);
  justify-content: space-around; align-items: center;
}
.bottom-nav-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; color: var(--text-muted); font-size: .62rem; font-weight: 600;
  transition: var(--tr); padding: 4px 10px; border-radius: 10px;
}
.bottom-nav-item i { font-size: 1.15rem; transition: transform .2s ease; }
.bottom-nav-item:hover, .bottom-nav-item.active { color: var(--orange); }
.bottom-nav-item.active i { transform: translateY(-2px); }
.bottom-nav-item.active .bnav-dot {
  display: block; width: 4px; height: 4px; border-radius: 50%;
  background: var(--orange); margin: 0 auto;
}
.bnav-dot { display: none; }

@media (max-width: 768px) {
  .bottom-nav { display: flex; }
  body { padding-bottom: 68px; }
  .desktop-nav-links { display: none !important; }
  .desktop-auth-btns { display: none !important; }
}
@media (min-width: 769px) {
  .mobile-only { display: none !important; }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 26px; border-radius: 8px; font-weight: 600; font-size: .875rem;
  transition: var(--tr); border: 2px solid transparent; white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-orange {
  background: var(--orange); color: #fff; border-color: var(--orange);
}
.btn-orange:hover { background: var(--orange-dark); border-color: var(--orange-dark); box-shadow: 0 6px 20px rgba(224,123,57,.35); }
.btn-navy {
  background: var(--navy); color: #fff; border-color: var(--navy);
}
.btn-navy:hover { background: var(--navy-dark); box-shadow: 0 6px 20px rgba(43,58,107,.3); }
.btn-outline-white {
  background: transparent; color: #fff; border-color: rgba(255,255,255,.6);
}
.btn-outline-white:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.btn-outline-navy {
  background: transparent; color: var(--navy); border-color: var(--navy);
}
.btn-outline-navy:hover { background: var(--navy); color: #fff; }
.btn-green { background: var(--green); color: #fff; border-color: var(--green); }
.btn-green:hover { background: #236040; box-shadow: 0 6px 20px rgba(45,122,79,.3); }
.btn-sm { padding: 7px 16px; font-size: .8rem; border-radius: 6px; }
.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: 10px; }
.btn-block { width: 100%; }

/* ===== HERO SECTION ===== */
.hero-section {
  min-height: 100vh; background: var(--navy); position: relative;
  display: flex; align-items: center; overflow: hidden; padding-top: 64px;
}
.hero-bg {
  position: absolute; inset: 0; background-size: cover;
  background-position: center; z-index: 0; transition: background-image .5s ease;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(27,42,80,.82) 0%, rgba(27,42,80,.55) 100%);
  z-index: 1;
}
.hero-content { position: relative; z-index: 2; }
.hero-title {
  font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; color: #fff;
  line-height: 1.15; transition: opacity .3s ease;
}
.hero-title span { color: var(--orange); }
.hero-subtitle { transition: opacity .3s ease; }

/* Floating badge */
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.12); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.2); border-radius: 100px;
  padding: 7px 16px; color: #fff; font-size: .8rem; font-weight: 600;
  margin-bottom: 20px;
}

/* ===== SECTION LAYOUT ===== */
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.section-white { background: var(--surface); }
.section-light { background: var(--bg); }
.section-navy { background: var(--navy); }

.section-label {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(224,123,57,.1); color: var(--orange);
  font-weight: 700; font-size: .7rem; letter-spacing: 2px;
  text-transform: uppercase; padding: 5px 14px; border-radius: 100px; margin-bottom: 12px;
}
.section-label.white { background: rgba(255,255,255,.15); color: #fff; }
.section-label.green { background: rgba(45,122,79,.12); color: var(--green); }

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.1rem); color: var(--navy); margin-bottom: 10px;
}
.section-title.white { color: #fff; }
.section-subtitle { color: var(--text-muted); font-size: .95rem; max-width: 560px; }
.section-subtitle.white { color: rgba(255,255,255,.72); }

/* ===== CARDS ===== */
.card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-xs); transition: var(--tr); overflow: hidden;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-5px); }

/* Stat Card */
.stat-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 24px; text-align: center; box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--orange);
}
.stat-number {
  font-family: 'Poppins', sans-serif; font-size: 2.4rem;
  font-weight: 800; color: var(--navy); line-height: 1;
}
.stat-label { color: var(--text-muted); font-size: .82rem; font-weight: 600; margin-top: 4px; }

/* Course Card */
.course-card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-xs); transition: var(--tr); overflow: hidden;
}
.course-card:hover { box-shadow: var(--shadow-md); transform: translateY(-6px); }
.course-thumb { width: 100%; height: 195px; object-fit: cover; transition: transform .4s ease; }
.course-card:hover .course-thumb { transform: scale(1.05); }
.course-thumb-wrap { overflow: hidden; }

/* Job Card */
.job-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-xs); transition: var(--tr);
  border-left: 4px solid transparent;
}
.job-card:hover { box-shadow: var(--shadow-md); border-left-color: var(--orange); transform: translateX(4px); }

/* Project/Campaign Card */
.project-card {
  background: var(--surface); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-xs); transition: var(--tr);
}
.project-card:hover { box-shadow: var(--shadow-md); transform: translateY(-5px); }

/* Testimonial */
.testimonial-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow-sm); position: relative;
}
.testimonial-card::before {
  content: '\201C'; position: absolute; top: 12px; left: 22px;
  font-size: 5rem; color: var(--orange); font-family: Georgia, serif;
  line-height: 1; opacity: .25;
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 100px; font-size: .7rem; font-weight: 700;
}
.badge-orange  { background: rgba(224,123,57,.12); color: var(--orange); }
.badge-green   { background: rgba(45,122,79,.12);  color: var(--green); }
.badge-navy    { background: rgba(43,58,107,.1);   color: var(--navy); }
.badge-red     { background: rgba(220,38,38,.1);   color: #dc2626; }
.badge-yellow  { background: rgba(245,166,35,.12); color: #92400e; }
.badge-gray    { background: rgba(107,114,128,.1); color: #6b7280; }

/* ===== PROGRESS BAR ===== */
.progress-wrap { height: 7px; background: #E5E7EB; border-radius: 4px; overflow: hidden; }
.progress-bar  { height: 100%; background: var(--green); border-radius: 4px; transition: width 1.2s ease; }
.progress-bar.orange { background: var(--orange); }
.progress-bar.navy   { background: var(--navy); }

/* ===== FORMS ===== */
.form-group { margin-bottom: 20px; }
.form-label  { display: block; font-size: .83rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 11px 15px;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-size: .9rem; color: var(--text); background: var(--surface);
  transition: border-color .25s, box-shadow .25s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--navy); box-shadow: 0 0 0 3px rgba(43,58,107,.08);
}
.form-input::placeholder, .form-textarea::placeholder { color: #9CA3AF; }
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236B7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.form-textarea { resize: vertical; min-height: 100px; }
.input-group { position: relative; }
.input-group .input-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: .9rem; pointer-events: none;
}
.input-group .form-input { padding-left: 40px; }
.input-group .input-icon-right {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); cursor: pointer;
}
.form-check {
  display: flex; align-items: center; gap: 8px;
  font-size: .85rem; color: var(--text); cursor: pointer;
}
.form-check input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--navy); cursor: pointer; }

/* ===== MODAL ===== */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 2000;
  align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal-box {
  background: var(--surface); border-radius: 16px;
  width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,.25);
  animation: fadeInUp .3s ease;
}
.modal-header {
  padding: 18px 24px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.modal-header h3 { font-size: 1rem; color: var(--navy); }
.modal-close {
  width: 32px; height: 32px; border-radius: 8px; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); cursor: pointer; transition: var(--tr); flex-shrink: 0;
}
.modal-close:hover { background: #fee2e2; color: #dc2626; }
.modal-body    { padding: 22px 24px; }
.modal-footer  { padding: 14px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ===== COPY BOX ===== */
.copy-box {
  display: flex; align-items: center;
  background: var(--bg); border: 1.5px solid var(--border); border-radius: 8px; overflow: hidden;
}
.copy-box input {
  flex: 1; padding: 10px 14px; border: none; background: transparent;
  font-size: .82rem; color: var(--text);
}
.copy-btn {
  padding: 10px 16px; background: var(--navy); color: #fff;
  font-size: .78rem; font-weight: 700; transition: var(--tr);
}
.copy-btn:hover { background: var(--orange); }

/* ===== ACCORDION ===== */
.accordion-item { border: 1.5px solid var(--border); border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
.accordion-header {
  padding: 14px 18px; display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; font-weight: 600; font-size: .9rem; background: var(--surface);
  transition: var(--tr); gap: 10px;
}
.accordion-header:hover { background: var(--bg); color: var(--navy); }
.accordion-header .chevron { transition: transform .3s ease; font-size: .8rem; color: var(--text-muted); }
.accordion-header.open .chevron { transform: rotate(180deg); }
.accordion-body { max-height: 0; overflow: hidden; transition: max-height .35s ease; background: var(--bg); }
.accordion-body.open { max-height: 600px; }
.accordion-content { padding: 14px 18px; font-size: .875rem; color: var(--text-muted); }

/* ===== TAB BUTTONS ===== */
.tab-wrap { display: flex; gap: 8px; flex-wrap: wrap; }
.tab-btn {
  padding: 8px 18px; border-radius: 8px; font-size: .83rem; font-weight: 600;
  color: var(--text-muted); border: 1.5px solid var(--border);
  background: var(--surface); transition: var(--tr); cursor: pointer;
}
.tab-btn:hover, .tab-btn.active {
  background: var(--navy); color: #fff; border-color: var(--navy);
}

/* ===== STARS ===== */
.stars { color: #F59E0B; font-size: .82rem; letter-spacing: .5px; }

/* ===== AVATAR ===== */
.avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; }

/* ===== ALERTS ===== */
.alert { padding: 12px 16px; border-radius: 8px; font-size: .875rem; display: flex; align-items: center; gap: 10px; }
.alert-success { background: rgba(45,122,79,.09); color: var(--green);  border: 1px solid rgba(45,122,79,.2); }
.alert-warning { background: rgba(245,166,35,.1);  color: #92400e; border: 1px solid rgba(245,166,35,.25); }
.alert-danger  { background: rgba(220,38,38,.08);  color: #dc2626;  border: 1px solid rgba(220,38,38,.18); }
.alert-info    { background: rgba(43,58,107,.08);  color: var(--navy); border: 1px solid rgba(43,58,107,.18); }

/* ===== PAGE LOADER ===== */
.page-loader {
  position: fixed; inset: 0; background: var(--navy);
  z-index: 9999; display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 18px; transition: opacity .45s ease;
}
.page-loader.hide { opacity: 0; pointer-events: none; }
.loader-ring {
  width: 52px; height: 52px; border-radius: 50%;
  border: 4px solid rgba(255,255,255,.2); border-top-color: var(--orange);
  animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== FOOTER ===== */
.footer { background: var(--navy); }
.footer-link {
  display: block; color: rgba(255,255,255,.62); font-size: .855rem;
  transition: var(--tr); margin-bottom: 9px;
}
.footer-link:hover { color: var(--orange); padding-left: 4px; }
.social-icon {
  width: 37px; height: 37px; border-radius: 8px;
  background: rgba(255,255,255,.1); display: inline-flex; align-items: center;
  justify-content: center; color: #fff; font-size: .9rem; transition: var(--tr);
}
.social-icon:hover { background: var(--orange); transform: translateY(-3px); }
.footer-divider { border-color: rgba(255,255,255,.1); }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp    { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInLeft  { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeInRight { from { opacity: 0; transform: translateX(28px);  } to { opacity: 1; transform: translateX(0); } }
@keyframes floatY      { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulse-dot   { 0%,100%{transform:scale(1)} 50%{transform:scale(1.15)} }

.anim-up    { animation: fadeInUp   .7s ease both; }
.anim-left  { animation: fadeInLeft .7s ease both; }
.anim-right { animation: fadeInRight .7s ease both; }
.anim-float { animation: floatY 3.5s ease-in-out infinite; }

.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }
.delay-4 { animation-delay: .4s; }
.delay-5 { animation-delay: .5s; }
.delay-6 { animation-delay: .6s; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== SEARCH BOX ===== */
.search-wrap { position: relative; }
.search-wrap i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.search-wrap .form-input { padding-left: 40px; }

/* ===== SLIDER DOTS ===== */
.slider-dots { display: flex; gap: 6px; align-items: center; }
.s-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.35); cursor: pointer; transition: var(--tr); }
.s-dot.active { background: var(--orange); width: 22px; border-radius: 4px; }

/* ===== AFFILIATE LEVEL TABLE ===== */
.level-row {
  display: flex; align-items: center; padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}
.level-row:last-child { border-bottom: none; }
.level-num {
  width: 32px; height: 32px; border-radius: 50%; background: var(--navy);
  color: #fff; font-size: .78rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.level-bar-wrap { flex: 1; margin: 0 14px; }
.level-pct { font-family: 'Poppins',sans-serif; font-size: 1rem; font-weight: 800; color: var(--orange); }

@media (max-width: 768px) {
  .section { padding: 56px 0; }
  .section-title { font-size: 1.45rem; }
}

/* ===== LEADERBOARD ===== */
.lb-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px;
  border-bottom: 1px solid var(--border); transition: var(--tr);
}
.lb-row:hover { background: var(--bg); }
.lb-rank { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 800; }
.lb-rank.gold   { background: #FEF3C7; color: #B45309; }
.lb-rank.silver { background: #F3F4F6; color: #6B7280; }
.lb-rank.bronze { background: #FEF3C7; color: #92400E; }
.lb-rank.other  { background: var(--bg); color: var(--text-muted); }

/* ===== UPLOAD ZONE ===== */
.upload-zone {
  border: 2px dashed var(--border); border-radius: 10px; padding: 32px;
  text-align: center; cursor: pointer; transition: var(--tr); background: var(--bg);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--navy); background: rgba(43,58,107,.04);
}

/* ===== QUICK UTILS ===== */
.divider { height: 1px; background: var(--border); }
.text-navy   { color: var(--navy) !important; }
.text-orange { color: var(--orange) !important; }
.text-green  { color: var(--green) !important; }
.text-muted  { color: var(--text-muted) !important; }
.bg-navy     { background: var(--navy) !important; }
.bg-orange   { background: var(--orange) !important; }
.bg-green    { background: var(--green) !important; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.font-display { font-family: 'Poppins', sans-serif !important; }

/* ===== TOAST NOTIFICATIONS ===== */
#toastContainer {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999; display: flex; flex-direction: column; gap: 10px;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  min-width: 280px; max-width: 360px;
  padding: 14px 18px; border-radius: 10px;
  background: #fff; box-shadow: 0 8px 30px rgba(0,0,0,.14);
  animation: fadeInRight .35s ease both;
  border-left: 4px solid var(--navy);
  font-size: .875rem; font-weight: 500;
}
.toast.success { border-color: var(--green); }
.toast.error   { border-color: #dc2626; }
.toast.info    { border-color: var(--navy); }
.toast.warning { border-color: var(--accent); }
.toast-icon.success { color: var(--green); }
.toast-icon.error   { color: #dc2626; }
.toast-icon.info    { color: var(--navy); }
.toast-icon.warning { color: var(--accent); }
.toast-close {
  margin-left: auto; background: none; border: none;
  color: var(--text-muted); cursor: pointer; font-size: .85rem;
}
.toast.hide { animation: fadeInRight .3s ease reverse both; }

