/**
 * Credit Card Payoff Theme - Global Stylesheet
 * High-performance, clean financial utility styling
 */

:root {
  --site-primary: #1e3a8a;
  --site-primary-dark: #172554;
  --site-primary-light: #3b82f6;
  --site-accent: #059669;
  --site-text: #1e293b;
  --site-text-light: #64748b;
  --site-text-muted: #94a3b8;
  --site-bg: #f8fafc;
  --site-surface: #ffffff;
  --site-border: #e2e8f0;
  --site-border-dark: #cbd5e1;
  --site-radius: 10px;
  --site-radius-lg: 16px;
  --site-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --site-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --site-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
  --site-container: 1160px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  line-height: 1.6;
  color: var(--site-text);
  background-color: var(--site-bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--site-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--site-primary-light);
}

.site-container {
  width: 100%;
  max-width: var(--site-container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.site-header {
  background: var(--site-surface);
  border-bottom: 1px solid var(--site-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--site-shadow-sm);
}

.site-nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--site-text);
  letter-spacing: -0.02em;
}

.site-logo-badge {
  background: linear-gradient(135deg, var(--site-primary) 0%, #2563eb 100%);
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--site-text);
  padding: 6px 0;
  position: relative;
}

.site-nav-link:hover,
.site-nav-link.active {
  color: var(--site-primary);
}

.site-nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--site-primary);
  border-radius: 2px;
}

.nav-cta-btn {
  background-color: var(--site-primary);
  color: #ffffff !important;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.nav-cta-btn:hover {
  background-color: var(--site-primary-dark);
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--site-border);
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--site-text);
}

@media (max-width: 768px) {
  .mobile-nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--site-surface);
    border-bottom: 1px solid var(--site-border);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
    box-shadow: var(--site-shadow);
  }

  .site-nav.is-open {
    display: flex;
  }
}

/* ==========================================================================
   HOMEPAGE HERO SECTION
   ========================================================================== */
.hero-section {
  padding: 48px 0 32px 0;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, var(--site-bg) 100%);
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  font-size: 0.825rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--site-primary-dark);
  line-height: 1.15;
  margin: 0 0 16px 0;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--site-text-light);
  max-width: 720px;
  margin: 0 auto 28px auto;
  line-height: 1.6;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--site-primary);
  color: #ffffff;
  padding: 14px 32px;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 8px;
  box-shadow: var(--site-shadow);
  transition: all 0.2s ease;
}

.hero-cta:hover {
  background-color: var(--site-primary-dark);
  color: #ffffff;
  transform: translateY(-1px);
}

.trust-badges {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 24px;
  font-size: 0.85rem;
  color: var(--site-text-light);
}

.trust-badge-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 2rem;
  }
  .hero-description {
    font-size: 1rem;
  }
  .trust-badges {
    flex-direction: column;
    gap: 8px;
  }
}

/* ==========================================================================
   HOMEPAGE EDUCATIONAL CONTENT
   ========================================================================== */
.edu-content-section {
  padding: 60px 0;
}

.edu-section-block {
  background: var(--site-surface);
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius);
  padding: 40px;
  margin-bottom: 32px;
  box-shadow: var(--site-shadow-sm);
}

@media (max-width: 640px) {
  .edu-section-block {
    padding: 24px 18px;
  }
}

.edu-section-block h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--site-primary-dark);
  margin-top: 0;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.edu-section-block h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--site-text);
  margin-top: 24px;
  margin-bottom: 12px;
}

.edu-section-block p {
  color: #334155;
  font-size: 1.025rem;
  line-height: 1.75;
  margin-bottom: 16px;
}

.edu-section-block ul,
.edu-section-block ol {
  padding-left: 24px;
  margin-bottom: 20px;
}

.edu-section-block li {
  margin-bottom: 10px;
  color: #334155;
  font-size: 1rem;
  line-height: 1.6;
}

.highlight-box {
  background-color: #f0fdf4;
  border-left: 4px solid var(--site-accent);
  padding: 20px 24px;
  border-radius: 6px;
  margin: 24px 0;
}

