/* Growth Stack blog grid: shared by index.html and blog.html */

/* 3-column grid (2 on tablet, 1 on mobile) */
.gs-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  min-height: 160px;
  scroll-margin-top: 110px;
}
.gs-blog-grid > .blog-post-item { display: block; height: 100%; text-decoration: none; color: inherit; }
.gs-blog-grid .blog-card { height: 100%; }
.gs-empty { grid-column: 1 / -1; text-align: center; color: #666; padding: 48px 0; }

@media (max-width: 1024px) { .gs-blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
@media (max-width: 640px)  { .gs-blog-grid { grid-template-columns: 1fr; gap: 16px; } }

/* Active state for the index.html Tailwind pill buttons */
.gs-pill-active {
  background-color: #111827 !important;
  border-color: #111827 !important;
  color: #fff !important;
}

/* Pagination: buttons that pop */
.gs-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
}
.gs-page-btn {
  min-width: 44px;
  height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  border: 2px solid #4A90E2;
  background-color: #f0f4ff;
  color: #4A90E2;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(74, 144, 226, 0.25);
  transition: transform .18s ease-out, box-shadow .18s ease-out, background-color .18s ease-out, color .18s ease-out;
}
.gs-page-btn:hover:not(:disabled) {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 10px 20px rgba(74, 144, 226, 0.4);
  background-color: #4A90E2;
  color: #fff;
}
.gs-page-btn:active:not(:disabled) {
  transform: translateY(0) scale(.97);
  box-shadow: 0 1px 0 rgba(74, 144, 226, 0.3);
}
.gs-page-btn.is-active { background-color: #4A90E2; color: #fff; }
.gs-page-btn--nav { background-color: #4A90E2; color: #fff; }
.gs-page-btn--nav:hover:not(:disabled) { background-color: #3a7bc8; border-color: #3a7bc8; }
.gs-page-btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.gs-page-btn:focus-visible { outline: 3px solid #1a1a1a; outline-offset: 2px; }
.gs-page-gap { color: #999; padding: 0 2px; }
.gs-page-info { flex-basis: 100%; text-align: center; color: #666; font-size: 14px; font-weight: 500; margin-top: 4px; }

#grid-heading { scroll-margin-top: 110px; }

@media (prefers-reduced-motion: reduce) {
  .gs-page-btn { transition: none; }
  .gs-page-btn:hover:not(:disabled) { transform: none; }
}

/* ==========================================================
   Individual post pages: sidebar navigation + related posts
   ========================================================== */

/* Article + sidebar layout */
.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
}
@media (min-width: 1024px) {
  .post-layout { grid-template-columns: minmax(0, 1fr) 300px; }
}

.post-sidebar { align-self: start; }
@media (min-width: 1024px) {
  /* sits below the sticky header; if the sidebar is taller than the screen it scrolls inside itself
     instead of being cut off, so it also works at 100% zoom and on short screens */
  .post-sidebar {
    position: sticky; top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
}

.sidebar-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 24px;
}
.sidebar-title { font-size: 1.125rem; margin: 0 0 16px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 12px; }

.sidebar-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 2px solid #4A90E2;
  background-color: #f0f4ff;
  color: #4A90E2;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  box-shadow: 0 3px 0 rgba(74, 144, 226, 0.25);
  transition: transform .18s ease-out, box-shadow .18s ease-out, background-color .18s ease-out, color .18s ease-out;
}
.sidebar-btn span { flex: 1; }
.sidebar-btn-arrow { font-size: 12px; opacity: .7; transition: transform .18s ease-out; }
.sidebar-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(74, 144, 226, 0.35);
  background-color: #4A90E2;
  color: #fff;
}
.sidebar-btn:hover .sidebar-btn-arrow { transform: translateX(3px); opacity: 1; }
.sidebar-btn:active { transform: translateY(0); box-shadow: 0 1px 0 rgba(74, 144, 226, 0.3); }
.sidebar-btn:focus-visible { outline: 3px solid #1a1a1a; outline-offset: 2px; }

/* Related posts */
.gs-related {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid #e5e7eb;
}
.gs-related[hidden] { display: none; }
.gs-related-title { font-size: 1.75rem; margin: 0 0 8px; }
.gs-related-intro { color: #666; margin: 0 0 28px; }

.gs-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
@media (max-width: 900px) { .gs-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .gs-related-grid { grid-template-columns: 1fr; } }

.gs-rel-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  color: inherit;
  transition: transform .3s ease-out, box-shadow .3s ease-out;
}
.gs-rel-card:hover, .gs-rel-card:focus-visible {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}
.gs-rel-img {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #4A90E2 0%, #357abd 100%);
  overflow: hidden;
}
.gs-rel-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gs-rel-body { display: flex; flex-direction: column; gap: 10px; padding: 20px; flex: 1; }
.gs-rel-cat {
  align-self: flex-start;
  background: #f0f4ff;
  color: #4A90E2;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 9999px;
}
.gs-rel-title { font-size: 1.1rem; line-height: 1.35; margin: 0; }
.gs-rel-excerpt {
  color: #666;
  font-size: .9rem;
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gs-rel-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
  font-size: 13px;
  color: #888;
}
.gs-rel-link { color: #4A90E2; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .sidebar-btn, .sidebar-btn-arrow, .gs-rel-card { transition: none; }
  .sidebar-btn:hover, .gs-rel-card:hover { transform: none; }
}

/* Link-style pagination (category pages built by build.py) */
a.gs-page-btn, span.gs-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  text-decoration: none;
}
.gs-page-btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; box-shadow: none; pointer-events: none; }

/* Product box (affiliate recommendation). Add the word "hidden" to the <aside> to hide it. */
.product-box {
  display: flex; gap: 20px; align-items: stretch; margin: 40px 0; padding: 20px;
  background: #f0f4ff; border: 2px solid #4A90E2; border-radius: 12px;
}
.product-box[hidden] { display: none; }
.product-box-img { flex: 0 0 240px; display: block; border-radius: 8px; overflow: hidden; background: #dbe6fb; }
.product-box-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-box-body { flex: 1; min-width: 0; }
.product-box-label { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: #4A90E2; }
.product-box-name { margin: 0 0 8px; font-size: 1.4rem; font-weight: 700; color: #1a1a1a; }
.product-box-desc { margin: 0 0 16px; color: #444; line-height: 1.6; }
.product-box-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 9999px;
  background: #4A90E2; color: #fff; font-weight: 600; text-decoration: none; transition: transform .18s ease-out, background-color .18s ease-out;
}
.product-box-btn:hover { background: #3a7bc8; transform: translateY(-2px); }
.product-box-note { margin: 12px 0 0; font-size: 12px; color: #777; }
@media (max-width: 640px) { .product-box { flex-direction: column; } .product-box-img { flex-basis: auto; aspect-ratio: 16 / 9; } }

/* About the author box (added to every post by build.py) */
.author-box {
  display: flex; gap: 20px; align-items: flex-start; margin: 48px 0 0; padding: 24px;
  background: #f0f4ff; border-radius: 12px; border: 1px solid #dbe6fb;
}
.author-box-img { flex: 0 0 96px; width: 96px; height: 96px; border-radius: 9999px; object-fit: cover; object-position: center top; background: #dbe6fb; }
.author-box-body { min-width: 0; }
.author-box-label { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: #4A90E2; }
.author-box-name { margin: 0; font-size: 1.2rem; font-weight: 700; color: #1a1a1a; }
.author-box-role { margin: 2px 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: #777; }
.author-box-bio { margin: 0 0 12px; color: #444; line-height: 1.6; font-size: .95rem; }
.author-box-link { color: #4A90E2; font-weight: 600; text-decoration: none; }
.author-box-link:hover { text-decoration: underline; }
@media (max-width: 520px) { .author-box { flex-direction: column; } }

/* ---- Share buttons (end of every post) ---- */
.share-box { margin: 40px 0 8px; padding: 20px 24px; border: 1px solid #e5e7eb; border-radius: 16px; background: #f8fafc; }
.share-title { margin: 0 0 12px; font-size: 15px; font-weight: 700; color: #1a1a1a; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.share-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 42px; height: 42px; border-radius: 9999px; border: 1px solid #d5dbe6; background: #fff; color: #374151; cursor: pointer; text-decoration: none; font: inherit; font-size: 14px; font-weight: 600; transition: background .2s, color .2s, border-color .2s, transform .2s; }
.share-btn svg { width: 18px; height: 18px; flex: 0 0 18px; }
.share-btn:hover, .share-btn:focus-visible { transform: translateY(-2px); color: #fff; outline: none; }
.share-x:hover { background: #111; border-color: #111; }
.share-facebook:hover { background: #1877f2; border-color: #1877f2; }
.share-linkedin:hover { background: #0a66c2; border-color: #0a66c2; }
.share-whatsapp:hover { background: #25d366; border-color: #25d366; }
.share-email:hover { background: #4A90E2; border-color: #4A90E2; }
.share-copy { width: auto; padding: 0 16px; }
.share-copy:hover { background: #4A90E2; border-color: #4A90E2; }
.share-copy.copied { background: #16a34a; border-color: #16a34a; color: #fff; }
@media (max-width: 480px) { .share-box { padding: 16px; } }
