/* ── Floating action bar ─────────────────────────────── */
.post-fab {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
}

.post-fab-inner {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  padding: 8px 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
}

.fab-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fab-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s;
}

.fab-btn:hover {
  color: #1d4ed8;
  background-color: #eff6ff;
}

.fab-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.fab-divider {
  width: 1px;
  height: 24px;
  background: #e5e7eb;
  margin: 0 4px;
}

/* Tooltip — hidden on mobile, shown on desktop hover */
.fab-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: #ffffff;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  display: none;
}

.fab-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #1f2937;
}

@media (min-width: 768px) {
  .fab-tooltip {
    display: block;
  }
  .fab-item:hover .fab-tooltip {
    opacity: 1;
  }
}

/* Bookmark active state */
.bookmark-btn.bi-bookmarked {
  color: #1d4ed8;
  background-color: #eff6ff;
}
/* ────────────────────────────────────────────────────── */

/* Banner Gradient */
.banner-gradient {
  background: linear-gradient(0.35deg, #4da6ff 0.3%, #003366 99.7%);
}

/* Featured Posts Grid */
.featured-posts-grid > div:nth-child(1) {
  grid-column: span 1 / span 1;
}
.featured-posts-grid > div:not(:first-child) .post-image {
  max-width: 100%;
}

/* Popular Topics Grid */
.popular-topics-grid .topic-1,
.popular-topics-grid .topic-2 {
  border-top-width: 1px;
}
.popular-topics-grid .topic-2,
.popular-topics-grid .topic-4,
.popular-topics-grid .topic-6,
.popular-topics-grid .topic-8 {
  border-right-width: 0;
}
.popular-topics-grid .topic-7,
.popular-topics-grid .topic-8 {
  border-bottom-width: 0;
}

@media (min-width: 768px) {
  /* Banner Gradient */
  .banner-gradient {
    background: linear-gradient(270.05deg, #4da6ff 0.04%, #003366 99.96%);
  }
  /* Featured Posts Grid */
  .featured-posts-grid > div:nth-child(1) {
    grid-column: span 2 / span 2;
  }

  /* Popular Topics Grid */
  .popular-topics-grid .topic-1,
  .popular-topics-grid .topic-2 {
    border-top-width: 0;
  }
  .popular-topics-grid .topic-2,
  .popular-topics-grid .topic-4,
  .popular-topics-grid .topic-8 {
    border-right-width: 1px;
  }
  .popular-topics-grid .topic-3,
  .popular-topics-grid .topic-6 {
    border-right-width: 0;
  }
  .popular-topics-grid .topic-7,
  .popular-topics-grid .topic-8 {
    border-bottom-width: 0;
  }
}
