
/* Root Variables */
:root {
    --primary: #C0A8D8;
    --secondary: #ecc47d;
    --primary-dark: #fdf1ff;
    --secondary-dark: #eece97;
    --foreground: hsl(291, 100%, 18%);
    --muted: #3f2843;
    --border: rgba(0, 0, 0, 0.1);
    --white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-900: #1a1a1a;
    --radius: 0.625rem;
    --transition: all 0.3s ease;
    --clr-focus-ring:       #4E005C;    /* AAA focus indicator — ~13:1 on white */
     /* ── Primary Purple Palette ── */
    --clr-primary-darkest: #4E005C;    /* text, headings */
    --clr-primary-dark:    #6B3FA0;    /* SVG strokes, deep accents */
    --clr-primary-light:   #C0A8D8;    /* borders, tags, secondary buttons */
    --clr-primary-lighter: #EDE0F5;    /* card borders, light backgrounds */
    --clr-primary-bg:      #f0e6f8;    /* page tint, very light bg */

    /* ── Gradients ── */
    --grad-btn:     linear-gradient(135deg, #917ACC, #ecc47d);
    --grad-cta:     linear-gradient(135deg, #af9edc, #7a5ec4);
    --grad-nav:     linear-gradient(159deg, #c0a8d8, #917acc);
    --grad-card-bg: linear-gradient(135deg, #dcc8ea, #ede0f5);

    /* ── Neutrals ── */
    --clr-white:    #ffffff;

    /* ── Chatbox variables ── */
    --clr-primary-mid:     #7a5ec4;
    --clr-primary-soft:    #af9edc;
    --clr-visitor-bg:      #f0e9f9;
    --clr-input-bg:        #fcf7ff;
    --clr-input-border:    #d4c5e2;
    --clr-cancel-border:   #d4c0e8;
}


/* WCAG 2.2 AAA Focus Appearance (2.4.12) */
*:focus-visible {
    outline: 3px solid var(--clr-focus-ring);
    outline-offset: 3px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
font-family: 'Cal Sans', sans-serif;    color: var(--foreground);
    min-height: 100vh;
    background:  var(--clr-white) ;
    background-repeat: no-repeat;
    background-attachment: fixed;

    line-height: 1.6;
    overflow-x: hidden;
}

@font-face {
    font-family: 'Saudi';
  src: url('/static/fonts/The year of handicrafts /TheYearofHandicrafts-Medium.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Saudi';
  src: url('/static/fonts/The year of handicrafts /TheYearofHandicrafts-Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}
h1, h2, h3, h4, h5, h6 {
    font-family: 'Saudi', serif;
}

html[lang="ar"],
html[lang="ar"] body,
html[lang="ar"] body * {
    font-family: 'Saudi', sans-serif !important;
}

html[lang="en"] h1,
html[lang="en"] h2,
html[lang="en"] h3,
html[lang="en"] h4,
html[lang="en"] h5,
html[lang="en"] h6,
html[lang="en"] body h1,
html[lang="en"] body h2,
html[lang="en"] body h3,
html[lang="en"] body h4,
html[lang="en"] body h5,
html[lang="en"] body h6 {
    font-family: 'Saudi', serif;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navigation */
nav:not(.navbar) {
    background: linear-gradient(135deg,#fffaf0 0% ,#fdf1ff 100%);
    border-radius: 9999px;
    padding: 5px 6px;
    display: flex;
    gap: 6px;
    flex: 0.8;
}

nav:not(.navbar) a {
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    color: #6b4f84;
    padding: 11px 20px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s ease;
    white-space: nowrap;
    flex: 0.9;
}

nav:not(.navbar) a:hover { background: rgba(192,168,216,0.4); }

nav:not(.navbar) a.active {
    background: linear-gradient(159deg, #d8c7ea 0%, #b7a0dc 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(145,122,204,0.24);
}

/* Top Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: linear-gradient(135deg,#fffaf0 0% ,#fdf1ff 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    position: relative;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

.nav-logo-link {
    display: inline-flex;
    align-items: center;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-title {
    font-size: 1.05rem;
    color: var(--foreground);
}

.brand-subtitle {
    font-size: 0.8rem;
    color: var(--muted);
}

.logo-img {
    width: 120px;
    height: 60px;
    object-fit: contain;
    cursor: pointer;
    transition: var(--transition);
}

.logo-img:hover {
    animation: wiggle 0.5s ease;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
    75% { transform: rotate(-10deg); }
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex: 1;
    animation: fadeIn 0.5s ease 0.3s backwards;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    flex-shrink: 0;
}
.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--clr-primary, #8a4ab8);
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}
.mobile-menu-btn.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-actions .btn {
    white-space: nowrap;
}

.nav-link {
    color: var(--foreground);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link:hover::after {
    width: 100%;
}


/* Tooltip */
.tooltip {
  position: absolute;
  top: 120%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  padding: 16px;
  background: white;
  color: var(--clr-primary-darkest);
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(145, 122, 204, 0.3);
  opacity: 0;
  visibility: hidden;
    z-index: 1200;
    pointer-events: none;
  transition: all 0.3s ease;
}
.tooltip .tooltip-header {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.tooltip .tooltip-header h3 {
  font-weight: 900;
  font-size: 18px;
  margin: 0;
  color: var(--clr-primary-darkest);
}
.tooltip .tooltip-header p {
  font-size: 14px;
  margin: 0;
  color: #3a2050;
}
.tooltip .right-sec {
  text-align: right;
}
.tooltip .left-sec {
  display: flex;  align-items: center;
  justify-content: center;
}

/* Language Tooltip */
.lang-tooltip {
  width: 220px;
  padding: 16px;
  text-align: center;
}
.lang-tooltip .lang-tooltip-header h3 {
  font-weight: 900;
  font-size: 17px;
  margin: 0 0 4px;
  color: var(--clr-primary-darkest);
}
.lang-tooltip .lang-tooltip-header p {
  font-size: 14px;
  color: #5a4070;
  margin: 0 0 10px;
}
.lang-btns {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.lang-btn {
  flex: 1;
  padding: 8px 0;
  border-radius: 60px;
  font-weight: 900;
  font-size: 15px;
  text-decoration: none;
  text-align: center;
 border:1.5px solid var(--primary);
  color: var(--clr-primary-darkest);
  background: var(--clr-white);
  transition: all 0.25s ease;
}
.lang-btn.active {
  background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(192, 168, 216, 0.3);
}
.lang-btn:hover:not(.active) {
  background: var(--clr-primary-lighter);
}

/* Show state */
.tooltip.show {
  opacity: 1;
  visibility: visible;
    pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Arrow */
.tooltip::after {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);

  border-width: 10px;
  border-style: solid;
  border-color: transparent transparent white transparent;
}
.icon-wrapper {
  position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  z-index: 10;
}

.lang-switcher-wrap {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left: 0;
}

.lang-icon {
    width: 24px;
    height: 24px;
    display: block;
}

html[dir="rtl"] .lang-switcher-wrap {
    margin-right: 0;
}

/* In RTL the flex-start side is the RIGHT (near the logo).
   flex-end = LEFT side, which is where the actions should go. */
[dir="rtl"] .nav-menu {
    justify-content: flex-end;
}

html[dir="rtl"] .icon-wrapper .lang-tooltip {
    left: 50%;
    right: auto;
    transform: translateX(-50%) translateY(10px);
}

html[dir="rtl"] .icon-wrapper .lang-tooltip.show {
    transform: translateX(-50%) translateY(0);
}

html[dir="rtl"] .icon-wrapper .lang-tooltip::after {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
}

.hero-icons-corner {
  position: absolute;
  top: 16px;
  right: 20px;
  display: flex;
  gap: 10px;
  align-items: center;
  z-index: 10;
}
   

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--foreground);
    box-shadow: 0 4px 14px rgba(145, 122, 204, 0.35);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 28px rgba(145, 122, 204, 0.5);
}

.btn-primary:active {
    transform: scale(0.95);
}

.btn-secondary {
    background: var(--secondary);
    color: hsl(38,100%, 18%);
}

.btn-secondary:hover {
    transform: scale(1.05);
    background: var(--secondary-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--foreground);
}

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

.btn-white:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 32px rgba(255, 255, 255, 0.3);
}

.btn-outline-white {
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-outline-white:hover {
    background: var(--white);
    color: var(--primary);
}

/* Hero Section */
.hero-section {
    padding: 6rem 0 5rem;
    margin-top: 20px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(236, 196, 125, 0.2);
    border-radius: 9999px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.badge-icon {
    color: var(--primary);
}

.hero-title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.3;
}

.gradient-text {
    font-size: clamp(3rem, 8vw, 8rem);
    line-height: 1.3;
    margin-bottom: 1.5rem;
    padding-bottom: 0.15em;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


.hero-description {
    font-size: 1.25rem;
    color: var(--muted);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--muted);
}

.stat-item svg {
    color: var(--primary);
}

.hero-image {
    position: relative;
}

.image-glow {
    position: absolute;
    inset: -1rem;
    background: linear-gradient(135deg, rgba(192, 168, 216, 0.2), rgba(236, 196, 125, 0.15));
    border-radius: 1.5rem;
    filter: blur(48px);
    z-index: -1;
}

.hero-img-container {
    position: relative;
    animation: float-left 3s ease-in-out infinite;
}

.hero-img-container img {
    width: 90%;
    height: auto;
    display: block;
}

.floating-element {
    position: absolute;
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.float-1 {
    top: -1.5rem;
    right: -1.5rem;
    background: var(--secondary);
    color: hsl(38,100%, 18%);
    animation: float 3s ease-in-out infinite;
}

.float-2 {
    bottom: -1.5rem;
    left: -1.5rem;
    background: var(--primary);
    color: var(--white);
    animation: float 3s ease-in-out infinite 0.5s;
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.animate-slide-in {
    animation: slideIn 0.8s ease 0.3s backwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(50px) rotate(-5deg) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateX(0) rotate(0deg) scale(1);
    }
}

/* Sections */

.features-section,
.platform-section {
    padding: 5rem 0;
     margin-top: 20px;
    
}

.how-it-works-section,
.demo-section {
     margin-top: 20px;
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 4rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    padding-bottom: 0.15em;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    font-size: 1.25rem;
    color: var(--muted);
    max-width: 42rem;
    margin: 0 auto;
}

/* Features Grid */
.right-feature-sec {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: center;
    margin-top: 5rem;
    direction: ltr;
}

.left-feature-sec {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: center;
    margin-top: 5rem;
    direction: rtl; /* flips order */
}

.left-feature-sec > * {
    direction: ltr; /* keep text normal */
}
.feature-image.animate-slide-in{
    position: relative;
    animation: slideIn 0.8s ease 0.3s backwards;
    
}

.animate-on-scroll .feature-image.animate-slide-in {
    opacity: 0;
    transform: translateX(50px) rotate(-5deg) scale(0.8);
    animation: none;
}

.animate-on-scroll.visible .feature-image.animate-slide-in {
    animation: slideIn 0.8s ease 0.2s forwards;
}

.animate-on-scroll .feature-content.animate-fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: none;
}

.animate-on-scroll.visible .feature-content.animate-fade-in {
    animation: fadeIn 0.8s ease 0.35s forwards;
}


.feature-content h3 {
    font-size: clamp(1.5rem, 4vw, 4rem);
    font-family: 'Cal Sans', sans-serif;
    margin-bottom: 0.75rem;
    text-align: center;
    overflow-wrap: break-word;
}

.feature-content p {
    color: var(--muted);
     text-align: center;
}

/* How It Works */
.how-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.how-image {
    position: relative;
}

.how-image img {
    width: 100%;
    border-radius: 1rem;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
}

.how-steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.step {
    display: flex;
    gap: 1rem;
}

.step-number {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 1.25rem;
}

.step-content h3 {
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--muted);
}

/* Demo Section */
.demo-grid {
    display: grid;
    grid-template-columns: 0.7fr 1.3fr;
    gap: 3rem;
    align-items: center;
    /* align-items: stretch; */
}

.demo-nira {
    position: relative;
    /* height: 100%; */
}


.demo-counter {
    display: flex;
    /* align-items: stretch;  */
    align-items: center;
    justify-content: center;
    height: 100%;
}

.counter-card {
    /* height: 100%;  */
    /* Ensure the card fills the height */
    flex-direction: column;   /* IMPORTANT */
    justify-content: space-between; /* spreads content nicely */
    align-items: stretch; 
    display: flex;
    /* align-items: center; */
    justify-content: center;
    padding: 1rem; */
    /* background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}


.nira-animation {
    position: relative;
    animation: float 4s ease-in-out infinite;
}

.nira-glow {
    position: absolute;
    inset: -2rem;
    background: linear-gradient(135deg, rgba(192, 168, 216, 0.3), rgba(236, 196, 125, 0.2));
    border-radius: 50%;
    filter: blur(64px);
    z-index: -1;
}

.nira-mascot {
    width: 100%;
    max-width: 200px;
    /* width: auto; */
    margin: 0 auto;
    display: block;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.2));
}

/* Counter Card */
.counter-card {
    background: var(--white);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(192, 168, 216, 0.2);
}

.counter-card h3 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.counter-subtitle {
    text-align: center;
    color: var(--muted);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}
.counter-display {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    /* margin-bottom: 1.5rem; */
}

/* Soroban Abacus Styles */
.soroban-container {
    background:  linear-gradient(135deg,rgba(255, 248, 236, 1) 0% ,rgba(253, 241, 255, 1) 100%);
    border: 4px var(--primary);
    border-radius: 1rem;
    padding: 1rem 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
}

.soroban-columns {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    position: relative;
    direction: ltr;
}

.soroban-column {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.soroban-rod {
    width: 3px;
    height: 280px;
    background: linear-gradient(to bottom, #2c2c2c, #1a1a1a);
    border-radius: 2px;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.5);
}

.soroban-bar {
    width: 100%;
    height: 3px;
    background: linear-gradient(to bottom, #1a1a1a, #2c2c2c);
    position: absolute;
    top: 90px;
    left: -100%;
    right: -100%;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.heaven-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 3;
    height: 70px;
    justify-content: flex-start;
    padding-top: 0.5rem;
}

.earth-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 3;
    height: 180px;
    justify-content: flex-end;
    padding-bottom: 0.5rem;
}

.soroban-bead {
    width: 32px;
    height: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 3;
}

.heaven-bead {
    background: linear-gradient(135deg, #9d86db, #b8a3e8);
    border: 2px solid var(--clr-primary-mid);
}

.earth-bead {
    background: linear-gradient(135deg, #f5d09b, #eece97);
    border: 2px solid #d4a055;
}

.soroban-bead:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.soroban-bead.active-heaven {
    transform: translateY(40px);
    background: linear-gradient(135deg, var(--clr-primary-mid), #9d86db);
}

.soroban-bead.active-earth {
    transform: translateY(-40px);
    background: linear-gradient(135deg, #d4a055, #ecc47d);
}

.heaven-bead.active {
    transform: translateY(40px);
    background: linear-gradient(135deg, var(--clr-primary-mid), #9d86db);
}

.earth-bead.active {
    transform: translateY(-40px);
    background: linear-gradient(135deg, #d4a055, #ecc47d);
}


.beads-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.counter-card .btn {
    display: block;
    margin: 0 auto;
}

/* Platform Cards */
.platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.platform-card {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    padding: 2rem;
    transition: var(--transition);
    cursor: pointer;
}

.platform-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.card-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 128px;
    height: 128px;
    border-radius: 50%;
    margin: -64px -64px 0 0;
    transition: var(--transition);
}

.platform-card:hover .card-bg {
    transform: scale(1.5);
}

.platform-training {
    background: linear-gradient(135deg, rgba(192, 168, 216, 0.1), rgba(192, 168, 216, 0.05));
}

.platform-training .card-bg {
    background: rgba(192, 168, 216, 0.1);
}

.platform-training .platform-icon {
    color: var(--primary);
}

.platform-home {
    background: linear-gradient(135deg, rgba(236, 196, 125, 0.2), rgba(236, 196, 125, 0.08));
}

.platform-home .card-bg {
    background: rgba(236, 196, 125, 0.15);
}

.platform-home .platform-icon {
    color: var(--foreground);
}

.platform-dashboard {
    background: linear-gradient(135deg, rgba(192, 168, 216, 0.1), rgba(236, 196, 125, 0.08));
}

.platform-dashboard .card-bg {
    background: linear-gradient(135deg, rgba(192, 168, 216, 0.1), rgba(236, 196, 125, 0.08));
}

.platform-dashboard .platform-icon {
    color: var(--primary);
}

@font-face {
    font-family: 'Hudhud';
    src: url('/static/fonts/RTL-AdamScript-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
.platform-icon {
    position: relative;
    z-index: 1;
    margin-bottom: 1rem;
}

.platform-card h3 {
    position: relative;
    z-index: 1;
    margin-bottom: 0.75rem;
}

.platform-card p {
    position: relative;
    z-index: 1;
    color: var(--muted);
}

/* CTA Section */
.cta-section {
    padding: 3rem 0;
    background:  linear-gradient(135deg,rgba(255, 248, 236, 1) 0% ,rgba(253, 241, 255, 1) 100%);
}

.cta-content {
    text-align: center;
}

.cta-content h2 {
    font-size: clamp(1.75rem, 4vw, 4rem);
    color: var(--clr-primary-darkest);
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.25rem;
    color: var(--clr-primary-darkest);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}
@keyframes slideAndAppear {
  0% {
    opacity: 0;
    transform: translateX(-50px); /* Starts 50px left */
  }
  100% {
    opacity: 1;
    transform: translateX(0); /* Slides to original spot */
  }
}

.text-element {
  animation: slideAndAppear 1s ease-out forwards;
}

/* Footer */
.footer {
    color: var(--gray-900);
    background: rgba(237, 224, 245, 0.55);
    padding: 3rem 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.footer-logo-icon svg {
    color: var(--white);
}

.footer-logo span {
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-col p {
    color: #9ca3a6;
}

.footer-col h4 {
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col ul li a {
    color: #9ca3a6;
    text-decoration: none;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--clr-primary-darkest);
}

.footer-bottom {
    border-top: 1px solid var(--clr-footer-border);
    padding-top: 2rem;
    text-align: center;
    color: var(--clr-footer-muted);
}


/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
    animation: scrollFallback 0s 1.5s forwards;
}


html[lang="ar"] .about-page,
html[lang="ar"] .about-page * {
  font-family: 'Saudi', sans-serif !important;
}

.about-page {
  direction: rtl;
  color: var(--clr-primary-darkest);
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 1.5rem 48px;
  display: none;
}

.about-section-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--clr-primary-darkest);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.about-section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 22px;
  border-radius: 4px;
  background: var(--grad-btn);
  flex-shrink: 0;
}

.about-team { margin-top: 40px; }
.about-team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.about-team-grid .about-team-card:last-child { grid-column: 2; }
.about-team-card {
  background: white;
  border: 1.5px solid var(--clr-primary-lighter);
  border-radius: 20px;
  padding: 28px 20px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(78,0,92,0.06);
  transition: transform 0.2s;
}
.about-team-card:hover { transform: translateY(-4px); }
.about-team-avatar {
  width: 100px; height: 100px; border-radius: 50%;
  background: #ffffff;
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 900; color: white;
  box-shadow: 0 4px 14px rgba(78,0,92,0.2);
  overflow: hidden;
}
.about-team-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.about-team-name { font-size: 16px; font-weight: 800; color: var(--clr-primary-darkest); }
.about-team-role { font-size: 12px; color: var(--clr-primary-darkest); margin-top: 4px; }
.about-team-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 14px;
 background:  linear-gradient(135deg,rgba(255, 248, 236, 1) 0% ,rgba(253, 241, 255, 1) 100%);
  border-radius: 20px;
  font-size: 12px; font-weight: 600; color: var(--clr-primary-dark);
}

@media (max-width: 1024px) {
  .about-values-list, .about-team-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .about-mission { flex-direction: column; }
}
@media (max-width: 480px) {
  .about-values-list, .about-team-grid { grid-template-columns: 1fr; }
  .about-team-card { width: 100%; max-width: 320px; margin: 0 auto; }
  .about-team-grid .about-team-card:last-child { grid-column: 1 !important; }
}

@keyframes scrollFallback {
    to { opacity: 1; transform: translateY(0); }
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
    animation: none;
}

/* Responsive Design */
@media (max-width: 968px) {
    .hero-grid,
    .how-grid,
    .demo-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .hero-image { order: -1; }
    .hero-img-container img { width: 70%; margin: 0 auto; display: block; }
    .float-1 { top: -0.5rem; right: 0; }
    .float-2 { bottom: -0.5rem; left: 0; }

    .nav-menu {
        display: none;
    }

    .nav-menu.active {
        display: flex;
        position: absolute;
        top: calc(100% + 10px);
        left: 1.25rem;
        right: 1.25rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.9rem;
        padding: 1rem;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid var(--border);
        border-radius: 16px;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
        z-index: 1200;
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 0.4rem;
    }

    .nav-link {
        padding: 0.45rem 0.25rem;
        border-radius: 8px;
    }

    .nav-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
    }

    .nav-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .lang-switcher-wrap {
        justify-content: center;
    }

    .floating-nira {
        bottom: 1rem;
        right: 1rem;
    }

    .nira-button {
        width: 64px;
        height: 64px;
    }

    .right-feature-sec,
    .left-feature-sec {
        grid-template-columns: 1fr;
        margin-top: 3rem;
    }

    .left-feature-sec {
        direction: ltr;
    }

    .left-feature-sec > * {
        direction: ltr;
    }
}

/* ============================================================
   MOBILE REDESIGN — ≤ 767px
   Fresh, modern, mobile-first layout for the hello/landing page
   All original content is preserved — only reorganised & restyled
   ============================================================ */
@media (max-width: 767px) {

    /* ── NAVBAR ───────────────────────────────────────────── */
    .navbar { padding: 0.55rem 0; }
    .logo-img { width: 90px; height: 46px; }

    /* ── HERO ─────────────────────────────────────────────── */
    .hero-section {
        padding: 5.5rem 0 2.5rem;
        background: linear-gradient(160deg, #f0e6f8 0%, #fff8ec 100%);
        border-radius: 0 0 2.5rem 2.5rem;
    }
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        text-align: center;
    }
    /* Show image first on mobile (above the text) */
    .hero-image {
        order: -1;
        display: flex;
        justify-content: center;
    }
    .hero-img-container {
        max-width: 200px;
        margin: 0 auto;
    }
    .hero-img-container img {
        width: 100%;
        filter: drop-shadow(0 8px 28px rgba(192, 168, 216, 0.4));
    }
    /* Hide decorative floating badges and glow — too cramped on phone */
    .floating-element { display: none; }
    .hero-image .image-glow { display: none; }

    .badge {
        background: rgba(192, 168, 216, 0.15);
        border: 1px solid rgba(192, 168, 216, 0.3);
        font-size: 0.8rem;
        padding: 0.4rem 0.9rem;
        margin-bottom: 0.6rem;
    }
    .hero-title { font-size: 1.65rem; line-height: 1.25; }
    .gradient-text {
        font-size: clamp(2rem, 14vw, 3.5rem);
        margin-bottom: 1rem;
    }

    /* Buttons stacked, full-width, thumb-friendly */
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }
    .hero-buttons .btn-lg {
        width: min(100%, 300px);
        justify-content: center;
        padding: 0.9rem 1.5rem;
        font-size: 1rem;
        box-shadow: 0 6px 20px rgba(192, 168, 216, 0.3);
    }

    /* Stats as pill chips */
    .hero-stats {
        justify-content: center;
        gap: 0.6rem;
        flex-wrap: wrap;
    }
    .stat-item {
        background: rgba(255, 255, 255, 0.75);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        border: 1px solid rgba(192, 168, 216, 0.25);
        border-radius: 9999px;
        padding: 0.3rem 0.85rem;
        font-size: 0.78rem;
    }

    /* ── SECTION SPACING ──────────────────────────────────── */
    .section-header { margin-bottom: 2rem; }
    .section-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
        margin-bottom: 0.75rem;
    }
    .features-section,
    .platform-section,
    .how-it-works-section,
    .demo-section { padding: 2.5rem 0; }

    /* ── FEATURES — fresh card style on mobile ─────────────── */
    .right-feature-sec,
    .left-feature-sec {
        grid-template-columns: 1fr;
        direction: rtl;
        gap: 1rem;
        margin-top: 1.5rem;
        background: linear-gradient(135deg, #f7f0fc 0%, #fff8ec 100%);
        border-radius: 1.5rem;
        padding: 1.5rem 1.25rem;
        border: 1.5px solid rgba(192, 168, 216, 0.3);
        box-shadow: 0 4px 16px rgba(192, 168, 216, 0.1);
    }
    /* Override 968px LTR direction so Arabic text stays RTL */
    .left-feature-sec > * { direction: rtl; }

    /* Image always on top inside each card */
    .feature-image { text-align: center; order: -1; }
    .feature-image img {
        max-height: 150px;
        width: auto;
        margin: 0 auto;
        display: block;
        object-fit: contain;
        border-radius: 0.75rem;
    }
    .feature-image .image-glow { display: none; }
    .feature-content h3 { font-size: 1.2rem; margin-bottom: 0.4rem; }
    .feature-content p { font-size: 0.88rem; }

    /* ── HOW IT WORKS ─────────────────────────────────────── */
    .how-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .how-grid > .nira-animation {
        max-width: 130px;
        margin: 0 auto;
    }
    .nira-mascot { max-width: 130px; }
    .sparkle { font-size: 1.1rem; }
    .how-steps { gap: 1.25rem; }
    .step-number {
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
        border-radius: 0.6rem;
        flex-shrink: 0;
    }
    .step-content h3 { font-size: 0.95rem; }
    .step-content p { font-size: 0.83rem; }

    /* ── DEMO / SOROBAN ───────────────────────────────────── */
    .demo-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .demo-nira { max-width: 130px; margin: 0 auto; }
    .counter-card { padding: 1.25rem 1rem; }
    .counter-card h3 { font-size: 0.95rem; margin-bottom: 0.4rem; }
    .counter-subtitle { font-size: 0.78rem; margin-bottom: 1rem; }
    .soroban-columns { gap: 0.7rem; }
    .soroban-bead { width: 24px; height: 12px; border-radius: 6px; }
    .soroban-rod { height: 210px; }
    .earth-section { height: 140px; }

    /* ── CTA BAND ─────────────────────────────────────────── */
    .cta-section {
        padding: 2.5rem 0;
        margin: 0 0.75rem;
        border-radius: 2rem;
    }
    .cta-content h2 { font-size: 1.5rem; margin-bottom: 0.6rem; }
    .cta-content p { font-size: 0.95rem; margin-bottom: 1.5rem; }
    .cta-buttons .btn-lg {
        width: min(100%, 280px);
        justify-content: center;
        padding: 0.9rem 1.5rem;
    }
    .mobile-menu-btn { display: flex; }

    /* ── FOOTER ───────────────────────────────────────────── */
    .footer { padding: 2rem 0 1.25rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem 1rem; }
    .footer-col:first-child { grid-column: 1 / -1; }
    .footer-col h4 { font-size: 0.95rem; margin-bottom: 0.75rem; }
    .footer-col ul li { margin-bottom: 0.4rem; }
    .footer-col ul li a { font-size: 0.85rem; }
    .footer-bottom { padding-top: 1.25rem; font-size: 0.78rem; }
}

@media (max-width: 640px) {
    .brand-subtitle {
        display: none;
    }

    .hero-section {
        padding: 6rem 0 3rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-description {
        font-size: 1rem;
    }

    .beads-container {
        gap: 0.5rem;
    }

    .bead {
        width: 40px;
        height: 40px;
    }

    .counter-display {
        font-size: 3rem;
    }

    .gradient-text {
        font-size: clamp(2.5rem, 10vw, 8rem);
    }

    .hero-grid {
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-img-container img { width: 60%; }
        .mobile-menu-btn { display: flex; }

}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .btn-lg {
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
    }


    .hero-section { padding: 5rem 0 2rem; }
    .hero-img-container img { width: 50%; }
    .floating-element { display: none; }
    .hero-stats { gap: 1rem; }
    .gradient-text { font-size: clamp(2rem, 12vw, 4rem); }

    .mobile-menu-btn { display: flex; }

}
