/* Guides (About) page: two-column doc layout, one post visible at a time */

/* No overflow-x: hidden on container — it breaks position: sticky on mobile */
.guides-container {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.guides-empty {
  max-width: 42em;
  margin: 0 auto;
}

/* Two-column layout: 25% nav / 75% content */
.guides-layout {
  display: grid;
  grid-template-columns: 25% 75%;
  gap: 2rem 3rem;
  align-items: start;
  min-width: 0;
}

/* Mobile dropdown: hidden on desktop */
.guides-nav-mobile {
  display: none;
}

/* Left column: sticky nav (desktop) */
.guides-nav {
  position: sticky;
  top: 20px;
  min-width: 0;
}

.guides-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guides-nav-item {
  margin: 0;
}

.guides-nav-link {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--clean-blog-gray-700, #374151);
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.4;
  border-left: 3px solid transparent;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.guides-nav-link:hover {
  color: var(--clean-blog-gray-900, #111);
  background-color: rgba(0, 0, 0, 0.04);
}

.guides-nav-link.active {
  font-weight: 600;
  color: var(--brand-accent, #4f46e5);
  border-left-color: var(--brand-accent, #4f46e5);
  background-color: rgba(79, 70, 229, 0.06);
}

/* Right column: content — only one section visible at a time */
.guides-content {
  padding-left: 40px;
  min-width: 0;
}

.guides-section {
  display: none;
}

.guides-section.guides-section--current {
  display: block;
}

.guides-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--clean-blog-gray-900, #111);
}

.guides-section-body {
  max-width: 800px;
  line-height: 1.6;
}

/* Responsive images inside guide body */
.guides-content .guides-section-body img,
.guides-content .homepage-content img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

.guides-content .guides-section-body figure,
.guides-content .homepage-content figure {
  margin: 1.25rem 0;
}

.guides-content .guides-section-body figure img,
.guides-content .homepage-content figure img {
  max-width: 100%;
  height: auto;
}

/* Mobile / small screens: sticky dropdown, single column */
@media (max-width: 768px) {
  .guides-container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .guides-layout {
    grid-template-columns: 1fr;
    gap: 0;
    max-width: 100%;
  }

  .guides-nav {
    display: none;
  }

  .guides-nav-mobile {
    display: block;
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid #ddd;
    margin-bottom: 1rem;
  }

  .guides-nav-mobile__summary {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--clean-blog-gray-800, #1f2937);
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 8px;
    list-style: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .guides-nav-mobile__summary::-webkit-details-marker {
    display: none;
  }

  .guides-nav-mobile__summary::after {
    content: '';
    margin-left: auto;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid currentColor;
    opacity: 0.7;
  }

  .guides-nav-mobile[open] .guides-nav-mobile__summary {
    border-radius: 8px 8px 0 0;
    border-bottom-color: transparent;
  }

  .guides-nav-mobile-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    background: #fff;
    max-height: 70vh;
    overflow-y: auto;
  }

  .guides-nav-mobile-item {
    margin: 0;
    border-bottom: 1px solid #eee;
  }

  .guides-nav-mobile-item:last-child {
    border-bottom: none;
  }

  .guides-nav-mobile .guides-nav-link {
    display: block;
    padding: 12px 16px;
    color: var(--clean-blog-gray-800, #1f2937);
    text-decoration: none;
    font-size: 0.95rem;
    border-left: none;
  }

  .guides-nav-mobile .guides-nav-link:hover {
    background: #f5f5f5;
  }

  .guides-nav-mobile .guides-nav-link.active {
    background: rgba(79, 70, 229, 0.1);
    color: var(--brand-accent, #4f46e5);
    font-weight: 600;
  }

  .guides-content {
    padding-left: 0;
    padding: 0 0.25rem 20px;
    max-width: 100%;
  }

  .guides-section-body {
    max-width: 100%;
  }

  .guides-content .guides-section-body img,
  .guides-content .homepage-content img {
    max-width: 100%;
    height: auto;
  }
}

/* Single-guide page masthead breadcrumb */
.guides-breadcrumb {
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.guides-breadcrumb__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: center;
}

.guides-breadcrumb__item:not(:last-child)::after {
  content: "/";
  margin-left: 0.5rem;
  opacity: 0.6;
}

.guides-breadcrumb__item a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: underline;
}

.guides-breadcrumb__item--current span {
  opacity: 0.95;
  font-weight: 600;
}