.highlight-box h4 {
  margin: 0 0 8px 0;
  color: #065f46;
  font-size: 1.05rem;
}

.highlight-box p {
  margin: 0;
  color: #047857;
  font-size: 0.95rem;
}

.formula-card {
  background: #f8fafc;
  border: 1px dashed var(--site-border-dark);
  border-radius: 8px;
  padding: 18px 22px;
  margin: 20px 0;
  font-family: monospace;
  font-size: 0.95rem;
  color: var(--site-primary-dark);
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 24px;
}

@media (max-width: 640px) {
  .tips-grid {
    grid-template-columns: 1fr;
  }
}

.tip-card {
  background: #f8fafc;
  border: 1px solid var(--site-border);
  border-radius: 8px;
  padding: 20px;
}

.tip-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--site-primary-dark);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   FAQ SECTION ACCORDION
   ========================================================================== */
.faq-section {
  padding: 40px 0 70px 0;
}

.faq-header {
  text-align: center;
  margin-bottom: 36px;
}

.faq-header h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--site-primary-dark);
  margin: 0 0 10px 0;
}

.faq-accordion {
  max-width: 860px;
  margin: 0 auto;
}

.faq-item {
  background: var(--site-surface);
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-item.is-active {
  border-color: #93c5fd;
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 20px 24px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--site-text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq-question:hover {
  color: var(--site-primary);
}

.faq-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #eff6ff;
  color: var(--site-primary);
  font-weight: bold;
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.faq-item.is-active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  display: none;
  padding: 0 24px 22px 24px;
  color: #334155;
  font-size: 1rem;
  line-height: 1.7;
}

.faq-item.is-active .faq-answer {
  display: block;
}

/* ==========================================================================
   BLOG HUB / ARCHIVE
   ========================================================================== */
.blog-header {
  padding: 48px 0 24px 0;
  text-align: center;
}

.blog-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--site-primary-dark);
  margin: 0 0 12px 0;
}

.blog-filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--site-border);
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cat-pill {
  background: var(--site-surface);
  border: 1px solid var(--site-border);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--site-text);
  transition: all 0.15s ease;
}

.cat-pill:hover,
.cat-pill.active {
  background: var(--site-primary);
  color: #ffffff;
  border-color: var(--site-primary);
}

.blog-search-box {
  position: relative;
  width: 260px;
}

.blog-search-input {
  width: 100%;
  padding: 8px 14px;
  border: 1px solid var(--site-border);
  border-radius: 6px;
  font-size: 0.9rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 48px;
}

@media (max-width: 992px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

.post-card {
  background: var(--site-surface);
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--site-shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--site-shadow-md);
}

.post-card-thumb {
  height: 180px;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 2.5rem;
  position: relative;
}

.post-card-category {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
}

.post-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.post-card-date {
  font-size: 0.8rem;
  color: var(--site-text-muted);
  margin-bottom: 8px;
}

.post-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--site-text);
  margin: 0 0 12px 0;
  line-height: 1.35;
}

.post-card-title a {
  color: inherit;
}

.post-card-title a:hover {
  color: var(--site-primary);
}

.post-card-excerpt {
  color: var(--site-text-light);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.post-card-link {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--site-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.post-card-link:hover {
  gap: 10px;
}

/* ==========================================================================
   SINGLE POST LAYOUT
   ========================================================================== */
.single-post-container {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 20px 80px 20px;
}

.post-breadcrumbs {
  font-size: 0.85rem;
  color: var(--site-text-muted);
  margin-bottom: 20px;
}

.post-breadcrumbs a {
  color: var(--site-text-light);
}

.single-post-header {
  margin-bottom: 32px;
}

.single-post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.875rem;
  color: var(--site-text-light);
  margin-bottom: 12px;
}

.post-category-tag {
  background: #eff6ff;
  color: var(--site-primary);
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
}

.single-post-title {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--site-primary-dark);
  margin: 0 0 20px 0;
}

