/* Minimal Fintech UI (YMYL-safe)
   - Calm, premium, readable
   - No gradients, no animations
   - Palette: Teal (#3C6E71) + Maroon (#6F1D1B) sparingly
*/

:root{
  /* Surfaces */
  --bg:#f4f6f8;                 /* app frame */
  --surface:#ffffff;            /* main card */
  --surface-2:#fbfcfd;          /* subtle section tint */
  --header:#ffffff;
  --footer:#0b1220;

  /* Text */
  --text:#0b1220;
  --muted:#5b6472;
  --muted-2:#7a8596;

  /* Brand */
  --teal:#3C6E71;
  --teal-strong:#2f585a;
  --teal-weak:rgba(60,110,113,.10);

  --maroon:#6F1D1B;             /* emphasis only */
  --maroon-weak:rgba(111,29,27,.08);

  /* Lines / depth */
  --border:#e5eaf0;
  --shadow-xs:0 2px 10px rgba(16,24,40,.06);
  --shadow-sm:0 14px 36px rgba(16,24,40,.10);

  /* Radius */
  --r-sm:12px;
  --r-md:16px;
  --r-lg:22px;

  /* Layout */
  --container:1120px;

  /* Spacing */
  --s1:6px;
  --s2:10px;
  --s3:16px;
  --s4:22px;
  --s5:30px;
  --s6:44px;

  /* Focus */
  --focus:rgba(60,110,113,.28);
}

/* ===== Base ===== */
*,
*::before,
*::after{box-sizing:border-box}

html{
  -webkit-text-size-adjust:100%;
  height: 100%;
}

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size:clamp(15px,.25vw + 14px,16px);
  line-height:1.65;
  color:var(--text);
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* Main content grows to push footer down */
main.container {
  flex: 1 0 auto;
}

footer {
  flex-shrink: 0;
}

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

a{color:var(--teal);text-decoration:none}
a:hover{text-decoration:underline}

:focus-visible{
  outline:3px solid var(--focus);
  outline-offset:3px;
  border-radius:12px;
}

.container{
  width:min(var(--container), calc(100% - 40px));
  margin:0 auto;
}

/* ===== Header / Navigation ===== */
header{
  background:var(--header);
  position:sticky;
  top:0;
  z-index:60;
}

/* Remove the top accent bar */
header::before{
  display: none;
}

.nav-row{
  display:flex;
  align-items:center;
  gap:var(--s3);
  padding:26px 0;
  position: relative;
}

.brand{
  font-weight:900;
  letter-spacing:-.25px;
  font-size:clamp(18px, 1.2vw + 14px, 22px);
  color:var(--text);
  flex-shrink: 0;
  z-index: 2;
}
.brand span{
  color:var(--teal);
  font-weight:900;
}

.nav{
  display:flex;
  align-items:center;
  gap:var(--s1);
  background: rgba(16,24,40,.02);
  padding: 8px;
  border-radius: 999px;
  border: 1px solid rgba(16,24,40,.04);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav a{
  color:var(--muted);
  font-weight:700;
  font-size: 14px;
  padding:12px 18px;
  border-radius:999px;
  text-decoration:none;
  transition: all 0.2s ease;
}

.nav a:hover{
  color: var(--text);
  background: #fff;
  box-shadow: 0 2px 8px rgba(16,24,40,.06);
  text-decoration: none;
}

.nav a[aria-current="page"]{
  color: #fff;
  background: var(--teal);
  box-shadow: 0 4px 12px rgba(60,110,113,.24);
}

.nav a[aria-current="page"]:hover{
  background: var(--teal-strong);
}

/* Language Switcher - Clean Design */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: auto;
  background: var(--surface-2);
  border-radius: 999px;
  padding: 3px;
  z-index: 2;
}

.lang-switch a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  border-radius: 999px;
  color: var(--muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.lang-switch a:hover {
  color: var(--teal);
  text-decoration: none;
}

.lang-switch a.active {
  background: var(--teal);
  color: #fff;
}

.lang-switch a.active:hover {
  background: var(--teal-strong);
}

/* Remove pseudo-elements */
.lang-switch a::before {
  display: none;
}

/* Mobile */
.menu-btn{
  display:none;
  min-width:44px;
  min-height:44px;
  padding:10px;
  border-radius:14px;
  border:1px solid var(--border);
  background:#fff;
  color:var(--text);
  cursor:pointer;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
  margin-left: auto;
}

.menu-btn:hover {
  background: var(--teal-weak);
  border-color: var(--teal);
}

.menu-btn svg {
  transition: transform 0.3s ease;
  display: block;
}

.menu-btn[aria-expanded="true"] svg {
  transform: rotate(90deg);
}

#mobile-menu{
  display:none;
  background: #fff;
  padding:0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-top: 1px solid var(--border);
}

