/* blog.css */
.blog-post h2 {
  text-decoration: underline;
  margin-top: 2rem;
}
/* blog.css */

/* Fix underline for H2 in blog content */
.blog-content h2 {
  border-bottom: 2px solid #ffc107;
  padding-bottom: 0.3rem;
  margin-top: 2rem;
}

/* Prevent mobile scroll issues */
body {
  overflow-x: hidden;
}

/* Optional: tighter spacing under h2 */
.blog-content h2 + p,
.blog-content h2 + ul {
  margin-top: 0.5rem;
}
img {
  max-width: 100%;
  height: auto;
}

/* Force proper container on mobile */
@media (max-width: 768px) {
  body {
    overflow-x: hidden; /* Prevents horizontal scroll */
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
    max-width: 100%;
    overflow-x: hidden;
  }

  .row {
    margin-left: 0;
    margin-right: 0;
  }

  .col-lg-8,
  .col-lg-4 {
    padding-left: 0;
    padding-right: 0;
  }

  img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
  }
}

.blog-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
  table-layout: auto; /* Natural width for columns */
}

.blog-content th,
.blog-content td {
  border: 1px solid #ccc;
  padding: 10px 15px;
  text-align: center;
  white-space: nowrap; /* Prevents text wrapping */
}

.blog-content th {
  background-color: #f8f8f8;
  font-weight: bold;
}

.blog-content tr:nth-child(even) {
  background-color: #fafafa;
}

.blog-content tr:hover {
  background-color: #f1f1f1;
}

/* ✅ Mobile: Only scroll if table is too wide */
@media (max-width: 768px) {
  .blog-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%; /* ✅ Prevent breaking layout */
  }
}
