/* Overrides layered on top of the original Gridly theme (gridly.css).
   - The original relied on gridly.min.js to masonry-position the cards; we reproduce
     that "photo wall" with pure CSS multi-column layout.
   - Several compiled box-shadows in the theme are malformed (invalid syntax); we
     restore clean ones here.
   - Social icons were an icon font (<i class="ss-icon">); we use inline SVG. */

/* --- masonry feed --------------------------------------------------------- */
.posts {
  column-count: 4;
  column-gap: 10px;
}
.post-area .blog-post {
  width: 100%;
  display: inline-block;
  margin: 0 0 10px;
  -webkit-column-break-inside: avoid;
  break-inside: avoid;
  box-shadow: 2px 3px 6px rgba(0, 0, 0, 0.15);
  background: #fff;
}
@media screen and (max-width: 59.9375em) { .posts { column-count: 3; } .post-area .blog-post { width: 100%; } }
@media screen and (max-width: 47.9375em) { .posts { column-count: 2; } .post-area .blog-post { width: 100%; } }
@media screen and (max-width: 29.9375em) { .posts { column-count: 1; } .post-area .blog-post { width: 100%; } }

/* When JS masonry is active, cards are absolutely positioned — disable CSS columns
   and per-card margins (the script adds the gap itself). The feed is hidden until the
   first pass finishes (.masonry-ready) so un-positioned cards never flash. With JS off,
   .masonry-js is never added and the CSS multi-column fallback above renders. */
.posts.masonry-js { column-count: initial; columns: auto; visibility: hidden; }
.posts.masonry-js.masonry-ready { visibility: visible; }
.post-area .posts.masonry-js .blog-post { margin: 0; }

.post-area .blog-post .post-image img {
  display: block;
  width: 100%;
  height: auto;
}
.post-area .blog-post .post-content h2 {
  font-size: 18px;
  line-height: 1.35;
  word-break: break-word;
}
.post-area .blog-post .post-content h2 a { color: #252525; }
.post-area .blog-post .post-content p { font-size: 14px; }
.post-area .blog-post .post-content img { margin-top: 8px; border-radius: 2px; }

/* tag overlay sits on the image (kept from theme, ensure it stays above) */
.post-area .blog-post .post-image { line-height: 0; }
.post-area .blog-post .post-image .post-tags p a,
.post-area .blog-post .post-image .post-tags p { line-height: 30px; }

/* --- fixed shadows -------------------------------------------------------- */
.page, .post { box-shadow: 2px 3px 6px rgba(0, 0, 0, 0.15); }
.avatar a { box-shadow: 0 2px 3px rgba(0, 0, 0, 0.25); }
#nav, .copyright { box-shadow: 0 -1px 0 rgba(133, 133, 133, 0.2); }

/* --- social icons (SVG) --------------------------------------------------- */
.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.social-icons a svg { width: 20px; height: 20px; fill: #4f5356; transition: fill .1s ease-in; }
.social-icons a:hover svg { fill: #111; }
.social-icons a span { display: none; }

/* keep the wrap from feeling cramped on wide screens */
@media screen and (min-width: 75em) { .wrap { width: 96%; margin-left: 2%; } }

/* --- pagination ------------------------------------------------------------ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 40px 0;
  font-size: 14px;
}
.pagination a,
.pagination span {
  padding: 6px 12px;
  border-radius: 3px;
  text-decoration: none;
}
.pagination a {
  background: #f5f5f5;
  color: #252525;
  border: 1px solid #e0e0e0;
  transition: background 0.15s ease;
}
.pagination a:hover {
  background: #e0e0e0;
}
.pagination-current {
  padding: 6px 12px;
  color: #252525;
  font-weight: 500;
}

