/* =====================================================
   COMPREHENSIVE MOBILE OPTIMIZATION
   ===================================================== */

/* Base Mobile Viewport Settings */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
    min-width: 320px;
}

/* Prevent horizontal scrolling */
main, section, footer, header {
    overflow-x: hidden;
}

/* =====================================================
   GLOBAL RESPONSIVE SPACING & CONTAINERS
   ===================================================== */

/* Container responsive padding */
@media (max-width: 1400px) {
    .section-container {
        padding-right: 3rem !important;
        padding-left: 3rem !important;
        max-width: 100%;
    }
}

@media (max-width: 1200px) {
    .section-container {
        padding-right: 2.5rem !important;
        padding-left: 2.5rem !important;
    }
}

@media (max-width: 992px) {
    .section-container {
        padding-right: 2rem !important;
        padding-left: 2rem !important;
    }
}

@media (max-width: 768px) {
    .section-container {
        padding-right: 1.5rem !important;
        padding-left: 1.5rem !important;
    }
}

@media (max-width: 576px) {
    .section-container {
        padding-right: 1rem !important;
        padding-left: 1rem !important;
    }
}

@media (max-width: 480px) {
    .section-container {
        padding-right: 0.75rem !important;
        padding-left: 0.75rem !important;
    }
}

/* Section spacing optimization */
@media (max-width: 992px) {
    .section {
        padding: 60px 0 !important;
    }
    
    .section-sub {
        padding-top: 60px !important;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 50px 0 !important;
    }
    
    .section-sub {
        padding-top: 50px !important;
    }
}

@media (max-width: 576px) {
    .section {
        padding: 40px 0 !important;
    }
    
    .section-sub {
        padding-top: 40px !important;
    }
}

/* =====================================================
   RESPONSIVE TYPOGRAPHY
   ===================================================== */

/* Text size optimization for mobile */
@media (max-width: 1200px) {
    :root {
        --heading-font-size: 48px;
        --brand-font-size: 40px;
        --desc-font-size: 16px;
        --button-font-size: 15px;
    }
}

@media (max-width: 992px) {
    :root {
        --heading-font-size: 42px;
        --brand-font-size: 36px;
        --desc-font-size: 16px;
        --button-font-size: 15px;
    }
}

@media (max-width: 768px) {
    :root {
        --heading-font-size: 36px;
        --brand-font-size: 32px;
        --desc-font-size: 15px;
        --button-font-size: 14px;
    }
    
    /* Ensure all paragraphs are readable */
    p {
        font-size: 15px !important;
        line-height: 1.6 !important;
    }
}

@media (max-width: 576px) {
    :root {
        --heading-font-size: 32px;
        --brand-font-size: 28px;
        --desc-font-size: 14px;
        --button-font-size: 14px;
    }
    
    p {
        font-size: 14px !important;
        line-height: 1.6 !important;
    }
}

@media (max-width: 480px) {
    :root {
        --heading-font-size: 28px;
        --brand-font-size: 24px;
        --desc-font-size: 14px;
        --button-font-size: 13px;
    }
}

/* Section titles responsive sizing */
@media (max-width: 992px) {
    .section-title, .section-title-nordic {
        font-size: 38px !important;
        line-height: 1.2 !important;
        margin-bottom: 1.5rem !important;
        padding: 0 !important;
    }
    
    .section-subtitle {
        font-size: 18px !important;
        line-height: 1.5 !important;
        margin-bottom: 2rem !important;
    }
}

@media (max-width: 768px) {
    .section-title, .section-title-nordic {
        font-size: 32px !important;
        line-height: 1.2 !important;
        margin-bottom: 1.25rem !important;
    }
    
    .section-subtitle {
        font-size: 16px !important;
        line-height: 1.5 !important;
        margin-bottom: 1.75rem !important;
    }
}

@media (max-width: 576px) {
    .section-title, .section-title-nordic {
        font-size: 28px !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
    }
    
    .section-subtitle {
        font-size: 15px !important;
        line-height: 1.5 !important;
        margin-bottom: 1.5rem !important;
    }
}

