/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 30px;
    height: 3px;
    background: var(--text-color);
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    header {
        flex-wrap: wrap;
        padding: 1rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
        order: 1;
    }
    
    .logo-container {
        order: 0;
        flex-grow: 1;
    }
    
    nav {
        order: 2;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }
    
    nav.active {
        max-height: 500px;
        padding-top: 1rem;
    }
    
    nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    nav li {
        width: 100%;
    }
    
    nav a {
        display: block;
        padding: 0.75rem 1rem;
        text-align: center;
    }
    
    .hero {
        flex-direction: column;
        padding: 3rem 5%;
        gap: 2rem;
    }
    
    .hero-text h2 {
        font-size: 2rem;
    }
    
    .hero-text p {
        font-size: 1rem;
    }
    
    .features-preview, .problem-solution, .download-section {
        padding: 3rem 5%;
    }
    
    .features-preview h3, .problem-solution h3, .download-section h3 {
        font-size: 1.8rem;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .problem-card, .solution-card {
        padding: 2rem;
    }
    
    .page-header h2 {
        font-size: 1.8rem;
    }
    
    /* Disable some heavy animations on mobile */
    .particle-canvas {
        display: none;
    }
    
    /* Adapt abstract animation for mobile */
    .abstract-animation {
        max-width: 100%;
        height: 350px;
    }
    
    .wave-lines {
        width: 90%;
        height: 90%;
    }
    
    .circle-1 {
        width: 70px;
        height: 70px;
    }
    
    .circle-2 {
        width: 60px;
        height: 60px;
    }
    
    .circle-3 {
        width: 50px;
        height: 50px;
    }
    
    /* Adapt new modern design for mobile */
    .features-preview h3,
    .problem-solution h3,
    .download-section h3 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .features-preview {
        padding: 2rem 5% 3rem;
    }
    
    .problem-solution {
        padding: 3rem 5%;
    }
    
    .download-section {
        padding: 3rem 5% 4rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .feature-card {
        padding: 2.5rem 2rem;
        border-radius: 24px;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .problem-card,
    .solution-card {
        transform: rotate(0);
        padding: 2.5rem 2rem;
        border-radius: 24px;
    }
    
    .download-card {
        padding: 1rem;
        border-radius: 12px;
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
        max-width: 100%;
        justify-content: center;
    }
    
    .download-card .card-content {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .download-icon {
        width: 35px;
        height: 35px;
    }
    
    .download-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .download-button {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    
    /* Download Page Mobile */
    .download-page-hero {
        padding: 2rem 5% 1rem;
    }
    
    .download-page-hero h2 {
        font-size: 2rem;
    }
    
    .download-page-hero .subtitle {
        font-size: 1rem;
    }
    
    .download-section-page {
        padding: 1rem 5% 3rem;
    }
    
    .download-card-page {
        padding: 2rem 1.5rem;
        border-radius: 15px;
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .download-card-page .card-content {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .download-card-page .windows-icon {
        width: 56px;
        height: 56px;
    }
    
    .download-card-page .content-text {
        text-align: center;
    }
    
    .download-card-page .content-text h4 {
        font-size: 1.3rem;
    }
    
    .download-button-page {
        padding: 0.9rem 2rem;
        font-size: 1rem;
        width: 100%;
    }
    
    /* Interface Showcase Mobile */
    .interface-showcase {
        padding: 3rem 5%;
    }
    
    .interface-showcase h3 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .showcase-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .screenshot-showcase {
        gap: 2rem;
        max-width: 100%;
    }
    
    .screenshot-item {
        flex-direction: column !important;
        padding: 1.5rem;
        gap: 1.5rem;
        min-height: auto;
        background: rgba(235, 235, 235, 0.22);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    }
    
    /* Remove shadows on mobile for all except "Элегантная простота" */
    .screenshot-item.welcome-screen,
    .screenshot-item.call-interface,
    .screenshot-item.encryption-feature {
        box-shadow: none;
    }
    
    .screenshot-item > img.screenshot-media {
        width: 100%;
        height: auto;
        object-fit: contain;
        object-position: center;
    }
    
    .screenshot-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    }
    
    .screenshot-item.welcome-screen:hover,
    .screenshot-item.call-interface:hover,
    .screenshot-item.encryption-feature:hover {
        box-shadow: none;
    }
    
    .screenshot-image {
        width: 100%;
        height: 400px;
        border-radius: 15px;
    }
    
    .screenshot-item.main-menu > img.screenshot-media {
        width: 100%;
        height: auto;
        max-height: 600px;
        object-fit: contain;
        object-position: center;
    }
    
    .image-info h4 {
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
    }
    
    .image-info p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
}

/* Tablet Responsive */
@media (max-width: 1024px) {
    .screenshot-image {
        height: 350px;
    }
    
    .screenshot-image.small-image {
        height: 280px;
    }
    
    .screenshot-item.main-menu > img.screenshot-media {
        width: 100%;
        height: auto;
        min-height: 450px;
        max-height: 650px;
        object-fit: contain;
        object-position: center;
    }
    
    .screenshot-item > img.screenshot-media {
        width: 100%;
        height: auto;
        object-fit: contain;
        object-position: center;
    }
}

/* Roadmap Slider Responsive */
@media (max-width: 768px) {
    .latest-update-card {
        padding: 2rem;
    }
    
    .roadmap-control {
        padding: 1.5rem;
        margin: 2rem 0;
    }
    
    .timeline-control-label {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        font-size: 1rem;
    }
    
    .slider-steps {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0;
    }
    
    .slider-step {
        font-size: 0.75rem;
        padding: 0.25rem 0.4rem;
    }
    
    .timeline-slider::-webkit-slider-thumb {
        width: 28px;
        height: 28px;
    }
    
    .timeline-slider::-moz-range-thumb {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .slider-steps {
        gap: 0.3rem;
    }
    
    .slider-step {
        font-size: 0.7rem;
        padding: 0.2rem 0.3rem;
    }
}