/* Blogs hub — full-bleed reader (left) + blue library panel (right) */

.blog-hub {
  padding: 0;
}

.blog-hub-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  min-height: calc(100vh - 72px + 180px);
  align-items: stretch;
}

/* —— Reader panel (left) —— */
.blog-reader {
  min-width: 0;
  min-height: calc(100vh - 72px + 180px);
  background: var(--n0);
  padding: clamp(40px, 5vw, 72px) clamp(32px, 5vw, 80px);
  border: none;
  border-radius: 0;
  box-shadow: none;
  border-right: 1px solid var(--n2);
}

html[dir="rtl"] .blog-reader {
  border-right: none;
  border-left: 1px solid var(--n2);
}

.blog-reader-placeholder {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  min-height: 0;
  text-align: left;
  padding: 0;
  max-width: 720px;
}

html[dir="rtl"] .blog-reader-placeholder {
  text-align: right;
  align-items: flex-end;
}

.blog-reader-placeholder .eyebrow {
  color: var(--blue);
  margin-bottom: 14px;
}

.blog-reader-placeholder h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.blog-reader-placeholder p {
  color: var(--n5);
  font-size: 17px;
  max-width: 48ch;
  margin: 0;
}

.blog-reader-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 20px;
}

.blog-reader-tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-lightest);
  padding: 6px 12px;
  border-radius: 999px;
}

.blog-reader-date {
  font-size: 14px;
  color: var(--n5);
}

.blog-reader-article {
  max-width: 720px;
}

.blog-reader h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  letter-spacing: -0.025em;
  margin: 0 0 20px;
  line-height: 1.15;
}

.blog-reader-download {
  margin: 0 0 28px;
}

.blog-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--blue);
  color: var(--n0);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.15s ease;
}

.blog-download-btn:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
  color: var(--n0);
}

.blog-download-btn svg {
  flex-shrink: 0;
}

.blog-reader-body p,
.blog-reader-body li {
  color: var(--n5);
  font-size: 17px;
  line-height: 1.75;
}

.blog-reader-body p {
  margin: 0 0 16px;
}

.blog-reader-body h3 {
  font-size: 20px;
  margin: 32px 0 12px;
  color: var(--ink);
}

.blog-reader-body ul,
.blog-reader-body ol {
  margin: 0 0 18px;
  padding-left: 1.25em;
}

.blog-reader-body li {
  margin-bottom: 8px;
}

