/* Financial Theme - Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;500;600;700;900&family=Playfair+Display:wght@400;600;700&display=swap');

:root {
  --bg-deep: #0a0f1a;
  --bg-primary: #0d1526;
  --bg-secondary: #111d35;
  --bg-card: #162040;
  --accent-gold: #d4af37;
  --accent-green: #2ecc71;
  --accent-blue: #3498db;
  --text-primary: #f0f4f8;
  --text-secondary: #8899aa;
  --text-muted: #556677;
  --border-color: #1e3050;
  --gradient-gold: linear-gradient(135deg, #d4af37, #f0d060);
  --gradient-green: linear-gradient(135deg, #2ecc71, #27ae60);
  --radius: 12px;
  --shadow-glow: 0 0 30px rgba(212,175,55,0.15);
  --font-head: 'Playfair Display', Georgia, serif;
  --font-body: 'Lato', -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: linear-gradient(180deg, #0a0f1a 0%, #0d1526 50%, #0a0f1a 100%);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(ellipse at 20% 0%, rgba(212,175,55,0.05) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 100%, rgba(46,204,113,0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; position: relative; z-index: 1; }

header {
  background: rgba(10, 15, 26, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 70px;
}

.logo {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  letter-spacing: 1px;
}

.logo span { font-size: 0.7rem; opacity: 0.7; display: block; letter-spacing: 3px; text-transform: uppercase; font-family: var(--font-body); font-weight: 400; }

nav { display: flex; align-items: center; gap: 8px; }

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s;
}

nav a:hover, nav a.active { color: var(--accent-gold); background: rgba(212,175,55,0.1); }

.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2rem;
}

.dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  min-width: 220px;
  padding: 8px 0;
  box-shadow: var(--shadow-glow);
}
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a { display: block; padding: 10px 20px; color: var(--text-secondary); font-size: 0.88rem; }
.dropdown-menu a:hover { color: var(--accent-gold); background: rgba(212,175,55,0.08); }

/* Hero */
.hero { text-align: center; padding: 80px 20px 60px; }

.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 20px;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p { font-size: 1.1rem; color: var(--text-secondary); max-width: 700px; margin: 0 auto 30px; }

.stats-bar { display: flex; justify-content: center; gap: 50px; margin: 30px 0; flex-wrap: wrap; }
.stat-item { text-align: center; }
.stat-item .num { font-family: var(--font-head); font-size: 2rem; font-weight: 700; background: var(--gradient-gold); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat-item .label { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 1px; }

/* Sections */
.section { padding: 50px 0; }
.section-title { font-family: var(--font-head); font-size: 1.5rem; margin-bottom: 8px; color: var(--text-primary); }
.section-sub { color: var(--text-secondary); margin-bottom: 30px; }

/* Tools Grid */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s;
  display: block;
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-gold);
  opacity: 0;
  transition: opacity 0.3s;
}

.tool-card:hover { border-color: var(--accent-gold); transform: translateY(-3px); box-shadow: var(--shadow-glow); }
.tool-card:hover::before { opacity: 1; }

.tool-icon { font-size: 2rem; margin-bottom: 12px; }
.tool-card h3 { font-family: var(--font-head); font-size: 0.95rem; margin-bottom: 6px; }
.tool-card p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }

/* Tool Page */
.tool-page { padding: 40px 0; }
.tool-page .container { max-width: 900px; }

.tool-area {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

.tool-area label { display: block; font-weight: 600; margin-bottom: 10px; color: var(--text-secondary); font-size: 0.9rem; }

.tool-area input, .tool-area select {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: border-color 0.3s;
}

.tool-area input:focus, .tool-area select:focus { outline: none; border-color: var(--accent-gold); }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }

.btn {
  background: var(--gradient-gold);
  color: #0a0f1a;
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(212,175,55,0.4); }
.btn-outline { background: transparent; border: 1px solid var(--accent-gold); color: var(--accent-gold); }
.btn-outline:hover { background: rgba(212,175,55,0.1); box-shadow: none; }

/* Results */
.result-box {
  background: rgba(46,204,113,0.08);
  border: 1px solid rgba(46,204,113,0.3);
  border-radius: 12px;
  padding: 20px;
  margin-top: 16px;
}

.result-box h3 { color: var(--accent-green); font-family: var(--font-head); margin-bottom: 10px; }
.result-value { font-size: 1.8rem; font-weight: 700; color: var(--accent-green); }

/* Articles */
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s;
}

