/* =============================================
   Tool Page — Article Section Rhythm
   ============================================= */
article section,
article aside {
  margin-top: 3rem;
  padding-top: 0.25rem;
}
article section:first-child {
  margin-top: 1.5rem;
}
/* Discussions sits outside article, needs its own top spacing */
.disc-widget {
  margin-top: 3rem;
}

/* =============================================
   Tool Page — Section Navigation
   ============================================= */
.section-nav-wrapper {
    background: rgba(22, 22, 22, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1020;
    transition: all 0.3s ease;
}

.section-nav-wrapper.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.section-nav-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section-nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 0.25rem;
}

.section-nav-list::-webkit-scrollbar {
    display: none;
}

.section-nav-list li {
    flex-shrink: 0;
}

.section-nav-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 400;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.section-nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.section-nav-link.active {
    color: var(--color-app, #10b981);
    border-bottom-color: var(--color-app, #10b981);
}

.section-nav-link i {
    font-size: 1rem;
}

.section-nav-placeholder {
    height: 0;
    transition: height 0.3s ease;
}

.section-nav-placeholder.active {
    height: 42px;
}

@media (max-width: 768px) {
    .section-nav-link {
        padding: 0.45rem 0.75rem;
        font-size: 0.8rem;
    }
    .section-nav-link span {
        display: none;
    }
    .section-nav-link i {
        font-size: 1.1rem;
    }
}

@media (min-width: 769px) and (max-width: 991px) {
    .section-nav-link {
        padding: 0.5rem 0.85rem;
        font-size: 0.85rem;
    }
}

/* =============================================
   Tool Page — Feedback Interface
   ============================================= */

/* Recommend buttons */
.recommend-buttons {
  display: flex;
  gap: 16px;
}
.recommend-buttons input[type="radio"] {
  display: none;
}
.recommend-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s;
  border: 2px solid transparent;
}
.recommend-yes {
  background: rgba(77, 161, 103, 0.15);
  color: #4DA167;
  border-color: rgba(77, 161, 103, 0.3);
}
.recommend-yes:hover {
  background: rgba(77, 161, 103, 0.25);
  border-color: #4DA167;
}
.recommend-yes i { font-size: 18px; }
.recommend-no {
  background: rgba(220, 53, 69, 0.15);
  color: #dc3545;
  border-color: rgba(220, 53, 69, 0.3);
}
.recommend-no:hover {
  background: rgba(220, 53, 69, 0.25);
  border-color: #dc3545;
}
.recommend-no i { font-size: 18px; }
.recommend-buttons input[type="radio"]:checked + .recommend-yes {
  background: #4DA167;
  color: #fff;
  border-color: #4DA167;
  box-shadow: 0 4px 15px rgba(77, 161, 103, 0.4);
}
.recommend-buttons input[type="radio"]:checked + .recommend-no {
  background: #dc3545;
  color: #fff;
  border-color: #dc3545;
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

/* Reasons grid */
.reasons-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.reason-item {
  cursor: pointer;
}
.reason-item input[type="checkbox"] {
  display: none;
}
.reason-box {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid #444;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
}
.reason-box i {
  opacity: 0;
  color: #4DA167;
  font-size: 16px;
  transition: opacity 0.2s;
}
.reason-box:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(11, 43, 2, 0.915);
}
.reason-item input:checked + .reason-box {
  background: rgba(77, 161, 103, 0.25);
  border-color: #4DA167;
  color: #2d6a4f;
}
.reason-item input:checked + .reason-box i {
  opacity: 1;
}

/* Floating CTA */
.feedback-cta {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(22, 22, 22, 0.95);
  border: 1px solid #4DA167;
  border-radius: 50px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  z-index: 1000;
  animation: slideUp 0.3s ease-out;
}
@keyframes slideUp {
  from { transform: translateX(-50%) translateY(100px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}
.feedback-cta-text {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.feedback-cta-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.feedback-cta-btn:hover {
  transform: scale(1.15);
}
.feedback-cta-btn.thumbs-up {
  background: #4DA167;
  color: #fff;
}
.feedback-cta-btn.thumbs-up:hover {
  box-shadow: 0 0 15px rgba(77, 161, 103, 0.6);
}
.feedback-cta-btn.thumbs-down {
  background: #dc3545;
  color: #fff;
}
.feedback-cta-btn.thumbs-down:hover {
  box-shadow: 0 0 15px rgba(220, 53, 69, 0.6);
}
.feedback-cta-close {
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  padding: 4px;
  font-size: 18px;
  line-height: 1;
}
.feedback-cta-close:hover {
  color: #fff;
}
.feedback-cta.hidden {
  display: none;
}

@media (max-width: 576px) {
  .recommend-btn {
    padding: 12px 16px;
    font-size: 16px;
  }
  .recommend-btn i { font-size: 20px; }
  .reason-box {
    padding: 8px 12px;
    font-size: 13px;
  }
  .feedback-cta {
    padding: 8px 14px;
    gap: 8px;
  }
  .feedback-cta-text {
    font-size: 12px;
  }
  .feedback-cta-btn {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
}
