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

/* GLOBAL */
html,
body {
  font-size: 62.5%;
  background: #f4f7fa; /* světlé NASA pozadí */
  color: #1b2a41;
  font-family: "Poppins", sans-serif;
}

/* TYPOGRAPHY */
h1 {
  font-size: 2.4rem;
  font-weight: 600;
  color: #1b2a41;
  letter-spacing: 0.04rem;
}

h2 {
  font-size: 1.3rem;
  font-weight: 500;
  color: #274c77;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
}

h3 {
  font-size: 2.2rem;
  font-weight: 600;
  color: #1b2a41;
}

h4 {
  text-align: left;
  font-size: 1.4rem;
  color: #5c708c;
  margin: 0 1.5rem 2rem;
}

/* LINKS */
.links {
  display: flex;
  justify-content: flex-start;
  gap: 1.2rem;
  margin: 1rem 1.5rem 2rem;
  flex-wrap: wrap;
}

.links a {
  font-size: 1.4rem;
  text-decoration: none;
  color: #274c77;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  border: 1px solid #8ca7c8;
  background: #ffffff;
  transition: 0.15s ease;
}

.links a:hover {
  background: #e9eff6;
}

/* HEADER */
#main-head {
  margin: 2rem 1.5rem 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo_img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
}

/* GRID OF BOXES */
.boxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1.6rem;
  padding: 0 1.5rem 3rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* INDIVIDUAL BOX */
.box {
  background: #ffffff;
  border: 1px solid #d7e0ea;
  border-radius: 12px;

  padding: 1.4rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;

  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  transition: 0.15s ease-in-out;

  min-height: 120px;
}

/* HOVER (jemné, minimalistické) */
.box:hover {
  border-color: #c2d4e8;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.09);
}

/* ICON + TITLE HEADER */
.metric-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.metric-icon {
  font-size: 2rem;
  color: #274c77;
}

/* VALUE */
.box h3 {
  margin-top: 0.3rem;
}

/* FOOTER */
footer {
  margin: 2rem 1.5rem;
  text-align: center;
}

.footer-wrapper h4 {
  color: #5c708c;
  font-size: 1.3rem;
  opacity: 0.7;
}

/* MOBILE (iPhone 12 Pro) */
@media screen and (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }
  .logo_img {
    width: 42px;
    height: 42px;
  }
  .boxes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
    padding: 0 1.2rem 2rem;
  }
  .box {
    padding: 1.2rem;
    min-height: 105px;
  }
  h3 {
    font-size: 1.9rem;
  }
  .links {
    margin-left: 1.2rem;
  }
}

@media screen and (max-width: 360px) {
  .boxes {
    grid-template-columns: 1fr;
  }
}

.chart-panel {
  background: #ffffff;
  border: 1px solid #d7e0ea;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 2rem 1.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.chart-panel.hidden {
  display: none;
}

#chart-title {
  font-size: 1.6rem;
  color: #274c77;
  margin-bottom: 1rem;
}

#chart {
  width: 100%;
  height: 260px;
}

@media screen and (max-width: 480px) {
  #chart {
    height: 220px;
  }
}
