/* insights spage styling */
.insights-container {
  padding: 1rem; /* Adds space around the iframe */
}
.iframe-insights-entry {
  width: 100%;
  height: 70vh; /* Approx A4 size when full screen on a laptop plus scales to keep within view on smaller screens */
  border-radius: 0.625rem;
  border: none;
}
/* Post headings */
.post-heading {
  cursor: pointer;
  padding: 0.5rem;
  background: #dddddd;
  border: 2px solid #fa8c0a;
  border-radius: 5px;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.5rem;
  font-weight: bolder;
  color: #002191;
}
.post-heading:hover {
  background: #fae2b8;
  filter: grayscale(0%);
}
/* Container for title and subheading */
.post-title-container {
  display: flex;
  flex-direction: column; /* Stack title and subheading vertically */
  margin-left: 1.5rem; /* Add spacing from the image */
}
.post-subheading {
  font-size: 1.2rem;
  font-weight: normal;
  color: #333333;
  margin-top: 0.2rem; /* Space between title and subheading */
}
/* Post content */
.post-content {
  border: 1px solid #fae2b8;
  margin-bottom: 1rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: scaleY(0);
  transform-origin: top; /* Anchor the transition at the top */
  transition: max-height 0.4s ease, opacity 0.5s ease, transform 0.4s ease;
}
.post-content:not(.hidden) {
  max-height: 1800px; /* Adjust to fit content */
  opacity: 1;
  transform: scaleY(1);
}

.post-image {
  height: 12rem;
  width: 12rem;
  aspect-ratio: 1/1;
  filter: grayscale(100%);
}
.post-heading:hover .post-image {
  filter: grayscale(0%);
}

.filter-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-family: monospace;
}
.filter-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.5rem;
  border: 1px solid #cccccc;
  border-radius: 4px;
  background: #dddddd;
  color: #666666;
  font-size: 1rem;
  font-weight: bolder;
  height: 2rem;
  min-width: 2rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
#post-count {
  pointer-events: none; /* Non-clickable */
  user-select: none; /* Prevent text selection */
  border: 1px solid #dddddd;
  border-radius: 4px;
  background: #eeeeee;
  font-weight: lighter;
}

@media (prefers-color-scheme: dark) {
  .post-heading {
    background: #555555;
    color: #eeeeee;
  }
  .post-heading:hover {
    background: rgb(250, 140, 10, 0.75);
  }
  .post-subheading {
    color: #cccccc;
  }
  .post-content {
    border: 1px solid #555555;
  }
  .filter-controls button {
    border: 1px solid #cccccc;
    background: #666666;
    color: #dddddd;
  }
  #post-count {
    border: 1px solid #666666;
    background: #444444;
    color: #dddddd;
  }
  .pdf-frame {
    /* invert + hue rotate gives readable “dark mode” without neon colors */
    filter: invert(0.9) hue-rotate(190deg) contrast(0.9) brightness(0.8);
  }
}
