:root {
  --pp-blue: #2563EB;
  --pp-text: #1F2937;
  --pp-muted: #6B7280;
  --pp-bg: #FFFFFF;
  --pp-bg-soft: #F9FAFB;
  --pp-border: #E5E7EB;
  --line: var(--pp-border);
  --ink: var(--pp-text);
  --muted: var(--pp-muted);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--pp-bg);
  color: var(--ink);
  line-height: 1.5;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.header.compact .header-inner {
  padding: 0.5rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.brand {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--pp-text);
  text-decoration: none;
}

.brand-logo {
  height: 28px !important;
  max-height: 28px !important;
  width: 180px !important;
  max-width: 180px !important;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

html[lang="ar"] .logo-ar { display: block !important; }
html[lang="ar"] .logo-en { display: none !important; }

html[lang="en"] .logo-en { display: block !important; }
html[lang="en"] .logo-ar { display: none !important; }

@media (max-width: 640px) {
  .brand-logo {
    height: 24px !important;
    width: 160px !important;
  }
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.nav a {
  text-decoration: none;
  color: var(--pp-text);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  font-size: 0.95rem;
}

.nav a.active {
  background: transparent;
  border-color: #bfdbfe;
  color: var(--pp-blue);
  font-weight: 700;
}



.hero {
  padding: 2.2rem 0 1.3rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
}

.hero p {
  color: var(--muted);
  font-size: 1.03rem;
}

.btn {
  display: inline-block;
  text-decoration: none;
  border: 1px solid var(--pp-blue);
  border-radius: 12px;
  padding: 0.62rem 1rem;
  color: var(--pp-blue);
}

.btn-primary {
  background: var(--pp-blue);
  border-color: var(--pp-blue);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  border-color: var(--pp-blue);
  color: var(--pp-blue);
}

.btn:hover {
  border-color: #1d4ed8;
  color: #1d4ed8;
}

.btn-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

.hero-cta {
  font-weight: 700;
}

.hero-benefits {
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
  color: var(--ink);
}

.hero-benefits li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.98rem;
}

.hero-benefits li::before {
  content: "•";
  color: var(--pp-blue);
  font-weight: 700;
}

.card-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  margin: 1rem 0;
}

.card {
  padding: 1rem;
}

.card h2,
.card h3 {
  margin-top: 0;
}

.card-desc {
  color: var(--muted);
  margin-top: 0.3rem;
}

.page-main {
  padding: 1.1rem 0 2rem;
}

.landing-page {
  padding-top: 1.3rem;
}

.landing-section+.landing-section {
  margin-top: 1.1rem;
  position: relative;
}

.landing-section+.landing-section::before {
  content: "";
  display: block;
  height: 1px;
  background: var(--line);
  margin-bottom: 1rem;
}

.section-kicker {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  color: var(--muted);
}

.quick-example-block {
  background-color: var(--pp-bg-soft);
  border: 1px solid var(--pp-border);
  min-height: 180px;
}

.quick-example-block h2 {
  margin-top: 0;
}

.quick-example-text {
  margin: 0;
  color: var(--ink);
  white-space: pre-line;
  line-height: 1.6;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.auth-card {
  max-width: 680px;
}

.login-page {
  padding-block: 2rem 2.5rem;
}

.login-card {
  background: var(--pp-bg-soft);
}

.login-card-head {
  margin-bottom: 0.75rem;
}

.login-card-logo {
  width: 180px !important;
  height: 32px !important;
  max-width: 180px !important;
  max-height: 32px !important;
  object-fit: contain;
  display: block;
}

.auth-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field input {
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  font: inherit;
}

.auth-form-actions {
  align-items: center;
}

.auth-error {
  min-height: 1.2rem;
}

.auth-success {
  border: 1px solid #d1fae5;
  background: #f0fdf4;
  border-radius: 10px;
  padding: 0.75rem;
  display: grid;
  gap: 0.5rem;
}

.login-status {
  min-height: 1.2rem;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.ok-note {
  color: #1f7a4f;
}

.warn-note {
  color: #8e6200;
}

@media (max-width: 640px) {
  .login-card-logo {
    width: 160px !important;
    height: 28px !important;
    max-width: 160px !important;
    max-height: 28px !important;
  }
}

.level-pill {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.notice {
  color: var(--warn);
  background: #fff7e3;
  border: 1px solid #f0ddad;
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  margin-top: 0.8rem;
}

.footer {
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  padding: 1rem 0 1.5rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.footer a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dashed var(--line);
}

.hero {
  background: #fff;
}

.hero-example {
  margin: 0.65rem 0 0.9rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--pp-bg-soft);
  color: var(--ink);
  font-size: 0.98rem;
}

.hero-trust {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.flow-grid {
  margin: 0;
}

.flow-card {
  position: relative;
  padding-top: 1.2rem;
}

.flow-step {
  position: absolute;
  top: 0.55rem;
  inset-inline-end: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: var(--pp-bg-soft);
  border: 1px solid #bfdbfe;
  color: var(--pp-blue);
  font-weight: 700;
  font-size: 0.88rem;
}

.list {
  margin: 0;
  padding-inline-start: 1.25rem;
}

@media (min-width: 860px) {
  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* -------------------------------------------------------
   Global Header Mobile Navigation
------------------------------------------------------- */
/* Hide toggle on desktop */
.nav-toggle {
  display: none;
}

@media (max-width: 759px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.4rem;
    color: var(--ink);
    cursor: pointer;
  }

  .nav {
    display: none;
    /* Hidden by default */
  }

  /* When the nav is open via JS */
  .nav.is-open {
    display: flex;
    position: absolute;
    top: 100%;
    inset-inline-start: 0;
    inset-inline-end: 0;
    flex-direction: column;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 1rem;
    gap: 0.5rem;
    box-shadow: none;
  }

  .nav.is-open a {
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    padding: 0.8rem 0.5rem;
    font-size: 1.05rem;
  }

  .nav.is-open a:last-child {
    border-bottom: none;
  }

  /* Make brand and actions stack vertically if needed */
  .header-inner {
    flex-wrap: wrap;
  }
}
/* --- About Page Styles --- */
.page-main-full {
  padding: 0;
}

.about-container {
  max-width: 700px;
  margin: 0 auto;
}

.about-section {
  padding: 4.5rem 0;
}

.bg-soft {
  background-color: var(--pp-bg-soft);
}

.about-hero {
  text-align: center;
  padding: 5rem 0 3.5rem;
}

.about-hero h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.25;
  margin-bottom: 1.25rem;
  color: var(--pp-text);
  letter-spacing: -0.02em;
}

.about-hero p {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  color: var(--muted);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.about-cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 2.5rem;
}

.about-card {
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.about-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 8px 24px rgba(37,99,235,0.06);
  transform: translateY(-2px);
}

.about-card-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  max-width: 28px;
  max-height: 28px;
  margin-bottom: 1.25rem;
  color: var(--pp-text);
  flex-shrink: 0;
  display: block;
}

.about-card-icon-blue {
  color: var(--pp-blue);
}

.about-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  color: var(--pp-text);
  font-weight: 700;
}