.single-featured-banner {
  height: 320px;
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #3b82f6 100%);
  border-radius: var(--site-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 4rem;
  margin-bottom: 36px;
  box-shadow: var(--site-shadow);
}

/* Table of Contents */
.toc-box {
  background: #f8fafc;
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius);
  padding: 24px 28px;
  margin-bottom: 36px;
}

.toc-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--site-primary-dark);
  margin: 0 0 12px 0;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li {
  margin-bottom: 8px;
}

.toc-list a {
  font-size: 0.95rem;
  color: #334155;
  font-weight: 500;
}

.toc-list a:hover {
  color: var(--site-primary);
  text-decoration: underline;
}

/* Post Body */
.post-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #1e293b;
}

.post-content h2 {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--site-primary-dark);
  margin-top: 48px;
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}

.post-content h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--site-text);
  margin-top: 32px;
  margin-bottom: 14px;
}

.post-content p {
  margin-bottom: 24px;
}

.post-content ul,
.post-content ol {
  margin-bottom: 24px;
  padding-left: 28px;
}

.post-content li {
  margin-bottom: 10px;
}

/* In-Post Calculator CTA */
.post-calculator-cta {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 2px solid #93c5fd;
  border-radius: var(--site-radius);
  padding: 32px;
  margin: 40px 0;
  text-align: center;
}

.post-calculator-cta h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--site-primary-dark);
  margin: 0 0 10px 0;
}

.post-calculator-cta p {
  font-size: 1.05rem;
  color: #1e3a8a;
  max-width: 600px;
  margin: 0 auto 20px auto;
}

.post-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--site-primary);
  color: #ffffff !important;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.post-cta-btn:hover {
  background-color: var(--site-primary-dark);
  transform: translateY(-1px);
}

/* Author Box */
.author-box {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #f8fafc;
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius);
  padding: 24px;
  margin-top: 50px;
}

.author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--site-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  flex-shrink: 0;
}

.author-info h4 {
  margin: 0 0 4px 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.author-info p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--site-text-light);
}

/* ==========================================================================
   PAGE TEMPLATES (About, Contact, Legal)
   ========================================================================== */
.page-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 20px 80px 20px;
}

.page-header {
  margin-bottom: 36px;
  text-align: center;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--site-primary-dark);
  margin: 0 0 12px 0;
}

.page-header p {
  font-size: 1.1rem;
  color: var(--site-text-light);
  max-width: 600px;
  margin: 0 auto;
}

.page-content-card {
  background: var(--site-surface);
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius);
  padding: 40px;
  box-shadow: var(--site-shadow-sm);
}

@media (max-width: 640px) {
  .page-content-card {
    padding: 24px 18px;
  }
}

.page-content-card h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--site-primary-dark);
  margin-top: 32px;
  margin-bottom: 14px;
}

.page-content-card h2:first-child {
  margin-top: 0;
}

.page-content-card p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #334155;
  margin-bottom: 20px;
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 28px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--site-text);
}

.form-control {
  padding: 12px 14px;
  border: 1.5px solid var(--site-border);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--site-primary);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 140px;
}

.contact-privacy-alert {
  background-color: #fffbeb;
  border-left: 4px solid #f59e0b;
  padding: 16px 20px;
  border-radius: 6px;
  color: #92400e;
  font-size: 0.925rem;
  font-weight: 500;
  line-height: 1.5;
  margin-top: 10px;
}

.disclaimer-banner {
  background-color: #f8fafc;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 30px;
}

.disclaimer-banner p {
  font-size: 1.05rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 10px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  margin-top: auto;
  background: #0f172a;
  color: #94a3b8;
  padding: 56px 0 28px 0;
  border-top: 1px solid #1e293b;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

.footer-brand h3 {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 12px 0;
}

.footer-brand p {
  font-size: 0.925rem;
  line-height: 1.6;
  max-width: 380px;
  margin-bottom: 16px;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 16px 0;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.9rem;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-disclaimer-snippet {
  border-top: 1px solid #1e293b;
  padding-top: 24px;
  margin-bottom: 24px;
  font-size: 0.8rem;
  line-height: 1.6;
  color: #64748b;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: #64748b;
}
