/* ===== HERO SECTION GLITCH FIX - PREVENTS SHAKING & TRANSITION CONFLICTS ===== */

/* 1. Fix hero slide transitions - prevents layout shift */
.crypto-hero {
    isolation: isolate;
    contain: layout style paint;
}

.hero-slides-container {
    contain: layout style;
}

.hero-slide {
    transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), visibility 0.4s ease !important;
    transform: none !important;
    will-change: opacity;
    backface-visibility: hidden;
}

.hero-slide.active {
    transform: none !important;
}

/* 2. Prevent text shaking */
.title-line {
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

/* 3. Fix timer bar transition */
.timer-bar {
    transition: width 0.05s linear !important;
    will-change: width;
}

/* 4. Stabilize slide dots */
.slide-dot {
    transition: all 0.2s ease;
    will-change: width, background;
}

/* 5. Prevent navbar and hero from conflicting */
.tars-header {
    transform: translateZ(0);
    will-change: transform;
}

/* 6. Fix any GPU acceleration conflicts */
.crypto-hero * {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* 7. Prevent mobile menu from causing hero reflow */
.mobile-nav {
    transform: translateZ(0);
    will-change: transform;
}

.mobile-nav.active {
    transform: translateZ(0);
}

/* 8. Stabilize particle animations - prevent jitter */
.creative-particles {
    transform: translateZ(0);
    will-change: auto;
}

.particle-icon {
    will-change: transform;
    transform: translateZ(0);
}

/* 9. Prevent hero buttons from causing layout shift */
.hero-btn-primary,
.hero-btn-outline {
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
}

/* 10. Critical - Stop any conflicting transitions */
.crypto-title,
.crypto-stats-mini,
.crypto-apy-display,
.loan-features,
.hero-cta-group {
    transform: none !important;
}
/* ===== FIX EP SKILL MASTER SECTION - ADD MARGIN RIGHT ON MOBILE ===== */
@media (max-width: 768px) {
    .ep-skill-master {
        overflow-x: hidden !important;
    }
    
    .ep-container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin: 0 !important;
    }
    
    .ep-wrapper {
        width: 100% !important;
    }
    
    .ep-grid {
        width: 100% !important;
    }
    
    .ep-col-left {
        width: 100% !important;
        padding-right: 20px !important;
        margin-right: 0 !important;
    }
    
    .ep-showcase {
        width: 100% !important;
    }
    
    .ep-showcase-stage {
        width: 100% !important;
        padding-right: 20px !important;
    }
    
    .ep-slide {
        width: 100% !important;
    }
    
    /* Expand the video carousel box by 30% */
    .ep-video-wrapper {
        width: 100% !important;
        height: auto !important;
        min-height: 280px !important;
    }
    
    .ep-slide-content {
        width: 100% !important;
        padding-right: 20px !important;
    }
    
    .ep-moonpay-content {
        width: 100% !important;
        padding-right: 20px !important;
    }
    
    .ep-crypto-card {
        width: 100% !important;
    }
    
    .ep-quick-amounts {
        width: 100% !important;
        gap: 0.8rem !important;
    }
    
    .ep-amount-btn {
        flex: 1 !important;
        min-width: 70px !important;
        padding: 0.8rem !important;
    }
    
    .ep-payment-methods {
        width: 100% !important;
        gap: 0.8rem !important;
    }
    
    .ep-payment-icon {
        flex: 1 !important;
        justify-content: center !important;
    }
    
    .ep-buy-button {
        width: 100% !important;
    }
    
    .ep-slide-link.ep-3d-link {
        width: 100% !important;
        justify-content: center !important;
    }
    
    /* Steps container */
    .steps-container {
        padding-right: 20px !important;
        gap: 0.8rem !important;
    }
    
    .step-card {
        min-width: 85px !important;
        padding: 0.8rem !important;
    }
    
    .trust-indicators {
        padding-right: 20px !important;
        gap: 0.8rem !important;
    }
}
/* ===== FIX TESTIMONIAL SECTION SCROLL ISSUE ===== */
.mp-test-section {
    overflow-x: hidden !important;
    overflow-y: visible !important;
}

.mp-test-tickers {
    overflow: visible !important;
}

.mp-test-ticker {
    overflow: hidden !important;
    position: relative !important;
}

.mp-ticker-track {
    display: flex !important;
    gap: 1.5rem !important;
    width: max-content !important;
    overflow: visible !important;
}

/* Ensure no vertical scroll appears */
.mp-test-container {
    overflow: visible !important;
    height: auto !important;
}

/* Fix for any hidden overflow causing scroll */
body, html {
    overflow-x: hidden !important;
    width: 100% !important;
}

.main-wrapper {
    overflow-x: hidden !important;
    width: 100% !important;
}

/* ===== FIX HEALTH INSURANCE SECTION ON MOBILE ===== */
@media (max-width: 768px) {
    .health-insurance-section {
        padding: 50px 16px 60px 16px !important;
    }
    
    .health-plans-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    .health-card {
        padding: 20px !important;
    }
    
    .health-title {
        font-size: 1.5rem !important;
    }
    
    .health-subtitle {
        font-size: 0.9rem !important;
    }
    
    .card-actions {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .price {
        font-size: 1.6rem !important;
    }
}

/* ===== FIX PRICING SECTION ON MOBILE ===== */
@media (max-width: 640px) {
    .pr-pricing-section {
        padding: 3rem 1rem !important;
    }
    
    .pr-grid {
        grid-template-columns: 1fr !important;
        max-width: 100% !important;
    }
    
    .pr-card {
        padding: 1.5rem !important;
    }
    
    .pr-percent {
        font-size: 2.2rem !important;
    }
    
    .pr-percent small {
        font-size: 1.2rem !important;
    }
}

/* ===== FIX HEADER ON MOBILE ===== */
@media (max-width: 768px) {
    .tars-header {
        width: 95% !important;
        left: 2.5% !important;
        padding: 10px 16px !important;
    }
    
    .logo-mark {
        width: 32px !important;
        height: 32px !important;
    }
    
    .wealth, .assure {
        font-size: 1rem !important;
    }
    
    .brand-text {
        gap: 1px !important;
    }
    
    .header-actions {
        gap: 6px !important;
        margin-right: 5px !important;
    }
    
    .lang-select {
        padding: 4px 20px 4px 8px !important;
        font-size: 0.7rem !important;
        min-width: 55px !important;
    }
    
    .login-btn {
        padding: 4px 8px !important;
    }
    
    .login-btn i {
        font-size: 0.9rem !important;
    }
    
    .menu-toggle {
        width: 32px !important;
        height: 32px !important;
    }
    
    .menu-toggle span {
        width: 16px !important;
        height: 1.5px !important;
    }
    
    .menu-toggle span:nth-child(2) {
        width: 12px !important;
    }
}

/* ===== FIX HERO SECTION ON MOBILE ===== */
@media (max-width: 768px) {
    .crypto-hero {
        padding: 0 16px !important;
    }
    
    .crypto-hero-container {
        margin-top: 80px !important;
    }
    
    .hero-spacer {
        height: 60px !important;
    }
    
    .hero-slides-container {
        min-height: 480px !important;
    }
    
    .title-line {
        font-size: 2rem !important;
    }
    
    .hero-badge {
        padding: 5px 12px !important;
        font-size: 0.7rem !important;
        margin-bottom: 20px !important;
    }
    
    .crypto-stats-mini {
        gap: 20px !important;
        flex-wrap: wrap !important;
    }
    
    .stat-value {
        font-size: 1.2rem !important;
    }
    
    .stat-label {
        font-size: 0.7rem !important;
    }
    
    .hero-cta-group {
        flex-direction: column !important;
        width: 100% !important;
        gap: 12px !important;
    }
    
    .hero-btn-primary, .hero-btn-outline {
        width: 100% !important;
        justify-content: center !important;
        padding: 12px 20px !important;
        font-size: 0.9rem !important;
    }
}

/* ===== FIX ABOUT SECTION ON MOBILE ===== */
@media (max-width: 768px) {
    .tars-about {
        padding: 80px 16px !important;
    }
    
    .about-content-wrapper {
        padding-left: 0 !important;
        margin-top: 40px !important;
    }
    
    .about-title {
        font-size: 1.8rem !important;
    }
    
    .lead-text {
        font-size: 1rem !important;
    }
    
    .secondary-text {
        font-size: 0.9rem !important;
    }
    
    .about-features {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    
    .about-cta-group {
        flex-direction: column !important;
    }
    
    .about-btn-primary, .about-btn-outline {
        width: 100% !important;
        justify-content: center !important;
    }
}
/* ===== FIX TICKER TAPE IMAGES ON MOBILE ===== */
@media (max-width: 768px) {
    .mp-ticker-section {
        padding: 20px 0 !important;
        overflow-x: hidden !important;
    }
    
    .mp-ticker-container {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .mp-ticker-track {
        display: flex !important;
        gap: 25px !important;
        animation: mp-scroll 30s linear infinite !important;
        width: max-content !important;
        min-width: 100% !important;
    }
    
    .mp-ticker-track img {
        height: 35px !important;
        width: auto !important;
        object-fit: contain !important;
        opacity: 1 !important;
        filter: brightness(1) !important;
    }
    
    /* Ensure gradient fades don't hide images */
    .mp-ticker-container::before,
    .mp-ticker-container::after {
        width: 60px !important;
        z-index: 2 !important;
    }
    
    .mp-ticker-container::before {
        left: 0;
        background: linear-gradient(90deg, #ffffff, transparent) !important;
    }
    
    .mp-ticker-container::after {
        right: 0;
        background: linear-gradient(-90deg, #ffffff, transparent) !important;
    }
}
/* ===== FIX STATS SECTION - REMOVE EXCESS SPACE & ADJUST SIZES ===== */
@media (max-width: 768px) {
    .mp-stats-section {
        padding: 40px 20px 50px 20px !important;
        margin: 0 !important;
        overflow-x: hidden !important;
    }
    
    .mp-container {
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 0 !important;
        text-align: center !important;
        margin-top: -60px !important;
        margin-bottom: -80px !important;
    }
    
    .mp-number {
        font-size: 56px !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 0 10px !important;
        display: inline-block !important;
        width: auto !important;
        margin-bottom: 12px !important;
        line-height: 1.2 !important;
    }
    
    .mp-label {
        font-size: 15px !important;
        padding: 0 15px !important;
        margin-bottom: 8px !important;
    }
    
    .mp-sublabel {
        font-size: 15px !important;
        margin-bottom: 35px !important;
        padding: 0 15px !important;
    }
    
    .mp-video {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
    }
}

/* ===== FIX PRO TICKER TAPE - MAKE IT BLEND WITH BACKGROUND ===== */
.pro-ticker-wrapper {
    background: rgba(10, 12, 20, 0.6) !important;
    backdrop-filter: blur(8px) !important;
    border-top: 1px solid rgba(139, 92, 246, 0.15) !important;
    border-bottom: 1px solid rgba(139, 92, 246, 0.15) !important;
    margin: 30px 0 !important;
    padding: 20px 0 !important;
}

.pro-ticker-wrapper::before {
    background: linear-gradient(rgba(139, 92, 246, 0.08) 5%, transparent 5%) !important;
}

.pro-ticker-wrapper::after {
    background: linear-gradient(90deg, #0A0C14 0%, transparent 10%, transparent 90%, #0A0C14 100%) !important;
}

.ticker-track {
    gap: 50px !important;
}

.pro-ticker-item .brand {
    font-size: 1.8rem !important;
    font-weight: 500 !important;
    background: linear-gradient(90deg, #FFFFFF, #A78BFA, #22D3EE) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.pro-ticker-item .price {
    font-size: 1.8rem !important;
    color: #FFFFFF !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(139, 92, 246, 0.2) !important;
}

.indicator {
    width: 28px !important;
    height: 28px !important;
    font-size: 12px !important;
}

/* Mobile Responsive for Pro Ticker */
@media (max-width: 768px) {
    .pro-ticker-wrapper {
        padding: 12px 0 !important;
        margin: 20px 0 !important;
    }
    
    .ticker-track {
        gap: 30px !important;
        animation: proTickerMove 20s linear infinite !important;
    }
    
    .pro-ticker-item .brand {
        font-size: 1rem !important;
    }
    
    .pro-ticker-item .price {
        font-size: 1rem !important;
        padding: 3px 10px !important;
    }
    
    .indicator {
        width: 20px !important;
        height: 20px !important;
        font-size: 10px !important;
    }
}