#mobile-menu[aria-hidden="false"]{
  display:block;
  max-height: 500px;
  padding:12px 0;
}

#mobile-menu a{
  display:block;
  padding:14px 16px;
  color:var(--text);
  border-radius:var(--r-sm);
  text-decoration:none;
  margin:4px 10px;
  font-weight: 600;
  transition: background 0.2s ease;
  border: 1px solid var(--border);
}

#mobile-menu a:hover{
  background: var(--teal-weak);
  border-color: rgba(60,110,113,.18);
}

#mobile-menu a[aria-current="page"]{
  color:var(--teal);
  background:var(--teal-weak);
  font-weight: 700;
  border-color: rgba(60,110,113,.20);
}

/* Remove pseudo-elements from mobile menu */
#mobile-menu a::before {
  display: none;
}

/* ===== Main “white window” ===== */
main.container{
  background:var(--surface);
  border-radius:var(--r-lg);
  margin:var(--s6) auto;
  padding:var(--s5);
  box-shadow:var(--shadow-sm);
  border:1px solid rgba(229,234,240,.60);
}

/* Breadcrumbs */
.breadcrumbs{
  font-size:13px;
  color:var(--muted-2);
  margin:6px 0 16px;
}
.breadcrumbs a{color:var(--muted);text-decoration:none}
.breadcrumbs a:hover{text-decoration:underline}

/* ===== Sections ===== */
.section{
  padding:var(--s4);
  border-radius:var(--r-md);
}

.section:first-of-type{border-top:0}
.section + .section{margin-top:var(--s3)}

/* Light sections - subtle background, same padding as regular */
.section.light{
  background:var(--surface-2);
  border:1px solid rgba(229,234,240,.80);
}

/* Section inner content breathing room */
.section > h2 {
  margin-bottom: var(--s3);
}

.section > p:last-child,
.section > ul:last-child,
.section > ol:last-child {
  margin-bottom: 0;
}

.section ul,
.section ol {
  margin: var(--s3) 0 var(--s3) var(--s4);
}

.section li {
  margin: var(--s2) 0;
  line-height: 1.7;
}

.section li + li {
  margin-top: var(--s2);
}

/* ===== Typography ===== */
h1{
  margin:0 0 14px;
  font-size:clamp(28px, 3.4vw, 42px);
  line-height:1.08;
  letter-spacing:-.6px;
  font-weight:950;
}

h2{
  margin:0 0 12px;
  font-size:clamp(20px, 2vw, 30px);
  line-height:1.18;
  letter-spacing:-.35px;
  font-weight:900;
}

h3{
  margin:0 0 10px;
  font-size:16px;
  font-weight:900;
  letter-spacing:-.15px;
}

p{margin:0 0 14px}
ul,ol{margin:10px 0 0 18px}
li{margin:6px 0}

.lead{
  max-width:72ch;
  font-size:clamp(16px, .9vw + 14px, 19px);
  color:rgba(11,18,32,.92);
  font-weight:650;
  margin-bottom:var(--s3);
}

/* Note blocks: more “fintech product” */
.note{
  background:var(--teal-weak);
  border:1px solid rgba(60,110,113,.18);
  border-left:5px solid var(--teal);
  color:rgba(11,18,32,.92);
  padding:12px 14px;
  border-radius:var(--r-md);
}
.note a{font-weight:900}
.note strong{color:var(--maroon);font-weight:950}

/* Reduce accidental “everything red” */
strong{font-weight:900}

/* ===== Cards (for grid-2) ===== */
.grid-2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:var(--s4);
  margin-top:var(--s4);
}

.card{
  border:1px solid var(--border);
  background:#fff;
  border-radius:var(--r-lg);
  padding:var(--s4);
  box-shadow:var(--shadow-xs);
}

.card p {
  margin-bottom: var(--s2);
}

.card p:last-child {
  margin-bottom: 0;
}

.card ul {
  margin: var(--s2) 0 0 var(--s3);
}

.card li {
  margin: var(--s1) 0;
}

/* add a tiny header accent so it doesn't look like “boxes” */
.card h3{
  display:flex;
  align-items:center;
  gap:10px;
}
.card h3::before{
  content:"";
  width:10px;
  height:10px;
  border-radius:999px;
  background:var(--teal);
  opacity:.9;
}

