/* Mobile Responsive Fixes for MegaDexBot */

/* Base mobile improvements */
@media screen and (max-width: 768px) {
    /* Prevent horizontal scroll */
    html, body {
        overflow-x: hidden;
        width: 100%;
    }

    .container {
        width: 95%;
        padding: 0 10px;
    }

    /* Typography fixes */
    h1 {
        font-size: 2rem !important;
        line-height: 1.2;
        word-wrap: break-word;
        hyphens: auto;
    }

    h2 {
        font-size: 1.8rem !important;
        line-height: 1.3;
        word-wrap: break-word;
    }

    h3 {
        font-size: 1.4rem !important;
        line-height: 1.3;
    }

    /* Header fixes */
    header {
        padding: 15px 0;
        backdrop-filter: blur(10px);
    }

    header .container {
        padding: 0 15px;
    }

    .logo {
        font-size: 1.5rem;
    }

    .logo img {
        width: 1.8rem !important;
    }

    /* Hero section fixes */
    .hero {
        padding: 140px 0 60px;
        text-align: center;
    }

    .hero .container {
        flex-direction: column;
        gap: 40px;
    }

    .hero-content {
        order: 1;
        text-align: center;
    }

    .hero-image {
        order: 2;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    .subtitle {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 25px;
    }

    /* CTA badges mobile fix */
    .cta-badges {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 25px;
    }

    .cta-badge {
        font-size: 0.8rem;
        padding: 8px 12px;
        white-space: nowrap;
        min-width: fit-content;
    }

    /* CTA buttons mobile */
    .cta-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
        margin-bottom: 30px;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        padding: 16px 25px;
        font-size: 1rem;
        text-align: center;
    }

    /* Hero stats mobile */
    .hero-stats {
        flex-direction: column;
        gap: 20px;
        width: 100%;
        align-items: center;
    }

    .stat {
        text-align: center;
        width: 100%;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .stat-label {
        font-size: 0.9rem;
    }

    /* Dashboard preview mobile */
    .dashboard-preview {
        height: 250px;
        width: 100%;
    }

    /*.floating-card {*/
        /*display: none;*/ /* Hide floating cards on mobile for cleaner look */
    /*}*/

    /* Partners banner mobile */
    .partners-banner {
        padding: 20px 0;
    }

    .partners-logos {
        gap: 15px;
        justify-content: center;
    }

    .partner-logo {
        width: 80px;
        height: 40px;
    }

    /* Benefits section mobile */
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .benefit-card {
        padding: 25px 20px;
        text-align: center;
    }

    .benefit-card h3 {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }

    .benefit-card p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    /* How it works section mobile */
    .steps {
        flex-direction: column;
        gap: 30px;
        margin-bottom: 40px;
    }

    .step {
        text-align: center;
        padding: 0;
        min-width: 100%;
    }

    .step:not(:last-child)::after {
        display: none;
    }

    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        margin: 0 auto 15px;
    }

    .step-content h3 {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }

    .step-content p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    /* Features section mobile */
    .feature-tabs {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 30px;
    }

    .tab-btn {
        width: 100%;
        padding: 15px 20px;
        margin: 0;
        font-size: 0.95rem;
        text-align: center;
        border-radius: 8px;
        border: 1px solid rgba(255,255,255,0.1);
    }

    .tab-content {
        flex-direction: column;
        gap: 30px;
    }

    .feature-image,
    .feature-details {
        min-width: 100%;
        flex: none;
    }

    .feature-details {
        padding: 0;
        text-align: center;
    }

    .feature-image {
        height: 250px;
        order: 1;
    }

    .feature-details {
        order: 2;
    }

    .feature-list {
        text-align: left;
        max-width: 300px;
        margin: 0 auto;
    }

    /* Performance section mobile */
    .performance-data {
        flex-direction: column;
        gap: 30px;
    }

    .performance-chart,
    .performance-stats {
        min-width: 100%;
        flex: none;
    }

    .performance-stats {
        gap: 15px;
    }

    .stat-value {
        font-size: 2rem;
    }

    /* Pricing section mobile */
    .pricing-cards {
        flex-direction: column;
        gap: 25px;
        align-items: center;
    }

    .pricing-card {
        min-width: 100%;
        max-width: 350px;
        margin: 0;
        padding: 30px 25px;
    }

    .pricing-card.highlight {
        transform: none;
        order: -1; /* Move highlighted card to top */
    }

    .pricing-card.highlight:hover {
        transform: translateY(-5px);
    }

    .price .amount {
        font-size: 2.5rem;
    }

    .features-list {
        font-size: 0.9rem;
    }

    /* Security section mobile */
    .security-features {
        flex-direction: column;
        gap: 30px;
        margin-bottom: 40px;
    }

    .security-feature {
        min-width: 100%;
        padding: 20px 15px;
    }

    .security-icon {
        width: 70px;
        height: 70px;
    }

    .security-icon i {
        font-size: 2rem;
    }

    .security-logos {
        gap: 20px;
        justify-content: center;
    }

    .audit-logo {
        width: 140px;
        height: 70px;
    }

    /* Testimonials mobile */
    /*.testimonial-navigation {*/
        /*display: none; *//* Hide navigation on mobile, use swipe instead */
    /*}*/

    .testimonial-card {
        margin: 0 10px;
        padding: 25px 20px;
    }

    .testimonial-header {
        flex-direction: column;
        text-align: center;
        margin-bottom: 15px;
    }

    .testimonial-avatar {
        margin: 0 auto 10px;
    }

    .testimonial-content p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    /* FAQ section mobile */
    .faq-container {
        width: 100%;
    }

    .faq-question {
        padding: 20px 15px;
        flex-wrap: wrap;
    }

    .faq-question h3 {
        font-size: 1.1rem;
        line-height: 1.4;
        flex: 1;
        margin-right: 15px;
        word-wrap: break-word;
    }

    .faq-answer {
        padding: 0 15px;
    }

    .faq-answer p {
        font-size: 0.95rem;
        line-height: 1.6;
        padding-bottom: 15px;
    }

    /* CTA section mobile */
    .cta-content h2 {
        font-size: 1.8rem;
        line-height: 1.3;
        margin-bottom: 20px;
    }

    .cta-content p {
        font-size: 1.1rem;
        line-height: 1.5;
        margin-bottom: 25px;
    }

    .cta-disclaimer {
        font-size: 0.85rem;
        margin-top: 15px;
    }

    /* Footer mobile */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-bottom p {
        font-size: 0.9rem;
    }

    .payment-methods {
        justify-content: center;
    }

    /* Modal mobile */
    .modal-content {
        width: 95%;
        max-width: 400px;
        padding: 25px;
        margin: 0 10px;
    }

    .wallet-options {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .wallet-option {
        padding: 20px 15px;
    }

    /* Page header mobile */
    .page-header {
        padding: 140px 0 50px;
    }

    .page-header h1 {
        font-size: 2rem;
        margin-bottom: 15px;
    }

    .page-header p {
        font-size: 1rem;
    }
}

/* Extra small devices */
@media screen and (max-width: 480px) {
    .container {
        width: 95%;
        padding: 0 8px;
    }

    h1 {
        font-size: 1.8rem !important;
    }

    h2 {
        font-size: 1.6rem !important;
    }

    .hero {
        padding: 130px 0 50px;
    }

    .btn {
        padding: 14px 20px;
        font-size: 0.95rem;
    }

    .cta-badge {
        font-size: 0.75rem;
        padding: 6px 10px;
    }

    .stat-number {
        font-size: 1.6rem;
    }

    .benefit-card,
    .pricing-card,
    .testimonial-card {
        padding: 20px 15px;
    }

    .security-feature {
        padding: 15px 10px;
    }

    .faq-question {
        padding: 15px 12px;
    }

    .faq-answer {
        padding: 0 12px;
    }

    .modal-content {
        padding: 20px;
    }

    .tab-btn {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
}

/* Landscape orientation fixes for mobile */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 120px 0 40px;
    }

    .hero-stats {
        flex-direction: row;
        justify-content: space-around;
    }

    .steps {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .step {
        flex: 1;
        min-width: 250px;
    }
}

/* Fix for very long text overflow */
@media screen and (max-width: 768px) {
    .gradient-text,
    .logo,
    .section-header h2,
    .hero h1,
    .benefit-card h3,
    .feature-details h3,
    .pricing-card h3,
    .faq-question h3 {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        max-width: 100%;
    }

    /* Ensure no element exceeds viewport width */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Fix for tables and wide content */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Image responsiveness */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Fix for any remaining overflow issues */
    .hero-content,
    .section-header,
    .benefit-card,
    .step-content,
    .feature-details,
    .testimonial-content,
    .faq-answer,
    .cta-content {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

/* Additional fixes for specific elements that might cause overflow */
@media screen and (max-width: 768px) {
    /* Partners slider mobile fix */
    .partners-track {
        flex-wrap: wrap;
        justify-content: center;
        animation: none; /* Stop animation on mobile */
    }

    .partner-logo {
        margin: 10px;
        min-width: 80px;
    }

    /* Security certifications mobile */
    .certification-logos {
        flex-wrap: wrap;
        gap: 15px;
    }

    .certification-logo {
        width: 100px;
        height: 50px;
    }

    /* Token grid mobile */
    .token-grid {
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
        gap: 15px;
    }

    .token-logo {
        width: 40px;
        height: 40px;
    }

    /* Workflow diagram mobile */
    .workflow-diagram {
        display: none; /* Hide complex diagrams on mobile */
    }

    /* Performance chart mobile */
    .performance-chart {
        padding: 15px;
    }

    /* Help section mobile fixes */
    .help-container {
        gap: 20px;
    }

    .help-sidebar {
        width: 100%;
        position: static;
        margin-bottom: 30px;
    }

    .guide-step {
        gap: 20px;
    }

    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }
}
