/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: #f4f6fb;
  color: #1a1a2e;
  line-height: 1.7;
}
a { color: #0057b8; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ===== VARIABLES ===== */
:root {
  --primary: #0a2c6e;
  --primary-light: #1a4a9e;
  --accent: #e8a020;
  --accent-dark: #c78010;
  --green: #16a34a;
  --red: #dc2626;
  --text: #1a1a2e;
  --text-muted: #5a6a7a;
  --bg: #f4f6fb;
  --bg-white: #ffffff;
  --border: #e0e6ef;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 28px rgba(10,44,110,0.10);
  --shadow-sm: 0 2px 10px rgba(10,44,110,0.07);
}

/* ===== HEADER & NAV ===== */
header {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0,0,0,0.18);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}
.logo span { color: var(--accent); }
nav ul { list-style: none; display: flex; gap: 0.25rem; }
nav ul li a {
  color: rgba(255,255,255,0.85);
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
nav ul li a:hover, nav ul li a.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
  text-decoration: none;
}
.lang-switcher {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 0.2rem;
  gap: 0.1rem;
  margin-left: 0.5rem;
}
.lang-switcher a, .lang-switcher .lang-active {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.28rem 0.7rem;
  border-radius: 16px;
  transition: all 0.2s;
  line-height: 1;
}
.lang-switcher a { color: rgba(255,255,255,0.85); }
.lang-switcher a:hover { color: #fff; background: rgba(255,255,255,0.12); text-decoration: none; }
.lang-switcher .lang-active { background: rgba(255,255,255,0.15); color: var(--accent); pointer-events: none; }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; background: none; border: none; }
.hamburger span { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: 0.3s; }
.nav-mobile { display: none; background: var(--primary); padding: 1rem 1.5rem; }
.nav-mobile.open { display: block; }
.nav-mobile ul { list-style: none; display: flex; flex-direction: column; gap: 0.25rem; }
.nav-mobile ul li a { display: block; color: rgba(255,255,255,0.9); padding: 0.6rem 0.75rem; border-radius: 8px; font-weight: 500; font-size: 0.95rem; }
.nav-mobile ul li a:hover { background: rgba(255,255,255,0.12); text-decoration: none; }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(150deg, #071e4a 0%, #0a2c6e 50%, #1a4a9e 100%);
  color: #fff;
  padding: 3.5rem 1.5rem 3.5rem;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.6rem;
  letter-spacing: -0.02em;
}
.hero-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.75);
  max-width: 500px;
  margin: 0 auto 1.75rem;
}
.rate-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 100px;
  padding: 0.45rem 1.25rem;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 2rem;
}
.rate-badge .dot {
  width: 8px; height: 8px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* ===== TRUST BAR ===== */
.trust-bar {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
}
.trust-item strong { color: rgba(255,255,255,0.85); }

/* ===== CALCULATOR ===== */
.calc-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  max-width: 520px;
  margin: 0 auto;
  padding: 2rem;
}
.calc-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.25rem;
}
.calc-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.calc-field input {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  background: #f8faff;
  transition: border-color 0.2s, background 0.2s;
  -webkit-appearance: none;
}
.calc-field input:focus { outline: none; border-color: var(--primary-light); background: #fff; }
.calc-arrow { display: flex; align-items: flex-end; justify-content: center; padding-bottom: 0.9rem; }
#swap-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px; height: 44px;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  flex-shrink: 0;
}
#swap-btn:hover { background: var(--primary-light); transform: scale(1.08); }
#swap-btn.spinning { animation: spin 0.4s ease; }
@keyframes spin { 0%{transform:rotate(0deg)} 100%{transform:rotate(180deg)} }
.calc-result {
  background: linear-gradient(135deg, #f0f6ff, #e8f0fe);
  border: 2px solid #c8d8f8;
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.25rem;
  text-align: center;
  margin-bottom: 1rem;
}
.result-amount { font-size: 2.1rem; font-weight: 800; color: var(--primary); line-height: 1.2; }
.result-rate { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.3rem; }
.result-rate span { color: var(--primary); font-weight: 700; }
.calc-updated { text-align: center; font-size: 0.76rem; color: var(--text-muted); }

/* ===== AFFILIATE CTA ===== */
.affiliate-cta {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #86efac;
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.affiliate-cta-text h3 { font-size: 1.05rem; font-weight: 700; color: #14532d; margin-bottom: 0.3rem; }
.affiliate-cta-text p { font-size: 0.88rem; color: #166534; margin: 0; }
.affiliate-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #16a34a;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.75rem 1.5rem;
  border-radius: 100px;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
}
.affiliate-cta-btn:hover { background: #15803d; transform: translateY(-1px); text-decoration: none; color: #fff; }

/* ===== MAIN CONTENT ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.content-grid { display: grid; grid-template-columns: 1fr 300px; gap: 2rem; padding: 2.5rem 0; }
.main-content h2 {
  font-size: 1.4rem; font-weight: 700; color: var(--primary);
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}
.main-content h2:first-child { margin-top: 0; }
.main-content p { margin-bottom: 1rem; color: #2a3a4a; }

/* ===== CONVERSION TABLE ===== */
.conv-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.95rem; }
.conv-table th { background: var(--primary); color: #fff; padding: 0.75rem 1rem; text-align: left; font-weight: 600; }
.conv-table th:last-child, .conv-table td:last-child { text-align: right; }
.conv-table td { padding: 0.65rem 1rem; border-bottom: 1px solid var(--border); }
.conv-table tr:nth-child(even) td { background: #f8fafc; }
.conv-table tr:hover td { background: #f0f6ff; }

/* ===== FAQ ===== */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 0.75rem; overflow: hidden; }
.faq-question { width: 100%; background: var(--bg-white); border: none; padding: 1rem 1.25rem; text-align: left; font-size: 0.95rem; font-weight: 600; color: var(--text); cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: background 0.2s; }
.faq-question:hover { background: #f0f6ff; }
.faq-question .icon { font-size: 1.2rem; color: var(--primary); transition: transform 0.3s; flex-shrink: 0; }
.faq-question.open .icon { transform: rotate(45deg); }
.faq-answer { display: none; padding: 0 1.25rem 1rem; font-size: 0.92rem; color: #3a4a5a; line-height: 1.6; }
.faq-answer.open { display: block; }

/* ===== SIDEBAR ===== */
.sidebar-card { background: var(--bg-white); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.5rem; margin-bottom: 1.5rem; border: 1px solid var(--border); }
.sidebar-card h3 { font-size: 1rem; font-weight: 700; color: var(--primary); margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--border); }
.quick-links { list-style: none; }
.quick-links li { padding: 0.4rem 0; border-bottom: 1px solid var(--border); }
.quick-links li:last-child { border: none; }
.quick-links li a { color: var(--text); font-size: 0.9rem; display: flex; align-items: center; gap: 0.5rem; }
.quick-links li a:hover { color: var(--primary); text-decoration: none; }

/* Sidebar Wise CTA */
.sidebar-wise {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #86efac;
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  text-align: center;
}
.sidebar-wise p { font-size: 0.85rem; color: #166534; margin-bottom: 0.75rem; }
.sidebar-wise a {
  display: block;
  background: #16a34a;
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.7rem 1rem;
  border-radius: 100px;
  transition: background 0.2s;
}
.sidebar-wise a:hover { background: #15803d; text-decoration: none; color: #fff; }

/* ===== ARTICLES GRID ===== */
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; padding: 2rem 0; }
.article-card { background: var(--bg-white); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; border: 1px solid var(--border); }
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.article-card-body { padding: 1.5rem; }
.article-tag { display: inline-block; background: #e8f0fe; color: var(--primary-light); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 0.2rem 0.6rem; border-radius: 4px; margin-bottom: 0.75rem; }
.article-meta-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.read-time { font-size: 0.75rem; color: var(--text-muted); }
.article-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; line-height: 1.4; }
.article-card h3 a { color: var(--text); }
.article-card h3 a:hover { color: var(--primary); text-decoration: none; }
.article-card p { font-size: 0.88rem; color: var(--text-muted); margin: 0 0 1rem; }
.read-more { font-size: 0.85rem; font-weight: 600; color: var(--primary); display: inline-flex; align-items: center; gap: 0.3rem; }
.read-more:hover { text-decoration: none; color: var(--primary-light); }
.read-more::after { content: '→'; }

/* ===== ARTICLE PAGE ===== */
.article-header { background: linear-gradient(150deg, #071e4a, #0a2c6e); color: #fff; padding: 3rem 1.5rem 2rem; }
.article-header h1 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); font-weight: 800; line-height: 1.3; max-width: 800px; }
.article-meta { margin-top: 0.75rem; font-size: 0.85rem; color: rgba(255,255,255,0.65); display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: center; }
.article-body { max-width: 800px; margin: 0 auto; padding: 2.5rem 1.5rem 3rem; }
.article-body h2 { font-size: 1.35rem; font-weight: 700; color: var(--primary); margin: 2.25rem 0 0.75rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--border); }
.article-body h3 { font-size: 1.1rem; font-weight: 700; margin: 1.75rem 0 0.5rem; color: #1a1a2e; }
.article-body p { margin-bottom: 1rem; color: #2a3a4a; line-height: 1.8; }
.article-body ul, .article-body ol { margin: 0.75rem 0 1rem 1.5rem; }
.article-body li { margin-bottom: 0.4rem; color: #2a3a4a; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.75rem 0; font-size: 0.9rem; display: block; overflow-x: auto; }
.article-body table th { background: var(--primary); color: #fff; padding: 0.75rem 1rem; text-align: left; white-space: nowrap; }
.article-body table td { padding: 0.65rem 1rem; border-bottom: 1px solid var(--border); }
.article-body table tr:nth-child(even) td { background: #f8fafc; }
.article-body table .winner { color: var(--green); font-weight: 700; }
.article-body table .loser { color: var(--red); }

/* ===== HIGHLIGHT & CTA BOXES ===== */
.highlight-box { background: #fff8e6; border-left: 4px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 1rem 1.25rem; margin: 1.5rem 0; font-size: 0.93rem; }
.info-box { background: #f0f6ff; border-left: 4px solid var(--primary-light); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 1rem 1.25rem; margin: 1.5rem 0; font-size: 0.93rem; }

/* ===== BREADCRUMB ===== */
.breadcrumb { background: var(--bg-white); border-bottom: 1px solid var(--border); padding: 0.6rem 0; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem; align-items: center; font-size: 0.82rem; }
.breadcrumb ol li { color: var(--text-muted); }
.breadcrumb ol li a { color: var(--primary); }
.breadcrumb ol li::after { content: '/'; margin-left: 0.25rem; }
.breadcrumb ol li:last-child::after { display: none; }

/* ===== SECTION TITLES ===== */
.section-title { font-size: 1.6rem; font-weight: 800; color: var(--primary); margin-bottom: 0.5rem; }
.section-sub { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 2rem; }

/* ===== FOOTER ===== */
footer { background: #071e4a; color: rgba(255,255,255,0.7); padding: 3rem 1.5rem 2rem; margin-top: 3rem; }
.footer-inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.footer-brand .logo { display: block; margin-bottom: 0.75rem; }
.footer-brand p { font-size: 0.87rem; line-height: 1.6; max-width: 280px; }
footer h4 { color: #fff; font-size: 0.9rem; font-weight: 700; margin-bottom: 0.75rem; }
footer ul { list-style: none; }
footer ul li { margin-bottom: 0.4rem; }
footer ul li a { color: rgba(255,255,255,0.65); font-size: 0.87rem; }
footer ul li a:hover { color: #fff; text-decoration: none; }
.footer-bottom { max-width: 1100px; margin: 2rem auto 0; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; font-size: 0.8rem; }
.footer-usd2cad { color: rgba(255,255,255,0.5); font-size: 0.82rem; margin-top: 0.75rem; }
.footer-usd2cad a { color: rgba(255,255,255,0.65); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .content-grid { grid-template-columns: 1fr; }
  .sidebar { order: -1; }
  .sidebar-card { display: none; }
  .sidebar-card.mobile-show { display: block; }
  .sidebar-wise { display: block !important; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
}
@media (max-width: 768px) {
  nav ul { display: none; }
  .hamburger { display: flex; }
  .trust-bar { gap: 1rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .calc-row { grid-template-columns: 1fr; gap: 0.75rem; }
  .calc-arrow { padding: 0; justify-content: center; }
  .articles-grid { grid-template-columns: 1fr; }
  .article-meta { flex-direction: column; gap: 0.4rem; }
  .affiliate-cta { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .hero { padding: 2.5rem 1rem 2.5rem; }
  .calc-card { padding: 1.5rem 1rem; }
  .result-amount { font-size: 1.7rem; }
}


/* ===== NEWSLETTER SIGNUP ===== */
.newsletter-box {
  background: linear-gradient(135deg, #1e3a5f, #2d5a87);
  border-radius: var(--radius, 12px);
  padding: 2rem 1.75rem;
  margin: 2rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.newsletter-box::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
}
.newsletter-box h3 {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.newsletter-box p {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}
.newsletter-form {
  display: flex;
  gap: 0.5rem;
  max-width: 440px;
  margin: 0 auto;
}
.newsletter-form input[type="email"] {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}
.newsletter-form input[type="email"]::placeholder { color: rgba(255,255,255,0.5); }
.newsletter-form input[type="email"]:focus { border-color: rgba(255,255,255,0.5); }
.newsletter-form button {
  padding: 0.75rem 1.5rem;
  background: #e8a020;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
}
.newsletter-form button:hover { background: #d4911a; transform: translateY(-1px); }
.newsletter-msg { color: #86efac; font-size: 0.85rem; margin-top: 0.75rem; display: none; }
.newsletter-msg.error { color: #fca5a5; }
.newsletter-privacy { color: rgba(255,255,255,0.4); font-size: 0.72rem; margin-top: 0.75rem; }
@media (max-width: 600px) {
  .newsletter-form { flex-direction: column; }
  .newsletter-form button { width: 100%; }
}
