/* ==========================================================================
   TPA Funnel — Global (mobile-first)
   ========================================================================== */

:root {
  --navy: #262262;
  --navy-deep: #1a1a4e;
  --blue: #3675f8;
  --gold: #e8a923;
  --white: #ffffff;
  --light-gray: #f8fafc;
  --border: #e2e8f0;
  --text-dark: #262262;
  --text-mid: #333333;
  --text-gray: #64748b;
  --text-light: #94a3b8;
  --font-heading: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  --gradient-brand: linear-gradient(90deg, #3675f8 0%, #262262 100%);
  --gradient-hero: linear-gradient(135deg, #262262 0%, #1a1a4e 55%, #0f172a 100%);
  --radius: 10px;
  --shadow: 0 8px 32px rgba(38, 34, 98, 0.1);
  --shadow-lg: 0 16px 48px rgba(38, 34, 98, 0.14);
  --tap-min: 44px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-mid);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  color: var(--text-dark);
  line-height: 1.25;
  margin: 0 0 0.75rem;
  font-weight: 700;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }

p {
  margin: 0 0 1rem;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tpa-container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Logo */
.tpa-logo {
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--white);
	text-decoration: none;
	white-space: nowrap;
}

.tpa-logo--image {
	display: inline-flex;
	align-items: center;
}

.tpa-logo--image img {
	display: block;
	width: 196px;
	max-width: 100%;
	height: auto;
	max-height: none;
}

.tpa-header .tpa-logo--image img {
	width: 196px;
}

.tpa-logo:hover {
	text-decoration: none;
	opacity: 0.92;
}

.tpa-logo__pro {
	color: var(--blue);
}

.tpa-logo--footer {
	color: var(--text-dark);
}

.tpa-logo--footer.tpa-logo--image img {
	width: 224px;
	max-width: 100%;
	max-height: none;
}

/* Buttons */
.tpa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-min);
  padding: 0.85rem 1.5rem;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.tpa-btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.tpa-btn--primary {
  background: var(--gradient-brand);
  color: var(--white);
}

.tpa-btn--primary:hover {
  color: var(--white);
  filter: brightness(1.05);
}

.tpa-btn--gold {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 4px 20px rgba(232, 169, 35, 0.35);
}

.tpa-btn--gold:hover {
  background: #d4981a;
  color: var(--navy);
}

.tpa-btn--lg {
  padding: 1rem 1.75rem;
  font-size: 1rem;
}

.tpa-btn--outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.35);
}

.tpa-btn--outline:hover {
  border-color: var(--white);
  color: var(--white);
}

.tpa-btn--block {
  width: 100%;
}

.tpa-btn--muted {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid var(--border);
}

.tpa-btn--muted:hover {
  background: #e2e8f0;
  color: var(--text-dark);
  filter: none;
}

/* Header */
.tpa-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 4px 20px rgba(38, 34, 98, 0.15);
}

.tpa-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 68px;
	padding-top: 0.5rem;
	padding-bottom: 0.5rem;
}

body:not(.tpa-funnel-landing) .tpa-header__inner {
	justify-content: center;
	position: relative;
}

.tpa-header__actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.75rem;
	flex-shrink: 0;
}

body:not(.tpa-funnel-landing) .tpa-header__actions {
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
}

.tpa-header__lang {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.35rem;
}

.tpa-header__lang-sep {
	color: rgba(255, 255, 255, 0.45);
	font-size: 0.8125rem;
	line-height: 1;
}

.tpa-header__lang-current {
	color: rgba(255, 255, 255, 0.92);
	font-family: 'Poppins', sans-serif;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.3;
	white-space: nowrap;
}

.tpa-header__lang-link {
	color: var(--gold);
	font-family: 'Poppins', sans-serif;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	white-space: nowrap;
}

.tpa-header__lang-link:hover,
.tpa-header__lang-link:focus-visible {
	color: var(--white);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.tpa-header__cta {
	width: auto;
	flex-shrink: 0;
	white-space: nowrap;
	font-size: 0.9375rem;
	font-weight: 700;
	padding: 0.75rem 1.25rem;
	box-shadow: 0 4px 16px rgba(232, 169, 35, 0.45);
	border: 2px solid rgba(255, 255, 255, 0.2);
}

.tpa-header__cta:hover {
	box-shadow: 0 6px 22px rgba(232, 169, 35, 0.55);
	transform: translateY(-2px);
}

.tpa-nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: var(--tap-min);
  height: var(--tap-min);
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.tpa-nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  margin: 0 auto;
  transition: transform 0.2s;
}

