/* Responsive Styles */

/* Tablet (Landscape) and Desktop small */
@media (max-width: 1024px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2.2rem; }
    section { padding: 60px 0; }
    
    .hero-container-split {
        gap: 40px;
    }

    .pricing-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 20px;
    }
    /* Последнюю карточку в тарифах растягиваем или центрируем, если их 3 */
    .pricing-card:last-child:not([data-monthly-price]) {
        grid-column: span 2;
        max-width: 600px;
        margin: 0 auto;
        width: 100%;
    }

    .pricing-card.popular { transform: scale(1); }
    
    .implementation-grid { 
        grid-template-columns: 1fr; 
    }
}

/* Tablet (Portrait) and Mobile Large */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: var(--surface-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease-in-out;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        padding: 20px;
    }
    .main-nav.is-open {
        right: 0;
    }
    .main-nav ul {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    .main-nav a {
        font-size: 1.5rem;
    }
    .header-cta {
        display: none;
    }
    .burger-menu {
        display: block;
    }
    body.nav-open .burger-menu span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    body.nav-open .burger-menu span:nth-child(2) {
        opacity: 0;
    }
    body.nav-open .burger-menu span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-container-split {
        grid-template-columns: 1fr;
        gap: 50px;
        text-align: center;
    }
    .hero-text {
        text-align: center;
    }
    .hero .subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-cta {
        justify-content: center;
    }
    
    .hero-image {
        order: -1; /* Показываем картинку над текстом на мобильных */
    }
    
    .solution-item {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .solution-arrow {
        transform: rotate(90deg);
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    .pricing-card:last-child:not([data-monthly-price]) { 
        grid-column: auto; 
        max-width: none;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-left {
        margin-bottom: 20px;
    }
    .footer-right {
        text-align: center;
    }
    
    .features-grid, .roles-grid, .problems-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .btn {
        width: 100%;
        display: block;
        margin-bottom: 10px;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 10px;
    }
    .hero-cta .btn:last-child {
        margin-bottom: 0;
    }
    
    .pricing-card {
        padding: 20px;
    }
    
    .implementation-step-number {
        font-size: 4rem;
        top: -5px;
        right: 10px;
    }
}

/* Landscape orientation fix for mobile menu */
@media (max-height: 500px) and (orientation: landscape) {
    .main-nav {
        overflow-y: auto;
        justify-content: flex-start;
        padding-top: 60px;
    }
}