body, html {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  scroll-behavior: smooth;
}

.btn-blue, .btn-red {
  color: white !important;
}

main {
  font-size: 1.2em;
  display: flex;
  flex-wrap: wrap; /* allow wrapping on smaller screen */
  gap: 20px; /* space between divs */
}

.left {
  flex: 0 0 800px;   /* fixed max width */
  max-width: 800px;
  width: 100%;
  /*background: lightblue;*/
  padding: 20px;
  color: #777777;
}

.right {
  flex: 1; /* take remaining space */
  /*background: lightgreen;*/
  padding: 0 20px 20px 20px;
}

/* Remove extra spacing between inline-block or flex items */
.left, .right {
  margin: 0;
  border: none; /* in case any border shows */
  outline: none !important; /* removes focus outline (dotted line) */
  box-shadow: none !important;
}
.left:focus,
.right:focus {
  outline: none !important;
  box-shadow: none !important;
}

.parallax-bg::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4); /* overlay */
}

.banner-content h1 {
  color: white;
  font-size: 3rem;
  margin: 0;
  line-height: 1.2;
}

.blog-image {
  width: 100%;
  /*height: 180px;*/
  object-fit: cover;
}

div.left > h2 {
  font-size: 1.5em;
}

div.left > h1, h2, h3 {
  margin: 0;
  color: #416c96;
  line-height: 1.3em;
}

div.left > strong, b {
  font-weight: bold;
}

img.mango {
  width: 100%;
}

.placeholder {
  background-color: whitesmoke;
  color: #333;
  border-radius: 12px;
  padding: 15px 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  margin-bottom: 25px;
}

.shareaddthis {
  margin: 20px 50px 0px 50px;
}

.button.small.post {
  margin-top: 10px;
  background-color: #4267B2;
  color: white !important;
  border: none;
  box-shadow: none;
  border-radius: 5px;
}

.disabled {
  background-color: #ccc;
  color: #666;
  cursor: not-allowed;
  pointer-events: none; /* disable clicking */
}

#comments-section {
  scroll-margin-top: 80px; /* height of the sticky header */
}

.comment {
  padding: 10px;
  position: relative;
  scroll-margin-top: 80px; /* height of the sticky header */
}

.comment-body {
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #ddd;
  padding-bottom: 0.5rem;
  color: #777777;
}

.comment-avatar {
  background-color: #4CAF50; /* green */
  /*background-color: #4267B2;  /*blue */
  color: white;
  font-weight: bold;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.comment-avatar-img {
  width: 36px;
  height: 36px;
}

/* Default (mobile): avatar + userinfo inline */
.comment-meta {
  display: flex;
  margin-bottom: 0.5rem;
  /*font-size: 0.9rem;*/
  color: #333;
}

.comment-userinfo {
  margin-left: 0.6rem;
}

.comment-userinfo strong {
  display: inline-block;
  font-weight: 600;
}

.comment-date {
  color: #666;
  font-size: 0.85rem;
  line-height: 1em;
}

.comment-content > p {
  margin-bottom: 1em;
  font-size: 1rem;
  line-height: 1.5rem;
}


.replies {
  margin-left: 40px;
  position: relative;
}

.comment.reply {
  position: relative;
  padding-left: 20px;
  padding-right: 0;
  padding-bottom: 0;
}

/* Horizontal connector for every reply */
.comment.reply::before {
  content: "";
  position: absolute;
  top: 25px;   /* vertically align with avatar center */
  left: 0px;
  width: 20px;
  height: 2px;
  background: #ccc;
}

/* Vertical line (only for NON-last replies) */
.comment.reply:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 25px;   /* starts at horizontal branch */
  left: -2px;  /* align with connector */
  width: 2px;
  height: calc(100% + 2px); /* extend through this reply to next */
  background: #ccc;
}

.comment.reply:first-child::after {
  content: "";
  position: absolute;
  top: 0;   /* starts at horizontal branch */
  left: -2px;  /* align with connector */
  width: 2px;
  height: calc(100% + 1.7rem); /* extend through this reply to next */
  background: #ccc;
}

.comment.reply:only-child::after {
  content: "";
  position: absolute;
  top: 0;   /* starts at horizontal branch */
  left: -2px;  /* align with connector */
  width: 2px;
  height: 26px;
  background: #ccc;
}


.reply {
  margin-bottom: 0;
}

.reply .comment-body {
  /*background: #f1fdf1; /* different background for replies */
}

/* Reply button style */
.reply-link {
  text-align: right;
  padding-right: 5px;
  color: brown;
  font-size: 0.7rem;
}

.reply-link > button {
  color: black !important;
  padding: 0 2em;
}

.reply-option {
  display: inline;
  margin-bottom: 10px;
}