.tpa-nav {
  display: none;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--navy);
  padding: 1rem 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tpa-nav.is-open {
  display: block;
}

.tpa-nav__list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.tpa-nav__list a {
  display: block;
  min-height: var(--tap-min);
  line-height: var(--tap-min);
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  text-decoration: none;
}

.tpa-nav__list a:hover {
  color: var(--white);
  text-decoration: none;
}

/* Footer */
.tpa-footer {
  background: var(--light-gray);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.tpa-footer__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
	text-align: center;
	padding: 0.5rem 0;
}

.tpa-footer__tagline {
	margin: 0.75rem 0 0;
	font-size: 0.875rem;
	color: var(--text-gray);
	max-width: 360px;
	line-height: 1.5;
}

.tpa-footer__copy {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-light);
}

/* Sticky mobile CTA (landing) */
.tpa-sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 24px rgba(38, 34, 98, 0.12);
  transform: translateY(110%);
  transition: transform 0.25s ease;
}

.tpa-sticky-cta.is-visible {
  transform: translateY(0);
}

.tpa-sticky-cta .tpa-btn {
  width: 100%;
}

@media (min-width: 768px) {
  .tpa-sticky-cta {
    display: none;
  }
}

/* Shared section utilities */
.tpa-section {
  padding: 3rem 0;
}

.tpa-section--gray {
  background: var(--light-gray);
}

.tpa-section--navy {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.88);
}

.tpa-section--navy h1,
.tpa-section--navy h2,
.tpa-section--navy h3 {
  color: var(--white);
}

.tpa-tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.75rem;
}

.tpa-section--navy .tpa-tag {
  color: var(--gold);
}

.tpa-checklist li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.625rem;
  color: var(--text-mid);
}

.tpa-checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--blue);
  font-weight: 700;
}

.tpa-pill-badge {
  display: inline-block;
  background: rgba(232, 169, 35, 0.12);
  color: var(--gold);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(232, 169, 35, 0.45);
}

/* Desktop */
@media (min-width: 768px) {
  body {
    font-size: 15px;
  }

  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.875rem; }

  .tpa-header .tpa-logo--image img {
    width: 210px;
  }

  .tpa-logo--footer.tpa-logo--image img {
    width: 238px;
  }

  .tpa-nav-toggle {
    display: none;
  }

  .tpa-nav {
    display: flex;
    position: static;
    align-items: center;
    gap: 1.5rem;
    padding: 0;
    border: none;
    background: transparent;
  }

  .tpa-nav__list {
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 0;
  }

  .tpa-nav__list a {
    min-height: auto;
    line-height: 1.4;
  }

  .tpa-header__cta {
    font-size: 1rem;
    padding: 0.8rem 1.5rem;
  }

  .tpa-footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }

  .tpa-footer__brand {
    max-width: 420px;
  }
}

@media (max-width: 480px) {
  .tpa-header .tpa-logo--image img {
    width: 140px;
  }

  .tpa-header__cta {
    font-size: 0.875rem;
    padding: 0.65rem 1rem;
  }
}

/* RTL (Arabic markets) */
html[dir="rtl"] body.tpa-funnel-page {
  --font-heading: 'Noto Sans Arabic', 'Montserrat', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Noto Sans Arabic', 'Poppins', 'Segoe UI', system-ui, sans-serif;
}

html[dir="rtl"] .tpa-checklist li,
html[dir="rtl"] .funnel-reasons li {
  padding-left: 0;
  padding-right: 1.5rem;
}

html[dir="rtl"] .tpa-checklist li::before,
html[dir="rtl"] .funnel-reasons li::before {
  left: auto;
  right: 0;
  margin-left: 0;
  margin-right: 0;
}

html[dir="rtl"] .quiz-nav {
  flex-direction: row-reverse;
}

html[dir="rtl"] .funnel-split--book {
  direction: rtl;
}

html[dir="rtl"] .funnel-split--book > * {
  direction: rtl;
}

html[dir="rtl"] .tpa-footer__inner {
  text-align: right;
}

@media (min-width: 768px) {
  html[dir="rtl"] .tpa-footer__inner {
    text-align: right;
  }
}
