/* ============================================
   BTrade AI - Hero Section (Stage 1)
   ============================================ */
   /* RESET */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; background: #0a0a0f; }

/* CSS Variables - BTrade AI Brand Colors */
/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: #0a0a0f;
}

/* Remove WordPress default margins */
.page-template-template-landing,
.page-template-template-landing-php {
    margin: 0 !important;
    padding: 0 !important;
}

#wrapper,
#main,
.container,
.row {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

:root {
    --btrade-primary: #2196F3;
    --btrade-primary-dark: #1976D2;
    --btrade-primary-light: #64B5F6;
    --btrade-accent: #00BCD4;
    --btrade-success: #00ff9d;
    --btrade-danger: #ff4757;
    --btrade-warning: #ffa502;
    --btrade-bg-dark: #0a0a0f;
    --btrade-bg-card: #111118;
    --btrade-glass-bg: rgba(17, 17, 24, 0.7);
    --btrade-glass-border: rgba(33, 150, 243, 0.15);
    --btrade-text-primary: #ffffff;
    --btrade-text-secondary: #8b8b9e;
    --btrade-text-muted: #5a5a6e;
}

/* Hero Section Base */
.btrade-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 700px;
    background: var(--btrade-bg-dark);
    overflow: hidden;
    font-family: "Inter", "IBM Plex Sans Arabic", sans-serif;
    color: var(--btrade-text-primary);
}

/* Typography */
.btrade-hero h1, .btrade-hero h2, .btrade-hero h3, .btrade-hero .logo-text {
    font-family: "Poppins", "Cairo", sans-serif;
}

/* Background Grid */
.btrade-hero .bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(33, 150, 243, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(33, 150, 243, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* Logo */
.btrade-hero .hero-logo {
    position: absolute;
    top: 28px;
    left: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 100;
}

.btrade-hero .logo-img {
    width: 40px;
    height: 40px;
    object-fit: cover; /* غيرته من contain لـ cover */
    object-position: center;
    border-radius: 10px;
    display: block;
    flex-shrink: 0; /* مهم عشان ما ينكمش */
}

.btrade-hero .logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--btrade-primary);
    letter-spacing: -0.5px;
    white-space: nowrap; /* عشان ما ينزلش سطر */
}

/* Hero Content - Left Side with Glass Effect */
.btrade-hero .hero-content {
    position: absolute;
    top: 55%;
    left: 40px;
    transform: translateY(-50%);
    z-index: 50;
    max-width: 520px;
}

.btrade-hero .hero-glass {
    background: var(--btrade-glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--btrade-glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.btrade-hero .hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 20px;
    color: var(--btrade-text-primary);
}

.btrade-hero .gradient-text {
    background: linear-gradient(135deg, var(--btrade-primary), var(--btrade-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btrade-hero .hero-subtitle {
    font-size: 16px;
    color: var(--btrade-text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
    font-weight: 400;
}

/* Engine Tags Preview */
.btrade-hero .engines-preview {
    margin-bottom: 32px;
}

.btrade-hero .engine-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.btrade-hero .tag {
    padding: 8px 14px;
    background: rgba(33, 150, 243, 0.1);
    border: 1px solid rgba(33, 150, 243, 0.2);
    border-radius: 20px;
    font-size: 12px;
    color: var(--btrade-primary-light);
    font-family: "Inter", sans-serif;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.btrade-hero .tag:last-child {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--btrade-text-muted);
}

/* CTAs */
.btrade-hero .hero-ctas {
    display: flex;
    gap: 12px;
}

.btrade-hero .cta-primary {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--btrade-primary), var(--btrade-primary-dark));
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: "Inter", sans-serif;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.btrade-hero .cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.4);
}

.btrade-hero .cta-secondary {
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--btrade-text-primary);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: "Inter", sans-serif;
    backdrop-filter: blur(10px);
}

.btrade-hero .cta-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Main Container */
.btrade-hero .hero-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

/* Card Stream */
.btrade-hero .card-stream {
    position: absolute;
    width: 100vw;
    height: 280px;
    display: flex;
    align-items: center;
    overflow: visible;
    z-index: 10;
    opacity: 0.9;
}

.btrade-hero .card-line {
    display: flex;
    align-items: center;
    gap: 50px;
    white-space: nowrap;
    cursor: grab;
    user-select: none;
    will-change: transform;
    padding-left: 50%;
}

.btrade-hero .card-line:active,
.btrade-hero .card-line.dragging {
    cursor: grabbing;
}

/* Trade Card Wrapper */
.btrade-hero .card-wrapper {
    position: relative;
    width: 380px;
    height: 240px;
    flex-shrink: 0;
}

/* Front Card - Trade Result */
.btrade-hero .card-normal {
    position: absolute;
    top: 0;
    left: 0;
    width: 380px;
    height: 240px;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(22, 33, 62, 0.95));
    border-radius: 16px;
    overflow: hidden;
    z-index: 2;
    border: 1px solid rgba(33, 150, 243, 0.15);
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.6), 
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    clip-path: inset(0 0 0 var(--clip-right, 0%));
    transition: clip-path 0.1s;
    backdrop-filter: blur(10px);
}

