/* Latvia Residence — shared design layer (2026). Loaded after each page's inline styles. */
:root {
  --sea: #12808F; --sea-deep: #0B5F6B; --sea-soft: #E3F3F5;
  --sun: #F4B63F; --sun-soft: #FFF3D6;
  --leaf: #3E9B6B; --coral: #E86F5A; --sky: #F2F8FB;
  --gold-text: #7A5828;
  --radius: 18px;
  --shadow-sm: 0 2px 8px rgba(14,42,71,0.06);
  --shadow-md: 0 12px 32px -8px rgba(14,42,71,0.18);
}
body { font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; background: #FCFBF8; }
html[dir="rtl"] body, html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] h4, html[dir="rtl"] .btn, html[dir="rtl"] .brand, html[dir="rtl"] input, html[dir="rtl"] select, html[dir="rtl"] button {
  font-family: "Noto Kufi Arabic", "Plus Jakarta Sans", "Segoe UI", Tahoma, "Noto Naskh Arabic", Arial, sans-serif !important; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3 { letter-spacing: 0; line-height: 1.35; }
h1, h2, h3 { letter-spacing: -0.02em; }

/* Nav */
nav.top { background: rgba(252,251,248,0.88); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid rgba(216,220,225,0.6); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 19px; }
.brand::before { content: ""; width: 28px; height: 28px; border-radius: 8px; flex: none;
  background: linear-gradient(180deg, #9E3039 0 40%, #fff 40% 60%, #9E3039 60% 100%);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06), 0 4px 10px -4px rgba(158,48,57,0.6); }
.nav-links a { font-weight: 500; }
.nav-links a:hover { color: var(--sea); }
.nav-links a.nav-cta, .nav-links a[href*="cal.com"] { background: var(--sea) !important; color: #fff !important; border-radius: 999px; padding: 9px 18px; font-weight: 600; box-shadow: 0 6px 16px -6px rgba(18,128,143,0.6); }
.nav-links a.nav-cta:hover, .nav-links a[href*="cal.com"]:hover { background: var(--sea-deep) !important; }

/* Page header card */
.doc-header { position: relative; margin-top: 18px; padding: 44px 40px 36px; border-radius: 26px; overflow: hidden;
  background: radial-gradient(600px 300px at 100% 0%, rgba(244,182,63,0.25), transparent 60%),
              radial-gradient(500px 320px at 0% 100%, rgba(18,128,143,0.14), transparent 60%),
              linear-gradient(180deg, #FFFDF8 0%, var(--sky) 100%);
  border: 1px solid rgba(18,128,143,0.12); box-shadow: var(--shadow-sm); }
.doc-header h1 { font-weight: 800; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; background: #fff; border: 1px solid rgba(18,128,143,0.18);
  color: var(--sea-deep) !important; padding: 7px 14px; border-radius: 999px; font-size: 11.5px; letter-spacing: 0.12em; box-shadow: var(--shadow-sm); }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); box-shadow: 0 0 0 4px rgba(62,155,107,0.18); }
@media (max-width: 640px) { .doc-header { padding: 30px 20px 24px; border-radius: 20px; } }
/* Long eyebrow labels wrap tidily on phones: dot stays on the first line, softer corners */
@media (max-width: 560px) {
  .eyebrow { align-items: flex-start; line-height: 1.5; letter-spacing: 0.08em; border-radius: 16px; max-width: 100%; }
  .eyebrow::before { margin-top: 5px; }
}

/* Headings inside content */
main h2 { font-weight: 800; }
main h2::after { content: ""; display: block; width: 48px; height: 4px; border-radius: 99px; margin-top: 12px; background: linear-gradient(90deg, var(--sun), var(--coral)); }
.cta-block h2::after, .final-cta h2::after, .compare-card h2::after { display: none; }

/* Links in body text */
main a:not(.btn):not(.read-more) { color: var(--sea-deep); text-decoration-color: rgba(18,128,143,0.4); text-underline-offset: 3px; }
main a:not(.btn):not(.read-more):hover { color: var(--navy); }
strong { color: var(--navy); }

/* Price pill + buttons */
.price-pill { border-radius: 18px !important; background: linear-gradient(135deg, var(--navy) 0%, #15466B 100%) !important; box-shadow: var(--shadow-md); }
.price-pill strong { color: var(--sun) !important; }
.price-pill .dot { background: var(--sun) !important; box-shadow: 0 0 0 5px rgba(244,182,63,0.25); }
.btn { border-radius: 999px !important; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--sea) 0%, var(--sea-deep) 100%) !important; color: #fff !important; box-shadow: 0 12px 24px -10px rgba(11,95,107,0.7); }
.btn-whatsapp { box-shadow: 0 12px 24px -10px rgba(37,211,102,0.7); }

/* Cards, callouts, tables */
.callout, blockquote, .buyback-note, .prog-card, .author-card, .compare-card, .article-card, .person-card, .key-points .point {
  border-radius: var(--radius) !important; box-shadow: var(--shadow-sm); }
.callout, blockquote, .buyback-note, .prog-card { border-left-color: var(--sun) !important; }
.callout { background: #fff; }
.prog-card.highlight { background: var(--sun-soft) !important; border-left-color: var(--sea) !important; }
.prog-card .price { color: var(--sea-deep) !important; }
.article-card { transition: transform .2s ease, box-shadow .2s ease; }
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.read-more { color: var(--sea-deep) !important; font-weight: 700; }
.fee-table, .comparison-table, .changes { border-radius: var(--radius) !important; box-shadow: var(--shadow-md) !important; overflow: hidden; }
.fee-table th, .comparison-table th, .changes th { background: linear-gradient(120deg, var(--navy), #15466B) !important; }
.fee-table tr.highlight, .comparison-table tr.highlight { background: var(--sun-soft) !important; }
details { border-radius: 14px !important; }
details[open] { box-shadow: var(--shadow-md); border-color: rgba(18,128,143,0.35) !important; }
.breadcrumb a:hover { color: var(--sea); }

/* Closing CTA */
.cta-block, .final-cta { position: relative; overflow: hidden; border-radius: 24px;
  background: linear-gradient(120deg, #0E2A47 0%, #12406A 55%, #0B5F6B 100%) !important; }
.final-cta { border-radius: 0; }
.cta-block::before, .final-cta::before { content: ""; position: absolute; width: 360px; height: 360px; right: -120px; top: -160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(244,182,63,0.4), transparent 70%); pointer-events: none; }
.cta-block > *, .final-cta > * { position: relative; }
.cta-block .btn-primary, .final-cta .btn-primary { background: var(--sun) !important; color: var(--navy) !important; box-shadow: 0 14px 30px -10px rgba(244,182,63,0.8); }

footer.site a:hover { color: var(--sun) !important; }

/* Legal pages */
.nav-back { color: var(--sea-deep) !important; }

@media (prefers-reduced-motion: reduce) {
  .btn, .article-card { transition: none !important; }
}

/* Translated homepages (ar/fr) hero */
.hero { background: radial-gradient(900px 500px at 92% -10%, rgba(244,182,63,0.25), transparent 60%),
  radial-gradient(700px 520px at -10% 110%, rgba(18,128,143,0.14), transparent 60%),
  linear-gradient(180deg, #FFFDF8 0%, var(--sky) 100%) !important; }
.trust-strip { background: linear-gradient(120deg, #0E2A47 0%, #12406A 55%, #0B5F6B 100%) !important; }
.person-card .photo, .person .photo { box-shadow: 0 0 0 3px var(--sun), var(--shadow-md); }

/* Wide tables scroll inside themselves on small screens instead of widening the page */
@media (max-width: 760px) {
  main table, article table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  html, body { overflow-x: hidden; }
}

/* Nav: never wrap labels or the CTA button */
nav.top .row { gap: 20px; }
.brand { white-space: nowrap; flex: none; }
.nav-links { align-items: center; }
.nav-links a { white-space: nowrap; }
.nav-links a.nav-cta, .nav-links a[href*="cal.com"] { display: inline-block; white-space: nowrap; }
.lang { white-space: nowrap; flex: none; }
@media (max-width: 920px) { .nav-links li:not(:last-child) { display: none; } }

/* Nav alignment: page-level ul/li margins must not apply to the nav */
nav.top ul.nav-links { margin: 0 !important; padding: 0 !important; }
nav.top ul.nav-links li { margin: 0 !important; font-size: inherit; line-height: 1.4; }
nav.top .row { align-items: center; }

/* Phones: keep the "Book a call" button in the nav (labels are already hidden below 920px) */
@media (max-width: 760px) {
  nav.top .row:not(:has(.lang)) ul.nav-links { display: flex; }
  nav.top .brand { font-size: 17px; }
  .nav-links a.nav-cta, .nav-links a[href*="cal.com"] { padding: 8px 14px; font-size: 14px; }
}
@media (max-width: 400px) {
  nav.top .brand { font-size: 16px; gap: 8px; }
  nav.top .brand::before { width: 24px; height: 24px; }
  nav.top .row { gap: 12px; }
}

/* Language switcher (ar/fr homepages): one line on phones, current language dropped on the smallest screens */
nav.top .lang-switch { white-space: nowrap; flex: none; }
@media (max-width: 760px) {
  nav.top .lang-switch { display: flex; align-items: center; gap: 6px; font-size: 0; }
  nav.top .lang-switch > * { font-size: 13px; margin: 0; }
}
@media (max-width: 480px) { nav.top .lang-switch strong { display: none; } }

/* Price pill on phones: the amount never breaks mid-figure; the note drops to its own line */
.price-pill strong { white-space: nowrap; }
@media (max-width: 560px) {
  .price-pill { flex-wrap: wrap; row-gap: 2px; padding: 14px 20px; font-size: 14px; max-width: 100%; }
  .price-pill strong { font-size: 24px; }
}

/* Buttons: wrapped text stays centred; hero/CTA buttons go full-width on phones */
.btn { text-align: center; }
@media (max-width: 560px) { .ctas .btn { width: 100%; justify-content: center; } }

/* Tables with up to three columns fit the phone width instead of scrolling; wider tables keep the scroll above */
@media (max-width: 760px) {
  main table:not(:has(tr > :nth-child(4))), article table:not(:has(tr > :nth-child(4))) {
    display: table; width: 100%; table-layout: fixed; overflow-wrap: anywhere; }
  main table:not(:has(tr > :nth-child(4))) td:first-child, article table:not(:has(tr > :nth-child(4))) td:first-child { white-space: normal; }
  main table:not(:has(tr > :nth-child(3))) td:first-child, article table:not(:has(tr > :nth-child(3))) td:first-child { width: 36%; }
  main table th, main table td, article table th, article table td { padding: 10px 10px; font-size: 13px; }
}

/* WhatsApp float: same compact size on small phones everywhere (stays on the left on RTL pages) */
@media (max-width: 480px) {
  .wa-float { width: 48px; height: 48px; bottom: 16px; }
  .wa-float svg { width: 26px; height: 26px; }
  html:not([dir="rtl"]) .wa-float { right: 16px; }
  html[dir="rtl"] .wa-float { left: 16px; right: auto; }
}

/* EU / Latvia flags */
.flag-strip { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 2px 0 20px; padding: 8px 16px 8px 10px; background: #fff; border: 1px solid rgba(0,51,153,0.18); border-radius: 14px; box-shadow: 0 2px 8px rgba(14,42,71,0.06); font-size: 15px; color: #3A4652; }
.flag-strip img { display: block; border-radius: 3px; box-shadow: 0 0 0 1px rgba(14,42,71,0.12), 0 2px 6px -2px rgba(14,42,71,0.3); }
.flag-strip .fs-lv { width: 36px; height: 18px; }
.flag-strip .fs-eu { width: 33px; height: 22px; }
.flag-strip span { margin-inline-start: 4px; }
.flag-strip b { color: #003399; }
.eu-note { display: flex; align-items: flex-start; gap: 10px; font-size: 12px; line-height: 1.55; color: rgba(255,255,255,0.62); margin: 0 0 16px; font-style: normal; }
.eu-note img { flex: none; margin-top: 2px; border-radius: 2px; }

@media (max-width: 560px) { .flag-strip { flex-wrap: nowrap; align-items: center; font-size: 13px; line-height: 1.4; padding: 8px 12px 8px 10px; gap: 8px; } .flag-strip span { flex: 1; min-width: 0; } .flag-strip .fs-lv { width: 28px; height: 14px; } .flag-strip .fs-eu { width: 26px; height: 17px; } }

/* Active nav item */
.nav-links a.active { color: var(--sea-deep) !important; font-weight: 700; }

/* ===== Conversion round, October 2026 ===== */

/* Risk-reversal chips under hero CTAs */
.risk-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; list-style: none; padding: 0; }
.risk-chips li { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--navy, #0E2A47); background: #fff; border: 1px solid rgba(62,155,107,0.35); border-radius: 999px; padding: 7px 12px 7px 8px; box-shadow: var(--shadow-sm); line-height: 1.2; margin: 0; }
.risk-chips li::before { content: "\2713"; width: 18px; height: 18px; border-radius: 50%; background: #E5F4EA; color: #2C7A52; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; flex: none; }
html[dir="rtl"] .risk-chips li { padding: 7px 8px 7px 12px; }
.doc-header .ctas { margin-bottom: 14px; }

/* Mobile sticky contact bar (<=760px): WhatsApp + Book a call. Hides the floating bubble and pads the page so nothing is covered. */
.sticky-bar { display: none; }
@media (max-width: 760px) {
  .sticky-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 120; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); background: rgba(252,251,248,0.96); backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px); border-top: 1px solid rgba(216,220,225,0.8); box-shadow: 0 -8px 24px -12px rgba(14,42,71,0.25); }
  .sticky-bar a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 10px; border-radius: 999px; font-weight: 700; font-size: 14.5px; text-decoration: none !important; white-space: nowrap; color: #fff !important; }
  .sticky-bar .sb-wa { background: #25D366; }
  .sticky-bar .sb-call { background: linear-gradient(135deg, var(--sea) 0%, var(--sea-deep) 100%); }
  .sticky-bar svg { width: 18px; height: 18px; fill: #fff; flex: none; }
  .wa-float { display: none !important; }
  body { padding-bottom: 78px; }
}
@media (max-width: 360px) { .sticky-bar a { font-size: 13.5px; } }
