/* ========================================
   GOOGLE FONTS IMPORT (Critical - Top Priority)
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap');

/* ========================================
   CSS CUSTOM PROPERTIES & RESET
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #0062B8;
    --primary-dark: #004d94;
    --text-primary: #1A1A1A;
    --text-secondary: #666666;
    --text-light: #999999;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-lighter: #fafbfc;
    --border-gray: #eaebec;
    --border-light: #f0f1f2;
    --shadow-sm: rgba(0, 0, 0, 0.04);
    --shadow: rgba(0, 0, 0, 0.08);
    --shadow-md: rgba(0, 0, 0, 0.12);
    --shadow-lg: rgba(0, 0, 0, 0.16);
    --shadow-blue: rgba(0, 98, 184, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-white);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Prevent any horizontal scroll */
    max-width: 100vw;
    position: relative;
}

/* ========================================
   RTL & ARABIC LANGUAGE SUPPORT (Critical)
   ======================================== */
body[dir="rtl"],
body.rtl,
body.lang-ar,
html[dir="rtl"],
html[lang="ar"] {
    font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* CRITICAL FIX: Apply Tajawal to text elements ONLY, NOT icons */
html[lang="ar"] *:not(i):not(.fa):not(.fas):not(.far):not(.fal):not(.fab):not(.fad):not(svg):not(path):not(.icon):not([class*="fa-"]) {
    font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* Force Tajawal on text elements when Arabic, EXCLUDE icons */
.lang-ar *:not(i):not(.fa):not(.fas):not(.far):not(.fal):not(.fab):not(.fad):not(svg):not(path):not(.icon):not([class*="fa-"]) {
    font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* Ensure icons always use their correct font family */
i,
.fa,
.fas,
.far,
.fal,
.fab,
.fad,
[class^="fa-"],
[class*=" fa-"],
[class^="fab fa-"],
.icon {
    font-family: "Font Awesome 6 Brands", "Font Awesome 6 Free", "FontAwesome" !important;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    display: inline-block;
    font-weight: 400;
}

/* Brand icons specific */
.fab {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400;
}

/* ========================================
   CRITICAL FIX: REMOVE ALL OVERLAYS & ENSURE TEXT VISIBILITY
   ======================================== */
.hero::before,
.hero::after,
.hero-grid::before,
.hero-grid::after {
    display: none !important;
}

/* Force hero text to be 100% visible - NO GRAY OVERLAY */
/* EXCEPTION: rotating-text managed by JS - don't force opacity */
.hero-text,
.hero-text *:not(.rotating-text),
.rotating-text-wrapper,
.hero-subtitle,
.hero-feature,
.hero-badge,
.hero-buttons,
.hero-stats {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Rotating text controlled by JS - allow opacity changes */
.rotating-text {
    /* opacity and visibility controlled by JavaScript */
}

/* Prevent any filter or backdrop effects */
.hero,
.hero-grid,
.hero-text {
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* ========================================
   PREMIUM HEADER ENHANCEMENTS
   ======================================== */

/* Smooth logo transition - RTL support */
body[dir="rtl"] .logo-img {
    transform-origin: center right;
}

/* Prevent layout shift during transitions */
.header-content .logo {
    display: flex;
    align-items: center;
}

/* Premium glassmorphism effect when scrolled */
.header.scrolled::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
}

/* ========================================
   HEADER
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    /* INITIAL STATE: Transparent, no border */
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid transparent;
    /* SMOOTH TRANSITION: All properties */
    transition: background 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                backdrop-filter 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* SCROLLED STATE: Glassmorphism + Border */
.header.scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border-bottom: 1px solid #eaebec;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* INITIAL STATE: Larger height for 2x logo */
    height: 110px;
    transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* SCROLLED STATE: Normal height */
.header.scrolled .header-content {
    height: 80px;
}

.logo-img {
    /* INITIAL STATE: 2x size (84px) */
    height: 84px;
    width: auto;
    /* CRITICAL: Define initial transform to prevent first-scroll jump */
    transform: scale(1);
    /* SMOOTH TRANSITION: All properties defined on base class */
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    transform-origin: center left;
    will-change: transform, height;
}

/* SCROLLED STATE: Normal size (42px) */
.header.scrolled .logo-img {
    height: 42px;
    /* No transform change needed - we only change height */
}

/* Hover effect - subtle on large logo, more on small */
.logo-img:hover {
    transform: scale(1.05);
}

.header.scrolled .logo-img:hover {
    transform: scale(1.08);
}

.nav {
    display: flex;
    align-items: center;
    gap: 16px;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    white-space: nowrap;
}

.nav-link--muted {
    color: var(--text-secondary);
}

.nav-link:hover {
    text-decoration: none;
    color: var(--primary-blue);
    background: rgba(0, 98, 184, 0.06);
}

.nav-link--active,
.nav-link--active:hover {
    color: var(--primary-blue);
    background: rgba(0, 98, 184, 0.1);
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1.5px solid var(--border-gray);
    border-radius: 10px;
    background: var(--bg-white);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.nav-toggle:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.nav-toggle i {
    font-size: 18px;
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "FontAwesome" !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Ensure nav items stay aligned during transition */
.header-content > * {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    background: transparent;
    border: 1.5px solid var(--border-gray);
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    transition: var(--transition);
}

.lang-toggle:hover {
    border-color: var(--primary-blue);
    background: rgba(0, 98, 184, 0.06);
    transform: translateY(-1px);
}

.lang-toggle i {
    font-size: 16px;
    /* Ensure icon font is preserved */
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "FontAwesome" !important;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    padding: 13px 30px;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
    color: white;
    box-shadow: 0 6px 20px var(--shadow-blue);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 98, 184, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--text-primary);
    border: 2px solid var(--border-gray);
}

.btn-secondary:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--shadow);
}

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

.btn-outline:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--shadow-blue);
}

.btn-large {
    padding: 18px 40px;
    font-size: 16px;
    border-radius: 12px;
}

.btn-full {
    width: 100%;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    padding: 140px 0 80px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    background: #ffffff;
    /* Remove any gradient that might cause gray overlay */
    overflow-x: hidden;
    max-width: 100%;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 80px;
    align-items: center;
    margin-bottom: 80px;
    position: relative;
    z-index: 10;
    isolation: isolate;
}

.hero-text {
    position: relative;
    z-index: 100;
    animation: fadeInUp 1s ease-out;
    /* Hardware acceleration for smooth performance */
    will-change: transform, opacity;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    /* Force visibility */
    opacity: 1 !important;
    color: var(--text-primary) !important;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: linear-gradient(135deg, rgba(0, 98, 184, 0.15), rgba(0, 98, 184, 0.1));
    border: 1px solid rgba(0, 98, 184, 0.3);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 24px;
    position: relative;
    z-index: 100;
    opacity: 1 !important;
}

.hero-badge i {
    font-size: 14px;
}

.rotating-text-wrapper {
    position: relative;
    min-height: 140px;
    margin-bottom: 24px;
    overflow: hidden;
    z-index: 150;
}

.rotating-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    font-size: 56px;
    font-weight: 800;
    line-height: 1.15;
    color: #1A1A1A !important;
    /* CRITICAL FIX: Hidden by default - no overlap */
    opacity: 0;
    visibility: hidden;
    transform: translate3d(0, 40px, 0);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9),
                 0 2px 4px rgba(255, 255, 255, 0.8),
                 0 0 1px #1A1A1A;
    z-index: 200;
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    pointer-events: none;
}

