/* =====================================================
   FINAL CRITICAL UI FIXES - HIGHEST PRIORITY
   This file should be loaded LAST to override all others
   ===================================================== */

/* =====================================================
   1. BANNER TYPING ANIMATION FIX
   ===================================================== */
.cd-headline.clip .cd-words-wrapper {
    overflow: visible !important;
    display: inline-block !important;
}

.cd-headline.clip .cd-words-wrapper b {
    opacity: 0;
    display: inline-block !important;
    position: absolute;
    white-space: nowrap;
}

.cd-headline.clip .cd-words-wrapper b.is-visible {
    opacity: 1 !important;
    position: relative !important;
    display: inline-block !important;
    visibility: visible !important;
}

.cd-headline.clip .cd-words-wrapper b.is-hidden {
    opacity: 0 !important;
    position: absolute !important;
}

/* Ensure the animation wrapper shows content */
.banner__content-2 .animation-wrapper {
    min-height: 60px;
    display: block;
    overflow: visible !important;
}

.banner__content-2 h2 {
    overflow: visible !important;
}

.gradient-text-1 {
    background: linear-gradient(90deg, rgb(251, 83, 67) 0%, rgb(5, 157, 255) 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* =====================================================
   2. FINANCIAL INNOVATION FEATURE CARDS - COMPLETE FIX
   ===================================================== */
.about__area.theme-bg-5 {
    background: #1a1d29 !important;
}

.about__area.theme-bg-5 .feature-box,
.about__area .feature-box.glass-effect {
    background: rgba(30, 40, 55, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 24px !important;
    padding: 35px 25px !important;
    min-height: 340px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: center !important;
    overflow: visible !important;
}

.about__area.theme-bg-5 .feature-icon-wrap,
.about__area .feature-box .feature-icon-wrap {
    width: 80px !important;
    height: 80px !important;
    min-width: 80px !important;
    min-height: 80px !important;
    background: rgba(0, 245, 160, 0.1) !important;
    border: 2px solid rgba(0, 245, 160, 0.2) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 25px !important;
}

.about__area.theme-bg-5 .feature-icon-wrap i,
.about__area .feature-box .feature-icon-wrap i {
    font-size: 2rem !important;
    color: #00F5A0 !important;
}

.about__area.theme-bg-5 .feature-box h4,
.about__area .feature-box h4 {
    font-size: 1.35rem !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    margin-bottom: 15px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    text-overflow: unset !important;
    overflow: visible !important;
    width: 100% !important;
    line-height: 1.3 !important;
}

.about__area.theme-bg-5 .feature-box p,
.about__area .feature-box p {
    font-size: 1rem !important;
    line-height: 1.7 !important;
    color: rgba(255, 255, 255, 0.75) !important;
    margin: 0 !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    text-overflow: unset !important;
    overflow: visible !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* =====================================================
   3. HOW IMVEST WORKS SECTION - COMPLETE FIX
   ===================================================== */
.work__step-area {
    background: #121225 !important;
    padding: 80px 0 !important;
}

.work__steps-main-3 {
    position: relative !important;
}

/* Remove ALL pseudo-elements that might be causing issues */
.work__steps-main-3::before,
.work__steps-main-3::after,
.working__step-item::before,
.working__step-item::after,
.working__step-round::before,
.working__step-round::after,
.working__step-content::before,
.working__step-content::after {
    display: none !important;
    content: none !important;
}

/* Clean connecting line */
.work__steps-main-3 > .row {
    position: relative;
}

.work__steps-main-3 > .row::before {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    top: 35px !important;
    left: 12% !important;
    right: 12% !important;
    height: 2px !important;
    background: linear-gradient(90deg, 
        rgba(0, 245, 160, 0.2) 0%,
        rgba(0, 245, 160, 0.4) 50%,
        rgba(0, 217, 245, 0.2) 100%) !important;
    z-index: 1 !important;
}

/* Step item container */
.working__step-item {
    position: relative !important;
    z-index: 2 !important;
    padding: 0 15px !important;
    text-align: center !important;
    background: transparent !important;
    border: none !important;
}

/* Step number circles */
.working__step-round {
    width: 70px !important;
    height: 70px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(0, 245, 160, 0.15) !important;
    border-radius: 50% !important;
    margin: 0 auto 25px auto !important;
    position: relative !important;
    z-index: 3 !important;
    border: 3px solid rgba(0, 245, 160, 0.3) !important;
}

.working__step-round span {
    width: 52px !important;
    height: 52px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #00F5A0 0%, #00D9F5 100%) !important;
    border-radius: 50% !important;
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: #121225 !important;
}

/* Color variations for step circles */
.working__step-item.is-mainly-red .working__step-round {
    background: rgba(255, 107, 107, 0.15) !important;
    border-color: rgba(255, 107, 107, 0.3) !important;
}

.working__step-item.is-mainly-red .working__step-round span {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%) !important;
}

.working__step-item.is-mainly-blue .working__step-round {
    background: rgba(103, 74, 217, 0.15) !important;
    border-color: rgba(103, 74, 217, 0.3) !important;
}

.working__step-item.is-mainly-blue .working__step-round span {
    background: linear-gradient(135deg, #674AD9 0%, #8B5CF6 100%) !important;
}

/* Step content cards */
.working__step-content {
    background: rgba(30, 40, 55, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 20px !important;
    padding: 30px 20px !important;
    margin-top: 0 !important;
    min-height: 180px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

.working__step-content h4,
.working__step-content h3 {
    font-size: 1.15rem !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    margin-bottom: 12px !important;
    text-align: center !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    line-height: 1.4 !important;
}

.working__step-content p {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    color: rgba(255, 255, 255, 0.7) !important;
    margin: 0 !important;
    text-align: center !important;
    white-space: normal !important;
    word-wrap: break-word !important;
}

/* =====================================================
   4. REVOLUTION SECTION - BORDER FIX
   ===================================================== */
.revolution__area {
    background: #0f1419 !important;
    padding: 80px 0 100px !important;
    border: none !important;
}

.revolution__wrapper {
    background: rgba(30, 40, 55, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 30px !important;
    padding: 50px 40px !important;
    position: relative !important;
    overflow: visible !important;
}

.revolution__wrapper::before,
.revolution__wrapper::after,
.revolution__shape {
    display: none !important;
}

.revolution__item .revolution__content {
    background: rgba(20, 30, 45, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 20px !important;
    padding: 35px 20px !important;
    text-align: center !important;
}

.revolution__number h2 {
    font-size: 2.8rem !important;
    font-weight: 700 !important;
    margin-bottom: 10px !important;
}

.revolution__item p {
    font-size: 0.95rem !important;
    color: rgba(255, 255, 255, 0.7) !important;
    margin: 0 !important;
    line-height: 1.5 !important;
}

/* =====================================================
   5. PROTECTION SECTION - REMOVE EMPTY SPACE
   ===================================================== */
.protection__area {
    background: #121225 !important;
    padding: 50px 0 !important;
}

.protection__area .section__title-space {
    margin-bottom: 20px !important;
}

.protection__area .brnad__active,
.protection__area .brand__area,
.protection__area .brand__inner {
    background: transparent !important;
    padding: 15px 0 !important;
    border: none !important;
}

/* =====================================================
   6. GLOBAL TEXT FIXES
   ===================================================== */

/* Prevent text from being cut off */
h1, h2, h3, h4, h5, h6, p, span, a {
    text-overflow: clip !important;
}

/* Ensure proper text wrapping everywhere */
.feature-box *,
.working__step-content *,
.revolution__content *,
.our-values__content * {
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: none !important;
}

/* =====================================================
   7. RESPONSIVE ADJUSTMENTS
   ===================================================== */
@media (max-width: 1199px) {
    .work__steps-main-3 > .row::before {
        display: none !important;
    }
    
    .working__step-item {
        margin-bottom: 40px !important;
    }
}

@media (max-width: 768px) {
    .about__area.theme-bg-5 .feature-box {
        min-height: auto !important;
        padding: 25px 20px !important;
    }
    
    .working__step-content {
        min-height: auto !important;
        padding: 25px 15px !important;
    }
    
    .revolution__wrapper {
        padding: 30px 20px !important;
    }
    
    .revolution__item .revolution__content {
        padding: 25px 15px !important;
    }
}
