/* ============================================================
   THRIFTRUPEE — Components
   Credit card cards · Blog post cards · Calculator tiles
   Filters · Quick nav · Trust bar · FAQ
   ============================================================ */

/* ════════════════════════════════════
   CREDIT CARD CARD
   ════════════════════════════════════ */
.tr-cc-card {
  background: var(--tr-white);
  border: 1px solid var(--tr-sand);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur);
  position: relative;
}
.tr-cc-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(34,165,84,0.25);
}
.tr-cc-card-badge {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  z-index: 2;
}
.tr-cc-card-image {
  height: 140px;
  background: linear-gradient(135deg, var(--tr-forest) 0%, var(--tr-pine) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.tr-cc-card-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 20px 20px;
}
.tr-cc-card-image img {
  width: auto;
  height: 90px;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.3));
  transition: transform var(--dur) var(--ease);
}
.tr-cc-card:hover .tr-cc-card-image img { transform: scale(1.05) translateY(-2px); }

/* Placeholder card art when no image */
.tr-cc-card-placeholder {
  width: 160px;
  height: 100px;
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  position: relative;
  z-index: 1;
}
.tr-cc-card-placeholder::before {
  content: '';
  position: absolute;
  top: 14px; left: 14px;
  width: 28px; height: 20px;
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
}

.tr-cc-card-body {
  padding: var(--sp-5);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.tr-cc-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-2);
}
.tr-cc-card-bank {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--tr-muted);
}
.tr-cc-card-name {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--tr-heading);
  margin-bottom: var(--sp-3);
  line-height: 1.25;
}
.tr-cc-card-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}
.tr-cc-card-highlight {
  font-size: 12px;
  font-weight: 600;
  color: var(--tr-emerald);
  background: var(--tr-pale);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}
.tr-cc-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
  padding: var(--sp-3);
  background: var(--tr-warm);
  border-radius: var(--radius);
}
.tr-cc-stat { }
.tr-cc-stat-label {
  font-size: 11px;
  color: var(--tr-muted);
  font-weight: 500;
  margin-bottom: 2px;
}
.tr-cc-stat-value {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
  color: var(--tr-heading);
}
.tr-cc-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--tr-sand);
}
.tr-cc-card-fee {
  font-size: 13px;
  color: var(--tr-muted);
}
.tr-cc-card-fee strong {
  color: var(--tr-heading);
  font-weight: 700;
}

/* ════════════════════════════════════
   BLOG POST CARD
   ════════════════════════════════════ */
.tr-post-card {
  background: var(--tr-white);
  border: 1px solid var(--tr-sand);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.tr-post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.tr-post-card-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--tr-warm);
}
.tr-post-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 400ms var(--ease);
}
.tr-post-card:hover .tr-post-card-thumb img { transform: scale(1.04); }
.tr-post-card-body {
  padding: var(--sp-5);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.tr-post-card-cats {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: var(--sp-3);
}
.tr-post-card-cat {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--tr-green);
}
.tr-post-card-title {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.3;
  color: var(--tr-heading);
  margin-bottom: var(--sp-3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tr-post-card-title a { color: inherit; transition: color var(--dur-fast); }
.tr-post-card-title a:hover { color: var(--tr-green); }
.tr-post-card-excerpt {
  font-size: 14px;
  color: var(--tr-muted);
  line-height: 1.6;
  margin-bottom: var(--sp-4);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tr-post-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--tr-stone);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--tr-sand);
}
.tr-post-card-author {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 600;
  color: var(--tr-body);
}
.tr-post-card-author img {
  width: 24px; height: 24px;
  border-radius: 50%;
  object-fit: cover;
}
.tr-post-card-date { }

/* Featured post card (large) */
.tr-post-card--featured {
  flex-direction: row;
}
.tr-post-card--featured .tr-post-card-thumb {
  width: 40%;
  aspect-ratio: auto;
  flex-shrink: 0;
}
.tr-post-card--featured .tr-post-card-title {
  font-size: 24px;
  -webkit-line-clamp: 4;
}
@media (max-width: 640px) {
  .tr-post-card--featured { flex-direction: column; }
  .tr-post-card--featured .tr-post-card-thumb { width: 100%; aspect-ratio: 16/9; }
}

/* ════════════════════════════════════
   CALCULATOR TILE
   ════════════════════════════════════ */
.tr-calc-tile {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  background: var(--tr-white);
  border: 1px solid var(--tr-sand);
  border-radius: var(--radius);
  transition: all var(--dur) var(--ease);
  cursor: pointer;
  text-decoration: none;
}
.tr-calc-tile:hover {
  border-color: rgba(34,165,84,0.3);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}