.article-card:hover { border-color: var(--accent-gold); transform: translateY(-3px); box-shadow: var(--shadow-glow); }
.article-card img { width: 100%; height: 160px; object-fit: cover; }
.article-card-body { padding: 20px; }
.article-card h3 { font-size: 1rem; margin-bottom: 8px; color: var(--text-primary); }
.article-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }
.article-card .meta { font-size: 0.78rem; color: var(--accent-gold); margin-top: 10px; }

/* Article Page */
.article-page { padding: 40px 0; }
.article-page .container { max-width: 800px; }
.article-header { margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid var(--border-color); }
.article-header h1 { font-family: var(--font-head); font-size: clamp(1.5rem, 4vw, 2.2rem); margin-bottom: 12px; }
.article-header .breadcrumb { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; }
.article-header .breadcrumb a { color: var(--accent-gold); text-decoration: none; }
.article-body { line-height: 1.9; font-size: 1.05rem; }
.article-body h2 { font-family: var(--font-head); font-size: 1.3rem; margin: 35px 0 15px; color: var(--accent-gold); }
.article-body h3 { font-size: 1.1rem; margin: 25px 0 12px; }
.article-body p { margin-bottom: 18px; color: var(--text-secondary); }
.article-body ul, .article-body ol { margin: 0 0 18px 25px; color: var(--text-secondary); }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--text-primary); }
.article-body img { max-width: 100%; border-radius: 8px; margin: 20px 0; }
.article-body a { color: var(--accent-gold); text-decoration: none; }
.article-body a:hover { text-decoration: underline; }

.related-tools, .related-articles { margin-top: 40px; padding-top: 30px; border-top: 1px solid var(--border-color); }
.related-tools h3, .related-articles h3 { font-family: var(--font-head); font-size: 1rem; margin-bottom: 15px; color: var(--accent-gold); }
.related-list { display: flex; flex-wrap: wrap; gap: 8px; }
.related-list a { background: var(--bg-card); border: 1px solid var(--border-color); padding: 6px 14px; border-radius: 20px; font-size: 0.85rem; color: var(--text-secondary); text-decoration: none; transition: all 0.3s; }
.related-list a:hover { border-color: var(--accent-gold); color: var(--accent-gold); }

/* Static Pages */
.page-content { padding: 50px 0; }
.page-content .container { max-width: 800px; }
.page-content h1 { font-family: var(--font-head); font-size: 2rem; margin-bottom: 30px; background: var(--gradient-gold); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.page-content h2 { font-size: 1.3rem; margin: 30px 0 15px; color: var(--accent-gold); font-family: var(--font-head); }
.page-content p { color: var(--text-secondary); margin-bottom: 16px; line-height: 1.8; }
.page-content ul, .page-content ol { margin: 0 0 16px 25px; color: var(--text-secondary); }
.page-content li { margin-bottom: 8px; }
.page-content a { color: var(--accent-gold); }

/* Footer */
footer { background: var(--bg-deep); border-top: 1px solid var(--border-color); padding: 40px 0 20px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 30px; margin-bottom: 30px; }
.footer-col h4 { font-family: var(--font-head); font-size: 0.9rem; margin-bottom: 15px; color: var(--accent-gold); }
.footer-col a { display: block; color: var(--text-muted); text-decoration: none; font-size: 0.88rem; margin-bottom: 8px; transition: color 0.3s; }
.footer-col a:hover { color: var(--accent-gold); }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid var(--border-color); font-size: 0.82rem; color: var(--text-muted); }

/* Utility */
.breadcrumb-nav { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 20px; }
.breadcrumb-nav a { color: var(--accent-gold); text-decoration: none; }
.breadcrumb-nav span { margin: 0 8px; }
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tag { background: rgba(212,175,55,0.1); border: 1px solid rgba(212,175,55,0.3); color: var(--accent-gold); padding: 3px 12px; border-radius: 15px; font-size: 0.78rem; }

/* Mobile */
@media (max-width: 768px) {
  .mobile-toggle { display: block; }
  nav { display: none; position: fixed; top: 70px; left: 0; right: 0; background: rgba(10,15,26,0.98); flex-direction: column; padding: 20px; border-bottom: 1px solid var(--border-color); max-height: 70vh; overflow-y: auto; z-index: 999; }
  nav.open { display: flex; }
  nav a { padding: 12px 16px; }
  .dropdown-menu { position: static; box-shadow: none; border: none; padding-left: 16px; background: transparent; }
  .dropdown:hover .dropdown-menu { display: none; }
  .dropdown-menu.show { display: block !important; }
  .tools-grid { grid-template-columns: 1fr 1fr; }
  .articles-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 40px 20px 30px; }
  .section { padding: 30px 0; }
  .stats-bar { gap: 20px; }
  .stat-item .num { font-size: 1.4rem; }
}
@media (max-width: 480px) {
  .tools-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