.rotating-text.active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
}

.hero-subtitle {
    font-size: 19px;
    line-height: 1.7;
    color: #555555 !important;
    margin-bottom: 32px;
    max-width: 580px;
    position: relative;
    z-index: 100;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
    opacity: 1 !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 40px;
    position: relative;
    z-index: 100;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #1A1A1A !important;
    opacity: 1 !important;
}

.hero-feature i {
    color: var(--primary-blue);
    font-size: 18px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 56px;
    position: relative;
    z-index: 100;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    padding-top: 40px;
    border-top: 1px solid var(--border-light);
    position: relative;
    z-index: 100;
}

.stat {
    text-align: center;
    opacity: 1 !important;
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 8px;
    opacity: 1 !important;
}

.stat-label {
    font-size: 14px;
    color: #666666 !important;
    font-weight: 500;
    opacity: 1 !important;
}

/* ========================================
   VIRTUAL PAYMENT TERMINAL - HERO ANIMATION
   ======================================== */
.hero-animation {
    position: relative;
    height: 540px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    pointer-events: none;
    visibility: visible !important;
    opacity: 1 !important;
    max-width: 100%;
    width: 100%;
    overflow: visible;
    perspective: 1200px;
}

.terminal-scene {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 600px;
    pointer-events: all;
    transform-style: preserve-3d;
    /* CRITICAL: Establish stacking context for z-index control */
    z-index: 1;
}

/* ========================================
   BACKGROUND: PULSING CONCENTRIC CIRCLES
   ======================================== */
.pulse-circles {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    z-index: 1;
}

.pulse-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2px solid rgba(0, 98, 184, 0.15);
    animation: pulse-expand 4s ease-out infinite;
}

.pulse-circle.circle-1 {
    width: 120px;
    height: 120px;
    animation-delay: 0s;
}

.pulse-circle.circle-2 {
    width: 220px;
    height: 220px;
    animation-delay: 1s;
}

.pulse-circle.circle-3 {
    width: 320px;
    height: 320px;
    animation-delay: 2s;
}

.pulse-circle.circle-4 {
    width: 420px;
    height: 420px;
    animation-delay: 3s;
}

@keyframes pulse-expand {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
        border-color: rgba(0, 98, 184, 0.4);
    }
    50% {
        opacity: 1;
        border-color: rgba(0, 98, 184, 0.2);
    }
    100% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0;
        border-color: rgba(0, 98, 184, 0);
    }
}

/* ========================================
   MIDDLE GROUND: ANIMATED PAYMENT CARD
   ======================================== */
.payment-card-animated {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 380px;
    height: 240px;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
    /* CRITICAL: Lower z-index - card must stay BEHIND terminal */
    z-index: 10;
    overflow: hidden;
    /* Hardware acceleration */
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
    /* Default: PayPal Design */
    background: linear-gradient(135deg, #00457C 0%, #0070BA 100%);
    color: white;
    font-family: 'Montserrat', sans-serif;
}

/* Card Shine/Gleam Effect */
.card-shine {
    position: absolute;
    top: -50%;
    left: -150%;
    width: 40%;
    height: 200%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent);
    transform: skewX(-25deg);
    pointer-events: none;
    z-index: 20;
}