@media (max-width: 480px) {
    .section-title, .section-title-nordic {
        font-size: 24px !important;
        line-height: 1.15 !important;
        margin-bottom: 0.75rem !important;
    }
    
    .section-subtitle {
        font-size: 14px !important;
        line-height: 1.5 !important;
        margin-bottom: 1.25rem !important;
    }
}

/* =====================================================
   HEADER & NAVIGATION MOBILE OPTIMIZATION
   ===================================================== */

@media (max-width: 768px) {
    .header {
        margin-top: 0 !important;
        padding: 0.5rem 0 !important;
    }
    
    .navbar {
        padding: 0.5rem 0 !important;
    }
    
    .header-container {
        padding: 0 1rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 1rem !important;
    }
    
    .navbar-brand {
        display: flex;
        align-items: center;
        flex: 0 1 auto;
        min-width: 0;
    }
    
    .logo-container {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.1rem;
    }
    
    .by-99x-container {
        margin-left: 0.3rem !important;
        gap: 0.2rem !important;
    }
    
    .logo {
        height: 28px !important;
        width: auto !important;
    }
    
    .logo-99x {
        height: 12px !important;
    }
    
    .by-99x {
        font-size: 11px !important;
        color: #666 !important;
    }
    
    .mobile-auth-buttons {
        flex: 0 0 auto;
    }
}

@media (max-width: 576px) {
    .logo {
        height: 24px !important;
    }
    
    .logo-99x {
        height: 10px !important;
    }
    
    .by-99x {
        font-size: 10px !important;
    }
    
    .by-99x-container {
        margin-left: 0.25rem !important;
    }
}

/* =====================================================
   HERO SECTION MOBILE OPTIMIZATION
   ===================================================== */

/* Fix row margin issues in hero section */
.hero-section .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.hero-section [class*="col-"] {
    padding-left: 15px;
    padding-right: 15px;
}

/* Prevent content cutoff below hero button */
.hero-actions {
    margin-bottom: 1rem;
}

