/* ============================================
   Zentory Website - Custom Styles
   ============================================ */

/* Base */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* ---- Navbar ---- */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

.navbar-scrolled .nav-brand {
    color: #2c7be5 !important;
}

.navbar-scrolled .nav-link {
    color: #374151 !important;
}

.navbar-scrolled .nav-link:hover {
    color: #2c7be5 !important;
}

.navbar-scrolled .lang-btn {
    color: #374151 !important;
}

.navbar-scrolled .nav-cta {
    background: #2c7be5 !important;
    color: #fff !important;
}

/* ---- Scroll Animations ---- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.animate-on-scroll.animate-left {
    transform: translateX(-40px);
}

.animate-on-scroll.animate-right {
    transform: translateX(40px);
}

.animate-on-scroll.animate-scale {
    transform: scale(0.92);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* Stagger delays */
[data-delay="100"] { transition-delay: 100ms; }
[data-delay="200"] { transition-delay: 200ms; }
[data-delay="300"] { transition-delay: 300ms; }
[data-delay="400"] { transition-delay: 400ms; }
[data-delay="500"] { transition-delay: 500ms; }
[data-delay="600"] { transition-delay: 600ms; }

/* ---- Feature Cards ---- */
.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* ---- Pricing Card ---- */
.pricing-popular {
    transform: scale(1.05);
    border: 2px solid #2c7be5;
    position: relative;
}

@media (max-width: 1023px) {
    .pricing-popular {
        transform: scale(1);
    }
}

/* ---- Module Card ---- */
.module-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.module-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

/* ---- FAQ Accordion ---- */
.faq-item .faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.3s ease-out;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-item .faq-icon {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

/* ---- Hero ---- */
.bg-gradient-hero {
    background: linear-gradient(135deg, #050d1a 0%, #0b1727 20%, #0f2847 50%, #163d74 75%, #1e5aab 100%);
}

/* Glow pulses */
.hero-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(80px);
}
.hero-glow-1 { width: 500px; height: 500px; background: rgba(44,123,229,0.12); top: -10%; left: -5%; animation: glow-drift 8s ease-in-out infinite; }
.hero-glow-2 { width: 400px; height: 400px; background: rgba(6,182,212,0.08); bottom: 5%; right: -3%; animation: glow-drift 10s ease-in-out infinite 2s; }
.hero-glow-3 { width: 300px; height: 300px; background: rgba(139,92,246,0.06); top: 40%; left: 35%; animation: glow-drift 12s ease-in-out infinite 4s; }

@keyframes glow-drift {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.7; }
    50% { transform: translate(30px, -20px) scale(1.15); opacity: 1; }
}

/* Floating tech icons */
.hero-float-icon {
    position: absolute;
    color: rgba(255,255,255,0.06);
    font-size: 1.5rem;
    pointer-events: none;
    animation: icon-float var(--dur, 7s) ease-in-out infinite var(--delay, 0s);
    z-index: 1;
}

@keyframes icon-float {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.06; }
    25% { transform: translateY(-18px) rotate(5deg); opacity: 0.12; }
    50% { transform: translateY(-8px) rotate(-3deg); opacity: 0.08; }
    75% { transform: translateY(-22px) rotate(3deg); opacity: 0.14; }
}