/* EMV Chip */
.card-chip {
    position: absolute;
    top: 60px;
    left: 30px;
    width: 50px;
    height: 40px;
    background: linear-gradient(135deg, #D4AF37 0%, #F9E79F 50%, #D4AF37 100%);
    border-radius: 6px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    padding: 4px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.chip-line {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 1px;
}

/* Card Logo (Top Right) */
.card-logo {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -1px;
    text-transform: uppercase;
}

/* Card Number */
.card-number {
    position: absolute;
    top: 135px;
    left: 30px;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 3px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.last-digits {
    font-weight: 700;
}

/* Card Details Row */
.card-details {
    position: absolute;
    bottom: 30px;
    left: 30px;
    right: 30px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.card-holder,
.card-expiry {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1px;
    opacity: 0.7;
    text-transform: uppercase;
}

.card-name {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.card-date {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* ========================================
   CARD DESIGN VARIANTS (Cycled by JS)
   ======================================== */

/* PayPal Card */
.payment-card-animated.card-paypal {
    background: linear-gradient(135deg, #00457C 0%, #0070BA 100%);
    color: white;
}

.payment-card-animated.card-paypal .card-logo::before {
    content: 'PayPal';
    font-size: 28px;
    font-weight: 800;
    color: white;
}

/* Visa Card */
.payment-card-animated.card-visa {
    background: linear-gradient(135deg, #1A1F36 0%, #2C3E50 100%);
    color: white;
}

.payment-card-animated.card-visa .card-logo::before {
    content: 'VISA';
    font-size: 40px;
    font-weight: 800;
    font-style: italic;
    color: white;
    letter-spacing: 4px;
}

.payment-card-animated.card-visa .card-chip {
    background: linear-gradient(135deg, #D4AF37 0%, #F9E79F 50%, #D4AF37 100%);
}

/* Mastercard Card */
.payment-card-animated.card-mastercard {
    background: linear-gradient(135deg, #EB001B 0%, #F79E1B 100%);
    color: white;
}

.payment-card-animated.card-mastercard .card-logo::before {
    content: '⬤⬤';
    font-size: 32px;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: -12px;
}

/* Apple Pay Card */
.payment-card-animated.card-apple {
    background: linear-gradient(135deg, #000000 0%, #1C1C1E 100%);
    color: white;
}

.payment-card-animated.card-apple .card-logo {
    display: flex;
    align-items: center;
    gap: 6px;
}

.payment-card-animated.card-apple .card-logo::before {
    content: '\f179';
    font-family: 'Font Awesome 6 Brands';
    font-size: 34px;
    color: white;
    font-weight: 400;
}

.payment-card-animated.card-apple .card-logo::after {
    content: 'Pay';
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Montserrat', sans-serif;
    font-size: 30px;
    font-weight: 500;
    color: white;
    letter-spacing: -0.5px;
}

.payment-card-animated.card-apple .card-chip {
    display: none;
}

.payment-card-animated.card-apple .card-number {
    font-size: 20px;
    opacity: 0.8;
}

/* Google Pay Card */
.payment-card-animated.card-google {
    background: linear-gradient(135deg, #FFFFFF 0%, #F8F9FA 100%);
    color: #202124;
}

.payment-card-animated.card-google .card-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
}

.payment-card-animated.card-google .card-logo::before {
    content: '';
    display: inline-block;
    width: 42px;
    height: 42px;
    background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"%3E%3Cpath fill="%234285F4" d="M44.5 20H24v8.5h11.8C34.7 33.9 30.1 37 24 37c-7.2 0-13-5.8-13-13s5.8-13 13-13c3.1 0 5.9 1.1 8.1 2.9l6.4-6.4C34.6 4.1 29.6 2 24 2 11.8 2 2 11.8 2 24s9.8 22 22 22c11 0 21-8 21-22 0-1.3-.2-2.7-.5-4z"/%3E%3Cpath fill="%23EA4335" d="M6.3 14.7l6.6 4.8C14.1 16.1 18.6 13 24 13c3.1 0 5.9 1.1 8.1 2.9l6.4-6.4C34.6 4.1 29.6 2 24 2 16.4 2 9.8 5.9 6.3 14.7z"/%3E%3Cpath fill="%23FBBC05" d="M24 46c5.5 0 10.4-2 14.3-5.4l-6.6-5.6c-2.1 1.4-4.7 2.3-7.7 2.3-6.1 0-11.2-4-13-9.4l-6.5 5C8 41.1 15.4 46 24 46z"/%3E%3Cpath fill="%2334A853" d="M44.5 20H24v8.5h11.8c-.8 2.4-2.4 4.4-4.5 5.8l6.6 5.6c-.4.4 6.1-4.4 6.1-13.9 0-1.3-.2-2.7-.5-4z"/%3E%3C/svg%3E');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.payment-card-animated.card-google .card-logo::after {
    content: 'Pay';
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 500;
    color: #5F6368;
    letter-spacing: -0.3px;
}

.payment-card-animated.card-google .card-chip {
    background: linear-gradient(135deg, #4285F4 0%, #34A853 100%);
}

/* ========================================
   FOREGROUND: TERMINAL LOGO (STABLE)
   ======================================== */
.terminal-logo {
    position: absolute;
    /* CRITICAL: Slot-insertion positioning - only bottom edge covers card */
    top: 68%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 5px solid var(--primary-blue);
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: var(--primary-blue);
    box-shadow: 0 30px 80px rgba(0, 98, 184, 0.4);
    /* CRITICAL: Bulletproof z-index - terminal ALWAYS on top */
    z-index: 50;
    /* Ensure stacking context isolation */
    isolation: isolate;
}

.terminal-glow {
    position: absolute;
    inset: -40px;
    background: radial-gradient(circle, rgba(0, 98, 184, 0.3), transparent 65%);
    border-radius: 50%;
    animation: terminal-pulse 3s ease-in-out infinite;
    z-index: -1;
}

@keyframes terminal-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.15);
        opacity: 1;
    }
}

.terminal-slot {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 6px;
    background: linear-gradient(90deg, transparent, var(--primary-blue), transparent);
    border-radius: 3px;
    opacity: 0.4;
}

/* ========================================
   TECH STACK INTEGRATION BADGES
   ======================================== */
.tech-stack-badges {
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    /* DESKTOP: Single horizontal line with generous spacing */
    gap: 1.5rem;
    flex-wrap: nowrap;
    /* CRITICAL: Always above terminal, below nothing */
    z-index: 55;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50px;
    border: 1px solid rgba(0, 98, 184, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    /* Desktop: Prevent wrapping, scale icons if needed */
    max-width: 95%;
}

.tech-icon {
    font-size: 32px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    /* Initial: Sophisticated monochrome */
    color: #999999;
    filter: grayscale(100%);
    opacity: 0.6;
}

/* Individual brand colors for "glow-up" effect */
.tech-icon:hover,
.tech-icon:active {
    /* Smooth transition to full brand colors */
    filter: grayscale(0%);
    opacity: 1;
    transform: translateY(-4px) scale(1.15);
}

/* Specific brand color definitions for Devicon */
.devicon-laravel-plain:hover,
.devicon-laravel-plain:active {
    color: #FF2D20; /* Laravel Red */
}

.devicon-nodejs-plain:hover,
.devicon-nodejs-plain:active {
    color: #339933; /* Node.js Green */
}

.devicon-wordpress-plain:hover,
.devicon-wordpress-plain:active {
    color: #21759B; /* WordPress Blue */
}

.devicon-shopify-plain:hover,
.devicon-shopify-plain:active {
    color: #96BF48; /* Shopify Green */
}

.devicon-php-plain:hover,
.devicon-php-plain:active {
    color: #777BB4; /* PHP Purple */
}

.devicon-dot-net-plain:hover,
.devicon-dot-net-plain:active {
    color: #512BD4; /* .NET Purple */
}

/* Soft, minimal aesthetic - gentle pulse on load */
@keyframes tech-badge-float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-2px);
    }
}

.tech-icon:nth-child(1) { animation: tech-badge-float 3s ease-in-out infinite 0s; }
.tech-icon:nth-child(2) { animation: tech-badge-float 3s ease-in-out infinite 0.3s; }
.tech-icon:nth-child(3) { animation: tech-badge-float 3s ease-in-out infinite 0.6s; }
.tech-icon:nth-child(4) { animation: tech-badge-float 3s ease-in-out infinite 0.9s; }
.tech-icon:nth-child(5) { animation: tech-badge-float 3s ease-in-out infinite 1.2s; }
.tech-icon:nth-child(6) { animation: tech-badge-float 3s ease-in-out infinite 1.5s; }

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition);
    animation: bounce 2s infinite;
}

.scroll-indicator:hover {
    opacity: 1;
}

.scroll-mouse {
    width: 28px;
    height: 44px;
    border: 2px solid var(--text-secondary);
    border-radius: 14px;
    position: relative;
}

.scroll-wheel {
    width: 4px;
    height: 8px;
    background: var(--primary-blue);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 2s infinite;
}

.scroll-indicator span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

/* ========================================
   HOW TO START SECTION
   ======================================== */
.how-to-start {
    padding: 120px 0;
    background: var(--bg-light);
    position: relative;
}

.how-to-start::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        var(--border-gray) 20%,
        var(--border-gray) 80%,
        transparent);
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-badge {
    display: inline-block;
    padding: 8px 20px;
    background: var(--bg-white);
    border: 1px solid var(--border-gray);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.section-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 19px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    position: relative;
}

.step-card {
    position: relative;
    background: var(--bg-white);
    padding: 48px 36px;
    border-radius: 20px;
    border: 1px solid var(--border-light);
    box-shadow: 0 8px 32px var(--shadow-sm);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translate3d(0, 40px, 0) scale(0.95);
    /* Performance optimization */
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.step-card:hover {
    transform: translate3d(0, -12px, 0) scale(1);
    box-shadow: 0 24px 64px var(--shadow);
    border-color: var(--primary-blue);
}

.step-card:nth-child(2) {
    transform: translate3d(0, 60px, 0) scale(0.95);
}

.step-card:nth-child(2):hover {
    transform: translate3d(0, 48px, 0) scale(1);
}

.step-visual {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
}

.step-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    box-shadow: 0 12px 32px var(--shadow-blue);
}

.step-number {
    font-size: 72px;
    font-weight: 800;
    color: var(--bg-light);
    line-height: 1;
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.step-desc {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

.step-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
}

.step-link:hover {
    gap: 12px;
}

.step-link i {
    font-size: 14px;
}

.step-connector {
    display: none;
}

/* ========================================
   DOCUMENTATION & INTEGRATIONS
   ======================================== */
.developers {
    padding: 120px 0;
    background: var(--bg-white);
    position: relative;
}

.developers::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        var(--border-gray) 20%,
        var(--border-gray) 80%,
        transparent);
}

.guide-cards-section {
    padding-top: 80px;
    background: var(--bg-light);
}

.integration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.integration-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 28px 24px;
    background: var(--bg-white);
    border: 2px solid var(--border-light);
    border-radius: 20px;
    box-shadow: 0 8px 32px var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    min-height: 100%;
}

.integration-card:hover {
    text-decoration: none;
    color: inherit;
    transform: translateY(-8px);
    border-color: var(--primary-blue);
    box-shadow: 0 20px 48px var(--shadow-blue);
}

.integration-card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(0, 98, 184, 0.12), rgba(0, 98, 184, 0.04));
    color: var(--primary-blue);
    font-size: 26px;
}

