/* ===== Variables ===== */
:root {
  --navy-dark: #0a1c47;
  --navy: #0f2a5e;
  --navy-light: #16357a;
  --gold: #f0b429;
  --gold-dark: #d99e0f;
  --bg-light: #eef2fb;
  --bg-panel: #f6f9fe;
  --card-bg: #ffffff;
  --text-dark: #101a33;
  --text-muted: #5a6478;
  --border-light: #e2e8f5;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(15, 42, 94, 0.08);
}

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

body {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.5;
}

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

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.accent { color: var(--gold); }

/* ===== Header ===== */
.site-header {
  background: var(--navy-dark);
  border-bottom: 3px solid var(--navy-light);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--navy-dark);
}

.logo-text { display: flex; flex-direction: column; }
.logo-title { font-size: 1.35rem; font-weight: 700; color: #fff; white-space: nowrap; }
.logo-tagline { font-size: 0.75rem; color: #b9c4e0; letter-spacing: 0.5px; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

.main-nav a {
  color: #e6ebf7;
  font-weight: 600;
  font-size: 0.95rem;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.main-nav a:hover { color: var(--gold); }
.main-nav a.active { color: var(--gold); border-color: var(--gold); }

.header-right { display: flex; align-items: center; gap: 14px; }

.user-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--navy-light);
  border: none;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(120deg, var(--navy-dark) 0%, var(--navy) 60%, var(--navy-light) 100%);
  color: #fff;
  padding: 50px 0;
  overflow: hidden;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.hero-text { flex: 1 1 420px; max-width: 640px; }
.hero-text h1 { font-size: 2.4rem; font-weight: 800; line-height: 1.25; margin-bottom: 16px; }
.hero-text p { font-size: 1.15rem; color: #d7deef; }

.hero-graphic { flex: 1 1 420px; max-width: 520px; }
.hero-svg { width: 100%; height: auto; }

/* ===== Stats bar ===== */
.stats-bar {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: -30px;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 22px 20px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 10px;
  border-right: 1px solid var(--border-light);
}

.stat-item:last-child { border-right: none; }

.stat-item i {
  font-size: 1.4rem;
  color: var(--navy);
  background: var(--bg-light);
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-item div { display: flex; flex-direction: column; font-size: 0.9rem; }
.stat-item strong { color: var(--navy-dark); font-size: 0.95rem; }
.stat-item span { color: var(--text-muted); }

/* ===== Main layout ===== */
.main-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  padding: 30px 0 50px;
  align-items: start;
}

.main-col { display: flex; flex-direction: column; gap: 24px; }
.sidebar { display: flex; flex-direction: column; gap: 20px; }

.panel {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.panel-head h2, .panel > h2 {
  font-size: 1.15rem;
  color: var(--navy-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-head h2 i, .panel > h2 i { color: var(--gold-dark); }

.view-all { color: var(--navy); font-weight: 600; font-size: 0.9rem; }
.view-all:hover { color: var(--gold-dark); }

/* News items */
.news-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}

.news-item:last-child { border-bottom: none; }

.news-thumb {
  width: 100px;
  height: 72px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
}

.thumb-market { background: linear-gradient(135deg, #123a7a, #1e5aa8); }
.thumb-gold { background: linear-gradient(135deg, #b8860b, #d4a017); }
.thumb-policy { background: linear-gradient(135deg, #1c1c1c, #3a3a3a); }

.news-body { flex: 1; min-width: 0; }

.tag {
  display: inline-block;
  background: var(--gold);
  color: var(--navy-dark);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.news-body h3 { font-size: 1rem; color: var(--navy-dark); margin-bottom: 4px; line-height: 1.35; }
.news-body p { font-size: 0.87rem; color: var(--text-muted); }

.news-date {
  flex-shrink: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Learn & Earn cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.learn-card {
  background: var(--bg-panel);
  border-radius: var(--radius);
  padding: 18px;
  text-align: left;
}

.learn-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #dfe8fb;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.learn-card h3 { font-size: 1rem; color: var(--navy-dark); margin-bottom: 6px; }
.learn-card p { font-size: 0.87rem; color: var(--text-muted); margin-bottom: 14px; min-height: 40px; }

.btn {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 9px 20px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn:hover { background: var(--navy-light); }

/* Sidebar dark panel */
.dark-panel {
  background: var(--navy-dark);
  color: #fff;
}

.dark-panel h2 { color: #fff; margin-bottom: 14px; }
.dark-panel h2 i { color: var(--gold); }

.topic-list li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 0.92rem;
  color: #e6ebf7;
  transition: color 0.2s;
}

.topic-list li:last-child a { border-bottom: none; }
.topic-list li a i:first-child { color: var(--gold); width: 18px; text-align: center; }
.topic-list li a .arrow { margin-left: auto; font-size: 0.75rem; color: #8592b5; }
.topic-list li a:hover { color: var(--gold); }

/* Newsletter panel */
.newsletter-panel p { color: var(--text-muted); font-size: 0.9rem; margin: 8px 0 16px; }

.newsletter-form { display: flex; flex-direction: column; gap: 10px; }

.newsletter-form input {
  padding: 11px 14px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  font-size: 0.9rem;
  background: var(--bg-light);
}

.newsletter-form input:focus { outline: 2px solid var(--gold); }

.newsletter-form button {
  background: var(--navy-dark);
  color: #fff;
  border: none;
  padding: 11px 14px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s;
}

.newsletter-form button:hover { background: var(--navy-light); }

.form-msg { font-size: 0.85rem; margin-top: 10px; min-height: 1em; color: #1a9c56; }

/* Goal panel */
.goal-panel {
  background: linear-gradient(135deg, var(--navy), var(--navy-dark));
  color: #fff;
}

.goal-panel h2 {
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.goal-arrow { margin-left: auto; color: #fff; }
.goal-panel p { color: #d7deef; font-size: 0.92rem; }

/* ===== Page banner (inner pages) ===== */
.page-banner {
  background: linear-gradient(120deg, var(--navy-dark) 0%, var(--navy) 60%, var(--navy-light) 100%);
  color: #fff;
  padding: 34px 0 30px;
}

.page-banner h1 { font-size: 1.9rem; font-weight: 800; margin-bottom: 8px; }

.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; color: #c7d2ee; flex-wrap: wrap; }
.breadcrumb a { color: #c7d2ee; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb .sep { color: #5a6d9e; }
.breadcrumb .current { color: var(--gold); font-weight: 600; }

/* News title links + read more */
.news-body h3 a { color: inherit; }
.news-body h3 a:hover { color: var(--navy-light); }

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
}

.read-more:hover { color: var(--gold-dark); }

/* Pagination */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 22px; }

.pagination a {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-panel);
  color: var(--navy-dark);
  font-weight: 600;
  font-size: 0.9rem;
}

.pagination a.active { background: var(--navy-dark); color: #fff; }
.pagination a:hover { background: var(--gold); color: #fff; }

/* ===== Article (single blog post) ===== */
.article-panel { padding: 26px; }

.article-header h1 {
  font-size: 1.7rem;
  color: var(--navy-dark);
  margin: 10px 0 14px;
  line-height: 1.3;
}

.article-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
}

.article-meta span { display: flex; align-items: center; gap: 6px; }
.article-meta i { color: var(--gold-dark); }

.article-cover {
  height: 280px;
  border-radius: var(--radius);
  margin: 22px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #fff;
}

.article-content p { margin-bottom: 16px; color: #333; line-height: 1.75; font-size: 0.97rem; }
.article-content h2 { font-size: 1.25rem; color: var(--navy-dark); margin: 26px 0 12px; }

.article-content blockquote {
  border-left: 4px solid var(--gold);
  background: var(--bg-panel);
  color: var(--navy-dark);
  font-style: italic;
  padding: 14px 20px;
  border-radius: 0 8px 8px 0;
  margin: 20px 0;
}

.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0; }

.article-tags a {
  background: var(--bg-panel);
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
}

.article-tags a:hover { background: var(--gold); color: #fff; }

.article-share {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.article-share span { font-weight: 600; color: var(--navy-dark); font-size: 0.9rem; }
.share-icons { display: flex; gap: 10px; }

.share-icons a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-panel);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.share-icons a:hover { background: var(--navy-dark); color: #fff; }

.author-box {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--bg-panel);
  padding: 20px;
  border-radius: var(--radius);
  margin: 26px 0;
}

.author-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.author-box h4 { color: var(--navy-dark); margin-bottom: 4px; }
.author-box p { color: var(--text-muted); font-size: 0.87rem; }

/* ===== Comments ===== */
.comments-section { margin-top: 30px; }

.comments-section > h2 {
  font-size: 1.15rem;
  color: var(--navy-dark);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.comments-section > h2 i { color: var(--gold-dark); }

.comment-list { display: flex; flex-direction: column; gap: 18px; margin-bottom: 30px; }
.comment { display: flex; gap: 14px; }
.comment.reply { margin-left: 58px; }

.comment-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.comment-body { flex: 1; background: var(--bg-panel); padding: 14px 16px; border-radius: 10px; min-width: 0; }

.comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.comment-head strong { color: var(--navy-dark); font-size: 0.95rem; }
.comment-date { font-size: 0.78rem; color: var(--text-muted); }
.comment-body p { color: #333; font-size: 0.9rem; margin-bottom: 8px; }
.comment-reply { font-size: 0.8rem; font-weight: 600; color: var(--navy); }
.comment-reply:hover { color: var(--gold-dark); }

.comment-form-wrap { background: var(--bg-panel); padding: 22px; border-radius: var(--radius); }
.comment-form-wrap h3 { color: var(--navy-dark); margin-bottom: 14px; font-size: 1.05rem; }

.comment-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.comment-form .full { grid-column: 1 / -1; }
.comment-form button.full { justify-self: start; }

.comment-form input,
.comment-form textarea,
.contact-form input,
.contact-form textarea {
  padding: 11px 14px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  font-size: 0.9rem;
  font-family: inherit;
  background: #fff;
  width: 100%;
}

.comment-form textarea,
.contact-form textarea { resize: vertical; min-height: 110px; }

.comment-form input:focus,
.comment-form textarea:focus,
.contact-form input:focus,
.contact-form textarea:focus { outline: 2px solid var(--gold); }

.comment.new-comment { animation: highlightIn 1.2s ease; }
@keyframes highlightIn {
  0% { background: transparent; }
  30% { background: rgba(240, 180, 41, 0.15); border-radius: 10px; }
  100% { background: transparent; }
}

/* ===== Topics grid (Learn / Earn) ===== */
.topics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.topic-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.topic-card .learn-icon { margin-bottom: 12px; }
.topic-card h3 { font-size: 1rem; color: var(--navy-dark); margin-bottom: 6px; }
.topic-card p { font-size: 0.87rem; color: var(--text-muted); margin-bottom: 14px; min-height: 40px; }

/* ===== Contact page ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 24px;
  padding: 30px 0 50px;
  align-items: start;
}

.contact-info { display: flex; flex-direction: column; gap: 16px; }

.info-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.info-card i {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--bg-light);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.info-card h4 { color: var(--navy-dark); margin-bottom: 4px; }
.info-card p { color: var(--text-muted); font-size: 0.9rem; }

.contact-form-panel {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
}

.contact-form-panel h2 {
  font-size: 1.15rem;
  color: var(--navy-dark);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.contact-form-panel h2 i { color: var(--gold-dark); }
.contact-form-panel > p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 18px; }

.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form .full { grid-column: 1 / -1; }
.contact-form button.full { justify-self: start; }

/* ===== Footer ===== */
.site-footer {
  background: var(--navy-dark);
  color: #c7d0e8;
  padding: 20px 0;
  margin-top: 20px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.88rem;
}

.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-nav a:hover { color: var(--gold); }

/* ===================================================== */
/* ===================== RESPONSIVE ===================== */
/* ===================================================== */

@media (max-width: 1024px) {
  .main-layout { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
  .hero-text h1 { font-size: 2rem; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item { border-right: 1px solid var(--border-light); padding-bottom: 10px; }
}

@media (max-width: 860px) {
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy-dark);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 10px 24px 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-top: 1px solid var(--navy-light);
  }

  .main-nav.open { max-height: 300px; }
  .main-nav a { width: 100%; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .nav-toggle { display: block; }

  .hero { padding: 36px 0; }
  .hero-inner { flex-direction: column; text-align: center; gap: 20px; }
  .hero-text,
  .hero-graphic { flex: none; width: 100%; max-width: 420px; }
  .hero-text h1 { font-size: 1.9rem; }
}

@media (max-width: 700px) {
  .cards-grid { grid-template-columns: 1fr; }
  .news-item { flex-wrap: wrap; }
  .news-thumb { width: 80px; height: 60px; }
  .news-date { width: 100%; order: 3; }
  .hero-text h1 { font-size: 1.7rem; }
  .hero-text p { font-size: 1rem; }
  .hero-graphic { max-width: 320px; }
}

@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .hero { padding: 28px 0; }
  .hero-text h1 { font-size: 1.5rem; }
  .hero-text p { font-size: 0.92rem; }
  .hero-graphic { max-width: 260px; }
  .stats-bar { grid-template-columns: 1fr; margin-top: 20px; }
  .stat-item { border-right: none; border-bottom: 1px solid var(--border-light); padding-bottom: 12px; margin-bottom: 4px; }
  .stat-item:last-child { border-bottom: none; margin-bottom: 0; }
  .logo-title { font-size: 1.1rem; }
  .logo-tagline { font-size: 0.68rem; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-nav { justify-content: center; }
  .panel { padding: 16px; }
}

@media (max-width: 400px) {
  .header-inner { flex-wrap: wrap; }
  .hero-text h1 { font-size: 1.3rem; }
}

@media (max-width: 1024px) {
  .contact-grid { grid-template-columns: 1fr; }
  .topics-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .page-banner { padding: 26px 0; }
  .page-banner h1 { font-size: 1.5rem; }
  .article-header h1 { font-size: 1.35rem; }
  .article-cover { height: 200px; font-size: 2.2rem; }
}

@media (max-width: 700px) {
  .topics-grid { grid-template-columns: 1fr; }
  .comment-form,
  .contact-form { grid-template-columns: 1fr; }
  .comment.reply { margin-left: 24px; }
  .article-panel { padding: 18px; }
  .author-box { flex-direction: column; text-align: center; }
}

@media (max-width: 560px) {
  .comment-head { flex-direction: column; align-items: flex-start; gap: 2px; }
  .article-share { flex-direction: column; align-items: flex-start; }
}
