/* ============================================================
   AIStack — custom.css
   Manus-inspired warm editorial design
   ============================================================ */

/* ---- Global smooth transitions ---- */
* {
  transition-property: background-color, border-color, color, fill, stroke;
  transition-duration: 150ms;
  transition-timing-function: ease-in-out;
}

.no-transition,
.no-transition * {
  transition: none !important;
}

/* ---- Filter pills ---- */
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  border: 1px solid #d4cfc8;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  background-color: #ffffff;
  color: #6b6560;
  white-space: nowrap;
}

.filter-pill:hover {
  border-color: #4a4540;
  color: #1c1917;
  background-color: #f2f0ec;
}

.filter-pill.active {
  border-color: #1c1917;
  color: #1c1917;
  background-color: #f2f0ec;
  font-weight: 600;
}

/* ---- Affiliate button ---- */
.affiliate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  background: #1c1917;
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
}

.affiliate-btn:hover {
  background: #292524;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px 0 rgba(28, 25, 23, 0.25);
}

.affiliate-btn:active {
  transform: translateY(0);
}

/* ---- Star ratings ---- */
.star-filled {
  color: #d97706;
}

.star-empty {
  color: #d4cfc8;
}

/* ---- Clickable star rating (review form) ---- */
.star-input {
  cursor: pointer;
  font-size: 1.5rem;
  color: #d4cfc8;
  transition: color 150ms;
}

.star-input:hover,
.star-input.selected {
  color: #d97706;
}

/* ---- Prose / blog article body ---- */
.prose-content {
  color: #4a4540;
  line-height: 1.8;
  font-size: 1.0625rem;
}

.prose-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1c1917;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.3;
  border-bottom: 1px solid #e8e4de;
  padding-bottom: 0.5rem;
}

.prose-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1c1917;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.prose-content p {
  margin-bottom: 1.25rem;
}

.prose-content ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.prose-content ul li {
  margin-bottom: 0.5rem;
}

.prose-content ol {
  list-style-type: decimal;
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.prose-content ol li {
  margin-bottom: 0.5rem;
}

.prose-content a {
  color: #1c1917;
  text-decoration: underline;
  text-decoration-color: #b0a99e;
}

.prose-content a:hover {
  color: #292524;
  text-decoration-color: #292524;
}

.prose-content strong {
  font-weight: 700;
  color: #1c1917;
}

.prose-content blockquote {
  border-left: 3px solid #d4cfc8;
  padding-left: 1rem;
  font-style: italic;
  color: #6b6560;
  margin: 1.5rem 0;
}

/* ---- Table sort indicators ---- */
th[data-sort-col] {
  cursor: pointer;
  user-select: none;
}

th[data-sort-col]:hover {
  background-color: #f2f0ec;
}

th[data-sort-col] .sort-indicator {
  margin-left: 0.25rem;
  opacity: 0.4;
  font-size: 0.75rem;
}

th[data-sort-col].sorted-asc .sort-indicator::after {
  content: ' ↑';
  opacity: 1;
}

th[data-sort-col].sorted-desc .sort-indicator::after {
  content: ' ↓';
  opacity: 1;
}

/* ---- Tool card ---- */
.tool-card {
  background-color: #ffffff;
  border: 1px solid #e8e4de;
  border-radius: 1rem;
  padding: 1.5rem;
  transition: box-shadow 200ms, transform 200ms, border-color 200ms;
  display: flex;
  flex-direction: column;
}

.tool-card:hover {
  box-shadow: 0 8px 30px -4px rgba(28, 25, 23, 0.1);
  border-color: #b0a99e;
  transform: translateY(-2px);
}

/* ---- Brand logo tiles ---- */
.logo-tile {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e8e4de;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-tile img {
  width: 68%;
  height: 68%;
  object-fit: contain;
}
.logo-tile .logo-fallback {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
}

/* ---- Featured tools (cards + table rows) ---- */
.tool-card.featured {
  background: #faf8f5;
  border-top: 3px solid #1c1917;
}
.featured-badge {
  display: inline-flex; align-items: center; gap: 0.2rem;
  font-size: 0.6rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: #1c1917; background: #e8e4de;
  border: 1px solid #d4cfc8; border-radius: 3px;
  padding: 1px 5px; white-space: nowrap; vertical-align: middle;
  margin-left: 0.35rem;
}
tr.featured-row td { background: #faf8f5; }
tr.featured-row:hover td { background: #f5f2ec; }
tr.featured-row td:first-child { border-left: 3px solid #1c1917; }

/* ---- Sticky sidebar ---- */
.sticky-sidebar {
  position: sticky;
  top: 5rem;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
}

/* ---- Mobile menu overlay ---- */
#mobile-menu {
  transition: transform 300ms ease-in-out, opacity 300ms ease-in-out;
}

#mobile-menu.hidden {
  display: none;
}

/* ---- Pricing badge colours ---- */
.badge-free {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.badge-freemium {
  background-color: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.badge-paid {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-enterprise {
  background-color: #ede9fe;
  color: #5b21b6;
  border: 1px solid #ddd6fe;
}

/* ---- Nav link hover underline ---- */
.nav-link {
  position: relative;
  font-size: 0.9375rem;
  font-weight: 450;
  color: #6b6560;
  text-decoration: none;
  padding-bottom: 2px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1.5px;
  background-color: #1c1917;
  transform: scaleX(0);
  transition: transform 200ms ease;
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-link:hover {
  color: #1c1917;
}

/* ---- Review card ---- */
.review-card {
  background-color: #faf9f7;
  border: 1px solid #e8e4de;
  border-radius: 0.75rem;
  padding: 1.5rem;
}

/* ---- Scrollbar styling ---- */
.scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #d4cfc8 transparent;
}

.scroll-x::-webkit-scrollbar {
  height: 4px;
}

.scroll-x::-webkit-scrollbar-track {
  background: transparent;
}

.scroll-x::-webkit-scrollbar-thumb {
  background-color: #d4cfc8;
  border-radius: 9999px;
}

/* ---- Inline tool card (blog) ---- */
.inline-tool-card {
  background: #faf9f7;
  border: 1px solid #e8e4de;
  border-radius: 0.875rem;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  display: flex;
  align-items: center;
  gap: 1rem;
}
