        :root {
            --color-primary: #f8fafc;
            --color-secondary: #ffffff;
            --text-main: #0f172a;
            --text-muted: #64748b;
            --glass-bg: rgba(255, 255, 255, 0.6); 
            --glass-border: rgba(0, 0, 0, 0.05);
            --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
            --flip-back-bg: #ffffff;
        }

        .dark {
            --color-primary: #0f172a;
            --color-secondary: #1e293b;
            --text-main: #ffffff;
            --text-muted: #94a3b8;
            --glass-bg: rgba(255, 255, 255, 0.03);
            --glass-border: rgba(255, 255, 255, 0.08);
            --card-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
            --flip-back-bg: #1e293b;
        }

        body {
            background-color: var(--color-primary);
            color: var(--text-muted);
            overflow-x: hidden;
            margin: 0;
            transition: background-color 0.3s ease, color 0.3s ease;
        }
/* Ascunde scrollbar-ul pentru slider-ul de pe mobil */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
        /* Optimize scrollbar */
        ::-webkit-scrollbar { width: 8px; }
        ::-webkit-scrollbar-track { background: var(--color-primary); }
        ::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }
        ::-webkit-scrollbar-thumb:hover { background: #3b82f6; }

/* Navbar de bază (pentru Desktop) */
        .glass-nav {
            background: var(--glass-bg);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border-bottom: 1px solid var(--glass-border);
        }

        /* Suprascriere pentru Mobil: Fără blur, doar culoare semi-transparentă */
        @media (max-width: 768px) {
            .glass-nav {
                backdrop-filter: none !important;
                -webkit-backdrop-filter: none !important;
                /* Fundal deschis semi-transparent pentru Light Mode */
                background: rgba(248, 250, 252, 0.95) !important; 
            }
            .dark .glass-nav {
                /* Fundal închis semi-transparent pentru Dark Mode */
                background: rgba(15, 23, 42, 0.95) !important; 
            }
        }

        .glass-card-design {
            background: var(--glass-bg);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid var(--glass-border);
            box-shadow: var(--card-shadow);
            transition: all 0.3s ease;
        }
        
/* Aplică hover-ul doar pe ecrane care suportă mouse (Desktop/Laptop) */
@media (hover: hover) and (pointer: fine) {
  .glass-card-design:not(.tilt-card):hover {
    border-color: #3b82f6;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
    transform: translateY(-5px);
  }
}

        /* FLIP CARDS */
        .flip-card {
            background-color: transparent;
            perspective: 1000px;
            height: 420px;
        }

        .flip-card-inner {
            position: relative;
            width: 100%;
            height: 100%;
            text-align: center;
            transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
            transform-style: preserve-3d;
        }

        .flip-card.flipped .flip-card-inner {
            transform: rotateY(180deg);
        }

        .flip-card-front, .flip-card-back {
            position: absolute;
            width: 100%;
            height: 100%;
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
            border-radius: 1.5rem;
            padding: 2.5rem;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

        .flip-card-front {
            background: var(--glass-bg);
            backdrop-filter: blur(12px);
            border: 1px solid var(--glass-border);
            box-shadow: var(--card-shadow);
        }
        
        .flip-card-back {
            background: var(--flip-back-bg); 
            backdrop-filter: blur(20px);
            border: 1px solid #3b82f6;
            transform: rotateY(180deg);
            box-shadow: 0 0 30px rgba(59, 130, 246, 0.2);
            z-index: 2;
        }

        .text-gradient {
            background: linear-gradient(to right, #3b82f6, #0ea5e9);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        /* Footer Links Hover */
        .footer-link {
            position: relative;
            display: inline-block;
            transition: color 0.3s;
        }
        .footer-link::after {
            content: '';
            position: absolute;
            width: 0;
            height: 1px;
            bottom: -2px;
            left: 0;
            background-color: #3b82f6;
            transition: width 0.3s;
        }
        .footer-link:hover::after {
            width: 100%;
        }
/* FIX glass pe mobile (iOS/Safari) */
.flip-card-front,
.flip-card-back {
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .flip-card-front,
  .flip-card-back {
    background: rgba(255,255,255,0.85); /* light fallback */
  }
  .dark .flip-card-front,
  .dark .flip-card-back {
    background: rgba(30,41,59,0.75); /* dark fallback */
  }
}

        /* Mobile Menu */
        .mobile-menu-overlay {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: var(--color-primary);
            z-index: 49;
            transform: translateX(100%);
            transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
            display: flex; flex-direction: column; justify-content: center; align-items: center;
        }
        .mobile-menu-overlay.open { transform: translateX(0); }

        canvas {
            pointer-events: none;
        }



/* Animația de plutire (doar sus-jos) */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.floating-card {
  animation: float 4s ease-in-out infinite;
}

/* Delay-uri pentru plutire (opțional, pentru naturalețe) */
.card-wrapper:nth-child(2) .floating-card { animation-delay: 0.5s; }
.card-wrapper:nth-child(3) .floating-card { animation-delay: 1s; }
.card-wrapper:nth-child(4) .floating-card { animation-delay: 1.5s; }

/* Starea inițială: Invizibil */
/* Reveal premium (intră + iese, se poate re-anima) */
.reveal-fade{
  opacity: 0;
  transform: translateY(14px);
  filter: blur(8px);
  transition:
    opacity .75s cubic-bezier(.2,.8,.2,1),
    transform .75s cubic-bezier(.2,.8,.2,1),
    filter .75s cubic-bezier(.2,.8,.2,1);
  will-change: opacity, transform, filter;
}

/* Delay doar la apariție (la dispariție nu vrem întârziere) */
.reveal-fade.active{
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  transition-delay: var(--d, 0ms);
}


/* Starea finală: Vizibil */
.reveal-fade.active {
  opacity: 1;
}
.why-reveal{
  opacity: 0;
  transform: translateY(14px);
  filter: blur(8px);
  transition:
    opacity .75s cubic-bezier(.2,.8,.2,1),
    transform .75s cubic-bezier(.2,.8,.2,1),
    filter .75s cubic-bezier(.2,.8,.2,1);
  will-change: opacity, transform, filter;
}

.why-reveal.is-in{
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  transition-delay: var(--d, 0ms);
}
/* 
lag in iphone
#scrollRibbonPath {
  stroke-width: 24;              
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.1s ease-out;
} */
#scrollRibbonPath {
  stroke-width: 16px; /* Mai subțire pe mobil pentru performanță */
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.1s ease-out;
  will-change: stroke-dashoffset, stroke; /* Spune plăcii video să se pregătească */
}

/* Adăugăm grosime și umbră DOAR pe ecrane mari (Desktop/Tablete mari) unde placa video duce fără lag */
@media (min-width: 768px) {
  #scrollRibbonPath {
    stroke-width: 24px;
    filter: drop-shadow(0 10px 15px rgba(59, 130, 246, 0.4));
  }
}
/* ===============================
   SERVICES: 3D tilt support (ONLY additions)
   =============================== */

/* variabile tilt pe wrapper (le setează JS) */
#services .flip-card{
  --tRX: 0deg;
  --tRY: 0deg;
  --tLift: 0px;
  --tScale: 1;
}

/* NU atingem fețele (ca să nu se strice click/hover/flip).
   Tilt-ul îl aplică JS pe .flip-card-inner prin inline style. */
#services .flip-card-inner{
  will-change: transform;
  transform-style: preserve-3d;
}

