/* TYPOGRAPHY */

body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  background: #ffffff;
  color: #111;
}



.eyebrow {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 1px;
  color: #777;
  margin-bottom: 10px;
}

.main-title {
  font-family: Georgia, serif;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
  margin-bottom: 20px;
}

.intro {
  color: #444;
  max-width: 650px;
}

.meta {
  font-size: 13px;
  color: #777;
  margin-top: 15px;
}

/* YEAR */

.year-display {
  text-align: center;
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 15px;
}

/* CHART */

.chart-wrapper {
  margin: 10px 0;
}

#pyramid {
  width: 100%;
  height: auto;
}

/* CONTROLS */

.controls {
  margin-top: 20px;
  display: flex;
  gap: 15px;
  align-items: center;
}

.controls input[type="range"] {
  flex: 1;
}

/* SECTION TITLE */

.section-title {
  font-family: Georgia, serif;
  font-size: 22px;
  margin-bottom: 30px;
}

/* AD PLACEHOLDER */

.ad-placeholder {
  margin: 40px 0;
  padding: 30px;
  border: 1px solid #eee;
  text-align: center;
  font-size: 12px;
  letter-spacing: 1px;
  color: #aaa;
}

/* FOOTER */

.journal-footer {
  background: #f7f7f7;
  border-top: 1px solid #eee;
  font-size: 14px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  border-bottom: 1px solid #eee;
  background: #fff;
}

.logo a {
  font-size: 20px;
  font-weight: bold;
  text-decoration: none;
  color: #000;
}

.countries a {
  margin-left: 20px;
  text-decoration: none;
  color: #555;
}

.countries a.active {
  font-weight: bold;
  color: #000;
}

.container {
  max-width: 1000px;         /* ili 1400px – ograniči i kontejner ako želiš */
  margin: 0 auto;
  padding: 0 16px;
}

#year-display {
  font-size: 20px;
  margin-bottom: 10px;
}

#loading {
  color: #777;
  margin-bottom: 20px;
}

#pyramid {
  width: 100%;
  max-width: 960px;          /* ili 1000px / 1100px – probaj šta ti najlepše izgleda */
  height: auto;
  display: block;
  margin: 0 auto;            /* centriranje */
}
.chart-wide {
  max-width: 1100px;
  margin: 0 auto;
}
@media (min-width: 1200px) {
  #pyramid {
    max-width: 1000px;       /* ili čak 1100px ako želiš malo veće na desktopu */
  }
}

#bottom-controls {
  flex-direction: column; /* slider i dugme jedno ispod drugog na telefonu */
  align-items: stretch;
  gap: 12px;
}

#year-slider {
  width: 100%;
}

.axis-label, .pct-label {
  font-size: clamp(9px, 1.8vw, 11px);   /* skalira se sa širinom ekrana */
}

@media (max-width: 640px) {
  .axis-label {
    font-size: 9px;
  }
  .pct-label {
    font-size: 8px;
  }
  .tooltip {
    font-size: 12px;
    padding: 6px 8px;
  }
}

#bottom-controls {
  margin-top: 25px;
  display: flex;
  align-items: center;
  gap: 15px;
}

#year-slider {
  flex: 1;
}

#play-btn {
  padding: 8px 14px;
  cursor: pointer;
}

.bar.male {
  fill: #1e90ff;
}

.bar.female {
  fill: #ff69b4;
}

.tooltip {
  position: absolute;
  background: #fff;
  border: 1px solid #ddd;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 13px;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.timeline-container {
  margin: 50px 0;
  padding: 0 10px;
}

.timeline-container h3 {
  text-align: center;
  margin-bottom: 30px;
  color: #333;
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

/* Vertikalna linija */
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: #d69e2e;           /* ili linear-gradient(#d69e2e, #c53030) */
  transform: translateX(-50%);
  z-index: 1;
}

/* Svaki događaj */
.event {
  position: relative;
  margin: 40px 0;
  padding: 0 20px;
  width: 50%;
  box-sizing: border-box;
  z-index: 2;
}

/* Leva i desna strana naizmenično */
.event:nth-child(odd) {
  left: 0;
  text-align: right;
}

.event:nth-child(even) {
  left: 50%;
  text-align: left;
}

/* Krug/tačka na liniji */
.event::after {
  content: '';
  position: absolute;
  top: 15px;
  width: 16px;
  height: 16px;
  background: #fff;
  border: 3px solid #d69e2e;
  border-radius: 50%;
  z-index: 3;
}

.event:nth-child(odd)::after {
  right: -8px;
}

.event:nth-child(even)::after {
  left: -8px;
}

/* Sadržaj događaja */
.event-year {
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 8px;
  color: #333;
}

.event-flag {
  font-size: 36px;
  margin: 10px 0;
}

.event-title {
  font-size: 15px;
  line-height: 1.4;
  color: #444;
}

/* Na malim ekranima – sve na jednoj strani */
@media (max-width: 768px) {
  .timeline::before {
    left: 30px;
  }

  .event {
    width: 100%;
    left: 0 !important;
    text-align: left !important;
    padding-left: 70px;
    padding-right: 20px;
  }

  .event::after {
    left: 22px !important;
    right: auto !important;
  }

  .event-year,
  .event-flag,
  .event-title {
    text-align: left;
  }
}

#country-dropdown {
  border: 1px solid #dbdbdb;
  border-radius: 4px;
  background: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

#country-list .menu-list a {
  padding: 8px 12px;
  display: block;
  color: #363636;
  text-decoration: none;
}

#country-list .menu-list a:hover {
  background-color: #f5f5f5;
}

#country-list .menu-list a.is-active {
  background-color: #00d1b2;
  color: white;
}

/* Na malim ekranima proširi širinu */
@media (max-width: 768px) {
  #country-search {
    width: 100% !important;
  }
  #country-dropdown {
    width: 100% !important;
  }
}
.year-info {
  line-height: 1.3;
}

.pop-change {
  font-weight: 600 !important;
  min-width: 70px;
  text-align: center;
}

.pop-change.up {
  background-color: #48c774 !important;
  color: white !important;
}

.pop-change.down {
  background-color: #f14668 !important;
  color: white !important;
}

.pop-change.neutral {
  background-color: #dbdbdb !important;
  color: #7a7a7a !important;
}

/* ako želiš da tag bude malo manji na mobilnom */
@media screen and (max-width: 768px) {
  .year-info .is-size-3 {
    font-size: 1.8rem !important;
  }
  .year-info .is-size-5 {
    font-size: 1rem !important;
  }
  .pop-change {
    min-width: 60px;
  }
}