.reply-btn:hover {
  background-color: #218838;
}

/* Connector for the reply box */
.reply-box {
  margin-left: 13px;
  padding-left: 5px;
  position: relative;
}

.reply-connector {
  position: absolute;
  left: -15px;
  top: 0;
  height: 20px;
  width: 20px;
  border-left: 2px solid #ccc;
  border-bottom: 2px solid #ccc;
}

.reply-box textarea {
  width: 100%;
  min-height: 80px;
  padding: 8px;
  border-radius: 5px;
  border: 1px solid #ccc;
  background: #f1f7fd;
  color: black;
}

.reply-box .send-reply {
  /*
  margin-top: 5px;
  background-color: #4267B2;
  color: white !important;
  border: none;
  font-size: 0.8em;
  border-radius: 5px;
  cursor: pointer; */
  font-size: 0.8em;

  margin-top: 10px;
  background-color: #4267B2;
  color: white !important;
  border: none;
  box-shadow: none;
  border-radius: 5px;
}

.reply-box.hidden {
  display: none;
}

.jconfirm-box {
  max-width: 600px;
}

/* css for simple-lightbox */
.image-border {
  padding: 2px;
  border: 1px solid #021a40;
}
.sl-overlay {
  background: darkgray;
}
.sl-wrapper .sl-close {
  left: 30px;
}
.pic-wrapper { display: flex; }
.pic-content { position: relative; width: max-content}
.pic-content img { display: block; }
.pic-content .icon { position: absolute; bottom:0px; right:10px; color: white; font-size: 1.5em;}

/* Desktop (wider screens): side-by-side layout */
@media (min-width: 768px) {
  .comment-body {
    display: flex;
    align-items: flex-start;
  }

  .comment-meta {
    width: 190px; /* fixed width sidebar */
    margin-bottom: 0;
    padding-right: 1rem;
    /*border-right: 2px solid #ddd; */
    flex-shrink: 0;

    display: flex;
    align-items: flex-start;;
  }

  .comment-avatar {
    width: 64px;
    height: 64px;
    font-size: 1.75rem;
  }
  .comment-avatar-img {
    width: 64px;
    height: 64px;
  }

  .comment-userinfo {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 10px;
  }

  .comment-userinfo strong {
    font-size: 0.9em;
    color: #222;
    font-weight: 600;
    /*margin-bottom: 0.25rem;*/
    line-height: 1em;
  }

  .comment-date {
    font-size: 0.8rem;  /* smaller */
    color: #9999ff;
    font-weight: 400;
  }

  .time-divider {
    display: none;
  }

  .comment-content {
    padding-left: 1rem;
    flex: 1;
    border-left: 1px solid #ddd;
  }

  .comment-meta-divider {
    display: none;;
  }
}


@media (max-width: 1120px) {
  .left, .right {
    max-width: 100%;
    flex: 1 1 100%;
  }
}

@media (max-width: 1024px) {
  .banner-content h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .banner {
    height: 300px; /* shrink banner on tablets */
  }
  .banner-content h1 {
    font-size: 2rem;
  }
  main {
    flex-direction: column;
  }
  .reply-box textarea {
    min-height: 120px;
  }
}

@media (max-width: 600px) {

  .comment.reply {
    margin-left: -20px;
  }
  .reply-btn {
    font-size: 0.8rem;
    padding: 0.3rem 0.65rem;
  }

  .reply-box {
    margin-left: 0;
    padding-left: 0;
    position: relative;
  }

  .reply-connector {
    position: absolute;
    left: -22px;
    top: 0;
    height: 20px;
    width: 20px;
    border-left: 2px solid #ccc;
    border-bottom: 2px solid #ccc;
  }

}

@media (max-width: 480px) {
  .banner {
    height: 250px; /* smaller banner on phones */
  }
  .banner-content h1 {
    font-size: 1.5rem;
  }

  .shareaddthis {
    margin: 0;
  }
  .replies {
    margin-left: 30px;
  }

  .comment-body {
    padding-left: 0.75rem;
  }
  .comment-userinfo {
    margin-left: 0;
  }
  .comment-avatar {
    display: none;
  }
  .comment-avatar-img {
    display: none;
  }
  .left-right-full {
    display: inline-block !important;
  }
}

@media (max-width: 400px) {
  .replies {
    margin-left: 25px;
  }
  .comment-avatar {
    width: 28px;
    height: 28px;
  }
  .comment-avatar-img {
    width: 28px;
    height: 28px;
  }
  .comment-userinfo strong {
    font-size: 0.9rem;
  }

  .comment-date {
    font-size: 0.85rem;
  }

  div.left > h1, h2, h3 {
    font-size: 1.3em !important;
  }
}
