/* ============================================================
   kredytuje.my — Shared Stylesheet
   ============================================================ */

/* ── Design Tokens ── */
:root {
  --navy:         #1e3a5f;
  --navy-dark:    #0f2240;
  --navy-mid:     #274d7a;
  --blue:         #2563eb;
  /* --blue-light:   #dbeafe; */
  --blue-light:   #eff6ff;
  --blue-mid:     #bfdbfe;
  --green:        #059669;
  --green-light:  #d1fae5;
  --amber:        #d97706;
  /* --amber-light:  #fef3c7; */
  --amber-light:  #fffae6;
  --red:          #dc2626;
  --red-light:    #fee2e2;
  --bg:           #ffffff;
  --surface:      #f8faff;
  --border:       #e2e8f0;
  --text:         #0f172a;
  --muted:        #64748b;
  /* --muted-light:  #94a3b8; */
  --muted-light:  #64748b;
  --serif:        'Playfair Display', Georgia, serif;
  --sans:         'DM Sans', system-ui, sans-serif;
  --max:          1200px;
  --article-max:  720px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; }

/* ── Skip link (a11y) ── */
.skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  background: var(--blue);
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 9999;
  transition: top 0.15s;
}
.skip-link:focus { top: 8px; }

/* ── Navigation ── */
.nav {
  background: var(--navy);
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.logo span { color: #93c5fd; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.01em;
  transition: color 0.15s;
  white-space: nowrap;
}
.nav-links a:hover { color: #fff; }
.nav-links a.active { color: #fff; }
.nav-app-link {
  background: rgba(147,197,253,0.15) !important;
  border: 1px solid rgba(147,197,253,0.6) !important;
  border-radius: 6px;
  padding: 5px 12px !important;
  color: #93c5fd !important;
}
.nav-app-link:hover { background: rgba(147,197,253,0.25) !important; }
.nav-cta {
  background: var(--blue);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  display: inline-block;
}
.nav-cta:hover { background: #1d4ed8; }
.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,0.8);
  border-radius: 2px;
}
.nav-mobile-menu {
  display: none;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.nav-mobile-menu.open { display: block; }
.nav-mobile-menu a {
  display: block;
  padding: 10px 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(255,255,255,0.72);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-mobile-menu a:last-child { border-bottom: none; }
.nav-mobile-menu a.active { color: #fff; }

/* ── Footer ── */
footer {
  background: var(--navy-dark);
  padding: 36px 24px 24px;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 16px;
}
.footer-logo {
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
}
.footer-logo span { color: #93c5fd; }
.footer-tagline { font-size: 0.75rem; color: rgba(255,255,255,0.8); margin-top: 4px; }
.footer-links { display: flex; gap: 20px; row-gap: 6px; flex-wrap: wrap; align-items: center; padding: 0; background: unset; border: none; }
.footer-links a { font-size: 0.8125rem; color: rgba(255,255,255,0.6); transition: color 0.15s; }
.footer-links a:hover { color: rgba(255,255,255,0.75); }
.footer-disclaimer { font-size: 0.73rem; line-height: 1.6; max-width: 700px; color: rgba(255,255,255,0.6); max-width: var(--max); margin: 0 auto; }

/* ── Thumb color variants (article thumbnails) ── */
.thumb-navy    { background: linear-gradient(135deg, #1e3a5f, #2563eb); }
.thumb-teal    { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.thumb-slate   { background: linear-gradient(135deg, #334155, #64748b); }
.thumb-indigo  { background: linear-gradient(135deg, #3730a3, #6366f1); }
.thumb-emerald { background: linear-gradient(135deg, #065f46, #10b981); }
.thumb-rose    { background: linear-gradient(135deg, #9f1239, #f43f5e); }

/* ── Page header (dark) ── */
.page-header { background: var(--navy); padding: 40px 24px 48px; }
.page-header-inner { max-width: var(--max); margin: 0 auto; }
.page-header-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #93c5fd;
  margin-bottom: 10px;
}
.page-header-title {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 10px;
}
.page-header-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.6);
  max-width: 560px;
  line-height: 1.6;
}
.page-header-trust {
  display: flex;
  align-items: center;
  gap: 20px;
  row-gap: 0;
  margin-top: 20px;
  flex-wrap: wrap;
}
.trust-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.55);
}
.trust-chip svg { color: #93c5fd; flex-shrink: 0; }

/* ── Calculator CTA banner ── */
.calc-banner { background: var(--navy); padding: 56px 24px; }
.calc-banner-inner { max-width: 800px; margin: 0 auto; text-align: center; }
.calc-banner-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #93c5fd;
  margin-bottom: 12px;
}
.calc-banner-title {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 12px;
}
.calc-banner-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 28px;
  line-height: 1.6;
}
.calc-banner-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--blue);
  color: #fff;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
}
.calc-banner-cta:hover { background: #1d4ed8; transform: translateY(-1px); }
.calc-banner-note { font-size: 0.8rem; color: rgba(255,255,255,0.6); margin-top: 12px; }

/* ── CTA band ── */
.cta-band { background: var(--navy); padding: 56px 24px; text-align: center; }
.cta-band-title {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}
.cta-band-sub { font-size: 1rem; color: rgba(255,255,255,0.6); margin-bottom: 28px; }
.btn-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: #fff;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 8px;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
}
.cta-btn:hover { background: #1d4ed8; transform: translateY(-1px); }
.cta-btn-secondary {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.25);
}
.cta-btn-secondary:hover { background: rgba(255,255,255,0.08); transform: translateY(-1px); }

/* ── Trust banner ── */
.trust-banner {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.trust-banner-inner {
  margin: 0 auto;
  padding: 20px 24px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.trust-banner-inner::-webkit-scrollbar {
  display: none;
}
.trust-logos {
  display: flex;
  align-items: center;
  gap: 40px;
  justify-content: center;
}
.bank-logo-img { height: 28px; width: auto; display: block; transition: opacity 0.15s; }

/* ── Affiliate card grid ── */
.aff-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.aff-card-large {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  transition: border-color 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
}
.aff-card-large:hover { border-color: var(--blue); box-shadow: 0 4px 20px rgba(37,99,235,0.1); }
.aff-card-large-header { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.aff-bank-logo-lg {
  font-size: 10px;
  display: flex;
  align-items: center;
}
.aff-bank-logo-lg img { height: 34px; width: auto; display: block; }
.aff-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #059669;
  background: #effff6;
  padding: 2px 6px;
  border-radius: 4px;
}
.aff-badge.amber { background: var(--amber-light); color: #92400e; }
.aff-card-large-rate {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 20px;
}
.aff-card-large-rate span { font-size: 0.9rem; font-family: var(--sans); font-weight: 400; color: var(--muted); margin-left: 4px; }
.aff-card-large-details { font-size: 0.875rem; color: var(--muted); line-height: 1.6; margin-bottom: 16px; flex: 1; }
.aff-card-large-details li { list-style: none; padding-left: 0; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.aff-card-large-details li::before { content: '✓'; color: #059669; font-weight: 700; font-size: 0.8rem; flex-shrink: 0; }
.aff-card-large-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--border); }
.aff-card-large-monthly { font-size: 0.875rem; color: var(--text); }
.aff-card-large-monthly strong { font-weight: 600; }
.aff-card-large-cta {
  background: var(--blue);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
  text-decoration: none;
}
.aff-card-large-cta:hover { background: #1d4ed8; }
.aff-disclaimer { font-size: 0.78rem; color: var(--muted-light); margin-top: 20px; line-height: 1.5; }

/* ── Content section layout ── */
.section { padding: 72px 24px; }
.section-inner { max-width: 760px; margin: 0 auto; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-eyebrow { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--blue); margin-bottom: 10px; }

/* ── Chart card (shared across calculators) ── */
.chart-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 20px; }
.chart-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 4px; }
.chart-title { font-size: 0.8125rem; font-weight: 600; color: var(--text); }
.chart-sub { font-size: 0.75rem; color: var(--muted-light); margin-bottom: 12px; }
.chart-legend { display: flex; gap: 16px; margin-bottom: 12px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--muted); }
.legend-dot { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }

/* ── Responsive: nav ── */
@media (max-width: 1023px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-mobile-toggle { display: flex; }
}
@media (max-width: 800px) {
  .aff-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .calc-banner { padding: 40px 16px; }
  .cta-band { padding: 40px 16px; }
  .page-header { padding: 28px 16px 36px; }
  .section { padding: 48px 16px; }
  .trust-logos { justify-content: flex-start; }
}