.integration-card-icon .devicon-wordpress-plain,
.integration-card-icon .devicon-shopify-plain {
    font-size: 32px;
}

.integration-card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

.integration-card-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
    flex: 1;
}

.integration-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-blue);
    margin-top: 4px;
    transition: var(--transition);
}

.integration-card:hover .integration-card-cta {
    gap: 12px;
}

/* ========================================
   OPEN GUIDE PAGE
   ======================================== */
.page-guide .header {
    background: rgba(255, 255, 255, 0.98);
}

.guide-main {
    padding-top: 100px;
}

.page-hero {
    padding: 48px 0 56px;
    background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-white) 100%);
    border-bottom: 1px solid var(--border-light);
}

.page-hero-inner .section-title {
    font-size: clamp(2rem, 4vw, 3rem);
}

.page-hero-lead {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.guide-hub {
    padding: 56px 0 40px;
}

.guide-split {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
    align-items: start;
}

.guide-toc {
    position: sticky;
    top: 110px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 24px var(--shadow-sm);
}

.guide-toc-heading {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin: 0 0 16px;
}

.guide-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.guide-toc-item {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.guide-toc-item:hover,
.guide-toc-item.is-active {
    background: rgba(0, 98, 184, 0.08);
    color: var(--primary-blue);
    text-decoration: none;
}

.guide-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.guide-content-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 28px 32px;
    box-shadow: 0 4px 20px var(--shadow-sm);
    scroll-margin-top: 120px;
}

.guide-content-card h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--text-primary);
}

