/* ========================================
   MODERN INVEST SECTION STYLES
   Trading Platform Design - How to Invest
   ======================================== */

/* Section Container */
.modern-invest-section {
    position: relative;
    padding: 120px 0;
    background: #112025;
    overflow: hidden;
}

/* Animated Background Pattern */
.invest-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.3;
    pointer-events: none;
}

.pattern-circles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.05) 1%, transparent 50%),
                      radial-gradient(circle at 75% 75%, rgba(16, 185, 129, 0.05) 1%, transparent 50%);
    background-size: 100px 100px;
    animation: circlesMove 20s linear infinite;
}

@keyframes circlesMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(100px, 100px); }
}

.pattern-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 35px,
            rgba(59, 130, 246, 0.03) 35px,
            rgba(59, 130, 246, 0.03) 70px
        );
    animation: linesMove 15s linear infinite;
}

@keyframes linesMove {
    0% { transform: translateX(0); }
    100% { transform: translateX(70px); }
}

/* Gradient Orbs */
.gradient-orb.orb-invest-left {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3), transparent 70%);
    border-radius: 50%;
    filter: blur(100px);
    top: 20%;
    left: -10%;
    animation: floatOrb 10s ease-in-out infinite;
    pointer-events: none;
}

.gradient-orb.orb-invest-right {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.3), transparent 70%);
    border-radius: 50%;
    filter: blur(100px);
    bottom: 10%;
    right: -10%;
    animation: floatOrb 12s ease-in-out infinite reverse;
    pointer-events: none;
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -40px) scale(1.1); }
    66% { transform: translate(-30px, 30px) scale(0.9); }
}

/* Section Badge */
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 50px;
    color: #3b82f6;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-badge svg {
    width: 18px;
    height: 18px;
}

/* Section Title */
.section-title {
    font-size: 48px;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 20px;
    line-height: 1.2;
    background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Section Description */
.section-description {
    font-size: 18px;
    color: #94a3b8;
    line-height: 1.7;
    margin-bottom: 48px;
}

/* Invest Content */
.invest-content {
    position: relative;
    z-index: 2;
}

/* Steps List */
.invest-steps {
    position: relative;
    margin-bottom: 40px;
}

/* Individual Step */
.invest-step {
    position: relative;
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.invest-step.aos-animate {
    opacity: 1;
    transform: translateX(0);
}

/* Step Connector Line */
.step-connector {
    position: absolute;
    left: 31px;
    top: 70px;
    width: 2px;
    height: calc(100% + 10px);
    background: linear-gradient(180deg, 
        rgba(59, 130, 246, 0.5) 0%,
        rgba(59, 130, 246, 0.2) 100%);
    z-index: 0;
}

.step-connector::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #3b82f6;
    border-radius: 50%;
    animation: flowDown 2s ease-in-out infinite;
}

@keyframes flowDown {
    0% { top: 0; opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* Step Number Badge */
.step-number-badge {
    position: relative;
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.step-number-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.2),
        rgba(16, 185, 129, 0.2));
    border-radius: 16px;
    transition: all 0.5s ease;
    border: 2px solid rgba(59, 130, 246, 0.3);
}

.invest-step:hover .step-number-bg {
    transform: rotate(45deg) scale(1.1);
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.4),
        rgba(16, 185, 129, 0.4));
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.4);
}

.step-number {
    position: relative;
    z-index: 2;
    font-size: 24px;
    font-weight: 800;
    color: #3b82f6;
    transition: all 0.3s ease;
}

.invest-step:hover .step-number {
    color: #60a5fa;
    transform: scale(1.1);
}

/* Step Pulse Effect */
.step-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    animation: pulse 2s ease-in-out infinite;
    opacity: 0;
}

.invest-step:hover .step-pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* Step Content */
.step-content {
    flex: 1;
    background: rgba(17, 32, 37, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 16px;
    padding: 24px 28px;
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.step-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent,
        rgba(59, 130, 246, 0.1),
        transparent);
    transition: left 0.6s ease;
}

.invest-step:hover .step-content {
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateX(8px);
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.invest-step:hover .step-content::before {
    left: 100%;
}

/* Step Header */
.step-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.step-title {
    font-size: 20px;
    font-weight: 700;
    color: #f8fafc;
    margin: 0;
    transition: color 0.3s ease;
}

.invest-step:hover .step-title {
    color: #3b82f6;
}

.step-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    color: #3b82f6;
    transition: all 0.3s ease;
}

.invest-step:hover .step-icon {
    background: #3b82f6;
    color: white;
    transform: scale(1.1);
}

.step-icon svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.invest-step:hover .step-icon svg {
    transform: translateX(4px);
}

/* Step Description */
.step-description {
    font-size: 15px;
    color: #94a3b8;
    line-height: 1.7;
    margin: 0;
    transition: color 0.3s ease;
}

.invest-step:hover .step-description {
    color: #cbd5e1;
}

/* CTA Section */
.invest-cta {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
}

.btn-large {
    padding: 16px 40px;
    font-size: 16px;
}

.btn-modern {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    font-weight: 600;
    font-size: 15px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-modern svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.btn-modern-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.btn-modern-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-modern-primary:hover::before {
    left: 100%;
}

.btn-modern-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.5);
}

.btn-modern-primary:hover svg {
    transform: translateX(4px);
}

/* CTA Info */
.cta-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

.cta-info svg {
    width: 16px;
    height: 16px;
    color: #3b82f6;
}

