/* ============================================================
   Root Variables
   ------------------------------------------------------------
   Use CSS variables for easy theme and color control.
   You can adjust all colors here in one place.
   ============================================================ */
:root {
  --bg: #f5f5f5;
  --text: #222;
  --accent: #c0392b;

  /* Side colors for conflict visualization */
  --palestina-color: #b73223; /* red */
  --israel-color: #0e5f95;    /* blue */
}

/* ============================================================
   Global Styles  
   ============================================================ */
body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* ============================================================
   Header + Navigation
   ============================================================ */
.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo a {
  display: inline-block;
  text-decoration: none;
  color: var(--accent);
  font-weight: bold;
  font-size: 1.5rem;
}

.logo img {
  height: 200px;
  width: auto;
  display: block;
  margin: 0 auto 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  padding-bottom: 1rem;
}

.nav {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav a:hover {
  color: var(--accent);
}


/* Mobile menu button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
}

/* ============================================================
   Conflict Color Classes
   ------------------------------------------------------------
   Used for all Palestinian (red) and Israeli (blue) sections,
   text, borders, and charts. No inline colors needed.
   ============================================================ */
.palestina { color: var(--palestina-color); }
.israel { color: var(--israel-color); }

/* Civilians and military highlight classes */
.civilian {
  color: dimgray;
  /* opacity: 0.9; */
  font-weight: 500;
}
.military {
  color: darkgreen;
  /* opacity: 0.9;
  font-style: italic; */
}

/* ============================================================
   Layout: Main Content + Stats
   ============================================================ */
.content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.stat-block {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  margin-bottom: 3rem;
  text-align: left;
  width: 100%;
  max-width: -webkit-fill-available;
}

.stat-block h3 {
  /* color: var(--accent); */
  margin-bottom: 0.5rem;
}

.stat-block p {
  line-height: 1.4;
  font-size: 1rem;
  color: #333;
}

.stat-block canvas {
  margin-top: 1rem;
  width: 100%;
  height: 320px;
}

/* Source footer line under charts */
.source {
  text-align: center;
  color: #666;
  font-size: 0.9rem;
}

/* ============================================================
   Recent 72-hour Boxes
   ============================================================ */
.recent-72h {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0;
}

.recent-box {
  flex: 1 1 250px;
  background: #fff;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.recent-box h4 {
  margin-bottom: 0.5rem;
}

/* Colored side accents (using side classes) */
.recent-box.palestina {
  border-left: 6px solid var(--palestina-color);
}
.recent-box.israel {
  border-left: 6px solid var(--israel-color);
}

/* ============================================================
   Hero & Buttons (Homepage sections)
   ============================================================ */
.hero {
  text-align: center;
  padding: 5rem 1rem;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  margin-top: 1rem;
  transition: background 0.2s;
}
.btn:hover {
  background: #a93226;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  text-align: center;
  padding: 2rem;
  background: #fff;
  margin-top: 4rem;
  font-size: 0.9rem;
  color: #666;
}

/* ============================================================
   Chart Styling
   ------------------------------------------------------------
   These can be used by Chart.js to sync legend colors, etc.
   Chart.js picks up these via JS getComputedStyle.
   ============================================================ */
.chart {
  width: 100%;
  height: 400px;
}

/* You can optionally target Chart.js legend labels */
.chart-legend .palestina::before {
  background-color: var(--palestina-color);
}
.chart-legend .israel::before {
  background-color: var(--israel-color);
}

/* ============================================================
   Mobile Navigation
   ============================================================ */
@media (max-width: 768px) {
  .nav {
    display: none;
    flex-direction: column;
    background: white;
    position: absolute;
    top: 60px;
    right: 0;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  }

  .menu-toggle {
    display: block;
  }

  .nav.show {
    display: flex;
  }
}