.tr-calc-tile-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  background: var(--tr-pale);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  transition: background var(--dur-fast);
}
.tr-calc-tile:hover .tr-calc-tile-icon { background: rgba(34,165,84,0.12); }
.tr-calc-tile-text { flex: 1; min-width: 0; }
.tr-calc-tile-name {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  color: var(--tr-heading);
  line-height: 1.3;
}
.tr-calc-tile-desc {
  font-size: 12px;
  color: var(--tr-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tr-calc-tile-arrow {
  color: var(--tr-stone);
  font-size: 16px;
  flex-shrink: 0;
  transition: color var(--dur-fast), transform var(--dur-fast);
}
.tr-calc-tile:hover .tr-calc-tile-arrow {
  color: var(--tr-green);
  transform: translateX(2px);
}

/* ════════════════════════════════════
   FILTER TABS
   ════════════════════════════════════ */
.tr-filters {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin-bottom: var(--sp-8);
  padding-bottom: 4px;
}
.tr-filters::-webkit-scrollbar { display: none; }
.tr-filter-btn {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--tr-sand);
  color: var(--tr-muted);
  background: var(--tr-white);
  transition: all var(--dur-fast);
  cursor: pointer;
  white-space: nowrap;
}
.tr-filter-btn:hover {
  border-color: rgba(34,165,84,0.3);
  color: var(--tr-green);
  background: var(--tr-pale);
}
.tr-filter-btn.is-active {
  background: var(--tr-green);
  color: var(--tr-white);
  border-color: var(--tr-green);
}

/* ════════════════════════════════════
   QUICK NAV STRIP
   ════════════════════════════════════ */
.tr-quicknav {
  background: var(--tr-white);
  border-bottom: 1px solid var(--tr-sand);
}
.tr-quicknav-inner {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.tr-quicknav-inner::-webkit-scrollbar { display: none; }
.tr-qitem {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  white-space: nowrap;
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--tr-body);
  border-right: 1px solid var(--tr-sand);
  transition: color var(--dur-fast), background var(--dur-fast);
  text-decoration: none;
}
.tr-qitem:last-child { border-right: none; }
.tr-qitem:hover { color: var(--tr-green); background: var(--tr-pale); }
.tr-qitem-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--tr-warm);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.tr-qitem-title { display: block; }
.tr-qitem-sub { display: block; font-size: 11px; font-weight: 400; color: var(--tr-muted); }

/* ════════════════════════════════════
   TRUST / STATS BAR
   ════════════════════════════════════ */
.tr-trust {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  flex-wrap: wrap;
}
.tr-trust-item { }
.tr-trust-num {
  display: block;
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--tr-white);
  line-height: 1;
  margin-bottom: 2px;
}
.tr-trust-label {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.tr-trust-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
}

/* ════════════════════════════════════
   SINGLE POST (article styles)
   ════════════════════════════════════ */
.tr-article-body {
  font-size: 17px;
  line-height: 1.8;
  color: var(--tr-body);
}
.tr-article-body h2 {
  font-size: clamp(22px, 2.5vw, 28px);
  margin: var(--sp-10) 0 var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 2px solid var(--tr-pale);
}
.tr-article-body h3 {
  font-size: clamp(18px, 2vw, 22px);
  margin: var(--sp-8) 0 var(--sp-3);
}
.tr-article-body h4 {
  font-size: 18px;
  margin: var(--sp-6) 0 var(--sp-2);
}
.tr-article-body p { margin-bottom: var(--sp-5); }
.tr-article-body ul, .tr-article-body ol {
  margin: var(--sp-4) 0 var(--sp-5) var(--sp-6);
  list-style: disc;
}
.tr-article-body ol { list-style: decimal; }
.tr-article-body li { margin-bottom: var(--sp-2); }
.tr-article-body a { color: var(--tr-green); text-decoration: underline; text-underline-offset: 2px; }
.tr-article-body a:hover { color: var(--tr-emerald); }
.tr-article-body blockquote {
  border-left: 3px solid var(--tr-mint);
  padding: var(--sp-4) var(--sp-5);
  background: var(--tr-pale);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: var(--sp-6) 0;
  font-style: italic;
  color: var(--tr-emerald);
}
.tr-article-body table {
  font-size: 15px;
  margin: var(--sp-6) 0;
  border: 1px solid var(--tr-sand);
  border-radius: var(--radius);
  overflow: hidden;
}
.tr-article-body th {
  background: var(--tr-warm);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--tr-muted);
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
}
.tr-article-body td {
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--tr-sand);
  vertical-align: top;
}
.tr-article-body tr:hover td { background: var(--tr-pale); }
.tr-article-body img {
  border-radius: var(--radius);
  margin: var(--sp-6) 0;
}
.tr-article-body code {
  font-family: var(--font-mono);
  font-size: 14px;
  background: var(--tr-warm);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--tr-emerald);
}
.tr-article-body pre {
  background: var(--tr-ink);
  border-radius: var(--radius);
  padding: var(--sp-5);
  overflow-x: auto;
  margin: var(--sp-5) 0;
}
.tr-article-body pre code {
  background: none;
  color: var(--tr-lime);
  font-size: 13.5px;
  padding: 0;
}

/* ════════════════════════════════════
   FAQ COMPONENT
   ════════════════════════════════════ */
