/* Post Template */
.post-template {
  max-width: 1000px;
  margin: auto;
  padding: 5px 0px 50px; 
  min-height: calc(100vh - 200px);
  /* Ensure the template container doesn't overflow */
  overflow-x: hidden;
}

.post-category a {
  text-decoration: none;
  margin-bottom: 8px;
  color: #1b5e20;
}

.post-category a:hover {
  color: #f7451e;
}

.post-title {
  margin-top: -1px;
  margin-bottom: 10px;
  font-size: calc(1.6rem + 0.66vw);
  font-weight: 700;
}

.post-author {
  font-size: 16px;
  color: #666;
  margin-bottom: 20px;
}

.post-body {
  padding-top: 10px;
  font-size: 1.1rem;
  line-height: 1.45;
  /* Ensure post body content doesn't overflow */
  overflow-x: hidden;
}

.related-topics-bar {
  width: 100%;
  margin: 55px auto 15px;
}

.post-divider {
  border: 0;
  border-top: 2px solid #ccc; /* Gray line */
  margin: 50px 0 70px; /* Adjust space above and below the line */
}

/* =========== Post Article Table ============= START ========= */
/* General table styles */
.table-responsive {
  width: 99%;
  overflow-x: auto;
  /* Add scrolling behavior for touch devices */
  -webkit-overflow-scrolling: touch;
  /* Ensure proper containment */
  max-width: 100%;
  margin: 20px 0;
  /* Add subtle border to indicate scrollable area */
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  /* Add some padding for mobile */
  padding: 0;
}

.table-responsive table {
  width: 100%;
  /* Remove fixed min-width that was causing overflow */
  min-width: 100%;
  border-collapse: collapse;
  margin: 0;
  background-color: #f9f9f9;
  color: #333;
  font-family: 'Arial', sans-serif;
  box-shadow: none; /* Remove shadow as container has border */
}

/* Table header styles */
table th {
  padding: 12px 10px;
  background-color: #84da8f;
  color: rgb(22, 22, 22);
  text-align: left;
  font-size: 14px;
  font-weight: bold;
  border-top: 2px solid #ddd;
  /* Prevent text wrapping in headers on mobile */
  white-space: nowrap;
  min-width: 100px;
}

/* Table row styles */
table td {
  padding: 12px 15px;
  border: 1.5px solid #ddd;
  vertical-align: middle;
  /* Allow text wrapping in cells */
  word-wrap: break-word;
  word-break: break-word;
  /* Set minimum width for better mobile display */
  min-width: 80px;
}

/* Zebra striping for table rows */
table tr:nth-child(even) {
  background-color: #f2f2f2;
}

/* Hover effect on table rows */
table tr:hover {
  background-color: #f1f1f1;
}

/* Enhanced responsive design for smaller screens */
@media screen and (max-width: 768px) {
  .table-responsive {
    /* Add visual indicator for scrollable content */
    position: relative;
    margin: 15px 0;
  }
  
  /*
  .table-responsive::after {
    content: "← Scroll to see more →";
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: #666;
    white-space: nowrap;
  }
  */
  
  .table-responsive table {
    /* Set minimum width to ensure proper column spacing */
    min-width: 500px;
  }

  .table-responsive table td,
  .table-responsive table th {
    padding: 8px 6px;
    font-size: 13px;
    /* Reduce minimum width on mobile */
    min-width: 60px;
  }
}

/* Extra small screens */
@media screen and (max-width: 480px) {
  .table-responsive table {
    /* Further reduce minimum width for very small screens */
    min-width: 400px;
  }
  
  .table-responsive table td,
  .table-responsive table th {
    padding: 6px 4px;
    font-size: 12px;
    min-width: 50px;
  }
}

/* Very small screens - stack table content */
@media screen and (max-width: 320px) {
  .table-responsive table {
    min-width: 300px;
  }
  
  .table-responsive table td,
  .table-responsive table th {
    padding: 4px 3px;
    font-size: 11px;
    min-width: 40px;
  }
}
/* =========== Post Article Table ============= END ========= */

/* =========== BlockQuote ============= START ========= */
blockquote {
  font-style: italic;
  font-size: 1.05rem;
  /* line-height: 1.6; */
  padding: 15px;
  border-left: 4px solid #84da8f;
  background-color: #f9f9f9;
  color: #555;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  /* width: 90%; */
  margin: 20px auto;
  /* Ensure blockquote doesn't overflow */
  max-width: 100%;
  box-sizing: border-box;
}

blockquote:before {
  content: open-quote;
  font-size: 2rem;
  color: #84da8f;
  position: absolute;
  top: -10px;
  left: -15px;
}

blockquote p {
  margin: 0;
  /* Ensure text wraps properly */
  word-wrap: break-word;
}

cite {
  display: block;
  font-size: 1rem;
  font-style: normal;
  text-align: right;
  color: #666;
  margin-top: 10px;
}
/* =========== BlockQuote ============= END ========= */

/* =========== Tool Link Button ============= START ========= */
.tool_link_button {
  display: inline-block;
  padding: 0.5em 2em;
  background-color: #3a9241;
  color: #ffffff;
  text-decoration: none;
  border-radius: 25px;
  font-size: 1.2rem;
  font-weight: 500;
  transition:
    background-color 0.3s ease,
    box-shadow 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  margin-top: 5px;
  /* Ensure button is responsive */
  max-width: 100%;
  box-sizing: border-box;
}

.tool_link_button:hover {
  background-color: #1b5e20;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Responsive button adjustments */
@media screen and (max-width: 480px) {
  .tool_link_button {
    padding: 0.4em 1.5em;
    font-size: 1.2rem;
  }
}
/* =========== Tool Link Button ============= END ========= */