/* Mobile Responsive Improvements for Axgents AI Website */
/* Mobile-First Approach with Enhanced UX */

/* ========================================
   MOBILE NAVIGATION - Hamburger Menu
   ======================================== */

/* Hamburger Menu Button */
.mobile-menu-toggle {
    display: none;
    position: relative;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1002;
    padding: 0;
    transition: all 0.3s ease;
}

.mobile-menu-toggle span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: #e1e5e9;
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: all 0.25s ease;
}

.mobile-menu-toggle span:nth-child(1) {
    top: 0;
}

.mobile-menu-toggle span:nth-child(2) {
    top: 10px;
}

.mobile-menu-toggle span:nth-child(3) {
    top: 20px;
}

/* Hamburger Animation - Active State */
.mobile-menu-toggle.active span:nth-child(1) {
    top: 10px;
    transform: rotate(135deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    left: -60px;
}

.mobile-menu-toggle.active span:nth-child(3) {
    top: 10px;
    transform: rotate(-135deg);
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Ignore clicks/touches when inactive */
}

.mobile-nav-overlay.active {
    opacity: 1;
    pointer-events: auto; /* Capture clicks/touches when active */
}

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */

/* Tablet and below (max-width: 768px) */
@media (max-width: 768px) {
    /* Navigation Mobile Adjustments */
    .mobile-menu-toggle {
        display: block;
        margin-left: auto;
        order: 2;
    }

    .nav-container {
        padding: 1rem 1.5rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Language switcher visible in mobile - keep in header */
    .navbar .language-switcher {
        display: flex !important;
        order: 1;
        margin-left: auto;
        margin-right: 1rem;
        position: relative;
        top: auto;
        right: auto;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: linear-gradient(135deg, #0a0e1a 0%, #1a1f2e 100%);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 80px 30px 30px;
        gap: 1.5rem;
        transition: right 0.3s ease;
        z-index: 1001;
        border-left: 1px solid rgba(0, 132, 255, 0.2);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
        overflow-y: auto;
    }

    /* Remove language switcher from nav-links on mobile */
    .nav-links .language-switcher {
        display: none !important;
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-nav-overlay {
        display: block;
    }

    .nav-link {
        font-size: 1.1rem;
        width: 100%;
        padding: 12px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-link:hover::after {
        display: none;
    }

    .contact-btn {
        width: 100%;
        text-align: center;
        margin-top: 20px;
    }

    /* Hero Section Mobile */
    .hero {
        padding-top: 150px;
        min-height: auto;
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding: 2rem 1rem;
        gap: 2rem;
    }

    .hero-text {
        text-align: center;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero-description {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .hero-stats {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
    }

    .stat {
        flex: 0 1 calc(33.333% - 1rem);
        min-width: 80px;
    }

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

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

    .hero-actions {
        flex-direction: column;
        width: 100%;
        padding: 0 2rem;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
        max-width: 300px;
        padding: 1rem 1.5rem;
    }

    .digital-workers-showcase {
        width: 300px;
        height: 300px;
        margin: 2rem auto;
    }

    .worker-node {
        width: 60px;
        height: 60px;
    }

    .worker-node.secondary {
        width: 45px;
        height: 45px;
    }

    .worker-node::before {
        font-size: 0.7rem;
        bottom: -30px;
    }

    /* Chat Demo Section Mobile */
    .chat-demo {
        min-height: auto;
        padding: 3rem 0;
        position: relative;
        z-index: 100;
        pointer-events: auto;
    }

    /* Ensure chat elements are clickable */
    .discovery-cta {
        pointer-events: auto !important;
        position: relative;
        z-index: 101;
    }

    #discoverBtn {
        pointer-events: auto !important;
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(0, 132, 255, 0.3);
        /* Ensure the entire area is clickable */
        display: block;
        width: 100%;
        touch-action: manipulation;
        user-select: none;
        -webkit-user-select: none;
    }

    /* Make sure the entire input area is touchable */
    #discoverBtn .input-field {
        pointer-events: inherit;
        cursor: pointer;
        touch-action: manipulation;
        min-height: 56px; /* Larger touch target */
    }

    #discoverBtn .input-field * {
        pointer-events: none; /* Prevent child elements from blocking */
        cursor: inherit;
    }

    .chat-elements-container {
        padding: 0 1rem;
    }

    .chat-window-title {
        font-size: 1.1rem;
        padding: 0 1rem;
        text-align: center;
    }

    .chat-window-subtitle {
        font-size: 0.875rem;
        padding: 0 1rem;
        text-align: center;
    }

    .chat-window-input {
        width: 100%;
        padding: 0 1rem;
        margin-top: 1rem;
    }

    .chat-window-input .input-field {
        width: 100%;
        box-sizing: border-box;
    }

    .suggestion-cards {
        grid-template-columns: 1fr;
        gap: 10px;
        pointer-events: auto !important;
    }

    .suggestion-card {
        padding: 14px 16px;
        min-height: 48px;
        pointer-events: auto !important;
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(0, 132, 255, 0.2);
        touch-action: manipulation;
    }

    .suggestion-text {
        font-size: 13px;
    }

    .input-field {
        padding: 16px 14px;
        border-radius: 16px;
        pointer-events: auto !important;
        cursor: pointer;
        touch-action: manipulation;
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 48px;
        width: 100%;
        gap: 10px;
    }

    .input-placeholder {
        flex: 1;
        font-size: 14px;
        line-height: 1.4;
        text-align: left;
        color: #a0aec0;
    }

    .input-icon {
        flex-shrink: 0;
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .input-icon svg {
        width: 100%;
        height: 100%;
    }

    /* ChatGPT Interface Mobile */
    .chatgpt-interface {
        position: fixed;
        z-index: 9999 !important; /* Ensure it's above other elements */
        pointer-events: auto !important;
    }

    .chatgpt-interface .chat-container {
        width: 100%;
        height: 100vh;
        border-radius: 0;
        max-width: none;
        position: relative;
        z-index: 10000 !important;
        pointer-events: auto !important;
    }

    .chat-header {
        padding: 1rem;
        pointer-events: auto !important;
    }

    /* Chat input and buttons */
    .chat-footer {
        pointer-events: auto !important;
        position: relative;
        z-index: 10001;
    }

    .chat-textarea {
        pointer-events: auto !important;
        touch-action: manipulation;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }

    .send-btn {
        pointer-events: auto !important;
        cursor: pointer;
        touch-action: manipulation;
    }

    .control-btn, .minimize-btn {
        pointer-events: auto !important;
        cursor: pointer;
        touch-action: manipulation;
        min-width: 44px;
        min-height: 44px;
    }

    .chat-title {
        font-size: 0.9rem;
    }

    .chat-avatar {
        width: 28px;
        height: 28px;
    }

    .connection-status {
        display: none;
    }

    .chat-messages {
        padding: 1rem;
    }

    .message-text {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }

    .chat-footer {
        padding: 1rem;
    }

    .chat-textarea {
        font-size: 0.9rem;
    }

    /* Digital Workers Categories Mobile */
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 1rem;
    }

    .category-card {
        padding: 25px 20px;
    }

    .category-title {
        font-size: 1.3rem;
    }

    .category-preview li {
        font-size: 0.9rem;
        padding: 6px 0;
    }

    .category-link {
        padding: 12px 16px;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
    }

    /* Benefits Section Mobile */
    .benefits-key {
        padding: 60px 0;
    }

    .benefits-grid-main {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 1rem;
    }

    .benefit-item {
        padding: 20px;
        display: flex;
        gap: 15px;
        align-items: flex-start;
    }

    .benefit-icon {
        flex-shrink: 0;
        width: 40px;
        height: 40px;
    }

    .benefit-content h3 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .benefit-content p {
        font-size: 0.9rem;
    }

    .benefits-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin-top: 30px;
        padding: 0 1rem;
    }

    .stat-card {
        padding: 20px 15px;
    }

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

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

    /* Process Section Mobile */
    .how-it-works-simple {
        padding: 60px 0;
    }

    .process-steps {
        flex-direction: column;
        gap: 30px;
        padding: 0 1rem;
    }

    .process-step {
        padding: 25px 20px;
        width: 100%;
    }

    .step-number-circle {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        margin-bottom: 20px;
    }

    .step-icon-box {
        width: 48px;
        height: 48px;
        margin-bottom: 15px;
    }

    .step-title {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }

    .step-description {
        font-size: 0.9rem;
    }

    .process-cta {
        padding: 40px 20px 0;
        text-align: center;
    }

    .process-cta h3 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    .process-cta p {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }

    .btn-implement {
        width: 100%;
        max-width: 280px;
        padding: 14px 24px;
        font-size: 0.95rem;
    }

    /* Why Choose Us Section Mobile */
    .why-choose-us {
        padding: 60px 0;
    }

    .advantages-list {
        padding: 0 1rem;
    }

    .advantage-item {
        padding: 20px;
        margin-bottom: 20px;
    }

    .advantage-icon {
        width: 40px;
        height: 40px;
        margin-right: 15px;
    }

    .advantage-content h3 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .advantage-content p {
        font-size: 0.9rem;
    }

    /* Comparison Table Mobile */
    .comparison {
        padding: 60px 0;
    }

    .comparison-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 1rem;
        padding-bottom: 10px;
    }

    .comparison-table {
        min-width: 600px;
        font-size: 0.9rem;
    }

    .table-header {
        position: sticky;
        top: 0;
        background: linear-gradient(135deg, #0a0e1a 0%, #1a1f2e 100%);
        z-index: 10;
    }

    .header-cell {
        padding: 12px 10px;
        font-size: 0.85rem;
    }

    .option-icon {
        font-size: 1.2rem;
        margin-bottom: 4px;
    }

    .cell {
        padding: 12px 10px;
    }

    .cell-content {
        font-size: 0.85rem;
    }

    .category-title {
        font-size: 0.9rem;
    }

    /* Add scroll indicator for table */
    .comparison-table-container::after {
        content: '→ Scroll for more';
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(0, 132, 255, 0.9);
        color: white;
        padding: 8px 12px;
        border-radius: 20px;
        font-size: 0.75rem;
        pointer-events: none;
        animation: scrollHint 2s ease-in-out infinite;
    }

    @keyframes scrollHint {
        0%, 100% { opacity: 0.7; transform: translateY(-50%) translateX(0); }
        50% { opacity: 1; transform: translateY(-50%) translateX(5px); }
    }

    .comparison-cta {
        padding: 40px 20px 0;
    }

    .comparison-cta h3 {
        font-size: 1.5rem;
    }

    .comparison-cta p {
        font-size: 0.95rem;
    }

    .btn-save-costs {
        width: 100%;
        max-width: 280px;
        padding: 14px 24px;
        font-size: 0.95rem;
    }

    /* Footer Mobile */
    .footer-content {
        grid-template-columns: 1fr;
        padding: 0 1.5rem;
        gap: 2rem;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-column h4 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }

    .footer-column ul li a {
        font-size: 0.95rem;
        padding: 5px 0;
        display: inline-block;
    }

    /* Section Headers Mobile */
    .section-header {
        margin-bottom: 2.5rem;
        padding: 0 1rem;
    }

    .section-title {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .section-description {
        font-size: 0.95rem;
        line-height: 1.5;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    /* Further refinements for small screens */
    .hero-title {
        font-size: 1.75rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .stat {
        flex: 0 1 calc(50% - 0.75rem);
    }

    .benefits-stats {
        grid-template-columns: 1fr;
    }

    .chat-window-title {
        font-size: 1rem;
    }

    .chat-window-subtitle {
        font-size: 0.8rem;
    }

    .suggestion-text {
        font-size: 12px;
    }

    .advantage-content h3,
    .benefit-content h3 {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

/* Small Mobile Adjustments (max-width: 480px) */
@media (max-width: 480px) {
    /* Input field specific adjustments */
    .input-field {
        padding: 14px 12px;
        min-height: 44px;
        border-radius: 14px;
    }

    .input-placeholder {
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .input-icon {
        width: 18px;
        height: 18px;
        margin-left: 8px;
    }

    .chat-window-input {
        padding: 0 0.75rem;
    }

    .chat-elements-container {
        padding: 0 0.75rem;
    }

    .discovery-cta {
        padding: 1rem 0.5rem;
    }
}

/* Extra Small Mobile (max-width: 375px) */
@media (max-width: 375px) {
    .container {
        padding: 0 1rem;
    }

    .hero-content {
        padding: 1.5rem 0.75rem;
    }

    .digital-workers-showcase {
        width: 250px;
        height: 250px;
    }

    .worker-node {
        width: 50px;
        height: 50px;
    }

    .worker-node.secondary {
        width: 38px;
        height: 38px;
    }

    .btn-primary, .btn-secondary {
        font-size: 0.9rem;
        padding: 0.875rem 1.25rem;
    }

    .category-card {
        padding: 20px 15px;
    }

    .comparison-table {
        min-width: 500px;
    }
}

/* Ultra Small Mobile (max-width: 320px) */
@media (max-width: 320px) {
    .nav-container {
        padding: 0.875rem 1rem;
    }

    .logo-image {
        height: 20px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-description {
        font-size: 0.875rem;
    }

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

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

    .section-title {
        font-size: 1.25rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .nav-link {
        padding: 14px 8px;
    }

    .btn-primary, .btn-secondary {
        min-height: 48px;
    }

    .suggestion-card {
        min-height: 48px;
    }

    .category-link {
        min-height: 48px;
    }

    .control-btn, .minimize-btn {
        min-width: 44px;
        min-height: 44px;
    }

    /* Remove hover effects on touch devices */
    .category-card:hover,
    .benefit-item:hover,
    .process-step:hover,
    .advantage-item:hover {
        transform: none;
    }
}

/* Landscape Mobile Adjustments */
@media (max-width: 812px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 130px 0 40px;
    }

    .hero-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-actions {
        flex-direction: row;
    }

    .digital-workers-showcase {
        width: 250px;
        height: 250px;
    }

    .chat-demo {
        padding: 2rem 0;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .benefits-grid-main {
        grid-template-columns: repeat(2, 1fr);
    }

    .process-steps {
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .process-step {
        min-width: 280px;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero-visual,
    .chat-demo,
    .footer {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .section-title,
    .category-title,
    .benefit-content h3,
    .advantage-content h3 {
        color: black;
    }

    .section-subtitle,
    .section-description,
    .category-preview li,
    .benefit-content p,
    .advantage-content p {
        color: #333;
    }
}