/* Visual Section */
.invest-visual {
    position: relative;
    z-index: 2;
}

.invest-image-wrapper {
    position: relative;
    border-radius: 24px;
    overflow: visible;
}

/* Image Decorations */
.image-decoration {
    position: absolute;
    border-radius: 16px;
    opacity: 0.6;
    z-index: 0;
}

.decoration-1 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), transparent);
    top: -30px;
    right: -30px;
    animation: float 6s ease-in-out infinite;
}

.decoration-2 {
    width: 150px;
    height: 150px;
    background: linear-gradient(225deg, rgba(16, 185, 129, 0.2), transparent);
    bottom: -20px;
    left: -20px;
    animation: float 8s ease-in-out infinite reverse;
}

.decoration-3 {
    width: 100px;
    height: 100px;
    background: linear-gradient(315deg, rgba(168, 85, 247, 0.2), transparent);
    top: 50%;
    left: -50px;
    animation: float 7s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(20px, -20px) rotate(10deg); }
    66% { transform: translate(-15px, 15px) rotate(-10deg); }
}

/* Invest Image */
.invest-image {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.1);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.5s ease;
    z-index: 1;
}

.invest-image:hover {
    transform: scale(1.02);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(59, 130, 246, 0.2);
}

.invest-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.invest-image:hover img {
    transform: scale(1.05);
}

/* Image Overlay */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.1) 0%,
        transparent 50%,
        rgba(16, 185, 129, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.invest-image:hover .image-overlay {
    opacity: 1;
}

/* Light/Dark Mode Images */
.l-mood { display: block; }
.d-mood { display: none; }

@media (prefers-color-scheme: dark) {
    .l-mood { display: none; }
    .d-mood { display: block; }
}

/* Floating Stats */
.floating-stat {
    position: absolute;
    background: rgba(17, 32, 37, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    transition: all 0.4s ease;
    z-index: 3;
    animation: floatStats 4s ease-in-out infinite;
}

.floating-stat:hover {
    transform: translateY(-8px) scale(1.05);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.stat-1 {
    top: 10%;
    right: -30px;
    animation-delay: 0s;
}

.stat-2 {
    top: 45%;
    left: -40px;
    animation-delay: 1s;
}

.stat-3 {
    bottom: 15%;
    right: -20px;
    animation-delay: 2s;
}

@keyframes floatStats {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Stat Icon */
.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 12px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.stat-icon.success {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.stat-icon.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

/* Stat Content */
.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 20px;
    font-weight: 800;
    color: #f8fafc;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

/* Background Shape */
.invest-shape-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

.invest-shape-bg svg {
    width: 100%;
    height: auto;
}

/* Responsive Design */
@media (max-width: 1199px) {
    .modern-invest-section {
        padding: 100px 0;
    }

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

    .floating-stat {
        padding: 12px 16px;
    }

    .stat-value {
        font-size: 18px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 991px) {
    .modern-invest-section {
        padding: 80px 0;
    }

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

    .section-description {
        font-size: 16px;
        margin-bottom: 40px;
    }

    .invest-visual {
        margin-bottom: 60px;
    }

    .floating-stat {
        position: static;
        margin: 16px 0;
        animation: none;
    }

    .image-decoration {
        display: none;
    }
}

@media (max-width: 767px) {
    .modern-invest-section {
        padding: 60px 0;
    }

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

    .section-description {
        font-size: 15px;
    }

    .invest-step {
        gap: 16px;
    }

    .step-number-badge {
        width: 52px;
        height: 52px;
    }

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

    .step-connector {
        left: 25px;
    }

    .step-content {
        padding: 20px;
    }

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

    .step-description {
        font-size: 14px;
    }

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

    .gradient-orb {
        display: none;
    }
}

@media (max-width: 575px) {
    .section-badge {
        padding: 8px 20px;
        font-size: 13px;
    }

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

    .step-number-badge {
        width: 44px;
        height: 44px;
    }

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

    .step-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .step-icon {
        align-self: flex-end;
    }
}

/* Animation Enhancements */
[data-aos="fade-right"] {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s ease;
}

[data-aos="fade-right"].aos-animate {
    opacity: 1;
    transform: translateX(0);
}

[data-aos="fade-left"] {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s ease;
}

[data-aos="fade-left"].aos-animate {
    opacity: 1;
    transform: translateX(0);
}

/* Dark Mode Support */
@media (prefers-color-scheme: light) {
    .modern-invest-section {
        background: linear-gradient(180deg, 
            rgba(248, 250, 252, 0.9) 0%,
            rgba(241, 245, 249, 0.8) 50%,
            rgba(248, 250, 252, 0.9) 100%);
    }

    .step-content,
    .floating-stat {
        background: rgba(255, 255, 255, 0.95);
        border-color: rgba(203, 213, 225, 0.3);
    }

    .section-title {
        background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .step-title,
    .stat-value {
        color: #0f172a;
    }

    .step-description,
    .section-description {
        color: #475569;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .invest-step,
    .invest-image,
    .floating-stat,
    .pattern-circles,
    .pattern-lines,
    .gradient-orb,
    .step-pulse {
        animation: none;
        transition: none;
    }

    .invest-step:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .modern-invest-section {
        background: white;
        padding: 40px 0;
    }

    .invest-step {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .gradient-orb,
    .invest-bg-pattern,
    .floating-stat,
    .image-decoration {
        display: none;
    }
}