.btrade-hero .card-normal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--btrade-primary), transparent);
    opacity: 0.6;
}

.btrade-hero .trade-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.btrade-hero .coin-pair {
    font-family: "Inter", sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--btrade-text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.btrade-hero .coin-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
}

.btrade-hero .coin-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btrade-hero .profit-badge {
    padding: 8px 16px;
    background: rgba(0, 255, 157, 0.15);
    color: var(--btrade-success);
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-weight: 700;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 157, 0.3);
}

.btrade-hero .profit-badge.loss {
    background: rgba(255, 71, 87, 0.15);
    color: var(--btrade-danger);
    border-color: rgba(255, 71, 87, 0.3);
}

.btrade-hero .trade-chart-mini {
    height: 70px;
    margin: 16px 24px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.btrade-hero .chart-line {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    opacity: 0.8;
}

.btrade-hero .chart-line.up {
    background: linear-gradient(to top, rgba(0, 255, 157, 0.4), transparent);
    clip-path: polygon(0% 60%, 15% 40%, 30% 50%, 45% 30%, 60% 35%, 75% 15%, 90% 20%, 100% 10%, 100% 100%, 0% 100%);
}

.btrade-hero .chart-line.down {
    background: linear-gradient(to top, rgba(255, 71, 87, 0.4), transparent);
    clip-path: polygon(0% 20%, 15% 30%, 30% 25%, 45% 45%, 60% 40%, 75% 60%, 90% 55%, 100% 80%, 100% 100%, 0% 100%);
}

.btrade-hero .trade-details {
    display: flex;
    justify-content: space-between;
    padding: 0 24px;
    margin-bottom: 14px;
}

.btrade-hero .detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.btrade-hero .detail-label {
    font-size: 10px;
    color: var(--btrade-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 500;
}

.btrade-hero .detail-value {
    font-family: "Inter", sans-serif;
    font-size: 14px;
    color: var(--btrade-text-primary);
    font-weight: 600;
}

.btrade-hero .trader-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    background: rgba(0, 0, 0, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btrade-hero .trader-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--btrade-primary), var(--btrade-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    color: white;
    font-family: "Poppins", sans-serif;
}

.btrade-hero .trader-name {
    font-size: 13px;
    color: var(--btrade-text-secondary);
    font-family: "Inter", sans-serif;
}

.btrade-hero .trader-name strong {
    color: var(--btrade-text-primary);
    font-weight: 600;
}

/* Back Card - AI Processing */
.btrade-hero .card-ascii {
    position: absolute;
    top: 0;
    left: 0;
    width: 380px;
    height: 240px;
    background: rgba(13, 13, 18, 0.98);
    border-radius: 16px;
    overflow: hidden;
    z-index: 1;
    border: 1px solid rgba(33, 150, 243, 0.08);
    clip-path: inset(0 calc(100% - var(--clip-left, 0%)) 0 0);
    transition: clip-path 0.1s;
}

.btrade-hero .ascii-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: rgba(33, 150, 243, 0.7);
    font-family: "JetBrains Mono", monospace;
    font-size: 9px;
    line-height: 11px;
    overflow: hidden;
    white-space: pre;
    padding: 16px;
    text-align: left;
    -webkit-mask-image: linear-gradient(
        to right,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.8) 30%,
        rgba(0, 0, 0, 0.6) 50%,
        rgba(0, 0, 0, 0.4) 80%,
        rgba(0, 0, 0, 0.2) 100%
    );
    animation: btrade-glitch 0.15s infinite linear alternate-reverse;
}