/* ===== Offer Cards (Affiliate) - Wide & Compact Design ===== */

/* Grid: strict breakpoints, no fluid */
.offers {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s3);
  margin-top: var(--s4);
}

/* Tablet: 768-1099px = 2 columns */
@media (min-width: 768px) {
  .offers {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s4);
  }
}

/* Desktop: 1100-1399px = 3 columns */
@media (min-width: 1100px) {
  .offers {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Large desktop: >=1400px = 4 columns */
@media (min-width: 1400px) {
  .offers {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Card: flex column, CTA pinned to bottom */
.offer-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(16,24,40,.04);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 260px;
  position: static;
  z-index: auto;
  contain: layout style;
}

/* Header: Logo left, title center, badge right */
.offer-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: transparent;
  min-height: 44px;
}

.offer-brandline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.offer-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fafbfc;
  object-fit: contain;
  flex-shrink: 0;
}

.offer-titlewrap {
  flex: 1;
  min-width: 0;
}

.offer-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.1px;
  line-height: 1.2;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.offer-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.offer-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  background: var(--teal-weak);
  color: var(--teal);
  border: 1px solid rgba(60,110,113,.12);
  white-space: nowrap;
  flex-shrink: 0;
  align-self: flex-start;
}

.offer-pill--alt {
  background: var(--maroon-weak);
  color: var(--maroon);
  border-color: rgba(111,29,27,.10);
}

/* Facts: 2x2 grid, compact */
.offer-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: transparent;
  min-height: 76px;
}

.fact {
  background: #f8f9fa;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  min-height: 34px;
}

.fact-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

.fact-value {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.1px;
}

/* Disclaimer: 2 lines max, muted */
.offer-disclaimer {
  font-size: 10px;
  color: var(--muted-2);
  line-height: 1.4;
  background: transparent;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* CTA: Pinned to bottom */
.offer-cta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  background: transparent;
  margin-top: auto;
}

.offer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 16px;
  min-height: 40px;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  position: static;
}

.offer-btn:hover {
  background: var(--teal-strong);
  text-decoration: none;
}

.offer-btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* Mobile adjustments (<768px) - single column */
@media (max-width: 767px) {
  .offer-card {
    padding: 12px 14px;
    gap: 10px;
    border-radius: var(--r-sm);
  }
  
  .offer-head {
    gap: 8px;
  }
  
  .offer-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }
  
  .offer-title {
    font-size: 14px;
  }
  
  .offer-subtitle {
    font-size: 11px;
  }
  
  .offer-pill {
    font-size: 9px;
    padding: 3px 7px;
  }
  
  .offer-facts {
    gap: 6px;
  }
  
  .fact {
    padding: 6px 8px;
    border-radius: 6px;
  }
  
  .fact-label {
    font-size: 8px;
  }
  
  .fact-value {
    font-size: 12px;
  }
  
  .offer-disclaimer {
    font-size: 9px;
  }
  
  .offer-cta {
    padding-top: 8px;
  }
  
  .offer-btn {
    font-size: 13px;
    padding: 10px 14px;
    min-height: 42px;
  }
}

/* ===== Footer ===== */
footer{
  background: #1a2535;
  color: rgba(255,255,255,.90);
  padding: 48px 0 36px;
  margin-top: 48px;
}

footer .container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

footer h3{
  color: #fff;
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.2px;
}

footer p {
  margin: 0;
  font-size: 14px;
  color: rgba(255,255,255,.65);
  line-height: 1.6;
}

footer p + p {
  margin-top: 4px;
}

footer a{
  color: #6ecfd4;
  text-decoration: none;
  font-weight: 600;
}

footer a:hover{
  text-decoration: underline;
}

footer .footer-contact {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.08);
}

footer .footer-copy {
  margin-top: 16px;
  font-size: 12px;
  color: rgba(255,255,255,.45);
}

/* Tap targets */
button, a[role="button"]{cursor:pointer}
.menu-btn, .nav a, .offer-apply{min-height:44px}

/* ===== Responsive ===== */
@media (max-width: 980px){
  .grid-2{grid-template-columns:1fr}
  main.container{padding:var(--s4); margin:var(--s5) auto;}
  
  .section {
    padding: var(--s4);
  }
  
  .section.light {
    padding: var(--s4);
  }
}

