/* ===== Base ===== */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: Arial, sans-serif;
  background-color: #000; /* fallback */
}

/* Shared overlay */
.overlay {
  min-height: 100vh;   /* fallback */
  min-height: 100dvh;  /* modern browsers */
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .6s ease, transform .6s ease;

  /* Ensure all non-trading pages clear the fixed navbar */
  padding: 140px 20px 60px; 
}
.overlay.active,
.page-enter.page-enter-active {
  opacity: 1;
  transform: translateY(0);
}

/* Header / navbar */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 40px;
  background: #000; /* fallback */
  background: rgba(0, 0, 0, 0.6);
  flex-wrap: wrap;
  gap: 12px;
}

.logo h1 {
  color: #fff;
  margin: 0;
  font-size: 4em;
  font-weight: bold;
}

.logo p {
  color: rgba(255,255,255,0.95);
  margin: 5px 0 0 0;
  font-size: 1.35em;
}

.navbar { display: flex; align-items: center; flex-wrap: wrap; }
.navbar a {
  color: #fff;
  text-decoration: none;
  font-size: 1.1em;
  font-weight: bold;
  transition: color .3s ease;
  margin-left: 18px; /* fallback for browsers without gap */
}
.navbar { gap: 18px; } /* modern browsers */
.navbar a:hover { color: #ffd700; }

/* ========================================================= */
/* ================= TRADING PAGE ========================== */
/* ========================================================= */

body.trading {
  background: url('trading-bg.jpg') no-repeat center center fixed;
  background-size: cover;
}
.overlay.trading {
  background-color: rgba(0,0,0,0.35);
  min-height: 100vh;
  padding: 160px 20px 80px; /* leave room for header + ticker */
}

.trading-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Forex section */
.forex-box {
  background: rgba(0,0,0,0.55);
  padding: 20px;
  border-radius: 12px;
  color: #fff;
}
.forex-box h2 {
  font-size: 1.8rem;
  border-bottom: 2px solid #ffd700;
  padding-bottom: 6px;
}
.forex-box img {
  max-width: 100%;
  border-radius: 8px;
  margin: 16px 0;
  cursor: pointer;
}

/* Central Bank panel */
.cbank-box {
  background: rgba(0,0,0,0.55);
  padding: 20px;
  border-radius: 12px;
  color: #fff;
}
.cbank-box h2 {
  font-size: 1.6rem;
  border-bottom: 2px solid #ffd700;
  padding-bottom: 6px;
}
.calendar-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}
.calendar-list li {
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}
.accordion { margin-bottom: 20px; }
.accordion-item { margin-bottom: 8px; }
.accordion-header {
  background: rgba(0,0,0,0.7);
  color: #ffd700;
  font-weight: bold;
  font-size: 1.1rem;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .3s ease;
}
.accordion-header:hover {
  background: rgba(0,0,0,0.9);
}
.accordion-content {
  display: none;
  padding: 14px 18px;
  background: rgba(255,255,255,0.05);
  border-radius: 0 0 8px 8px;
  margin-top: 6px;
  line-height: 1.6;
}
.accordion-item.active .accordion-content { display: block; }

.view-all {
  display: block;
  text-align: right;
  margin-top: 10px;
  font-weight: bold;
  color: #ffd700;
  text-decoration: none;
}
.view-all:hover { text-decoration: underline; }

