html, body {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
}

main.sg-blog-wrap,
main.sg-post-wrap {
  flex: 1 0 auto;
}
body {
  font-family: 'Poppins', sans-serif;
}

.sg-blog-wrap,
.sg-post-wrap {
  font-family: 'Poppins', sans-serif;
  color: #1d3557;
}

/* ===== HERO ===== */
.sg-blog-hero {
  text-align: center;
  padding: 70px 20px 50px;
}
.sg-blog-hero h1 {
  font-size: 42px;
  font-weight: 800;
}
.sg-blog-hero p {
  max-width: 620px;
  margin: 14px auto 0;
  opacity: 0.85;
}

/* ===== GRID ===== */
.sg-blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px,1fr));
  gap: 28px;
  padding: 30px 6vw 80px;
}

/* ===== CARD ===== */
.sg-blog-card {
  background: rgba(255,255,255,0.85);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
  transition: transform .25s, box-shadow .25s;
}
.sg-blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 55px rgba(0,0,0,0.12);
}
.sg-blog-card a {
  text-decoration: none;
  color: inherit;
}

.sg-blog-image {
  height: 190px;
  background-size: cover;
  background-position: center;
}

.sg-blog-content {
  padding: 18px;
}
.sg-blog-content h3 {
  font-size: 18px;
  font-weight: 700;
}
.sg-blog-content p {
  font-size: 14px;
  margin: 8px 0 14px;
  opacity: .85;
}
.sg-blog-date {
  font-size: 12px;
  opacity: .6;
}

/* ===== POST ===== */
.sg-post-nav {
  display: flex;
  gap: 12px;
  padding: 30px 6vw 10px;
}

.sg-btn-outline {
  border: 2px solid #1d3557;
  padding: 8px 18px;
  border-radius: 999px;
  text-decoration: none;
  color: #1d3557;
  font-weight: 600;
  transition: all .2s;
}
.sg-btn-outline:hover {
  background: #1d3557;
  color: #fff;
}

.sg-post-hero {
  height: 320px;
  background-size: cover;
  background-position: center;
}

.sg-post-article {
  max-width: 780px;
  margin: -60px auto 80px;
  background: #fff;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.12);
}

.sg-post-article h1 {
  font-size: 34px;
  font-weight: 800;
}
.sg-post-article time {
  display: block;
  margin: 10px 0 30px;
  font-size: 13px;
  opacity: .6;
}

.sg-post-body {
  line-height: 1.8;
  font-size: 17px;
}
/* ===== BLOG BODY TYPOGRAPHY ===== */

.sg-post-body p {
  margin-bottom: 22px;
}

.sg-post-body h2 {
  font-size: 24px;
  font-weight: 800;
  margin: 48px 0 18px;
}

.sg-post-body h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 36px 0 14px;
}

.sg-post-body strong {
  font-weight: 700;
}

.sg-post-body em {
  font-style: italic;
}

/* Links inside article */
.sg-post-body a {
  color: #1d3557;
  font-weight: 600;
  text-decoration: underline;
}

.sg-post-body a:hover {
  opacity: 0.8;
}

/* Lists */
.sg-post-body ul,
.sg-post-body ol {
  padding-left: 22px;
  margin-bottom: 24px;
}

.sg-post-body li {
  margin-bottom: 10px;
}

/* Optional: quotes (nice for thought pieces) */
.sg-post-body blockquote {
  margin: 30px 0;
  padding: 18px 22px;
  background: rgba(29,53,87,0.06);
  border-left: 4px solid #1d3557;
  font-style: italic;
  opacity: 0.95;
}
.sg-post-body p:last-child {
  margin-bottom: 0;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .sg-blog-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
     padding-left: 16px;
    padding-right: 16px;
  }
  .sg-blog-card {
    min-width: 85%;
    max-width: 85%;
    scroll-snap-align: center;

  }
}