@media (max-width: 992px) {
    .hero-section {
        padding: 1.5rem 0 !important;
        margin-top: 0.5rem !important;
        overflow: visible !important;
    }
    
    .hero-section .section-container {
        overflow: visible !important;
    }
    
    .hero-heading {
        font-size: 38px !important;
        line-height: 1.2 !important;
    }
    
    .hero-subtitle {
        font-size: 20px !important;
        line-height: 1.3 !important;
    }
    
    .hero-description {
        font-size: 16px !important;
        line-height: 1.6 !important;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 1rem 0 !important;
        margin-top: 0 !important;
    }
    
    .hero-heading {
        font-size: 32px !important;
        line-height: 1.2 !important;
        margin-bottom: 0.75rem !important;
    }
    
    .hero-subtitle {
        font-size: 18px !important;
        line-height: 1.3 !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-description {
        font-size: 15px !important;
        line-height: 1.6 !important;
        text-align: center !important;
        margin-bottom: 2rem !important;
    }
    
    .hero-actions {
        text-align: center !important;
    }
    
    .hero-actions .btn {
        font-size: 15px !important;
        padding: 10px 24px !important;
    }
}

@media (max-width: 576px) {
    .hero-heading {
        font-size: 26px !important;
        margin-bottom: 0.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 16px !important;
        margin-bottom: 0.75rem !important;
    }
    
    .hero-description {
        font-size: 14px !important;
        margin-bottom: 1.5rem !important;
    }
    
    .hero-actions .btn {
        font-size: 14px !important;
        padding: 8px 20px !important;
        width: 100% !important;
        max-width: 280px !important;
    }
}

/* =====================================================
   CARDS & COMPONENTS MOBILE OPTIMIZATION
   ===================================================== */

/* Problem cards */
@media (max-width: 768px) {
    .problem-grid {
        gap: 1.25rem !important;
    }
    
    .problem-card {
        padding: 1.5rem !important;
        border-radius: 12px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
    }
    
    .problem-card-icon {
        width: 48px !important;
        height: 48px !important;
        font-size: 20px !important;
        margin-bottom: 1rem !important;
    }
    
    .problem-card h4 {
        font-size: 18px !important;
        margin-bottom: 0.5rem !important;
    }
}

@media (max-width: 576px) {
    .problem-grid {
        gap: 1rem !important;
    }
    
    .problem-card {
        padding: 1.25rem !important;
        border-radius: 10px !important;
    }
    
    .problem-card-icon {
        width: 44px !important;
        height: 44px !important;
        font-size: 18px !important;
    }
    
    .problem-card h4 {
        font-size: 16px !important;
    }
}

/* Solution cards */
@media (max-width: 768px) {
    .solution-advantage-grid {
        gap: 1.25rem !important;
    }
    
    .solution-advantage-card {
        padding: 1.5rem !important;
        border-radius: 12px !important;
        flex-direction: column !important;
        text-align: center !important;
    }
    
    .solution-advantage-content h4 {
        font-size: 20px !important;
        margin-bottom: 0.5rem !important;
    }
}

@media (max-width: 576px) {
    .solution-advantage-grid {
        gap: 1rem !important;
    }
    
    .solution-advantage-card {
        padding: 1.25rem !important;
        border-radius: 10px !important;
    }
    
    .solution-advantage-content h4 {
        font-size: 18px !important;
    }
}

/* Agent cards */
@media (max-width: 768px) {
    .agent-card {
        margin-bottom: 1.5rem !important;
        border-radius: 12px !important;
    }
    
    .agent-image-container {
        padding: 1.5rem !important;
    }
    
    .agent-image-background {
        width: 140px !important;
        height: 140px !important;
    }
    
    .agent-avatar {
        width: 120px !important;
        height: 120px !important;
    }
    
    .agent-header-nordic h3 {
        font-size: 20px !important;
    }
    
    .agent-role {
        font-size: 14px !important;
    }
}

@media (max-width: 576px) {
    .agent-card {
        margin-bottom: 1.25rem !important;
        border-radius: 10px !important;
    }
    
    .agent-image-container {
        padding: 1.25rem !important;
    }
    
    .agent-image-background {
        width: 120px !important;
        height: 120px !important;
    }
    
    .agent-avatar {
        width: 100px !important;
        height: 100px !important;
    }
    
    .agent-header-nordic h3 {
        font-size: 18px !important;
    }
    
    .agent-role {
        font-size: 13px !important;
    }
}

/* =====================================================
   BUTTONS & CTA MOBILE OPTIMIZATION
   ===================================================== */

@media (max-width: 768px) {
    .btn {
        font-size: 14px !important;
        padding: 10px 20px !important;
        border-radius: 8px !important;
        min-height: 44px !important; /* Accessibility */
    }
    
    .btn-lg {
        font-size: 16px !important;
        padding: 12px 24px !important;
    }
    
    .btn-sm {
        font-size: 13px !important;
        padding: 8px 16px !important;
    }
    
    .cta-section {
        text-align: center !important;
        margin-top: 2rem !important;
    }
}

@media (max-width: 576px) {
    .btn {
        font-size: 13px !important;
        padding: 8px 16px !important;
        width: 100% !important;
        max-width: 280px !important;
        margin: 0 auto !important;
    }
    
    .btn-lg {
        font-size: 14px !important;
        padding: 10px 20px !important;
    }
    
    .cta-buttons {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
        align-items: center !important;
    }
}

/* =====================================================
   FOOTER MOBILE OPTIMIZATION
   ===================================================== */

@media (max-width: 768px) {
    .footer {
        padding: 2rem 0 1rem !important;
    }
    
    .footer-content {
        flex-direction: column !important;
        gap: 1.5rem !important;
        text-align: center !important;
    }
    
    .footer-social {
        justify-content: center !important;
        gap: 1rem !important;
    }
    
    .social-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 18px !important;
    }
    
    .footer-links {
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: center !important;
    }
    
    .footer-link {
        font-size: 14px !important;
    }
    
    .footer-bottom p {
        font-size: 13px !important;
    }
}

@media (max-width: 576px) {
    .footer {
        padding: 1.5rem 0 0.75rem !important;
    }
    
    .footer-social {
        gap: 0.75rem !important;
    }
    
    .social-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 16px !important;
    }
    
    .footer-link {
        font-size: 13px !important;
    }
    
    .footer-bottom p {
        font-size: 12px !important;
    }
}

/* =====================================================
   BORDERS & VISUAL ELEMENTS
   ===================================================== */

