/* Hero & Search */
.hero-box {
  background: linear-gradient(135deg, #0f3d6e 0%, #15528c 65%, #0b6e5c 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2rem 1.35rem;
  margin: 1.25rem 0;
  box-shadow: var(--shadow-md);
}

.hero-box h1 {
  color: #ffffff;
  margin-bottom: 0.65rem;
}

.hero-box p {
  color: #e2e8f0;
  max-width: 680px;
  font-size: 1.04rem;
}

.search-form {
  display: flex;
  gap: 0.5rem;
  max-width: 640px;
  margin-top: 1.25rem;
  background: #ffffff;
  padding: 0.4rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.search-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  padding: 0.6rem 0.85rem;
  font-family: inherit;
  font-size: 0.98rem;
  color: var(--text-main);
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover {
  border-color: #93c5fd;
  transform: translateY(-2px);
}

.card-clickable {
  position: relative;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.card-clickable .card-main-link {
  -webkit-tap-highlight-color: transparent;
}

.card-clickable .card-main-link:focus,
.card-clickable .card-main-link:focus-visible,
.card-clickable .card-main-link:active {
  outline: none;
  box-shadow: none;
  background: transparent;
}

.card-clickable .card-main-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
}

.card-clickable:has(.card-main-link:focus-visible) {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.16);
}

.card-clickable:active {
  transform: scale(0.995);
}

.bank-header-card {
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 1rem;
  text-align: left;
  margin-bottom: 1.25rem;
}

.bank-header-card:hover {
  transform: none;
  border-color: var(--border-color);
}

@media (max-width: 639px) {
  .bank-header-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

.card-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--brand-primary-soft);
  color: var(--brand-primary);
  margin-bottom: 0.6rem;
  align-self: flex-start;
}

.card-badge.danger {
  background: var(--brand-danger-soft);
  color: var(--brand-danger);
}

.card-badge.success {
  background: var(--brand-accent-soft);
  color: var(--brand-accent);
}

.bank-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-main);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.bank-card:hover {
  text-decoration: none;
  border-color: var(--brand-primary);
}

.bank-card img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.bank-logo-badge {
  width: 50px;
  height: 50px;
  object-fit: contain;
  padding: 5px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 1rem 0 0.75rem;
}

.breadcrumb a {
  color: var(--brand-primary);
  font-weight: 600;
}

@media (max-width: 639px) {
  .breadcrumb {
    font-size: 0.81rem;
    gap: 0.3rem;
    margin: 0.75rem 0 0.5rem;
  }
  .breadcrumb span[aria-current="page"] {
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Article Meta & Quick Summary */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.15rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  padding-bottom: 0.9rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--border-color);
}

.article-lead {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-main);
  margin-bottom: 1.15rem;
}

.summary-box {
  background: #f4f8fd;
  border: 1px solid #d0e1f9;
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  margin: 1rem 0 1.25rem;
}

.summary-box-title {
  font-weight: 800;
  color: var(--brand-primary);
  margin-bottom: 0.7rem;
  font-size: 1rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

@media (min-width: 560px) {
  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .summary-grid .summary-item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

.summary-item {
  background: #ffffff;
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  border: 1px solid #e2ecfb;
}

.summary-label {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.1rem;
}

.summary-value {
  display: block;
  font-size: 0.93rem;
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.45;
}

/* Table of Contents */
.toc-box {
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.05rem;
  margin: 1.15rem 0 1.4rem;
}

.toc-box summary {
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toc-box summary::-webkit-details-marker {
  display: none;
}

.toc-box ul {
  margin: 0.65rem 0 0;
  padding-left: 1.15rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem 1.25rem;
}

@media (min-width: 640px) {
  .toc-box ul {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Article Body Typography & Step Lists */
.article-body {
  font-size: 1.02rem;
  line-height: 1.82;
  color: var(--text-body);
}

.article-body h2 {
  padding-top: 1.35rem;
  margin-top: 1.65rem;
  margin-bottom: 0.75rem;
  border-top: 1px solid var(--border-color);
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  color: var(--brand-primary-dark);
}

.article-body h2:first-child {
  padding-top: 0;
  margin-top: 0.5rem;
  border-top: 0;
}

.article-body ul li {
  margin-bottom: 0.55rem;
}

.article-body ol {
  list-style: none;
  padding-left: 0;
  counter-reset: step-counter;
  margin: 0.85rem 0 1.25rem;
}

.article-body ol li {
  counter-increment: step-counter;
  position: relative;
  padding: 0.65rem 0.85rem 0.65rem 2.85rem;
  margin-bottom: 0.6rem;
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.article-body ol li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0.75rem;
  top: 0.68rem;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--brand-primary);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* Alert Boxes */
.alert-box {
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  margin: 1.25rem 0;
  border-left: 4px solid var(--brand-primary);
  background: var(--brand-primary-soft);
}

.alert-box.danger {
  border-left-color: var(--brand-danger);
  background: var(--brand-danger-soft);
  color: #7f1d1d;
}

.alert-box.warn {
  border-left-color: var(--brand-warn);
  background: var(--brand-warn-soft);
  color: #78350f;
}

.alert-box.success {
  border-left-color: var(--brand-accent);
  background: var(--brand-accent-soft);
  color: #064e3b;
}

/* AdSense-Safe Fixed Height Container (Prevents CLS) */
.ad-slot {
  margin: 1.25rem 0;
  min-height: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  text-align: center;
}

.ad-slot.sidebar-ad {
  min-height: 250px;
}

.ad-label {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1rem;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 0.9rem 1rem;
  background: transparent;
  border: 0;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.faq-question:focus {
  outline: none;
}

.faq-question:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: -2px;
}

.faq-answer {
  display: none;
  padding: 0 1rem 0.95rem;
  color: var(--text-body);
  border-top: 1px solid var(--bg-muted);
}

.faq-item.open .faq-answer {
  display: block;
}

/* Filter Pills */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.25rem;
}

.pill {
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.88rem;
}

.pill.active, .pill:hover {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
  text-decoration: none;
}

/* Forms & Calculator */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
}

.calc-result {
  background: var(--brand-accent-soft);
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1.25rem;
}