.guide-content-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 16px;
}

.guide-content-card .btn {
    margin-top: 8px;
}

.doc-list,
.doc-steps {
    margin: 0 0 20px;
    padding-left: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.75;
}

.doc-steps li + li,
.doc-list li + li {
    margin-top: 8px;
}

/* ========================================
   DOCUMENTATION ARTICLE PAGES
   ======================================== */
.page-doc .guide-main,
.doc-main {
    padding-top: 100px;
    padding-bottom: 80px;
}

.doc-hero {
    padding-bottom: 40px;
}

.doc-hero-actions {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.doc-article {
    max-width: 900px;
}

.doc-section {
    margin-bottom: 48px;
}

.doc-section h2 {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 16px;
    color: var(--text-primary);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-light);
}

.doc-h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 28px 0 12px;
    color: var(--text-primary);
}

.doc-section p {
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 16px;
}

.inline-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9em;
    background: var(--bg-light);
    border: 1px solid var(--border-gray);
    padding: 2px 7px;
    border-radius: 6px;
    color: var(--primary-dark);
}

.doc-table-wrap {
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid var(--border-light);
    border-radius: 12px;
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.doc-table th,
.doc-table td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: top;
}

.doc-table th {
    background: var(--bg-light);
    font-weight: 700;
    color: var(--text-primary);
}

.doc-table tr:last-child td {
    border-bottom: none;
}

.doc-code {
    display: block;
    background: #0f172a;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.6;
    margin: 16px 0 24px;
    border: 1px solid #1e293b;
}

.doc-code code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    white-space: pre;
}

.doc-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    background: rgba(0, 98, 184, 0.06);
    border-left: 4px solid var(--primary-blue);
    border-radius: 0 10px 10px 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin: 20px 0;
}

/* ========================================
   PRICING SECTION
   ======================================== */
.pricing {
    padding: 120px 0;
    background: var(--bg-white);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    align-items: start;
}

.pricing-card {
    position: relative;
    background: var(--bg-white);
    padding: 48px 36px;
    border-radius: 20px;
    border: 2px solid var(--border-light);
    box-shadow: 0 8px 32px var(--shadow-sm);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.92);
    /* Performance optimization */
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.pricing-card:hover {
    transform: translate3d(0, -12px, 0) scale(0.96);
    box-shadow: 0 24px 64px var(--shadow);
    border-color: var(--border-gray);
}

.pricing-card.popular {
    transform: translate3d(0, 0, 0) scale(1);
    border: 2px solid var(--primary-blue);
    box-shadow: 0 24px 64px var(--shadow-blue);
    background: linear-gradient(180deg, var(--bg-white), rgba(0, 98, 184, 0.02));
}

.pricing-card.popular:hover {
    transform: translate3d(0, -16px, 0) scale(1.02);
    box-shadow: 0 32px 80px rgba(0, 98, 184, 0.25);
}

.popular-badge {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
    color: white;
    padding: 8px 24px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 8px 24px var(--shadow-blue);
    letter-spacing: 0.5px;
}

.plan-header {
    text-align: center;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 32px;
}

.plan-name {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.plan-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.currency {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-secondary);
}

.amount {
    font-size: 64px;
    font-weight: 800;
    color: var(--primary-blue);
    letter-spacing: -2px;
}

.period {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 500;
}

.plan-features {
    list-style: none;
    margin-bottom: 36px;
}

.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
    color: var(--text-secondary);
    font-size: 15px;
}

.plan-features i {
    color: var(--primary-blue);
    margin-top: 4px;
    flex-shrink: 0;
    font-size: 16px;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: linear-gradient(180deg, var(--bg-light) 0%, #f0f1f2 100%);
    padding: 100px 0 0;
    border-top: 1px solid var(--border-gray);
}

.footer-main {
    display: grid;
    grid-template-columns: 1.2fr 2fr;
    gap: 80px;
    margin-bottom: 0;
    padding-bottom: 0;
}

.footer-brand {
    max-width: 360px;
}

.footer-logo {
    height: 48px;
    width: auto;
    margin-bottom: 20px;
}

.footer-tagline {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 28px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--bg-white);
    border: 1px solid var(--border-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 18px;
    transition: var(--transition);
    /* STATIC - No animation, immediate visibility */
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

.footer-social a:hover {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow-blue);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 40px;
}

.footer-col h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
}

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

.footer-col ul li {
    margin-bottom: 14px;
}

.footer-col ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 15px;
    display: inline-block;
}

.footer-col ul li a:hover {
    color: var(--primary-blue);
    transform: translateX(4px);
}

body[dir="rtl"] .footer-col ul li a:hover {
    transform: translateX(-4px);
}

.footer-payment-methods {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 56px 0 48px;
    border-top: 1px solid var(--border-gray);
    border-bottom: 1px solid var(--border-gray);
    margin-top: 60px;
    margin-bottom: 32px;
    background: transparent;
}

.footer-payment-methods span {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.payment-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    max-width: 700px;
    min-height: 60px;
}

.payment-icons i {
    font-size: 48px;
    color: var(--text-secondary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: grayscale(100%);
    opacity: 0.6 !important;
    cursor: pointer;
    /* CRITICAL: Ensure icons use correct font */
    font-family: "Font Awesome 6 Brands", "Font Awesome 6 Free", "FontAwesome" !important;
    font-weight: 400;
    display: inline-block !important;
    /* STATIC - No animation, immediate visibility */
    visibility: visible !important;
    transform: none !important;
}

.payment-icons i:hover {
    filter: grayscale(0%);
    opacity: 1 !important;
    transform: translateY(-6px) scale(1.2);
    color: var(--primary-blue);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-blue);
}

