/* Realistic Comment Section */
.post-comments {
  margin-top: 40px;
  background: #ffffff; /* White background */
  padding: 25px;
  border-radius: 10px;
  border: 1px solid #c0c0c0; /* Darker border for better contrast */
  max-width: 800px;
}

.comments-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 20px;
  border-bottom: 2px solid #b0b0b0; /* Darker border for contrast */
  padding-bottom: 6px;
  color: #1a1a1a; /* Near-black for high contrast (4.5:1+ on white) */
}

.comment {
  background: #ffffff; /* White background */
  border: 1px solid #b0b0b0; /* Darker border for contrast */
  border-radius: 8px;
  padding: 15px 20px;
  margin-bottom: 15px;
  transition: box-shadow 0.2s ease;
}

.comment:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); /* Slightly darker shadow for visibility */
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.comment-author {
  font-weight: 600;
  color: #1a1a1a; /* Near-black for high contrast */
}

.comment-date {
  font-size: 0.9rem;
  color: #4a4a4a; /* Darker gray for contrast (4.5:1+ on white) */
}

.comment-text {
  line-height: 1.6;
  color: #2d2d2d; /* Darker gray for readability (4.5:1+ on white) */
  font-size: 0.95rem;
}
/* -----------------------------------------
   Accessible, consistent link styling
   ----------------------------------------- */

/* Base link styles */
a,
.text-gray-500 a,
.text-gray-400 a,
.dark\:text-gray-400 a {
    color: #0056b3 !important; /* AAA contrast blue on white */
    text-decoration: none;
    padding: 6px 4px; /* Improves tap area */
    display: inline-block; /* Make padding clickable */
    transition: color 0.2s ease, background-color 0.2s ease;
}

/* Hover, focus, and active states */
a:hover,
a:focus,
a:active,
.text-gray-500 a:hover,
.text-gray-400 a:hover,
.dark\:text-gray-400 a:hover {
    color: #003399 !important; /* Darker blue for hover/focus */
    background-color: #e6f0ff; /* Subtle visual feedback */
    text-decoration: none; /* Add underline for accessibility */
}

/* Add spacing between consecutive links */
a + a {
    margin-left: 6px;
}

/* Tag links or post meta links — give them button-like appearance */
a[rel="tag"],
.post-tags a {
    margin: 4px 6px;
    border-radius: 4px;
    background: #f9f9f9;
    padding: 6px 10px;
    color: #0056b3 !important;
    text-decoration: none;
}

/* Hover effect for tags */
a[rel="tag"]:hover,
.post-tags a:hover {
    background-color: #e6f0ff;
    color: #003399 !important;
    text-decoration: none;
}

/* Admin Tool Bar */
#toolbar {background: #fff !important;}

/* Code in Article Fix */
code {
  padding: 2px 4px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.95em;
  background-color: #f5f5f5;
  color: #1a1a1a;
}

/* Automatically adjust for dark mode */
@media (prefers-color-scheme: dark) {
  code {
    background-color: #2b2b2b; /* dark gray background */
    color: #f8f8f2; /* off-white text */
  }
}

/* ===== Amazon Product Box ===== */
#amzproduct {
  max-width: 900px;
  margin: 30px auto;
  padding: 25px;
  background: #ffffff;
  border: 2px solid #00bfa6;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#amzproduct:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 191, 166, 0.25);
  border-color: #009e8e;
}

/* ===== Product Title ===== */
.amz-product-title {
  font-size: 1.6rem;
  font-weight: 600;
  color: #1a1a1a;
  text-align: center;
  margin-bottom: 1.2rem;
  line-height: 1.4;
}

/* ===== Product Image ===== */
.product-image {
  text-align: center;
  margin-bottom: 20px;
}

.product-img {
  display: inline-block;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.product-img:hover {
  transform: scale(1.03);
}

/* ===== Product Description ===== */
.product-desc {
  font-size: 1rem;
  line-height: 1.6;
  color: #2d2d2d;
  margin-bottom: 1rem;
  text-align: justify;
}

/* ===== Pros & Cons Layout ===== */
.amz-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  margin: 30px 0;
}

.amz-pros-column,
.amz-cons-column {
  flex: 1 1 45%;
  padding: 20px;
  border-radius: 12px;
  background-clip: padding-box;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
}

.amz-pros-column {
  background-color: #e6f9ec; /* Light green */
  border: 1px solid #b2e3c0;
}

.amz-cons-column {
  background-color: #fff0f0; /* Light red */
  border: 1px solid #e3b2b2;
}

.amz-pros-column:hover,
.amz-cons-column:hover {
  transform: translateY(-3px);
}

/* ===== Pros & Cons Titles ===== */
.amz-pros-cons-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 0.75rem;
  text-align: center;
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
  padding-bottom: 6px;
}

/* ===== Pros & Cons Lists ===== */
.amz-pros-list,
.amz-cons-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 90%;
}

.amz-pros-item,
.amz-cons-item {
  position: relative;
  padding-left: 36px;
  margin-bottom: 12px;
  font-size: 1rem;
  color: #2d2d2d;
  line-height: 1.5;
}

.amz-pros-item::before,
.amz-cons-item::before {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 1.2em;
  font-family: "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.amz-pros-item::before {
  content: "👍";
}

.amz-cons-item::before {
  content: "👎";
}

/* ===== Buy Button ===== */
.amz-product-button {
  text-align: center;
  margin-top: 20px;
}

.buy-button {
  display: inline-block;
  background-color: #F5EFE6; /* Darkened for WCAG contrast */
  color: #ffffff;
  padding: 14px 30px;
  font-size: 17px;
  font-weight: 600;
  border-radius: 30px;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(138, 62, 0, 0.2);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.buy-button:hover {
  background-color: #E8DFCA; /* Accessible hover color */
  box-shadow: 0 6px 16px rgba(138, 62, 0, 0.4);
  color: #ffffff;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  .amz-row {
    flex-direction: column;
  }

  .amz-pros-column,
  .amz-cons-column {
    flex: 1 1 100%;
  }

  #amzproduct {
    padding: 20px 15px;
  }

  .amz-product-title {
    font-size: 1.4rem;
  }
}

.leaderboard-banner {
    width: 100%;
    max-width: 728px;
    height: auto;
    background-color: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    box-sizing: border-box;
    border-radius: 12px;
    border: 1px solid #ddd;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    flex-wrap: nowrap;
    flex-direction: row;
    gap: 20px;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
  }

  .leaderboard-left {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 200px;
    gap: 16px;
  }

  .leaderboard-left img {
    height: 60px;
    width: auto;
    max-height: 70px;
    border-radius: 8px;
    object-fit: contain;
  }

  .leaderboard-text h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #222;
    font-weight: 600;
  }

  .leaderboard-text p {
    margin: 4px 0 0;
    font-size: 0.95rem;
    color: #666;
  }

  .leaderboard-button {
    padding: 10px 24px;
    border-radius: 8px;
    background: #F5EFE6;
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    border: 1px solid #1a242f;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    white-space: nowrap;
  }

  .leaderboard-button:hover {
    background-color: #E8DFCA;
    color: #111;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
  }

  @media (max-width: 768px) {
    .leaderboard-banner {
      flex-direction: column;
      text-align: center;
      padding: 20px;
      gap: 12px;
    }

    .leaderboard-left {
      flex-direction: column;
      align-items: center;
      gap: 12px;
    }

    .leaderboard-left img {
      margin: 0 auto;
      display: block;
    }

    .leaderboard-text {
      text-align: center;
    }

    .leaderboard-button {
      margin: 8px 0 0;
    }
  }
