/* Mobile Menu */
.mobile-menu-toggle {
    display: none !important;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.mobile-menu-toggle span {
    display: block !important;
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 5px 0;
    transition: var(--transition);
    transform-origin: center;
}


.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 998;
    pointer-events: none;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Tablet Styles (max-width: 1024px) */
@media (max-width: 1024px) {
    .container {
        max-width: 960px;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
    
    .hero {
        min-height: 80vh;
    }
    
    h1 {
        font-size: var(--font-size-5xl);
    }
    
    h2 {
        font-size: var(--font-size-4xl);
    }
    
    section {
        padding-top: 60px;
        padding-bottom: 30px;
    }
    
    section:first-of-type {
        padding-top: 100px;
    }
    
    section:last-of-type {
        padding-bottom: 60px;
    }
}

/* Hide language switcher on mobile */
.mobile-lang-switcher {
    display: none;
}

/* Small Tablet Styles (max-width: 768px) */
@media (max-width: 768px) {
    /* Hide fixed language switcher on mobile */
    .language-switcher {
        display: none !important;
    }
    
    /* Show mobile language switcher in menu */
    .mobile-lang-switcher {
        display: block;
        margin-top: 2rem;
        padding-top: 2rem;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .lang-mobile-options {
        display: flex;
        justify-content: center;
        gap: 0.8rem;
    }
    
    .lang-mobile-option {
        padding: 8px 16px;
        border: 2px solid var(--accent-purple);
        border-radius: 20px;
        text-decoration: none;
        color: var(--text-primary);
        font-family: var(--font-family-primary);
        font-weight: var(--font-weight-semibold);
        transition: var(--transition);
    }
    
    .lang-mobile-option:hover,
    .lang-mobile-option.active {
        background: var(--primary-gradient);
        color: white;
        border-color: transparent;
    }
    
    .container {
        padding: 0 15px;
    }
    
    /* Navigation */
    .header {
        padding: 15px 0;
        background: #ffffff;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .nav-menu {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        width: 80% !important;
        max-width: 350px !important;
        height: 100vh !important;
        background: #ffffff !important;
        flex-direction: column !important;
        padding: 80px 30px !important;
        z-index: 99999 !important;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1) !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        transform: translateX(100%) !important;
        transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1) !important;
        will-change: transform !important;
        isolation: isolate !important;
    }
    
    .nav-menu.active {
        transform: translateX(0) !important;
    }
    
    .nav-link {
        display: block;
        padding: 15px 0;
        font-size: var(--font-size-lg);
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        pointer-events: auto;
        position: relative;
        z-index: 1;
        opacity: 1;
        color: #1a1a2e;
    }
    
    /* Hide nav button in mobile menu */
    .btn-nav {
        display: none !important;
    }
    
    .mobile-menu-toggle {
        display: block !important;
        z-index: 100000;
        position: relative;
        pointer-events: auto;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
        width: auto;
        height: auto;
    }
    
    .mobile-menu-toggle span {
        display: block;
        width: 25px;
        height: 3px;
        background: var(--text-primary);
        margin: 5px 0;
        transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
        border-radius: 2px;
        transform-origin: center center;
    }
    
    /* Mobile Menu Cross Animation */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
        background-color: var(--text-primary);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
        transform: scale(0);
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
        background-color: var(--text-primary);
    }
    
    /* Hero Section */
    .hero {
        min-height: 70vh;
        padding: 100px 0 50px;
        overflow: hidden;
        transform: none;
        position: relative;
        z-index: 1;
    }
    
    .hero h1 {
        font-size: var(--font-size-4xl);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-xl);
    }
    
    .hero-description {
        font-size: var(--font-size-lg);
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    /* Projects */
    .project-card {
        margin-bottom: 1.5rem;
    }
    
    /* Team */
    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    /* Solutions Grid Tablet */
    .solutions-grid {
        margin-top: 2rem;
    }
    
    /* Software Grid Tablet */
    .software-grid {
        margin-top: 2rem;
    }
    
    /* Philosophy Tablet */
    .philosophy-grid {
        margin: 1.5rem 0;
        gap: 1.5rem;
    }
    
    /* Founders Photos Tablet */
    .founders-photos {
        gap: 2rem;
        margin: 1.5rem 0;
    }
    
    /* CTA Section */
    .cta-section {
        padding: 50px 0;
    }
    
    .cta-section h2 {
        font-size: var(--font-size-3xl);
    }
    
    .cta-section p {
        font-size: var(--font-size-lg);
    }
    
    /* Typography */
    h2 {
        font-size: var(--font-size-3xl);
    }
    
    h3 {
        font-size: var(--font-size-2xl);
    }
    
    h4 {
        font-size: var(--font-size-xl);
    }
    
    p {
        font-size: var(--font-size-base);
    }
    
    section {
        padding-top: 50px;
        padding-bottom: 25px;
    }
    
    section:first-of-type {
        padding-top: 90px;
    }
    
    section:last-of-type {
        padding-bottom: 50px;
    }
}