/* ========================================
   MODAL
   ======================================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background: var(--bg-white);
    border-radius: 24px;
    max-width: 540px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-light);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 18px;
    transition: var(--transition);
    z-index: 10;
}

.modal-close:hover {
    background: var(--primary-blue);
    color: white;
    transform: rotate(90deg);
}

.modal-header {
    text-align: center;
    padding: 56px 48px 32px;
    border-bottom: 1px solid var(--border-light);
}

.modal-header i {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    margin-bottom: 24px;
    box-shadow: 0 12px 32px var(--shadow-blue);
}

.modal-header h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
}

.modal-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

.modal-form {
    padding: 48px;
}

.form-group {
    margin-bottom: 28px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 16px;
}

body[dir="rtl"] .input-wrapper i {
    left: auto;
    right: 18px;
}

.input-wrapper input,
.input-wrapper select {
    width: 100%;
    padding: 16px 18px 16px 50px;
    border: 2px solid var(--border-gray);
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    color: var(--text-primary);
    transition: var(--transition);
    background: var(--bg-white);
}

body[dir="rtl"] .input-wrapper input,
body[dir="rtl"] .input-wrapper select {
    padding: 16px 50px 16px 18px;
}

.input-wrapper input:focus,
.input-wrapper select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(0, 98, 184, 0.1);
}

.input-wrapper input::placeholder {
    color: var(--text-light);
}

.modal-success {
    display: none;
    text-align: center;
    padding: 64px 48px;
}

.modal-success.active {
    display: block;
}

.modal-success.active ~ .modal-form {
    display: none;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
    margin-bottom: 28px;
    animation: successPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.modal-success h3 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 16px;
}

.modal-success p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
}

/* ========================================
   ANIMATIONS (Hardware Accelerated)
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, -25px, 0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.15);
    }
}

@keyframes drawPath {
    0% {
        stroke-dashoffset: 400;
        opacity: 0;
    }
    30% {
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 0;
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(30deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(30deg);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

@keyframes scrollWheel {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(16px);
    }
}

@keyframes successPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ========================================
   RTL SUPPORT
   ======================================== */

/* ========================================
   RTL: Desktop Alignment (Arabic)
   ======================================== */

/* Hero section text alignment for Arabic */
body[dir="rtl"] .hero-text,
body[dir="rtl"] .hero-title,
body[dir="rtl"] .hero-subtitle,
body[dir="rtl"] .rotating-text-wrapper,
body[dir="rtl"] .rotating-text {
    text-align: right;
}

