/* =========================================================
   Blog index — "social-grid" layout (blog-index-social-grid.html)
   Image-first, Instagram/Ghost-Flow-inspired: profile header +
   square grid, text overlaid on the image. Needs a coverImage on
   every post to look its best — posts without one fall back to a
   plain surface-colored tile (no broken/missing-image look).
   ========================================================= */

.sgHero {
  padding: var(--section-py) 0 var(--space-xl);
}
.sgHeroInner {
  max-width: 640px;
  text-align: center;
}
.sgTagline {
  margin-top: var(--space-sm);
  color: var(--subtitle-color);
}

.sgSocialRow {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}
.sgSocialBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: var(--border-w) solid var(--border);
  color: var(--text);
}
.sgSocialBtn:hover {
  background: var(--surface);
}
.sgSocialSvg svg {
  display: block;
  width: 16px;
  height: 16px;
}

.sgCategoryRow {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 35px;
  margin-top: var(--space-xl);
}
.sgCategoryBubble {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  width: 84px;
}
.sgCategoryImg {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accent-soft);
}
.sgCategoryImg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sgCategoryName {
  font-size: var(--text-xs);
  font-weight: 600;
  text-align: center;
}

.sgGridSection {
  padding: var(--space-lg) 0 var(--space-xxl);
}
.sgGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}
@media (max-width: 700px) {
  .sgGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  .sgGrid {
    grid-template-columns: 1fr;
  }
}

.sgTile {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--surface);
  text-decoration: none;
  color: inherit;
}
.sgTileImage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sgTileOverlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  padding: var(--space-md);
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.65) 0%,
    rgba(0, 0, 0, 0.15) 55%,
    rgba(0, 0, 0, 0) 100%
  );
  color: #fff;
}
.sgTileCategory {
  font-size: var(--text-xxs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.85;
}
.sgTileTitle {
  font-family: var(--ff-heading);
  font-size: var(--text-lg-fluid);
  font-weight: 600;
  line-height: 1.25;
}
.sgPin {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
}
.sgPin svg {
  width: 14px;
  height: 14px;
}
