/* Design System: DemyForex UI Rebuild (2025) */

/* CSS Reset (modern minimal) */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body, h1, h2, h3, h4, h5, h6, p, ul { margin: 0; }
h4 { color: #1e3a8a; }
ul { padding: 0; list-style: none; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

/* Tokens */
:root {
  --bg: #0b1220;            /* base background (dark navy) */
  --surface: #111a2b;       /* card/section background */
  --surface-alt: #0e1726;   /* header/footer background */
  --text: #eef2f7;          /* primary text */
  --text-muted: #c7cfdd;    /* secondary text */
  --primary: #ffd700;       /* accent gold */
  --primary-700: #ffcc00;   /* hover gold */
  --secondary: #4fc3f7;     /* sky accent (subtle) */
  --danger: #ff6b6b;
  --success: #51cf66;
  --border: rgba(255,255,255,0.12);
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --radius: 14px;
  --radius-sm: 10px;
  --spacing: 24px;
}

/* Base */
body {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

/* Header */
.header { background: #ffffff; position: sticky; top: 0; z-index: 1000; box-shadow: var(--shadow); }
.navbar { padding: 14px 0; }
.navbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav-brand { display: flex; align-items: center; gap: 12px; }
.logo { width: 132px; height: auto; }
.nav-menu { display: flex; gap: 18px; }
.nav-menu a { color: #0b1226; font-weight: 600; }
.nav-menu a:hover { color: var(--primary); }
 .nav-actions { display: flex; gap: 12px; }
 .navbar .btn-outline { color: #000000; border-color: rgba(0,0,0,0.12); }
 .navbar .btn-outline:hover { color: #000000; border-color: rgba(0,0,0,0.20); background: rgba(0,0,0,0.04); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: var(--radius-sm); border: 1px solid transparent; transition: all .2s ease; font-weight: 600; }
.btn-large { padding: 14px 22px; border-radius: var(--radius); font-size: 1.05rem; }
.btn-primary { background: var(--primary); color: #0b1226; }
.btn-primary:hover { background: var(--primary-700); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: rgba(255,255,255,0.08); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: #fff; color: #fff; }
.btn-full { width: 100%; }

/* Hero */
.hero { background: linear-gradient(180deg, #0b1226 0%, #0c1730 60%, #0b1226 100%); padding: 72px 0; }
.hero-content { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 36px; }
.hero-text h1 { font-size: clamp(2rem, 3.5vw, 3rem); line-height: 1.15; color: var(--text); }
.hero-text .highlight { color: var(--primary); }
.hero-subtitle { color: var(--text-muted); margin-top: 14px; }
.hero-cta { margin-top: 22px; display: flex; gap: 12px; }
.hero-features { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-top: 22px; }
.feature-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; display:flex; align-items:center; gap:12px; }
.feature-item i { color: var(--secondary); }
.hero-image { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }

/* Section Header */
.section-header h2 { font-size: clamp(1.6rem, 2.6vw, 2.4rem); color: var(--text); }
.section-header p { color: var(--text-muted); }

/* Trading Features */
.trading-features { padding: 64px 0; background: var(--bg); }
.features-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-top: 24px; }
.feature-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.feature-icon i { color: var(--secondary); font-size: 1.4rem; }

/* Platform Section */
.platform-section { padding: 64px 0; background: var(--surface-alt); }
.platform-content { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
.platform-text p { color: var(--text-muted); margin: 10px 0 16px; }
.platform-features li { color: var(--text); margin: 6px 0; }
.platform-image { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }

/* Protection Section */
.protection-section { padding: 64px 0; background: var(--bg); }
.protection-content { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
.protection-text p { color: var(--text-muted); }
.protection-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; display:flex; align-items:center; gap:12px; }
.protection-item i { color: var(--secondary); }

/* Guides Section */
.trading-guides-section { padding: 64px 0; background: var(--surface-alt); }
.guides-content { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; }
.guide-main { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.guide-list li { color: var(--text); margin: 6px 0; }
.guide-sidebar { display: grid; gap: 18px; }
.quick-tips, .market-hours { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }

/* Market Analysis */
.market-analysis-section { padding: 64px 0; background: var(--bg); }
.analysis-content { display: grid; grid-template-columns: 1.05fr .95fr; gap: 24px; }
.currency-analysis { display: grid; gap: 16px; }
.currency-pair { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px; }
.technical-levels span { display:inline-block; margin-right: 10px; color: var(--text); }
.economic-calendar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.event-item { display:grid; grid-template-columns: 140px 1fr auto; align-items:center; gap: 12px; padding: 12px; border-bottom: 1px solid var(--border); }
.event-item:last-child { border-bottom: none; }
.event-time { color: var(--text-muted); }
.event-details { color: var(--text); }
.impact.high { color: var(--danger); }
.impact.medium { color: var(--secondary); }

/* Education */
.education-section { padding: 64px 0; background: var(--surface-alt); }
.education-grid { display:grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.education-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.education-icon i { color: var(--secondary); font-size: 1.6rem; }

/* FAQ */
.faq-section { padding: 64px 0; background: var(--bg); }
.faq-content { display:grid; gap: 12px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq-question { padding: 16px 18px; display:flex; align-items:center; justify-content:space-between; gap:12px; background: transparent; border: none; cursor: pointer; }
.faq-question h4 { color: #1e3a8a; font-weight: 600; }
.faq-question i { color: var(--primary); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-item.active .faq-answer { max-height: 260px; }
.faq-answer p { color: var(--text-muted); padding: 0 18px 16px; }

/* Rebuilt CTA: Highlight Section */
.highlight-section { padding: 72px 0; background: #0a1324; color: var(--text); }
.highlight-content { text-align: center; max-width: 900px; margin: 0 auto; }
.highlight-content h1 { color: var(--text); font-size: clamp(2rem, 3vw, 2.6rem); line-height: 1.2; margin-bottom: 12px; }
.highlight-content p { color: var(--text-muted); font-size: 1.15rem; margin-bottom: 20px; }
.highlight-actions { display: flex; justify-content: center; gap: 12px; }
.btn-primary-contrast { background: var(--primary); color: #0b1226; border: none; }
.btn-primary-contrast:hover { background: var(--primary-700); }
.btn-outline-contrast { background: transparent; color: var(--text); border: 2px solid var(--text); }
.btn-outline-contrast:hover { background: rgba(255,255,255,0.12); }

/* Footer */
.footer { background: var(--surface-alt); padding: 48px 0 24px; margin-top: 24px; }
.footer-content { display:grid; grid-template-columns: 1fr; gap: 18px; justify-items: center; text-align: center; }
.footer-brand h3 { color: var(--text); }
.footer-brand p, .footer-section ul li a, .contact-info p { color: var(--text-muted); }
.footer-logo { width: 140px; }
.footer-section h4 { color: #1e3a8a; margin-bottom: 10px; }
.social-links a { color: var(--text-muted); margin-right: 10px; }
.social-links a:hover { color: var(--text); }
.footer-bottom { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--border); color: var(--text-muted); text-align: center; }

/* Modal */
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(3px); }
.modal-content { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); width: min(520px, 94%); margin: 80px auto; padding: 18px; color: var(--text); }
.close { float: right; font-size: 1.6rem; color: var(--text); cursor: pointer; }
.registration-form input { width: 100%; padding: 12px; margin-bottom: 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: #0d1526; color: var(--text); }

/* Responsive */
@media (max-width: 1024px) {
  .hero-content, .platform-content, .protection-content, .guides-content, .analysis-content { grid-template-columns: 1fr; }
  .education-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 640px) {
  .nav-menu { display: none; }
  .mobile-menu-toggle { display: inline-flex; width: 40px; height: 40px; flex-direction: row; justify-content: center; align-items: center; gap: 0; border: 1px solid rgba(0,0,0,0.12); border-radius: var(--radius-sm); background: rgba(0,0,0,0.05); box-shadow: 0 1px 2px rgba(0,0,0,0.06); transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
  .mobile-menu-toggle:hover { background: rgba(0,0,0,0.08); border-color: rgba(0,0,0,0.18); box-shadow: 0 2px 6px rgba(0,0,0,0.08); }
  .mobile-menu-toggle:active { transform: scale(0.98); }
  .mobile-menu-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
  .mobile-menu-toggle i { font-size: 20px; color: #0b1226; line-height: 1; }
  .mobile-menu-toggle .icon-close { display: none; }
  .mobile-menu-toggle.active .icon-bars { display: none; }
  .mobile-menu-toggle.active .icon-close { display: inline-block; }
  .mobile-menu-toggle.active { background: rgba(0,0,0,0.06); border-color: rgba(0,0,0,0.20); }
  .nav-menu.active { display: flex; position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); flex-direction: column; padding: 14px; box-shadow: var(--shadow); border-top: 1px solid var(--border); }
  .nav-menu.active a { color: #fff; }
  .hero-features { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .education-grid { grid-template-columns: 1fr; }
  .footer-content { display:grid; grid-template-columns: 1fr; gap: 18px; justify-items: center; text-align: center; }
  .highlight-actions { flex-direction: column; }
}