.blog-reader-body a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* —— Library panel (right) —— */
.blog-sidebar {
  align-self: stretch;
  background: var(--blue);
  color: var(--n0);
  padding: 0 24px 40px;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.blog-sidebar-inner {
  max-width: 300px;
  margin: 0 auto;
}

.blog-sidebar-head {
  margin: 0 0 20px;
  padding: 28px 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.blog-sidebar-head h2 {
  font-size: 20px;
  margin: 0;
  letter-spacing: -0.02em;
  color: var(--n0);
}

.blog-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.blog-sidebar-group + .blog-sidebar-group {
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.blog-sidebar-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  padding: 9px 12px;
  border: none;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.18);
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: rgba(255, 255, 255, 0.92);
  transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html[dir="rtl"] .blog-sidebar-toggle {
  text-align: right;
}

.blog-sidebar-toggle:hover {
  background: rgba(0, 0, 0, 0.26);
}

.blog-sidebar-label {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.blog-sidebar-chevron {
  flex-shrink: 0;
  opacity: 0.75;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.blog-sidebar-group.is-collapsed .blog-sidebar-chevron {
  transform: rotate(-90deg);
}

html[dir="rtl"] .blog-sidebar-group.is-collapsed .blog-sidebar-chevron {
  transform: rotate(90deg);
}

.blog-sidebar-panel {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.38s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
}

.blog-sidebar-group.is-collapsed .blog-sidebar-panel {
  grid-template-rows: 0fr;
  opacity: 0.6;
}

.blog-sidebar-panel > .blog-sidebar-list {
  overflow: hidden;
  min-height: 0;
}

.blog-sidebar-empty {
  margin: 8px 0 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.5;
}

.blog-sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.blog-sidebar-item {
  width: 100%;
  text-align: left;
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 12px 14px;
  cursor: pointer;
  font: inherit;
  color: rgba(255, 255, 255, 0.82);
  transition:
    background 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    border-radius 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

html[dir="rtl"] .blog-sidebar-item {
  text-align: right;
}

.blog-sidebar-item:hover:not(.is-active) {
  color: var(--n0);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.blog-sidebar-item.is-active {
  padding: 12px 14px;
  color: var(--blue-dark);
  background: var(--blue-lightest);
  border: none;
  border-radius: 8px;
  box-shadow: none;
}

.blog-sidebar-item.is-active:hover {
  color: var(--blue-dark);
  background: var(--blue-lightest);
}

.blog-sidebar-item-title {
  display: block;
  font-family: "Urbanist", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: inherit;
  transition: color 0.35s cubic-bezier(0.4, 0, 0.2, 1), font-weight 0.2s ease;
}

.blog-sidebar-item-date {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    opacity 0.32s cubic-bezier(0.4, 0, 0.2, 1),
    max-height 0.32s cubic-bezier(0.4, 0, 0.2, 1),
    margin 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (hover: hover) and (pointer: fine) {
  .blog-sidebar-item:hover:not(.is-active) .blog-sidebar-item-date {
    opacity: 1;
    max-height: 20px;
    margin-top: 4px;
  }
}

.blog-sidebar-item.is-active .blog-sidebar-item-date {
  opacity: 0;
  max-height: 0;
  margin-top: 0;
}

.blog-sidebar-item.is-active .blog-sidebar-item-title {
  font-weight: 700;
  color: var(--blue);
  background: none;
  padding: 0;
  margin: 0;
  border: none;
}

/* RTL: library on the left */
html[dir="rtl"] .blog-hub-grid {
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
}

html[dir="rtl"] .blog-sidebar {
  order: -1;
}

@media (max-width: 960px) {
  /* Scroll-triggered reveal shifts content under the finger on touch devices */
  .blog-hub-over-cta .reveal,
  .blog-hub-grid.reveal,
  .blog-cta-window .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .blog-hub-grid {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  html[dir="rtl"] .blog-hub-grid {
    grid-template-columns: 1fr;
  }

  .blog-reader {
    min-height: 0;
  }

  .blog-sidebar {
    order: -1;
    padding: 0 var(--page-gutter, 12px) 36px;
  }

  .blog-sidebar-inner {
    max-width: none;
  }

  .blog-sidebar-head {
    padding: 24px 0 16px;
  }

  .blog-reader {
    order: 1;
    padding: 40px var(--page-gutter, 12px) 72px;
    border-right: none;
    border-left: none;
  }

}

@media (max-width: 700px) {
  .blog-reader {
    padding: 32px var(--page-gutter, 12px) 56px;
  }

  .blog-sidebar-toggle,
  .blog-sidebar-item {
    min-height: 44px;
    touch-action: manipulation;
  }

  .blog-sidebar-panel {
    transition: none;
  }

  .blog-cta-window {
    overflow: hidden;
  }

  .blog-cta-window {
    padding-top: clamp(4rem, 14vw, 5.5rem);
    padding-bottom: clamp(4rem, 14vw, 5.5rem);
  }

  .blog-cta-window .hiw-den-cta-block .btn {
    width: 100%;
    justify-content: center;
  }

}

/* —— Ready to find your Den: window overlap (Blogs page) —— */
.blog-hub-over-cta {
  position: relative;
  z-index: 4;
  margin-bottom: -5rem;
  padding-bottom: 1.5rem;
}

.blog-hub-over-cta .blog-hub-grid {
  box-shadow:
    0 28px 56px -12px rgba(3, 7, 18, 0.22),
    0 8px 24px -8px rgba(3, 7, 18, 0.12);
}

.blog-cta-window {
  position: relative;
  z-index: 1;
  overflow: hidden;
  padding-top: clamp(7.5rem, 14vw, 11rem);
  padding-bottom: clamp(7.5rem, 14vw, 11rem);
  margin: 0;
}

.blog-cta-window .hiw-den-cta-bg {
  transform: scale(1.06);
  transform-origin: center center;
}

.blog-cta-window .hiw-den-cta-in {
  position: relative;
  z-index: 2;
}

.foot-over-cta {
  position: relative;
  z-index: 4;
  margin-top: -5rem;
  box-shadow:
    0 -28px 56px -12px rgba(3, 7, 18, 0.28),
    0 -8px 24px -8px rgba(3, 7, 18, 0.14);
}

@media (max-width: 960px) {
  .blog-hub-over-cta {
    margin-bottom: 0;
    padding-bottom: 0;
    overflow-anchor: none;
  }

  .blog-cta-window {
    padding-top: clamp(4rem, 14vw, 6rem);
    padding-bottom: clamp(4rem, 14vw, 6rem);
    overflow-anchor: none;
  }

  .blog-cta-window .hiw-den-cta-bg {
    transform: none;
  }

  .foot-over-cta {
    margin-top: 0;
    box-shadow: none;
    overflow-anchor: none;
  }
}