/* Hero buttons alignment - Right-aligned for RTL flow */
body[dir="rtl"] .hero-buttons {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

/* Features alignment */
body[dir="rtl"] .hero-feature {
    flex-direction: row-reverse;
    text-align: right;
}

/* Stats alignment */
body[dir="rtl"] .stat {
    text-align: right;
}

/* Section headers */
body[dir="rtl"] .section-header,
body[dir="rtl"] .section-title,
body[dir="rtl"] .section-subtitle {
    text-align: right;
}

/* General RTL flex reversals */
body[dir="rtl"] .nav,
body[dir="rtl"] .hero-badge,
body[dir="rtl"] .lang-toggle,
body[dir="rtl"] .step-link {
    flex-direction: row-reverse;
}

body[dir="rtl"] .btn i {
    transform: scaleX(-1);
}

body[dir="rtl"] .footer-social,
body[dir="rtl"] .payment-icons {
    flex-direction: row-reverse;
}

/* ========================================
   RTL: Mobile Typography (< 768px)
   ======================================== */
@media (max-width: 768px) {
    /* Mobile Arabic: Center-align rotating/feature texts */
    body[dir="rtl"] .rotating-text-wrapper,
    body[dir="rtl"] .rotating-text,
    body[dir="rtl"] .hero-title,
    body[dir="rtl"] .hero-subtitle {
        text-align: center !important;
        /* Ensure wrapped lines stay centered */
        display: block;
        width: 100%;
    }

    /* Mobile Arabic: Center buttons on mobile */
    body[dir="rtl"] .hero-buttons {
        justify-content: center;
        align-items: center;
    }

    /* Mobile Arabic: Center features */
    body[dir="rtl"] .hero-feature {
        text-align: center;
        justify-content: center;
    }

    /* Mobile Arabic: Center stats */
    body[dir="rtl"] .stat {
        text-align: center;
    }

    /* Mobile Arabic: Center all hero text content */
    body[dir="rtl"] .hero-text {
        text-align: center;
    }
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    /* Tablet: Keep text first, animation second */
    .hero-animation {
        height: 450px;
        order: 2;
    }

    /* Tablet: Scale terminal scene */
    .terminal-scene {
        transform: scale(0.85);
    }

    .payment-card-animated {
        width: 340px;
        height: 215px;
        padding: 25px;
    }

    .terminal-logo {
        width: 120px;
        height: 120px;
        font-size: 56px;
    }

    /* Tablet: Tech Stack Badges - Scale down for single line */
    .tech-stack-badges {
        gap: 1.2rem;
        padding: 11px 18px;
        flex-wrap: nowrap;
    }

    .tech-icon {
        font-size: 30px;
    }

    .hero-text {
        order: 1;
    }

    /* Tablet: Features in 2-column grid */
    .hero-features {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px 24px;
    }

    .pricing-grid,
    .steps-container,
    .integration-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .guide-split {
        grid-template-columns: 1fr;
    }

    .guide-toc {
        position: static;
    }

    .pricing-card.popular,
    .pricing-card {
        transform: translate3d(0, 0, 0) scale(1) !important;
        opacity: 1;
    }

    .step-card,
    .step-card:nth-child(2) {
        transform: translate3d(0, 0, 0) scale(1) !important;
        opacity: 1;
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Disable parallax on tablets */
    .hero-animation {
        transform: none !important;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    /* Mobile: Smaller initial header */
    .header-content {
        height: 90px;
    }

    .header.scrolled .header-content {
        height: 70px;
    }

    /* Mobile: 1.8x logo initially, then normal */
    .logo-img {
        height: 64px;
        /* Maintain defined transform on mobile */
        transform: scale(1);
    }

    .header.scrolled .logo-img {
        height: 36px;
        /* Height change only - no transform override */
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: min(300px, 88vw);
        height: 100vh;
        height: 100dvh;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 88px 20px 24px;
        background: var(--bg-white);
        box-shadow: -8px 0 32px var(--shadow-md);
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1001;
        overflow-y: auto;
    }

    body[dir="rtl"] .nav-menu {
        right: auto;
        left: 0;
        transform: translateX(-100%);
        box-shadow: 8px 0 32px var(--shadow-md);
    }

    .nav.is-open .nav-menu {
        transform: translateX(0);
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        margin-bottom: 16px;
        padding-bottom: 16px;
        border-bottom: 1px solid var(--border-light);
    }

    .nav-link {
        padding: 14px 16px;
        font-size: 15px;
    }

    .nav-cta,
    .nav .btn.nav-cta {
        display: flex;
        width: 100%;
        justify-content: center;
    }

    body.nav-open {
        overflow: hidden;
    }

    body.nav-open::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(10, 31, 68, 0.45);
        z-index: 1000;
    }

    /* Language toggle stays in header bar (icon only) */
    .lang-toggle--bar {
        padding: 10px;
        min-width: 44px;
        min-height: 44px;
        justify-content: center;
        gap: 0;
    }

    .lang-toggle--bar span,
    .lang-toggle--bar #langText {
        display: none;
    }

    .lang-toggle--bar i {
        font-size: 18px;
        margin: 0;
    }

    .rotating-text {
        font-size: 32px;
        line-height: 1.2;
    }

    .rotating-text-wrapper {
        min-height: 80px;
    }

    /* Mobile: Terminal Scene Scaling - ENLARGED for immersion */
    .hero-animation {
        height: 420px;
        order: -1; /* Visual first on mobile */
    }

    .terminal-scene {
        transform: scale(0.85);
        max-width: 500px;
    }

    .payment-card-animated {
        width: 340px;
        height: 215px;
        padding: 24px;
        border-radius: 18px;
        /* Slightly higher positioning for better visibility */
        top: 43%;
    }

    .card-number {
        font-size: 22px;
        top: 125px;
        letter-spacing: 2px;
    }

    .card-logo::before {
        font-size: 30px !important;
    }

    .payment-card-animated.card-visa .card-logo::before {
        font-size: 34px !important;
    }

    .payment-card-animated.card-apple .card-logo::before {
        font-size: 32px !important;
    }

    .payment-card-animated.card-apple .card-logo::after {
        font-size: 28px !important;
    }

    .payment-card-animated.card-google .card-logo::before {
        width: 36px !important;
        height: 36px !important;
    }

    .payment-card-animated.card-google .card-logo::after {
        font-size: 24px !important;
    }

    .card-chip {
        width: 46px;
        height: 38px;
        top: 55px;
    }

    .card-details {
        bottom: 24px;
    }

    .card-name,
    .card-date {
        font-size: 13px;
    }

    .card-label {
        font-size: 9px;
    }

    .terminal-logo {
        width: 100px;
        height: 100px;
        font-size: 48px;
        border-radius: 20px;
        /* MOBILE: Lower positioning for slot-insertion effect */
        top: 75%;
    }

    .pulse-circles {
        width: 400px;
        height: 400px;
    }

    .pulse-circle.circle-1 {
        width: 100px;
        height: 100px;
    }

    .pulse-circle.circle-2 {
        width: 180px;
        height: 180px;
    }

    .pulse-circle.circle-3 {
        width: 260px;
        height: 260px;
    }

    .pulse-circle.circle-4 {
        width: 340px;
        height: 340px;
    }

    /* Mobile: Tech Stack Badges - FORCE SINGLE LINE */
    .tech-stack-badges {
        gap: 0.7rem;
        padding: 10px 8px;
        bottom: 3%;
        /* CRITICAL: Add breathing room between terminal and tech stack */
        margin-top: 32px;
        /* FORCE: Single horizontal line, no wrapping */
        flex-wrap: nowrap !important;
        justify-content: center;
        max-width: 95%;
    }

    .tech-icon {
        font-size: 28px;
        /* Prevent icons from shrinking */
        flex-shrink: 0;
    }

    .footer-payment-methods {
        padding: 40px 0 32px;
        margin-top: 40px;
    }

    .footer-payment-methods span {
        font-size: 12px;
    }

    .payment-icons {
        gap: 14px;
    }

    .payment-icons i {
        font-size: 36px;
        /* STATIC - Immediate visibility on mobile */
        opacity: 0.6 !important;
        visibility: visible !important;
        display: inline-block !important;
    }

    .footer-social a {
        width: 40px;
        height: 40px;
        font-size: 16px;
        /* STATIC - Immediate visibility on mobile */
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* MOBILE HERO - VISUAL FIRST APPROACH */
    .hero {
        padding: 100px 0 60px;
    }

    .hero-grid {
        display: flex;
        flex-direction: column;
        gap: 40px;
    }

    /* CRITICAL: Animation moves to TOP on mobile */
    .hero-animation {
        order: -1;
        height: 280px;
        margin-bottom: 20px;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        overflow: visible !important;
    }

    .hero-text {
        order: 1;
    }

    /* Mobile-optimized animation scaling */
    .payment-card {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .vault-icon {
        width: 90px;
        height: 90px;
        font-size: 42px;
    }

    /* Hero Badge - Premium mobile positioning */
    .hero-badge {
        display: inline-flex;
        font-size: 12px;
        padding: 6px 14px;
        margin-bottom: 20px;
    }

    /* Rotating Headlines - Mobile optimized */
    .rotating-text-wrapper {
        min-height: 75px;
        margin-bottom: 20px;
    }

    /* Subtitle - Tighter mobile spacing */
    .hero-subtitle {
        font-size: 15px;
        line-height: 1.6;
        margin-bottom: 24px;
    }

    /* INNOVATIVE 2-COLUMN GRID for Features */
    .hero-features {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px 16px;
        margin-bottom: 28px;
    }

    .hero-feature {
        font-size: 13px;
        gap: 8px;
    }

    .hero-feature i {
        font-size: 16px;
    }

    /* Buttons - Stacked but optimized */
    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
        margin-bottom: 32px;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
        padding: 15px 24px;
        font-size: 15px;
    }

    /* PREMIUM 3-COLUMN GRID for Stats */
    .hero-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
        padding-top: 24px;
    }

    .stat-number {
        font-size: 22px;
        margin-bottom: 4px;
    }

    .stat-label {
        font-size: 11px;
    }

    /* Scroll Indicator - Repositioned after mobile content */
    .scroll-indicator {
        position: static;
        margin-top: 40px;
        transform: none;
        display: flex;
    }

    .scroll-mouse {
        width: 24px;
        height: 38px;
    }

    .scroll-indicator span {
        font-size: 12px;
    }

    .section-title {
        font-size: 32px;
    }

    .section-subtitle {
        font-size: 16px;
    }

    .step-card {
        padding: 32px 24px;
    }

    .step-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .step-number {
        font-size: 48px;
    }

    .step-title {
        font-size: 22px;
    }

    .pricing-card {
        padding: 36px 24px;
    }

    .plan-name {
        font-size: 24px;
    }

    .amount {
        font-size: 48px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 12px;
    }

    .payment-icons {
        flex-wrap: wrap;
        justify-content: center;
    }

    .payment-icons i {
        font-size: 36px;
    }

    .modal-content {
        width: 95%;
        max-height: 85vh;
    }

    .modal-header,
    .modal-form {
        padding: 32px 20px;
    }

    .modal-header h2 {
        font-size: 24px;
    }

    .btn-large {
        padding: 14px 28px;
        font-size: 15px;
    }

    .scroll-indicator {
        display: none;
    }
}

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

    /* Extra small mobile - Further optimization */
    .rotating-text {
        font-size: 24px;
        line-height: 1.3;
    }

    .rotating-text-wrapper {
        min-height: 70px;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    .section-title {
        font-size: 26px;
    }

    /* CRITICAL: Animation MUST stay visible and scale proportionally */
    .hero-animation {
        height: 220px;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }

    .payment-vault {
        transform: scale(0.75);
        width: 100%;
        max-width: 100%;
    }

    .payment-card {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .vault-icon {
        width: 65px;
        height: 65px;
        font-size: 30px;
    }

    /* Keep 3-column stats on smallest screens */
    .hero-stats {
        gap: 12px;
    }

    .stat-number {
        font-size: 20px;
    }

    .stat-label {
        font-size: 10px;
    }

    /* Features stay in 2-column grid */
    .hero-features {
        gap: 10px 12px;
    }

    .hero-feature {
        font-size: 12px;
    }
}

/* ========================================
   ULTRA-SMALL SCREENS (320px - iPhone SE, older Android)
   CRITICAL: Animation MUST be visible
   ======================================== */
@media (max-width: 400px) {
    .hero-animation {
        height: 280px;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        overflow: visible !important;
    }

    .terminal-scene {
        transform: scale(0.65);
    }

    .payment-card-animated {
        width: 280px;
        height: 178px;
        padding: 20px;
        top: 43%;
    }

    .card-number {
        font-size: 19px;
        top: 102px;
    }

    .card-chip {
        width: 40px;
        height: 32px;
        top: 48px;
    }

    .terminal-logo {
        width: 85px;
        height: 85px;
        font-size: 40px;
        top: 75%;
    }

    .tech-stack-badges {
        gap: 0.6rem;
        padding: 8px 6px;
        margin-top: 28px;
        flex-wrap: nowrap !important;
        justify-content: center;
        max-width: 92%;
    }

    .tech-icon {
        font-size: 24px;
        flex-shrink: 0;
    }
}

@media (max-width: 360px) {
    .hero-animation {
        height: 270px;
        display: flex !important;
        visibility: visible !important;
    }

    .terminal-scene {
        transform: scale(0.58);
    }

    .payment-card-animated {
        width: 265px;
        height: 168px;
        top: 43%;
    }

    .terminal-logo {
        width: 80px;
        height: 80px;
        font-size: 38px;
        top: 75%;
    }

    .tech-stack-badges {
        gap: 0.5rem;
        padding: 7px 4px;
        margin-top: 24px;
        flex-wrap: nowrap !important;
        justify-content: center;
        max-width: 90%;
    }

    .tech-icon {
        font-size: 22px;
        flex-shrink: 0;
    }
}

@media (max-width: 320px) {
    /* iPhone SE 1st gen, smallest common viewport */
    .container {
        padding: 0 12px;
    }

    .hero-animation {
        height: 240px;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        overflow: visible !important;
        margin: 0 auto 20px;
    }

    .terminal-scene {
        transform: scale(0.52);
    }

    .payment-card-animated {
        width: 255px;
        height: 162px;
        padding: 18px;
        top: 43%;
    }

    .card-number {
        font-size: 17px;
        top: 95px;
    }

    .card-chip {
        width: 37px;
        height: 30px;
    }

    .terminal-logo {
        width: 75px;
        height: 75px;
        font-size: 36px;
        border-width: 4px;
        top: 75%;
    }

    .tech-stack-badges {
        gap: 0.4rem;
        padding: 6px 2px;
        bottom: 2%;
        margin-top: 20px;
        flex-wrap: nowrap !important;
        justify-content: center;
        max-width: 95%;
    }

    .tech-icon {
        font-size: 18px;
        flex-shrink: 0;
    }

    .rotating-text {
        font-size: 22px;
    }

    .rotating-text-wrapper {
        min-height: 65px;
    }

    .hero-subtitle {
        font-size: 13px;
    }
}
