/* Floating all-blogs rail — matches home "Built for the Real World" popup */
.blogs-float {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%) translateX(120%);
  width: min(340px, calc(100vw - 36px));
  z-index: var(--z-float, 90);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.blogs-float.is-visible {
  transform: translateY(-50%) translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.blogs-float.is-collapsed .blogs-float-panel {
  display: none;
}

.blogs-float.is-collapsed {
  right: 0;
  transform: translateY(-50%) translateX(0);
  opacity: 1;
  pointer-events: auto;
  width: auto;
}

.blogs-float-panel {
  background: #1a1a1a;
  border-radius: 16px;
  padding: 16px 14px 14px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  max-height: min(72vh, 640px);
  display: flex;
  flex-direction: column;
}

.blogs-float-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding: 0 2px;
  flex-shrink: 0;
}

.blogs-float-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  font-family: "Lexend Deca", system-ui, sans-serif;
}

.blogs-float-count {
  display: block;
  margin-top: 3px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: rgba(255, 255, 255, 0.5);
}

.blogs-float-toggle {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.blogs-float-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
}

.blogs-float-search {
  margin-bottom: 10px;
  flex-shrink: 0;
}

.blogs-float-search input {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #232323;
  color: #fff;
  font: 0.8rem/1.4 "Lexend Deca", system-ui, sans-serif;
  outline: none;
}

.blogs-float-search input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.blogs-float-search input:focus {
  border-color: rgba(190, 30, 45, 0.55);
}

.blogs-float-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  overflow-y: auto;
  padding-right: 2px;
  max-height: none;
  flex: 1;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.blogs-float-list::-webkit-scrollbar {
  width: 6px;
}

.blogs-float-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.blogs-float-card {
  display: flex;
  gap: 12px;
  align-items: stretch;
  padding: 10px;
  border-radius: 12px;
  background: #232323;
  text-decoration: none;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: background 0.2s ease;
  font-family: "Lexend Deca", system-ui, sans-serif;
}

.blogs-float-card:hover,
.blogs-float-card.is-active {
  background: #333333;
  color: #ffffff;
}

.blogs-float-card.is-active {
  outline: 1px solid rgba(190, 30, 45, 0.55);
}

.blogs-float-card img {
  width: 56px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: #3a3a3a;
}

.blogs-float-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}

.blogs-float-card-cat {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e02a2a;
}

.blogs-float-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blogs-float-card-meta {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.5);
}

.blogs-float-empty {
  padding: 18px 8px;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  font-family: "Lexend Deca", system-ui, sans-serif;
}

.blogs-float-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  width: 100%;
  padding: 11px 14px;
  border-radius: 999px;
  background: #be1e2d;
  color: #ffffff !important;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(190, 30, 45, 0.35);
  transition: background 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
  font-family: "Lexend Deca", system-ui, sans-serif;
}

.blogs-float-cta:hover {
  background: #8a1520;
  color: #ffffff !important;
  transform: translateY(-1px);
}

.blogs-float-tab {
  --tab-accent: #be1e2d;
  display: none;
  position: relative;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 132px;
  padding: 18px 10px 18px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-right: none;
  border-radius: 12px 0 0 12px;
  background: #1a1a1a;
  color: rgba(255, 255, 255, 0.92);
  font-family: "Lexend Deca", system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: -6px 10px 24px rgba(0, 0, 0, 0.28);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.blogs-float-tab::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 0;
  width: 2px;
  border-radius: 999px;
  background: var(--tab-accent);
}

.blogs-float-tab-label {
  line-height: 1;
}

.blogs-float-tab-chevron {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.75);
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.blogs-float-tab-chevron svg {
  width: 10px;
  height: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.blogs-float.is-collapsed .blogs-float-tab {
  display: inline-flex;
}

.blogs-float.is-collapsed .blogs-float-tab:hover {
  background: #222;
  color: #fff;
  box-shadow: -8px 12px 28px rgba(0, 0, 0, 0.34);
}

.blogs-float.is-collapsed .blogs-float-tab:hover .blogs-float-tab-chevron {
  background: var(--tab-accent);
  border-color: var(--tab-accent);
  color: #fff;
}

.blogs-float.is-collapsed .blogs-float-tab:focus-visible {
  outline: 2px solid #be1e2d;
  outline-offset: 3px;
}

@media (max-width: 1100px) {
  .blogs-float {
    display: none !important;
  }
}