@media (max-width: 768px) {
    /* Reduce border radius for smaller screens */
    .agent-card,
    .problem-card,
    .solution-advantage-card,
    .why-card,
    .feature-box,
    .partner-card {
        border-radius: 12px !important;
    }
    
    /* Reduce shadow intensity */
    .agent-card,
    .problem-card,
    .solution-advantage-card {
        box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
    }
}

@media (max-width: 576px) {
    /* Further reduce border radius */
    .agent-card,
    .problem-card,
    .solution-advantage-card,
    .why-card,
    .feature-box,
    .partner-card {
        border-radius: 10px !important;
    }
    
    /* Minimal shadows for mobile */
    .agent-card,
    .problem-card,
    .solution-advantage-card {
        box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
    }
}

/* =====================================================
   FULL-WIDTH SECTIONS & STRIPS
   ===================================================== */

@media (max-width: 768px) {
    /* Ensure full-width sections don't overflow */
    .section,
    .section-sub,
    .trusted-by,
    .the-problem-nordic,
    .ready-agents,
    .how-it-works,
    .enterprise-roles-accordion,
    .why-agentri,
    .implementation-partner,
    .final-cta {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    /* Remove negative margins that might cause overflow */
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .col, [class*="col-"] {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
}

/* =====================================================
   IMAGES & MEDIA OPTIMIZATION
   ===================================================== */

@media (max-width: 768px) {
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    .img-fluid {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Company logos */
    .company-logo-standard {
        max-width: 80px !important;
        max-height: 40px !important;
    }
    
    /* Partner images */
    .partner-image-standard {
        width: 80px !important;
        height: 80px !important;
    }
}

@media (max-width: 576px) {
    /* Company logos */
    .company-logo-standard {
        max-width: 70px !important;
        max-height: 35px !important;
    }
    
    /* Partner images */
    .partner-image-standard {
        width: 70px !important;
        height: 70px !important;
    }
}

/* =====================================================
   UTILITY CLASSES FOR MOBILE
   ===================================================== */

@media (max-width: 768px) {
    /* Text alignment utilities */
    .mobile-center {
        text-align: center !important;
    }
    
    /* Spacing utilities */
    .mobile-mb-2 {
        margin-bottom: 1rem !important;
    }
    
    .mobile-mb-3 {
        margin-bottom: 1.5rem !important;
    }
    
    .mobile-mt-2 {
        margin-top: 1rem !important;
    }
    
    .mobile-mt-3 {
        margin-top: 1.5rem !important;
    }
    
    /* Padding utilities */
    .mobile-p-2 {
        padding: 1rem !important;
    }
    
    .mobile-p-3 {
        padding: 1.5rem !important;
    }
}

/* =====================================================
   ACCESSIBILITY & TOUCH TARGETS
   ===================================================== */

@media (max-width: 768px) {
    /* Ensure touch targets are at least 44x44px */
    a,
    button,
    .btn,
    .social-icon,
    .accordion-toggle,
    input,
    select,
    textarea {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Increase clickable area for small elements */
    .social-icon::before,
    .accordion-toggle::before {
        content: '';
        position: absolute;
        top: -5px;
        left: -5px;
        right: -5px;
        bottom: -5px;
    }
}

/* =====================================================
   PERFORMANCE OPTIMIZATIONS
   ===================================================== */

@media (max-width: 768px) {
    /* Disable animations on mobile for better performance */
    *,
    *::before,
    *::after {
        animation-duration: 0.3s !important;
        transition-duration: 0.3s !important;
    }
    
    /* Disable parallax effects on mobile */
    .parallax {
        background-attachment: scroll !important;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =====================================================
   JAVASCRIPT ENHANCEMENT STYLES
   ===================================================== */

/* Custom viewport height for mobile browsers - removed to reduce height */
/* .hero-section {
    min-height: calc(var(--vh, 1vh) * 100);
} */

/* Touch feedback */
.touch-active {
    transform: scale(0.98);
    opacity: 0.8;
}

/* Disable hover effects during scroll for performance */
body.disable-hover * {
    pointer-events: none !important;
}

/* Keyboard open state adjustments */
body.keyboard-open {
    position: fixed;
    width: 100%;
}

/* =====================================================
   TRUSTED BY SECTION MOBILE OPTIMIZATION
   ===================================================== */

/* Ensure proper spacing between hero and trusted-by sections */
.hero-section + .trusted-by {
    margin-top: 0 !important;
}

@media (max-width: 768px) {
    .trusted-by {
        padding: 40px 0 !important;
        background-color: #f8f9fa;
        margin-top: 0 !important;
    }
    
    .trusted-by .section-container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .logos-container {
        padding: 0 1rem;
        overflow: hidden;
    }
    
    .company-logos-wrapper {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem !important;
        max-width: 100%;
        margin: 0 auto;
    }
    
    .company-logo-item {
        flex: 0 0 auto;
        background: white;
        border-radius: 8px;
        padding: 0.75rem 1rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }
    
    .company-logo-standard {
        max-width: 70px !important;
        max-height: 35px !important;
    }
    
    .many-more-text {
        font-size: 13px !important;
        margin-top: 1rem !important;
    }
}

/* =====================================================
   FULL-WIDTH STRIP OPTIMIZATION
   ===================================================== */

@media (max-width: 768px) {
    /* Ensure sections don't create horizontal scroll */
    .section,
    .section-sub {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        position: relative;
        overflow-x: hidden !important;
    }
    
    /* Reset container within full-width sections */
    .section .section-container,
    .section-sub .section-container {
        margin-left: auto;
        margin-right: auto;
        position: relative;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Fix Bootstrap row negative margins */
    .section .row,
    .section-sub .row,
    .hero-section .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Ensure proper column padding */
    .section [class*="col-"],
    .section-sub [class*="col-"],
    .hero-section [class*="col-"] {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
}

/* =====================================================
   MOBILE-SPECIFIC BORDER OPTIMIZATIONS
   ===================================================== */

@media (max-width: 768px) {
    /* Simplify borders for mobile */
    .agent-card,
    .problem-card,
    .solution-advantage-card,
    .why-card,
    .feature-box {
        border: 1px solid rgba(0,0,0,0.08) !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
    }
    
    /* Active state for cards */
    .agent-card:active,
    .problem-card:active,
    .solution-advantage-card:active {
        transform: scale(0.98);
        box-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
    }
    
    /* Simplify rounded corners */
    * {
        border-radius: min(var(--border-radius, 8px), 12px) !important;
    }
    
    /* Special cases that need larger radius */
    .btn {
        border-radius: 24px !important;
    }
    
    .hero-image-container {
        border-radius: 16px !important;
    }
}

/* =====================================================
   PROCESS TIMELINE MOBILE OPTIMIZATION
   ===================================================== */

@media (max-width: 768px) {
    .process-timeline {
        position: relative;
        padding-left: 0 !important;
    }
    
    .process-timeline::before {
        display: none !important;
    }
    
    .process-step {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        padding: 0 !important;
        margin-bottom: 2rem !important;
        gap: 1rem;
    }
    
    .step-number {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        margin-bottom: 0 !important;
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        flex-shrink: 0;
    }
    
    .step-content {
        flex: 1;
        max-width: none;
        padding: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }
    
    .step-content::before {
        display: none !important;
    }
    
    .step-content h3 {
        font-size: 18px !important;
        margin-bottom: 0.25rem !important;
    }
    
    .step-content p {
        font-size: 14px !important;
        color: #666;
        margin: 0 !important;
    }
}

@media (max-width: 576px) {
    .process-step {
        gap: 0.75rem;
        margin-bottom: 1.5rem !important;
    }
    
    .step-number {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        font-size: 14px !important;
    }
    
    .step-content h3 {
        font-size: 16px !important;
    }
    
    .step-content p {
        font-size: 13px !important;
    }
}

@media (max-width: 480px) {
    .process-step {
        gap: 0.6rem;
        margin-bottom: 1.25rem !important;
    }
    
    .step-number {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        font-size: 13px !important;
        border-width: 2px !important;
    }
    
    .step-content h3 {
        font-size: 15px !important;
        margin-bottom: 0.2rem !important;
    }
    
    .step-content p {
        font-size: 12px !important;
        line-height: 1.4 !important;
    }
}

/* =====================================================
   FINAL CTA SECTION MOBILE FIXES
   ===================================================== */

@media (max-width: 768px) {
    .final-cta {
        padding: 50px 0 !important;
        background-color: #f8f9fa;
    }
    
    .final-cta .section-title {
        font-size: 28px !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
        padding: 0 1rem !important;
    }
    
    .final-cta .section-subtitle {
        font-size: 16px !important;
        line-height: 1.5 !important;
        margin-bottom: 2rem !important;
        padding: 0 1rem !important;
    }
    
    .cta-buttons {
        padding: 0 1rem !important;
    }
    
    .cta-buttons .btn {
        width: 100% !important;
        max-width: 300px !important;
        margin: 0 auto !important;
        display: block !important;
    }
}

/* =====================================================
   MOBILE MENU IMPROVEMENTS
   ===================================================== */

@media (max-width: 768px) {
    /* Sticky header optimization */
    .header.sticky-top {
        position: sticky !important;
        top: 0 !important;
        z-index: 1000 !important;
        background-color: white !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    }
    
    /* Navbar collapse container */
    .navbar-collapse {
        display: flex !important;
        justify-content: flex-end !important;
        flex: 0 0 auto !important;
    }
    
    /* Logo section */
    .navbar-brand {
        max-width: 60% !important;
    }
    
    /* Mobile auth buttons container */
    .mobile-auth-buttons {
        display: flex !important;
        gap: 0.5rem !important;
        margin-left: 0 !important;
    }
    
    /* Hide desktop auth buttons */
    .d-none.d-lg-flex {
        display: none !important;
    }
}

/* =====================================================
   CLIENT LOGIN BUTTON MOBILE OPTIMIZATION
   ===================================================== */

/* Large tablets and small laptops */
@media (max-width: 991px) {
    .mobile-login-btn {
        background-color: var(--primary-green-color) !important;
        border-color: var(--primary-green-color) !important;
        color: white !important;
        font-weight: 500 !important;
        padding: 0.5rem 1rem !important;
        font-size: 13px !important;
        border-radius: 20px !important;
        transition: all 0.3s ease !important;
        text-decoration: none !important;
        display: inline-flex !important;
        white-space: nowrap !important;
        min-height: 38px !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .mobile-login-btn:hover,
    .mobile-login-btn:focus {
        background-color: #357a74 !important;
        border-color: #357a74 !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 8px rgba(66, 139, 131, 0.3) !important;
    }
    
    .mobile-login-btn:active {
        transform: translateY(0) !important;
        box-shadow: 0 2px 4px rgba(66, 139, 131, 0.3) !important;
    }
}

/* Standard mobile devices */
@media (max-width: 768px) {
    .header-container {
        padding: 0 1rem !important;
    }
    
    .mobile-auth-buttons {
        margin-right: 0 !important;
    }
    
    .mobile-login-btn {
        padding: 0.4rem 0.8rem !important;
        font-size: 12px !important;
        min-height: 36px !important;
        border-radius: 18px !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important;
    }
}

/* Small mobile devices */
@media (max-width: 576px) {
    .mobile-login-btn {
        padding: 0.35rem 0.7rem !important;
        font-size: 11px !important;
        min-height: 34px !important;
        border-radius: 16px !important;
        letter-spacing: 0.2px !important;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .header-container {
        padding: 0 0.75rem !important;
    }
    
    .mobile-login-btn {
        padding: 0.3rem 0.6rem !important;
        font-size: 10px !important;
        min-height: 32px !important;
        border-radius: 15px !important;
    }
}

/* Ultra small devices */
@media (max-width: 360px) {
    .navbar-brand {
        max-width: 50% !important;
    }
    
    .logo {
        height: 22px !important;
    }
    
    .logo-99x {
        height: 9px !important;
    }
    
    .by-99x {
        font-size: 9px !important;
    }
    
    .by-99x-container {
        margin-left: 0.2rem !important;
    }
    
    .mobile-login-btn {
        padding: 0.25rem 0.5rem !important;
        font-size: 9px !important;
        min-height: 30px !important;
        border-radius: 14px !important;
    }
}

/* Icon styling for mobile login button */
.mobile-login-btn i {
    margin-right: 0.4rem !important;
    font-size: 1em !important;
    vertical-align: middle !important;
}

.mobile-login-btn span {
    vertical-align: middle !important;
}

@media (max-width: 576px) {
    .mobile-login-btn i {
        margin-right: 0.3rem !important;
        font-size: 0.9em !important;
    }
}

@media (max-width: 480px) {
    /* Hide icon on small screens to save space */
    .mobile-login-btn i {
        display: none !important;
    }
}

/* =====================================================
   PARTNER SECTION MOBILE OPTIMIZATION
   ===================================================== */

@media (max-width: 768px) {
    .implementation-partner {
        padding: 50px 0 !important;
    }
    
    .partner-card {
        max-width: 90% !important;
        margin: 0 auto !important;
        padding: 2rem !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
    }
    
    .partner-image {
        margin-bottom: 1.5rem !important;
    }
    
    .partner-image-standard {
        width: 80px !important;
        height: 80px !important;
        border-radius: 50% !important;
    }
    
    .contact-details {
        margin-top: 1.5rem !important;
    }
    
    .contact-details p {
        font-size: 14px !important;
        margin-bottom: 0.75rem !important;
    }
    
    .contact-details a {
        color: var(--primary-green-color) !important;
        text-decoration: none !important;
    }
}

/* =====================================================
   SOLUTION AND PROBLEM CONTENT MOBILE OPTIMIZATION
   ===================================================== */

/* Ensure solution content displays properly on mobile */
@media (max-width: 768px) {
    /* Problem cards content */
    .problem-card-content p {
        display: block !important;
        font-size: 14px !important;
        line-height: 1.5 !important;
        color: #666 !important;
        margin-top: 0.5rem !important;
    }
    
    /* Solution advantage content */
    .solution-advantage-content p {
        display: block !important;
        font-size: 14px !important;
        line-height: 1.5 !important;
        color: #666 !important;
        margin-bottom: 1rem !important;
    }
    
    /* Solution features list */
    .solution-advantage-features {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
        margin-top: 0 !important;
    }
    
    .solution-feature-item {
        font-size: 13px !important;
        padding-left: 1.2rem !important;
        position: relative !important;
        color: #555 !important;
        line-height: 1.4 !important;
    }
    
    .solution-feature-item::before {
        content: '✓' !important;
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        color: var(--primary-green-color) !important;
        font-weight: bold !important;
        font-size: 14px !important;
        width: auto !important;
        height: auto !important;
        background: none !important;
        border-radius: 0 !important;
    }
}

@media (max-width: 576px) {
    .problem-card-content p {
        font-size: 13px !important;
        margin-top: 0.4rem !important;
    }
    
    .solution-advantage-content p {
        font-size: 13px !important;
        margin-bottom: 0.75rem !important;
    }
    
    .solution-feature-item {
        font-size: 12px !important;
        padding-left: 1rem !important;
    }
    
    .solution-feature-item::before {
        font-size: 12px !important;
    }
}

@media (max-width: 480px) {
    .problem-card-content p {
        font-size: 12px !important;
        line-height: 1.4 !important;
    }
    
    .solution-advantage-content p {
        font-size: 12px !important;
        line-height: 1.4 !important;
        margin-bottom: 0.5rem !important;
    }
    
    .solution-feature-item {
        font-size: 11px !important;
        padding-left: 0.9rem !important;
        line-height: 1.3 !important;
    }
}

/* =====================================================
   KEY BENEFITS SECTION SPACING OPTIMIZATION
   ===================================================== */

/* Reduce excessive spacing on key benefits section */
.key-benefits-section {
    padding: 40px 0 !important;
}

@media (max-width: 992px) {
    .key-benefits-section {
        padding: 35px 0 !important;
    }
}

@media (max-width: 768px) {
    .key-benefits-section {
        padding: 30px 0 !important;
    }
}

@media (max-width: 576px) {
    .key-benefits-section {
        padding: 25px 0 !important;
    }
    
    .key-benefits-section .benefit-item {
        margin-bottom: 1.5rem !important;
    }
}

@media (max-width: 480px) {
    .key-benefits-section {
        padding: 20px 0 !important;
    }
    
    .key-benefits-section .benefit-item {
        margin-bottom: 1.25rem !important;
    }
}