.tr-faq-item {
  border-bottom: 1px solid var(--tr-sand);
  padding: var(--sp-5) 0;
}
.tr-faq-item:first-child { border-top: 1px solid var(--tr-sand); }
.tr-faq-question {
  font-family: var(--font-ui);
  font-size: 17px;
  font-weight: 600;
  color: var(--tr-heading);
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  line-height: 1.4;
}
.tr-faq-question::after {
  content: '+';
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 300;
  color: var(--tr-green);
  flex-shrink: 0;
  margin-top: -2px;
  transition: transform var(--dur) var(--ease);
}
.tr-faq-item.is-open .tr-faq-question::after { transform: rotate(45deg); }
.tr-faq-answer {
  font-size: 16px;
  line-height: 1.7;
  color: var(--tr-body);
  padding-top: var(--sp-3);
  display: none;
}
.tr-faq-item.is-open .tr-faq-answer { display: block; }

/* ════════════════════════════════════
   SEO QUICK ANSWER BOX
   ════════════════════════════════════ */
.tr-quick-answer {
  background: var(--tr-pale);
  border: 1px solid rgba(34,165,84,0.2);
  border-left: 4px solid var(--tr-mint);
  border-radius: var(--radius);
  padding: var(--sp-5) var(--sp-6);
  margin: var(--sp-6) 0;
}
.tr-quick-answer-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--tr-emerald);
  margin-bottom: var(--sp-2);
}
.tr-quick-answer p {
  font-size: 16px;
  color: var(--tr-heading);
  font-weight: 500;
  line-height: 1.65;
}

/* ════════════════════════════════════
   BREADCRUMB
   ════════════════════════════════════ */
.tr-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13px;
  color: var(--tr-muted);
  flex-wrap: wrap;
}
.tr-breadcrumb a { color: var(--tr-muted); transition: color var(--dur-fast); }
.tr-breadcrumb a:hover { color: var(--tr-green); }
.tr-breadcrumb-sep { color: var(--tr-stone); }
.tr-breadcrumb-current { color: var(--tr-body); font-weight: 500; }

/* ════════════════════════════════════
   TOC (Table of Contents)
   ════════════════════════════════════ */
.tr-toc {
  background: var(--tr-warm);
  border: 1px solid var(--tr-sand);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
}
.tr-toc-title {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tr-muted);
  margin-bottom: var(--sp-4);
}
.tr-toc-list { display: flex; flex-direction: column; gap: var(--sp-1); }
.tr-toc-link {
  font-size: 13.5px;
  color: var(--tr-body);
  padding: 4px 8px;
  border-radius: 6px;
  transition: color var(--dur-fast), background var(--dur-fast);
  display: block;
  line-height: 1.4;
}
.tr-toc-link:hover, .tr-toc-link.is-active {
  color: var(--tr-green);
  background: var(--tr-pale);
}
.tr-toc-link--h3 { padding-left: var(--sp-5); font-size: 13px; color: var(--tr-muted); }

/* ════════════════════════════════════
   SCROLL PROGRESS BAR
   ════════════════════════════════════ */
.tr-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--tr-mint), var(--tr-green));
  z-index: calc(var(--z-nav) + 1);
  width: 0%;
  transition: width 50ms linear;
  border-radius: 0 2px 2px 0;
}

/* ════════════════════════════════════
   PAGINATION
   ════════════════════════════════════ */
.tr-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-10) 0 0;
}
.tr-pagination a,
.tr-pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  color: var(--tr-body);
  border: 1px solid var(--tr-sand);
  background: var(--tr-white);
  transition: all var(--dur-fast);
}
.tr-pagination a:hover { border-color: var(--tr-green); color: var(--tr-green); }
.tr-pagination .current {
  background: var(--tr-green);
  border-color: var(--tr-green);
  color: var(--tr-white);
}

/* ════════════════════════════════════
   SEARCH FORM
   ════════════════════════════════════ */
.tr-search {
  display: flex;
  align-items: center;
  background: var(--tr-white);
  border: 1.5px solid var(--tr-sand);
  border-radius: var(--radius-pill);
  overflow: hidden;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.tr-search:focus-within {
  border-color: var(--tr-green);
  box-shadow: 0 0 0 3px rgba(34,165,84,0.1);
}
.tr-search input {
  flex: 1;
  border: none;
  background: none;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--tr-heading);
  outline: none;
}
.tr-search input::placeholder { color: var(--tr-stone); }
.tr-search button {
  background: var(--tr-green);
  color: var(--tr-white);
  border: none;
  padding: 10px 18px;
  font-size: 15px;
  cursor: pointer;
  transition: background var(--dur-fast);
}
.tr-search button:hover { background: var(--tr-emerald); }

/* ════════════════════════════════════
   AUTHOR BOX
   ════════════════════════════════════ */
.tr-author-box {
  display: flex;
  gap: var(--sp-5);
  background: var(--tr-warm);
  border: 1px solid var(--tr-sand);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  align-items: flex-start;
}
.tr-author-box-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--tr-sand);
}
.tr-author-box-name {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--tr-heading);
  margin-bottom: var(--sp-1);
}
.tr-author-box-role {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--tr-green);
  margin-bottom: var(--sp-3);
}
.tr-author-box-bio {
  font-size: 14.5px;
  color: var(--tr-muted);
  line-height: 1.6;
}
@media (max-width: 560px) {
  .tr-author-box { flex-direction: column; }
}