@keyframes btrade-glitch {
    0% { opacity: 1; }
    25% { opacity: 0.95; }
    50% { opacity: 1; }
    75% { opacity: 0.9; }
    100% { opacity: 1; }
}

/* Scanner */
.btrade-hero .scanner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 3px;
    height: 340px;
    border-radius: 30px;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(33, 150, 243, 0.4),
        rgba(33, 150, 243, 0.9),
        rgba(33, 150, 243, 0.4),
        transparent
    );
    box-shadow: 
        0 0 40px rgba(33, 150, 243, 0.4),
        0 0 80px rgba(33, 150, 243, 0.2);
    animation: btrade-scan-pulse 2.5s ease-in-out infinite alternate;
    z-index: 20;
}

@keyframes btrade-scan-pulse {
    0% {
        opacity: 0.7;
        transform: translate(-50%, -50%) scaleY(1);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scaleY(1.02);
    }
}

.btrade-hero .scanner-label {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--btrade-primary);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-family: "JetBrains Mono", monospace;
    opacity: 0.8;
    white-space: nowrap;
}

/* Scan Effect */
.btrade-hero .scan-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(33, 150, 243, 0.15),
        transparent
    );
    animation: btrade-scan-effect 0.6s ease-out;
    pointer-events: none;
    z-index: 5;
}

@keyframes btrade-scan-effect {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Controls - Hidden by default */
.btrade-hero .hero-controls {
    position: absolute;
    bottom: 32px;
    left: 40px;
    display: flex;
    gap: 8px;
    z-index: 100;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s;
}

.btrade-hero:hover .hero-controls {
    opacity: 1;
    transform: translateY(0);
}

.btrade-hero .control-btn {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--btrade-text-secondary);
    font-size: 16px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btrade-hero .control-btn:hover {
    background: rgba(33, 150, 243, 0.1);
    border-color: rgba(33, 150, 243, 0.3);
    color: var(--btrade-primary);
    transform: translateY(-2px);
}

/* Canvas Layers */
#particleCanvas,
#scannerCanvas {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100vw;
    height: 340px;
    pointer-events: none;
}

#particleCanvas {
    z-index: 1;
    opacity: 0.5;
}

#scannerCanvas {
    z-index: 15;
}

/* Responsive */
@media (max-width: 1024px) {
    .btrade-hero .hero-content {
        left: 20px;
        max-width: 400px;
    }
    
    .btrade-hero .hero-glass {
        padding: 30px;
    }
    
    .btrade-hero .hero-title {
        font-size: 42px;
    }
}

@media (max-width: 768px) {
    .btrade-hero .hero-content {
        top: auto;
        bottom: 100px;
        left: 20px;
        right: 20px;
        transform: none;
        max-width: none;
    }
    
    .btrade-hero .hero-glass {
        padding: 24px;
    }
    
    .btrade-hero .hero-title {
        font-size: 36px;
    }
    
    .btrade-hero .hero-subtitle {
        font-size: 14px;
    }
    
    .btrade-hero .engine-tags {
        gap: 6px;
    }
    
    .btrade-hero .tag {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .btrade-hero .hero-ctas {
        flex-direction: column;
    }
    
    .btrade-hero .cta-primary,
    .btrade-hero .cta-secondary {
        width: 100%;
        text-align: center;
    }
    
    .btrade-hero .hero-logo {
        top: 20px;
        left: 20px;
    }
    
    .btrade-hero .hero-controls {
        left: 20px;
        bottom: 20px;
    }
    
    .btrade-hero .card-wrapper {
        transform: scale(0.8);
    }
}