/* blog.css — Archive drawer support */

.blog-layout {
  display: block;
}

@media (max-width: 900px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }
  .blog-sidebar {
    display: none;
  }
}

.blog-archive-toggle {
  position: relative; /* now positioned by the fixed column wrapper */
  z-index: 40;

  /* Bigger + not transparent */
  /* margin-right: 1rem; */
  padding: 1rem 1.5rem 0.45rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;

  background: var(--brand-primary);
  color: #fff;
  /* border: 1px solid var(--brand-primary); */

  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.blog-archive-fixed-column {
  /* border: 5px solid yellow; */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;

  padding: 0 2rem;

  max-width: 940px;
  margin: 0 auto;

  z-index: 90; /* above toggle (40), below modals if needed */

  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;

  pointer-events: none; /* container doesn't block clicks */
}

.blog-archive-fixed-column > * {
  pointer-events: auto; /* children remain clickable */
}

.blog-archive-toggle:hover {
  background: var(--brand-primary-dark);
  /* border-color: var(--brand-primary-dark); */
}

.blog-archive-drawer {
  position: relative; /* constrained by blog-archive-fixed-column */
  /* margin-left: auto; */
  width: 100%;

  bottom: 0;
  z-index: 250;

  /* Different background + rounded top corners */
  background: var(--bg-main);
  /* border-top: 1px solid var(--border-soft); */
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;

  /* Constrain the drawer so the CONTENT can scroll */
  height: 60vh;
  max-height: 60vh;

  display: flex;
  flex-direction: column;
  overflow: hidden;

  transform: translateY(200%);
  transition: transform 0.22s ease;

  box-shadow: 0 -10px 26px rgba(0, 0, 0, 0.22);

  font-size: 1.05rem;
}

/* Archive drawer: make each item a tappable row with spacing */
.blog-archive-drawer .blog-archive-link {
  display: flex; /* keep date + title on one row */
  gap: 0.75rem;
  padding: 0.75rem 0.25rem; /* vertical + a touch of horizontal */
  line-height: 1.35;
}

.blog-archive-drawer__content {
  padding: 1rem 1.25rem 1.25rem;

  /* This makes the list area take remaining height and scroll */
  flex: 1;
  min-height: 0;

  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.blog-archive-drawer.is-open {
  transform: translateY(0);
}

.blog-archive-drawer__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;

  padding: 0.85rem 1.25rem;
  /* background: var(--bg-card); */
  color: white;
  background: var(--brand-primary);
  border-bottom: 1px solid var(--border-soft);
}

/* Remove bullets + tighten list spacing */
.blog-archive-drawer .blog-archive-list {
  list-style: none;
  padding-left: 0;
  margin: 0.25rem 0 0;
}

.blog-archive-drawer .blog-archive-list li {
  margin: 0;
}

.blog-archive-drawer__close {
  color: white;
}

.blog-post__hero {
  /* Pull the hero image out to full card width */
  margin: 1.2rem 0 1.6rem;
  border-radius: 0.85rem;
  overflow: hidden;
}

/* Ensure the image fully fills the available width */
.blog-post__hero img {
  display: block;
  width: 100%;
  height: auto;
}

/* Dark mode: make archive links white */
body.theme-dark .blog-archive-drawer .blog-archive-link {
  color: #ffffff;
}

body.theme-dark a {
  color: #ffffff;
}

/* Optional: slightly dim the date text for hierarchy */
body.theme-dark .blog-archive-drawer .blog-archive-date {
  color: rgba(255, 255, 255, 0.7);
}

body.theme-dark .blog-archive-drawer .blog-archive-link:hover {
  background: rgba(255, 255, 255, 0.08);
}
