:root {
  --mcx-dark: #0a1f3d;
  --mcx-blue: #0f2b5c;
  --mcx-green: #1a8a3a;
  --mcx-light: #f0f4f0;
  --mcx-gray: #6c757d;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }

/* Top Bar */
.top-bar {
  background: var(--mcx-dark);
  font-size: 0.8rem;
  padding: 6px 0;
}
.top-bar a { color: #adb5bd; text-decoration: none; transition: color 0.2s; }
.top-bar a:hover { color: var(--mcx-green); }
.top-bar .divider { color: #495057; margin: 0 6px; }

/* Header / Logo */
.header-main {
  background: #fff;
  padding: 12px 0;
  border-bottom: 1px solid #dce6dc;
}
.header-main .logo img { height: 50px; }
.btn-mymcx {
  background: var(--mcx-blue); color: #fff; border-radius: 4px;
  padding: 6px 18px; font-size: 0.85rem; font-weight: 600;
  text-decoration: none; transition: background 0.2s;
}
.btn-mymcx:hover { background: #071d3d; color: #fff; }
.btn-old-site { color: var(--mcx-gray); font-size: 0.85rem; text-decoration: none; margin-right: 12px; }
.btn-old-site:hover { color: var(--mcx-blue); }

/* Navbar */
.navbar-main {
  background: #fff;
  border-bottom: 2px solid #dce6dc;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.navbar-main .nav-link {
  color: var(--mcx-dark) !important;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 12px 16px !important;
  transition: color 0.2s;
}
.navbar-main .nav-link:hover,
.navbar-main .nav-link.active { color: var(--mcx-blue) !important; }

/* Mega menu */
.mega-menu {
  width: 100%;
  padding: 24px 32px;
  border: none;
  border-top: 3px solid var(--mcx-blue);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}
.mega-menu .menu-col h6 {
  color: var(--mcx-blue);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #dce6dc;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.mega-menu .menu-col a {
  display: block;
  color: #495057;
  font-size: 0.85rem;
  padding: 4px 0;
  text-decoration: none;
  transition: color 0.2s;
}
.mega-menu .menu-col a:hover { color: var(--mcx-blue); padding-left: 4px; }

/* Dashboard Hero */
.dash-section {
  background: linear-gradient(135deg, #050d1a 0%, #0a1f3d 50%, #07152e 100%);
  min-height: 520px;
  padding: 30px 0 50px;
  position: relative;
}
.dash-section::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(26,138,58,0.06) 0%, transparent 60%);
  pointer-events: none;
}
.dash-card {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  padding: 20px;
  height: 100%;
  transition: box-shadow 0.3s;
}
.dash-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.3); }
.dash-card .card-title {
  color: rgba(255,255,255,0.6);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.dash-card .big-value {
  color: #fff; font-size: 2.2rem; font-weight: 700;
  font-family: 'Segoe UI', sans-serif;
}
.dash-card .change-badge {
  font-size: 0.85rem; font-weight: 600; padding: 2px 12px;
  border-radius: 20px; display: inline-block;
}
.change-badge.up { background: rgba(26,138,58,0.18); color: #2ecc71; }
.change-badge.down { background: rgba(192,57,43,0.18); color: #e74c3c; }

.dash-select {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.85rem;
  width: 100%;
}
.dash-select option { background: #0a1f3d; color: #fff; }
.dash-select:focus { outline: none; border-color: var(--mcx-green); }

/* Commodity Cards Grid */
.commodity-grid { display: grid; gap: 10px; }
.commodity-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.25s;
  cursor: default;
}
.commodity-card:hover {
  transform: translateX(4px);
  background: rgba(255,255,255,0.08);
}
.commodity-card .c-name { color: #fff; font-weight: 600; font-size: 0.9rem; }
.commodity-card .c-expiry { color: rgba(255,255,255,0.4); font-size: 0.7rem; }
.commodity-card .c-price { color: #fff; font-weight: 700; font-size: 0.95rem; }
.commodity-card .c-change { font-weight: 600; font-size: 0.8rem; }
.commodity-card .c-change.up { color: #2ecc71; }
.commodity-card .c-change.down { color: #e74c3c; }
.commodity-card .c-icon { font-size: 1.3rem; width: 32px; text-align: center; }

.dash-clock { color: rgba(255,255,255,0.5); font-size: 0.85rem; font-family: monospace; letter-spacing: 0.5px; }

/* Chart wrapper */
.chart-wrapper { position: relative; height: 250px; }
.chart-controls { display: flex; gap: 6px; flex-wrap: wrap; }
.chart-controls .btn-ctime {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  border-radius: 6px;
  padding: 3px 12px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}
.chart-controls .btn-ctime:hover,
.chart-controls .btn-ctime.active { background: rgba(26,138,58,0.2); border-color: var(--mcx-green); color: #2ecc71; }

.dash-toolbar .btn-dash {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}
.dash-toolbar .btn-dash:hover { background: rgba(26,138,58,0.15); border-color: var(--mcx-green); color: #2ecc71; }

/* Ticker horizontal scroll */
.ticker-wrap {
  overflow: hidden;
  position: relative;
  width: 100%;
}
.ticker-track {
  display: flex;
  gap: 10px;
  animation: tickerScroll 30s linear infinite;
  width: max-content;
}
.ticker-track:hover { animation-play-state: paused; }
@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  padding: 6px 14px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s;
}
.ticker-item:hover { background: rgba(255,255,255,0.1); }
.ticker-item .ti-name { color:#fff; font-weight:600; font-size:0.8rem; }
.ticker-item .ti-price { color:#fff; font-weight:700; font-size:0.85rem; margin-left:8px; }
.ticker-item .ti-change { font-weight:600; font-size:0.75rem; margin-left:6px; }
.ticker-item .ti-change.up { color:#2ecc71; }
.ticker-item .ti-change.down { color:#e74c3c; }
.ticker-item .ti-icon { font-size:1rem; width:20px; text-align:center; }

body.light-theme .ticker-item { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.08); }
body.light-theme .ticker-item .ti-name,
body.light-theme .ticker-item .ti-price { color:#0a1f3d; }
body.light-theme .ticker-item:hover { background: rgba(0,0,0,0.06); }

.dash-search {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.8rem;
  width: 100%;
}
.dash-search::placeholder { color: rgba(255,255,255,0.35); }
.dash-search:focus { outline: none; border-color: var(--mcx-green); }

/* Theme toggle */
.theme-toggle {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
}
.theme-toggle:hover { border-color: var(--mcx-green); color: #2ecc71; }

body.light-theme .dash-section {
  background: linear-gradient(135deg, #e8f0e8 0%, #d0e0d0 100%);
}
body.light-theme .dash-card {
  background: rgba(255,255,255,0.7);
  border-color: rgba(0,0,0,0.08);
}
body.light-theme .dash-card .card-title { color: rgba(0,0,0,0.5); }
body.light-theme .dash-card .big-value,
body.light-theme .commodity-card .c-name,
body.light-theme .commodity-card .c-price,
body.light-theme .dash-select { color: #0a1f3d; }
body.light-theme .dash-select { background: rgba(255,255,255,0.7); border-color: rgba(0,0,0,0.12); }
body.light-theme .commodity-card { background: rgba(255,255,255,0.6); border-color: rgba(0,0,0,0.08); }
body.light-theme .commodity-card:hover { background: rgba(255,255,255,0.85); }
body.light-theme .dash-clock { color: rgba(0,0,0,0.4); }
body.light-theme .dash-search { background: rgba(255,255,255,0.7); color: #0a1f3d; border-color: rgba(0,0,0,0.12); }
body.light-theme .dash-search::placeholder { color: rgba(0,0,0,0.3); }
body.light-theme .chart-controls .btn-ctime,
body.light-theme .dash-toolbar .btn-dash,
body.light-theme .theme-toggle { background: rgba(255,255,255,0.5); border-color: rgba(0,0,0,0.12); color: rgba(0,0,0,0.5); }
body.light-theme .chart-controls .btn-ctime:hover,
body.light-theme .dash-toolbar .btn-dash:hover,
body.light-theme .theme-toggle:hover { border-color: var(--mcx-green); color: var(--mcx-green); }
body.light-theme .dash-card [style*="border-top"] { border-top-color: rgba(0,0,0,0.08) !important; }
body.light-theme .ticker-item .ti-expiry { color: rgba(0,0,0,0.35) !important; }

/* Resources Quick Links */
.resources-section { padding: 50px 0; background: #fff; }
.resources-section h2 { font-weight: 700; color: var(--mcx-dark); margin-bottom: 32px; }
.resource-card {
  background: var(--mcx-light);
  border-radius: 10px;
  padding: 28px 20px;
  text-align: center;
  transition: all 0.3s;
  text-decoration: none;
  display: block;
  border: 1px solid transparent;
}
.resource-card:hover {
  background: #fff;
  border-color: var(--mcx-blue);
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(15,43,92,0.1);
}
.resource-card i { font-size: 2.2rem; color: var(--mcx-blue); margin-bottom: 12px; }
.resource-card span { display: block; font-weight: 600; color: var(--mcx-dark); font-size: 0.95rem; }

/* New Here Section */
.newhere-section { background: var(--mcx-light); padding: 50px 0; }
.newhere-section h2 { font-weight: 700; color: var(--mcx-dark); margin-bottom: 8px; }
.newhere-card {
  background: #fff; border-radius: 12px; padding: 28px; height: 100%;
  border: 1px solid #dce6dc; transition: box-shadow 0.3s;
}
.newhere-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.06); }
.newhere-card h5 { color: var(--mcx-blue); font-weight: 700; margin-bottom: 12px; }
.newhere-card p { font-size: 0.9rem; color: #495057; }
.newhere-card .badge-tag {
  display: inline-block; background: var(--mcx-green); color: #fff;
  padding: 2px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600;
  margin-bottom: 10px;
}

/* Trade With Section */
.trade-section { padding: 50px 0; background: #fff; }
.trade-section h2 { font-weight: 700; color: var(--mcx-dark); }
.trade-card {
  background: var(--mcx-light); border-radius: 12px; padding: 32px; height: 100%;
  transition: transform 0.3s;
}
.trade-card:hover { transform: translateY(-4px); }
.trade-card h3 { color: var(--mcx-blue); font-weight: 700; font-size: 1.5rem; }
.trade-card .member-type {
  display: inline-block; background: var(--mcx-dark); color: #fff;
  padding: 4px 14px; border-radius: 20px; font-size: 0.8rem; margin: 4px 4px 0 0;
}

/* Guides */
.guides-section { background: var(--mcx-light); padding: 50px 0; }
.guides-section h2 { font-weight: 700; color: var(--mcx-dark); margin-bottom: 32px; }
.guide-card {
  background: #fff; border-radius: 12px; overflow: hidden; height: 100%;
  border: 1px solid #dce6dc; transition: all 0.3s;
}
.guide-card:hover { box-shadow: 0 8px 25px rgba(0,0,0,0.08); transform: translateY(-3px); }
.guide-card img { width: 100%; height: 180px; object-fit: cover; }
.guide-card-body { padding: 20px; }
.guide-card-body h6 { font-weight: 700; color: var(--mcx-dark); margin-bottom: 8px; }
.guide-card-body p { font-size: 0.85rem; color: #6c757d; }
.guide-card-body a { color: var(--mcx-blue); font-weight: 600; text-decoration: none; font-size: 0.85rem; }
.guide-card-body a:hover { text-decoration: underline; }

/* Press Releases */
.press-section { padding: 50px 0; background: #fff; }
.press-section h2 { font-weight: 700; color: var(--mcx-dark); }
.press-item {
  border-bottom: 1px solid #dce6dc;
  padding: 16px 0;
  display: flex; align-items: center; gap: 12px;
}
.press-item:last-child { border-bottom: none; }
.press-item i { font-size: 1.5rem; color: var(--mcx-blue); flex-shrink: 0; }
.press-item .press-title { font-weight: 600; color: var(--mcx-dark); font-size: 0.9rem; }
.press-item .press-title:hover { color: var(--mcx-blue); cursor: pointer; }
.press-item .press-date { font-size: 0.75rem; color: var(--mcx-gray); }
.press-item a { color: var(--mcx-blue); font-weight: 600; text-decoration: none; font-size: 0.85rem; white-space: nowrap; }

/* Awards */
.awards-section { background: var(--mcx-dark); padding: 50px 0; color: #fff; }
.awards-section h2 { font-weight: 700; margin-bottom: 32px; }
.award-slide {
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  height: 100%;
  border: 1px solid rgba(255,255,255,0.08);
}
.award-slide i { font-size: 2rem; color: var(--mcx-green); margin-bottom: 12px; }
.award-slide h6 { font-weight: 600; font-size: 0.95rem; }
.award-slide p { font-size: 0.8rem; opacity: 0.7; }

/* Footer */
.footer-main {
  background: #07152e;
  color: #adb5bd;
  padding: 40px 0 20px;
  font-size: 0.85rem;
}
.footer-main h6 { color: #fff; font-weight: 700; margin-bottom: 16px; font-size: 0.9rem; }
.footer-main a { color: #adb5bd; text-decoration: none; display: block; padding: 2px 0; }
.footer-main a:hover { color: var(--mcx-green); }
.footer-main .footer-col { margin-bottom: 24px; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: #fff; margin-right: 6px; font-size: 1rem;
  transition: background 0.2s;
}
.footer-social a:hover { background: var(--mcx-blue); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 16px; margin-top: 24px; }
.footer-bottom a { display: inline; margin-right: 16px; }

/* Alert bar */
.alert-bar {
  background: #e6f0e0; color: #2a5a10; font-size: 0.85rem;
  padding: 8px 0; text-align: center; border-bottom: 1px solid #c0dca0;
}
.alert-bar a { color: #1a4a08; font-weight: 600; }

/* Market Data Classic Dropdown */
.dropdown-market { position: relative; }
.dropdown-classic {
  min-width: 220px;
  padding: 8px 0;
  border: 1px solid #e0e4e8;
  border-top: 3px solid var(--mcx-blue);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 12px 35px rgba(0,0,0,0.12);
  background: #fff;
  margin-top: 0;
}
.dropdown-classic .dropdown-item {
  padding: 10px 20px;
  font-size: 0.88rem;
  color: #2c3e50;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}
.dropdown-classic .dropdown-item i {
  font-size: 1rem;
  width: 22px;
  text-align: center;
  color: var(--mcx-blue);
  transition: color 0.2s;
}
.dropdown-classic .dropdown-item:hover {
  background: #f0f4f8;
  color: var(--mcx-blue);
  border-left-color: var(--mcx-blue);
  padding-left: 26px;
}
.dropdown-classic .dropdown-item:hover i {
  color: var(--mcx-blue);
}
.dropdown-classic .dropdown-item:active {
  background: var(--mcx-blue);
  color: #fff;
}
.dropdown-classic .dropdown-item:active i {
  color: #fff;
}
.dropdown-classic .dropdown-divider {
  margin: 4px 0;
  border-color: #e8ecf0;
}

/* Product Nav Cards */
.prod-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 10px;
  border-radius: 12px;
  text-decoration: none !important;
  transition: all 0.3s ease;
  min-height: 110px;
  border: 1px solid rgba(255,255,255,0.1);
}
.prod-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.2);
  border-color: rgba(255,255,255,0.25);
}
.prod-card .prod-icon {
  font-size: 2rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 8px;
  transition: transform 0.3s;
}
.prod-card:hover .prod-icon {
  transform: scale(1.15);
}
.prod-card span {
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  text-align: center;
  letter-spacing: 0.3px;
}

/* FAQ Accordion */
.faq-accordion .accordion-item {
  border: 1px solid #dce6dc;
  margin-bottom: 8px;
  border-radius: 8px !important;
  overflow: hidden;
}
.faq-accordion .accordion-button {
  font-weight: 600;
  color: var(--mcx-dark);
  background: #fff;
  box-shadow: none;
}
.faq-accordion .accordion-button:not(.collapsed) {
  color: var(--mcx-blue);
  background: var(--mcx-light);
}
.faq-accordion .accordion-button:focus {
  box-shadow: none;
  border-color: #dce6dc;
}
.faq-accordion .accordion-body {
  font-size: 0.9rem;
  color: #495057;
  background: #fafcfa;
}

.btn-primary { background-color: var(--mcx-blue); border-color: var(--mcx-blue); }
.btn-primary:hover { background-color: #071d3d; border-color: #071d3d; }
.btn-outline-primary { color: var(--mcx-blue); border-color: var(--mcx-blue); }
.btn-outline-primary:hover { background-color: var(--mcx-blue); border-color: var(--mcx-blue); color: #fff; }
.btn-success { background-color: var(--mcx-green); border-color: var(--mcx-green); }
.btn-success:hover { background-color: #147a30; border-color: #147a30; }
.bg-success { background-color: var(--mcx-green) !important; }
.text-primary { color: var(--mcx-blue) !important; }

@media (max-width: 991.98px) {
  .hero-content h1 { font-size: 1.5rem; }
}