/* Mobile Styles (max-width: 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    /* Hide text in CTA buttons, keep only icons on mobile */
    .cta-buttons .btn-icon-spacing {
        font-size: 0;
        padding: 14px;
        min-width: 50px;
        height: 50px;
        position: relative;
    }
    
    .cta-buttons .btn-icon-spacing i {
        font-size: 1.4rem;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }
    
    .cta-buttons {
        gap: 1rem;
    }
    
    /* Hero */
    .hero {
        min-height: 100vh;
        padding: 80px 0 40px;
    }
    
    .hero h1 {
        font-size: var(--font-size-3xl);
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: var(--font-size-lg);
        line-height: 1.4;
    }
    
    .hero-description {
        font-size: var(--font-size-base);
        line-height: var(--line-height-normal);
    }
    
    /* Category titles */
    .category-title {
        font-size: var(--font-size-lg);
    }
    
    /* Section titles */
    .section-title {
        font-size: var(--font-size-2xl);
    }

    /* Buttons */
    .btn {
        padding: 12px 24px;
        font-size: var(--font-size-base);
    }
    
    .btn-large {
        padding: 14px 28px;
        font-size: var(--font-size-base);
    }
    
    /* Cards */
    .card {
        padding: 1.5rem;
    }
    
    .feature-card {
        padding: 2rem 1.5rem;
    }
    
    .project-header {
        padding: 1.5rem;
    }
    
    .project-body {
        padding: 1.5rem;
    }
    
    /* Team */
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .team-member {
        padding: 1.5rem;
    }
    
    .team-avatar {
        width: 100px;
        height: 100px;
        font-size: var(--font-size-4xl);
    }
    
    /* Typography */
    h2 {
        font-size: var(--font-size-2xl);
        margin-bottom: 1rem;
    }
    
    h3 {
        font-size: var(--font-size-xl);
    }
    
    h4 {
        font-size: var(--font-size-lg);
    }
    
    p {
        font-size: var(--font-size-base);
        line-height: var(--line-height-relaxed);
    }
    
    /* Sections */
    section {
        padding-top: 40px;
        padding-bottom: 20px;
    }
    
    section:first-of-type {
        padding-top: 80px;
    }
    
    section:last-of-type {
        padding-bottom: 40px;
    }
    
    /* CTA */
    .cta-section {
        padding: 40px 0;
    }
    
    .cta-section h2 {
        font-size: var(--font-size-2xl);
    }
    
    .cta-section p {
        font-size: var(--font-size-base);
    }
    
    /* Scroll to Top */
    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
    
    /* Tech Stack */
    .tech-stack {
        gap: 0.4rem;
    }
    
    .tech-badge {
        padding: 4px 10px;
        font-size: var(--font-size-sm);
    }
    
    /* Navigation Menu */
    .nav-menu {
        width: 90%;
        max-width: none;
        padding: 60px 20px;
    }
    
    /* Mobile Component Spacing */
    .solutions-grid {
        margin-top: 1.5rem;
        gap: 1.5rem;
    }
    
    .software-grid {
        margin-top: 1.5rem;
        gap: 1.5rem;
    }
    
    .philosophy-grid {
        margin: 1rem 0;
        gap: 1.5rem;
    }
    
    .philosophy-statement {
        margin-top: 1rem;
        padding: 1.5rem;
    }
    
    .founders-photos {
        gap: 1.5rem;
        margin: 1rem 0;
        flex-direction: column;
        align-items: center;
    }
    
    .founder-photo img {
        width: 120px;
        height: 120px;
    }
    
    .testimonials-grid {
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .bots-grid {
        gap: 1.5rem;
    }
    
    .integrations-grid {
        gap: 1.5rem;
    }
}

/* Small Mobile (max-width: 375px) */
@media (max-width: 375px) {
    .hero h1 {
        font-size: var(--font-size-2xl);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-base);
    }
    
    .hero-description {
        font-size: var(--font-size-base);
    }
    
    h2 {
        font-size: var(--font-size-2xl);
    }
    
    h3 {
        font-size: var(--font-size-xl);
    }
    
    .btn {
        padding: 10px 20px;
        font-size: var(--font-size-sm);
    }
}

/* Landscape Mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding: 40px 0;
    }
    
    .hero h1 {
        font-size: var(--font-size-3xl);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-lg);
        margin-bottom: 1rem;
    }
    
    .hero-description {
        font-size: var(--font-size-base);
        margin-bottom: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .header,
    .mobile-menu-toggle,
    .scroll-to-top,
    .hero-buttons,
    .cta-section {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    h1, h2, h3, h4 {
        page-break-after: avoid;
        color: #000;
    }
    
    .card,
    .project-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}