@media (max-width: 720px){
  .nav{display:none}
  .menu-btn{display:inline-flex}
  #mobile-menu{display:block}

  .lang-switch {
    margin-left: auto;
    margin-right: 12px;
    padding: 2px;
  }

  .lang-switch a {
    padding: 6px 10px;
    font-size: 11px;
  }

  .offer-cta{
    flex-direction:column;
    align-items:stretch;
    justify-content:flex-start;
  }
  .offer-apply{width:100%}
  .offer-disc{max-width:none}
  
  /* Mobile content improvements */
  main.container {
    padding: var(--s4);
    margin: var(--s4) auto;
    border-radius: var(--r-md);
  }
  
  /* Unified section styling on mobile - all sections same */
  .section {
    padding: var(--s4);
  }
  
  .section.light {
    padding: var(--s4);
  }
  
  .section + .section {
    margin-top: var(--s3);
  }
  
  /* Typography breathing room */
  h1 {
    font-size: clamp(24px, 7vw, 32px);
    margin-bottom: var(--s3);
    line-height: 1.15;
  }
  
  h2 {
    font-size: clamp(19px, 5vw, 24px);
    margin-bottom: var(--s3);
    line-height: 1.2;
  }
  
  h3 {
    font-size: 15px;
    margin-bottom: var(--s2);
  }
  
  .lead {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: var(--s4);
  }
  
  p {
    line-height: 1.7;
    margin-bottom: var(--s3);
  }
  
  /* Lists on mobile */
  .section ul,
  .section ol {
    margin: var(--s3) 0;
    padding-left: var(--s4);
  }
  
  .section li {
    margin: var(--s2) 0;
    padding-left: var(--s1);
    line-height: 1.65;
  }
  
  /* Note block mobile */
  .note {
    padding: var(--s3);
    margin: var(--s3) 0;
    font-size: 14px;
    line-height: 1.6;
  }
  
  /* Cards on mobile */
  .card {
    padding: var(--s4);
  }
  
  .card h3 {
    font-size: 15px;
    margin-bottom: var(--s2);
  }
  
  .card p {
    font-size: 14px;
    line-height: 1.65;
  }
  
  .card ul {
    margin: var(--s2) 0 0 var(--s3);
  }
  
  .card li {
    font-size: 14px;
    line-height: 1.6;
    margin: var(--s1) 0;
  }
  
  /* Grid spacing */
  .grid-2 {
    gap: var(--s3);
    margin-top: var(--s3);
  }
  
  /* Breadcrumbs */
  .breadcrumbs {
    margin-bottom: var(--s3);
    font-size: 12px;
  }
  
  /* Legacy classes - unused but kept for compatibility */
  .offerCard {
    border-radius: var(--r-md);
  }
  
  .offerCard__head {
    padding: var(--s3);
  }
  
  .offerCard__body {
    padding: var(--s3);
  }
  
  .offerCard__foot {
    padding: var(--s3);
  }
  
  .offerFacts {
    grid-template-columns: 1fr 1fr;
    gap: var(--s2);
  }
  
  .offerFacts__item {
    padding: var(--s2) var(--s3);
    border-radius: var(--r-sm);
  }
  
  .offerFacts__label {
    font-size: 11px;
    margin-bottom: 4px;
  }
  
  .offerFacts__value {
    font-size: 13px;
  }
  
  .offerCard__fineprint {
    font-size: 11px;
    margin-top: var(--s3);
    line-height: 1.5;
  }
  
  .btnPrimary,
  .btnGhost {
    min-height: 48px;
    font-size: 14px;
  }
}

/* Extra small screens - more breathing room */
@media (max-width: 480px) {
  .container {
    width: calc(100% - 24px);
  }
  
  main.container {
    padding: var(--s3);
    margin: var(--s3) auto;
  }
  
  .section {
    padding: var(--s3);
  }
  
  .section.light {
    padding: var(--s3);
  }
  
  h1 {
    font-size: 22px;
  }
  
  h2 {
    font-size: 18px;
  }
  
  .lead {
    font-size: 15px;
  }
  
  .card {
    padding: var(--s3);
  }
  
  .note {
    padding: var(--s3);
    font-size: 13px;
  }
  
  .badge {
    padding: 5px 8px;
    font-size: 10px;
  }
  
  .lang-switch a {
    padding: 5px 8px;
    font-size: 10px;
  }
}

@media print{
  body{background:#fff}
  header, footer, #mobile-menu{display:none}
  main.container{box-shadow:none;border-radius:0;margin:0;padding:0}
}