/* ========================================================= */
/* ================= TICKER BAR ============================ */
/* ========================================================= */
.ticker-wrap {
  width: 100%;
  overflow: hidden;
  background: #111;
  border-top: 2px solid #222;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1200;
}
.ticker {
  display: inline-flex;
  gap: 40px;
  padding: 12px 0;
  font-size: 1.2rem;
  font-weight: bold;
  animation: tickerScroll 40s linear infinite;
  will-change: transform;
}
.ticker:hover { animation-play-state: paused; }
.ticker-item {
  color: #fff;
  white-space: nowrap;
  padding: 4px 12px;
  border-radius: 6px;
}
.ticker-item.up   { color: #0f0; }
.ticker-item.down { color: #f33; }
@keyframes tickerScroll {
  0%   { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* ========================================================= */
/* ================= CONTENT BOX =========================== */
/* ========================================================= */
.content-box {
  background: rgba(0, 0, 0, 0.65); /* semi-transparent dark box */
  padding: 40px;
  border-radius: 12px;
  max-width: 800px;
  margin: 0 auto;
  color: #fff;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.content-box h2 {
  font-size: 2rem;
  margin-bottom: 16px;
  color: #ffd700;
}

/* ========================================================= */
/* ================= LIGHTBOX ============================== */
/* ========================================================= */
.lightbox {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}
.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0,0,0,0.8);
  cursor: pointer;
}
.lightbox.active { display: flex; }

/* ========================================================= */
/* ================= INVESTING PAGE ======================== */
/* ========================================================= */
.investing-box {
  background: rgba(0,0,0,0.65);
  padding: 40px;
  border-radius: 12px;
  max-width: 900px;
  margin: 0 auto;
  color: #fff;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.investing-box h2 {
  font-size: 2rem;
  margin-bottom: 24px;
  color: #ffd700;
}
.broker {
  margin-bottom: 40px;
}
.broker-logo {
  max-width: 140px;
  display: block;
  margin: 0 auto 12px;
}
.broker h3 {
  color: #ffd700;
  margin-bottom: 8px;
}
.broker a {
  color: #ffd700;
  text-decoration: none;
  font-weight: bold;
}
.broker a:hover {
  text-decoration: underline;
}

/* ========================================================= */
/* ================= CLOCK WIDGET ========================== */
/* ========================================================= */
.world-clock {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: rgba(0,0,0,0.55); /* semi-transparent dark background */
  padding: 12px 16px;
  border-radius: 8px;
  color: #fff;
  font-weight: bold;
  font-size: 1.1rem;
  line-height: 1.6;   /* spacing between rows */
  z-index: 1500;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.world-clock .clock { margin-bottom: 4px; }
.world-clock .clock:last-child { margin-bottom: 0; }

/* ========================================================= */
/* ================= CENTRAL BANKS HUB ===================== */
/* ========================================================= */
.cb-logo {
  max-width: 200px;
  height: auto;
  display: block;
  margin: 0 auto 12px;
}
.cb-logo-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 32px;
  margin: 20px 0;
}

/* Bank grid */
.bank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  justify-items: center;
  margin: 40px auto;
  max-width: 1200px;
}

/* Bank card */
.bank-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  max-width: 220px;
}
.bank-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.45);
}
.bank-card img {
  max-width: 140px;
  height: auto;
  margin-bottom: 12px;
}
.bank-card .bank-name {
  font-size: 1.1rem;
  font-weight: bold;
  color: #fff;
  text-align: center;
}

/* ========================================================= */
/* ================= ECB SUMMARY PAGE ====================== */
/* ========================================================= */
body.ecb {
  background: url('ecb-bg.jpg') no-repeat center center fixed;
  background-size: cover;
  background-attachment: fixed;
  color: #111;
}
.overlay.ecb {
  background-color: rgba(255,255,255,0.85);
  min-height: 100vh;
  padding: 160px 20px 80px;
}
.summary-box {
  max-width: 1100px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  color: #111;
}

/* ===== NAVBAR DROPDOWN ===== */
.navbar .dropdown { position: relative; display: inline-block; }
.navbar .dropdown > a { display: inline-block; }
.navbar .dropdown-content {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  background: rgba(0,0,0,0.85);
  min-width: 180px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 1000;
}
.navbar .dropdown-content a {
  display: block;
  padding: 10px 14px;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.navbar .dropdown-content a:hover {
  background: rgba(255,215,0,0.2);
}
.navbar .dropdown:hover .dropdown-content { display: block; }

/* Highlight active page link */
.navbar a.active {
  color: #ffd700;
  font-weight: 700;
}
/* === Central Bank Cards & Accordions Fixes === */
.bank-logo {
  max-width: 120px;
  max-height: 80px;
  object-fit: contain;
  display: block;
  margin: 0 auto 10px;
}

.bank-card {
  background: #111;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  flex: 1 1 200px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bank-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.bank-name {
  color: #fff;
  font-weight: bold;
  margin-top: 8px;
}

.accordion-header {
  background: rgba(255,255,255,0.1);
  color: #ffd700;
}

.accordion-content {
  background: rgba(0,0,0,0.7);
  color: #fff;
}

.accordion-content p strong {
  color: #ffd700;
}

