/* Target only elements *inside* the body */
body [lang] {
  display: none;
}

/* Then show only the matching ones */
html.lang-active-en body [lang="en"],
html.lang-active-pl body [lang="pl"] {
  display: block; /* or inline/block as appropriate */
}

.post-content {
    margin-bottom: 20px;
}

/* Progress bar container */
.progress-bar {
    display: flex;
    height: 24px;
    border-radius: 4px;
    overflow: visible;
    margin: 0.5rem 1rem;
    position: relative;
}

/* Each segment */
.progress-bar .segment {
    cursor: pointer;
    position: relative;
    /* flex basis comes from inline style */
}

.progress-bar .segment:first-child {
    border-top-left-radius: 0.6rem;
    border-bottom-left-radius: 0.6rem;
}

.progress-bar .segment:last-child {
    border-top-right-radius: 0.6rem;
    border-bottom-right-radius: 0.6rem;
}

/* Hover tooltip */
.progress-bar .segment:hover::after {
    content: attr(data-activity) "\A" attr(data-hours) " hrs";
    white-space: pre;
    display: inline-block;
    line-height: 1.2;
    position: absolute;
    top: -3em;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 4px 8px;
    border-radius: 3px;
    pointer-events: none;
    z-index: 10;
    text-align: center;
    font-family: Roboto, Helvetica, "Noto Sans", Arial;
}


.sleep        { background-color: #323842; }
.dating       { background-color: #c61734; }
.friends      { background-color: #015745; }
.robots       { background-color: #fe65af; }
.school       { background-color: #01a8b3; }
.work         { background-color: #199748; }
.productive   { background-color: #fef236; }
.hobby        { background-color: #ff6c00; }
.leisure      { background-color: #5b3bb0; }
.waste        { background-color: #ff2816; }
.transition   { background-color: #bffe54; }

.bad      { background-color: #5b3bb0; }
.poor     { background-color: #c61734; }
.ok       { background-color: #ff6c00; }
.neutral  { background-color: #fabc05; }
.good     { background-color: #01a8b3; }
.great    { background-color: #199748; }

/* container for the two buttons */
.lang-switch {
  display: inline-flex;
  gap: 0.5em;
  margin-bottom: 1em;
}

.lang-switch {
  display: inline-flex;
  gap: 0.25em;
  margin-bottom: 1em;
}

.lang-switch button {
  background: #282c34;
  color: #ccc;
  border: 1px solid transparent;
  border-radius: 9999px;
  padding: 0.25em 0.75em;
  margin: 0 0.15em;
  font-family: Oswald, Arial, sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: 
    background 0.2s, 
    border-color 0.2s, 
    color 0.2s;
}

.lang-switch button:hover {
  background: #4a4f5b;
}

.lang-switch button.active {
  background: transparent;
  color: #00ccff;
  border-color: #00ccff;         /* just an outline highlight */
}

.lang-switch button:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 204, 255, 0.5);
}

.image-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 800px;
    margin: 0 auto;
}

.image-grid .item {
  /* each portrait item wants at least 200px, but will grow to fill the row */
  flex: 1 1 200px;
}

.image-grid .item.landscape {
  /* force a full‐width break */
  flex: 1 1 100%;
}

.image-grid img {
  height: auto;
  display: block;
  border-radius: 4px;
  max-height: 50vh;
  width: 100%;
  object-fit: contain;
  margin: 0 auto;
}