.about-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.about-philosophy-section {
  padding: 2.5rem 0;
}

.about-philosophy {
  background: var(--pp-bg-soft);
  border-radius: 24px;
  padding: 4rem 2.5rem;
}

.about-section h2, .about-philosophy h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--pp-text);
  letter-spacing: -0.01em;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 2.5rem 0;
}

.about-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  font-weight: 600;
  color: var(--pp-text);
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
  transition: all 0.2s ease;
}

.about-grid-item:hover {
  border-color: #bfdbfe;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37,99,235,0.05);
}

.about-grid-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  max-width: 28px;
  max-height: 28px;
  color: var(--pp-muted);
  flex-shrink: 0;
  display: block;
}

.about-behind {
  line-height: 1.8;
  color: var(--pp-text);
  font-size: 1.05rem;
  padding: 1.75rem 2rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  margin-top: 1.5rem;
}

.about-cta {
  text-align: center;
  padding: 5rem 0;
  border-top: 1px solid var(--line);
}

.about-quote {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 700;
  color: var(--pp-text);
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-inline: auto;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

@media (max-width: 640px) {
  .about-section {
    padding: 3rem 0;
  }
  .about-hero {
    padding: 3rem 0;
  }
  .about-philosophy {
    padding: 2.5rem 1.5rem;
    border-radius: 16px;
  }
  .about-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-behind {
    padding: 1.5rem;
  }
}

/* --- Floating Action Button (FAB) --- */
.fab {
  position: fixed;
  bottom: 2rem;
  inset-inline-end: 2rem;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--pp-blue);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 2px solid #fff;
}

.fab:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
  color: #fff;
}

.fab-icon {
  width: 20px;
  height: 20px;
}

@media (max-width: 640px) {
  .fab {
    bottom: 1.5rem;
    inset-inline-end: 1.5rem;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
}

/* Language Selector Component */
.lang-selector {
  position: relative;
  user-select: none;
}

.lang-selector-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  color: var(--ink);
  font-size: 0.95rem;
}

.lang-selector-trigger:hover {
  background: #fff;
  border-color: var(--pp-blue);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.lang-selector-trigger .chevron {
  width: 14px;
  height: 14px;
  opacity: 0.5;
  transition: transform 0.2s ease;
}

.lang-selector.is-open .lang-selector-trigger .chevron {
  transform: rotate(180deg);
}

.lang-popover {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  min-width: 160px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  display: none;
  flex-direction: column;
  padding: 6px;
  z-index: 10000;
  animation: popover-fade-in 0.2s ease-out;
}

.lang-selector.is-open .lang-popover {
  display: flex;
}

.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 0.95rem;
  color: var(--ink);
}

.lang-option:hover {
  background: var(--pp-bg-soft);
}

.lang-option.active {
  background: rgba(37, 99, 235, 0.05);
  color: var(--pp-blue);
  font-weight: 600;
}

.lang-option .check {
  width: 16px;
  height: 16px;
  opacity: 0;
}

.lang-option.active .check {
  opacity: 1;
}

@keyframes popover-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}



/* 3D Axial Globe Animation */
@keyframes globe-axial-spin {
  from { transform: translateX(0); }
  to { transform: translateX(-30px); } /* Matches the continent path repeat pattern */
}

.globe-3d {
  flex-shrink: 0;
  color: var(--muted);
  transition: all 0.3s ease;
}

.globe-continents-group {
  animation: globe-axial-spin 12s linear infinite;
}

.lang-selector-trigger:hover .globe-3d {
  color: var(--pp-blue);
  transform: scale(1.1);
}

.lang-selector-trigger:hover .globe-continents-group {
  animation-duration: 4s; /* Spin faster on hover */
}