/* Badge animation */
.hero-badge-animate {
    animation: badge-in 0.8s ease-out 0.3s both;
}
.hero-badge-dot {
    width: 8px; height: 8px;
    background: #34d399;
    border-radius: 50%;
    animation: dot-pulse 2s ease-in-out infinite;
    display: inline-block;
}
@keyframes dot-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0.5); }
    50% { box-shadow: 0 0 0 6px rgba(52,211,153,0); }
}
@keyframes badge-in {
    from { opacity: 0; transform: translateY(12px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Title lines stagger */
.hero-title-line {
    display: inline-block;
    animation: title-slide 0.9s ease-out both;
}
.hero-title-line-1 { animation-delay: 0.5s; }
.hero-title-line-2 { animation-delay: 0.7s; }

@keyframes title-slide {
    from { opacity: 0; transform: translateY(30px); filter: blur(8px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* Typed text + cursor */
.hero-typed-wrap { display: inline; }
.hero-typed-text {
    background: linear-gradient(90deg, #60a5fa, #34d399, #a78bfa, #60a5fa);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 6s ease-in-out infinite;
}
.hero-cursor {
    display: inline-block;
    color: #60a5fa;
    animation: blink 0.7s steps(1) infinite;
    font-weight: 300;
    margin-left: 2px;
}
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Subtitle + CTA + trust stagger */
.hero-subtitle-animate { animation: fade-up 0.8s ease-out 1.2s both; }
.hero-cta-animate { animation: fade-up 0.8s ease-out 1.5s both; }
.hero-stats-strip { animation: fade-up 0.8s ease-out 1.7s both; }
.hero-trust-animate { animation: fade-up 0.8s ease-out 1.9s both; }

@keyframes fade-up {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Primary CTA button shine */
.hero-btn-primary { position: relative; overflow: hidden; }
.hero-btn-shine {
    position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shine-sweep 3s ease-in-out infinite 2s;
}
@keyframes shine-sweep {
    0% { left: -100%; }
    40%, 100% { left: 100%; }
}

/* Stats strip */
.hero-stat {
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.hero-stat-num {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
    line-height: 1;
}
.hero-stat-label {
    font-size: 0.75rem;
    color: rgba(191,219,254,0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.hero-stat-divider {
    width: 1px;
    height: 28px;
    background: rgba(255,255,255,0.1);
    align-self: center;
}

/* Dashboard mockup */
.hero-dashboard {
    animation: dashboard-in 1s ease-out 0.8s both;
    perspective: 1200px;
}
@keyframes dashboard-in {
    from { opacity: 0; transform: translateY(40px) scale(0.92) rotateY(-5deg); }
    to { opacity: 1; transform: translateY(0) scale(1) rotateY(0); }
}
.hero-mockup-card {
    animation: card-hover 5s ease-in-out infinite 2s;
}
@keyframes card-hover {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Glass stat shimmer */
.hero-glass-stat {
    position: relative;
    overflow: hidden;
}
.hero-glass-stat::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    animation: shimmer 4s ease-in-out infinite;
}
.hero-glass-stat:nth-child(2)::after { animation-delay: 1s; }
.hero-glass-stat:nth-child(3)::after { animation-delay: 2s; }
@keyframes shimmer {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

/* Animated chart bars */
.hero-bar {
    height: 0%;
    animation: bar-grow 1.2s ease-out 1.5s forwards;
}
.hero-bar:nth-child(1) { animation-delay: 1.5s; }
.hero-bar:nth-child(2) { animation-delay: 1.6s; }
.hero-bar:nth-child(3) { animation-delay: 1.7s; }
.hero-bar:nth-child(4) { animation-delay: 1.8s; }
.hero-bar:nth-child(5) { animation-delay: 1.9s; }
.hero-bar:nth-child(6) { animation-delay: 2.0s; }
.hero-bar:nth-child(7) { animation-delay: 2.1s; }

@keyframes bar-grow {
    to { height: var(--bar-h); }
}

/* Live dot */
.hero-live-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #34d399;
    display: inline-block;
    animation: live-blink 1.5s ease-in-out infinite;
}
@keyframes live-blink {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(52,211,153,0.6); }
    50% { opacity: 0.5; box-shadow: 0 0 0 4px rgba(52,211,153,0); }
}

/* Activity rows slide in */
.hero-activity-row {
    animation: row-slide 0.6s ease-out both;
    animation-delay: calc(1.8s + var(--row-delay, 0s));
}
@keyframes row-slide {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Orbit ring */
.hero-orbit-ring {
    position: absolute;
    top: 50%; left: 50%;
    width: 110%;
    height: 110%;
    transform: translate(-50%, -50%);
    animation: orbit-spin 20s linear infinite;
    pointer-events: none;
    z-index: -1;
}
.hero-orbit-dot {
    position: absolute;
    font-size: 0.75rem;
    opacity: 0.3;
    top: 50%; left: 50%;
    transform: rotate(var(--angle)) translateX(calc(50% + 40px)) rotate(calc(-1 * var(--angle)));
}
@keyframes orbit-spin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Scroll indicator mouse */
.hero-scroll-indicator {
    animation: fade-up 1s ease-out 2.5s both;
}
.hero-mouse {
    width: 24px; height: 38px;
    border: 2px solid rgba(255,255,255,0.25);
    border-radius: 12px;
    position: relative;
}
.hero-mouse-wheel {
    width: 3px; height: 8px;
    background: rgba(255,255,255,0.5);
    border-radius: 2px;
    position: absolute;
    top: 6px; left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel 1.8s ease-in-out infinite;
}
@keyframes scroll-wheel {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(14px); }
}

/* ---- Nav Link Underline ---- */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #2c7be5;
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
    left: 0;
}

/* ---- Gradient Text ---- */
.gradient-text {
    background: linear-gradient(135deg, #2c7be5, #198754);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- Blog Overlay ---- */
.blog-overlay {
    background: rgba(11, 23, 39, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* ---- Form Input ---- */
.form-input {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
    border-color: #2c7be5;
    box-shadow: 0 0 0 3px rgba(44, 123, 229, 0.1);
    outline: none;
}

/* ---- Legal Collapsible ---- */
.legal-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
}

.legal-content.active {
    max-height: 3000px;
}

.legal-toggle .legal-icon {
    transition: transform 0.3s ease;
}

.legal-toggle.active .legal-icon {
    transform: rotate(180deg);
}

/* ---- Mobile Menu ---- */
.hamburger-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger-active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.mobile-menu.active {
    max-height: 500px;
}

/* ---- Language Dropdown ---- */
.lang-dropdown {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.lang-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ---- Back to Top ---- */
.back-to-top {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* ---- Pricing Gradient ---- */
.bg-gradient-pricing {
    background: linear-gradient(180deg, #f8fbff 0%, #e8f4fd 100%);
}

/* ---- Stats ---- */
.stat-number {
    font-variant-numeric: tabular-nums;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #2c7be5;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1a68c7;
}

/* ---- Section Badge ---- */
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    background: rgba(44, 123, 229, 0.08);
    color: #2c7be5;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

/* ---- RTL Support ---- */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .nav-link::after {
    left: auto;
    right: 50%;
}

[dir="rtl"] .nav-link:hover::after,
[dir="rtl"] .nav-link.active::after {
    left: auto;
    right: 0;
}

[dir="rtl"] .rtl-flip {
    direction: rtl;
}

[dir="rtl"] .faq-item .faq-icon {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .hero-trust span {
    direction: rtl;
}

/* RTL flex reversal */
[dir="rtl"] .rtl-reverse {
    flex-direction: row-reverse;
}

/* ---- Utility ---- */
.transition-smooth {
    transition: all 0.3s ease;
}

/* Popular badge pulse */
.popular-pulse {
    animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(44, 123, 229, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(44, 123, 229, 0); }
    100% { box-shadow: 0 0 0 0 rgba(44, 123, 229, 0); }
}