/* Tilt rapid doar când NU flip-uieste */
#services .flip-card-inner.is-tilting{
  transition: transform 60ms linear;
}

/* Când flip-uieste, forțăm tranziția originală (slow) */
#services .flip-card-inner.flip-animating{
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* asigură pointer pe butoane chiar cu transformuri 3D */
#services .flip-card button,
#services .flip-card a{
  cursor: pointer;
  pointer-events: auto;
}

/* opțional: păstrează click-ul consistent pe fețe */
#services .flip-card-front,
#services .flip-card-back{
  pointer-events: auto;
}

    

/* --- STILURI NOI OPTIMIZATE --- */

/* Zona care dictează înălțimea dinamica (rezolvă distanțarea butoanelor) */
.itq-layout-area {
    position: relative;
    margin: 0 auto;
}

/* Wrapper-ul absolut care menține proporția de bază 1200x750 */
.itq-scale-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 1320px;
    height: 750px;
    transform-origin: top left;
}

/* Stiluri Telefon */
.itq-iphone-mockup {
    width: 340px;
    height: 700px;
    background: #111;
    border-radius: 46px;
    padding: 12px;
    box-shadow: 0 0 0 2px #444, 0 20px 50px rgba(0,0,0,0.6), inset 0 0 10px rgba(255,255,255,0.2);
    position: absolute;
    left: 0;
    bottom: -50px;
    z-index: 20;
}

.itq-iphone-screen {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 34px;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.itq-iphone-screen::-webkit-scrollbar { display: none; }

.itq-iphone-notch {
    position: absolute;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 35px;
    background: #000;
    border-radius: 20px;
    z-index: 30;
    pointer-events: none;
}

.itq-iphone-content {
    width: 100%;
    display: block;
    padding-top: 45px;
    height: auto;
}

/* Stiluri Laptop */
.itq-laptop-container {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.itq-laptop-mockup {
    width: 900px;
    height: 560px;
    background: #111;
    border-radius: 20px 20px 0 0;
    padding: 20px 20px 30px 20px;
    position: relative;
    border: 3px solid #9f9f9f;
    border-bottom: none;
}

.itq-laptop-screen {
    width: 100%;
    height: 100%;
    background: #fff;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-radius: 4px;
}
.itq-laptop-screen::-webkit-scrollbar { display: none; }

.itq-laptop-content {
    width: 100%;
    display: block;
    height: auto;
}

.itq-laptop-base {
    width: 1020px;
    height: 25px;
    background: linear-gradient(to bottom, #d8d8d8, #999);
    border-radius: 5px 5px 20px 20px;
    position: relative;
    display: flex;
    justify-content: center;
    box-shadow: 0 15px 30px rgba(0,0,0,0.7);
}

.itq-laptop-lip {
    width: 120px;
    height: 10px;
    background: #b0b0b0;
    border-radius: 0 0 10px 10px;
}

/* Butoane de control */
.itq-scroll-controls {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 20px;
}

.itq-scroll-btn {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
}

.dark .itq-scroll-btn {
    background: rgba(15, 23, 42, 0.86);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.itq-scroll-btn:hover { background: rgba(255, 255, 255, 1); transform: scale(1.04); }
.dark .itq-scroll-btn:hover { background: rgba(30, 41, 59, 0.96); }
.itq-scroll-btn:active { transform: scale(0.96); }
.itq-scroll-btn.active { background: rgba(219, 234, 254, 0.95); }
.dark .itq-scroll-btn.active { background: rgba(37, 99, 235, 0.28); }

@media (max-width: 600px) {
    .itq-scroll-btn {
        width: 44px;
        height: 44px;
        font-size: 20px;
        border-radius: 12px;
    }
}