/* =====================================================
   RESPONSIVE.CSS - Адаптивность
   Mobile-first подход
   ===================================================== */

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
    :root {
        --font-size-5xl: 2.5rem;
        --font-size-4xl: 2rem;
        --font-size-3xl: 1.5rem;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image {
        max-width: 500px;
        margin: 0 auto;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .consultation-content {
        grid-template-columns: 1fr;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-image {
        order: -1;
        max-width: 500px;
        margin: 0 auto;
    }

    /* Contacts Bar Tablet */
    .contacts-bar {
        flex-wrap: wrap;
    }

    .contact-item {
        flex: 1 1 45%;
        min-width: 280px;
    }

    .contact-divider {
        display: none;
    }

    .map-header {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Large (max-width: 768px) */
@media (max-width: 768px) {
    :root {
        --font-size-5xl: 2rem;
        --font-size-4xl: 1.75rem;
        --font-size-3xl: 1.375rem;
        --space-3xl: 3rem;
        --space-2xl: 2rem;
    }

    .container {
        padding: 0 var(--space-md);
    }

    /* Header Mobile */
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: var(--space-lg);
        gap: var(--space-md);
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .nav-cta {
        margin-left: 0;
        margin-top: var(--space-md);
    }

    .nav-link {
        font-size: var(--font-size-base);
        padding: var(--space-sm) 0;
    }

    /* Hero Mobile */
    .hero {
        padding: 120px 0 60px;
    }

    .hero-title {
        font-size: var(--font-size-4xl);
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    /* Features Mobile */
    .features-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        display: flex;
        align-items: flex-start;
        text-align: left;
        gap: var(--space-md);
    }

    .feature-icon {
        flex-shrink: 0;
    }

    /* Pricing Mobile */
    .pricing-grid {
        grid-template-columns: 1fr;
    }

    /* Portfolio Mobile */
    .portfolio-images {
        grid-template-columns: 1fr;
    }

    .portfolio-btn {
        width: 40px;
        height: 40px;
    }

    /* FAQ Mobile */
    .faq-question {
        padding: var(--space-md);
        font-size: var(--font-size-sm);
    }

    .faq-answer p {
        padding: 0 var(--space-md) var(--space-md);
        font-size: var(--font-size-sm);
    }

    /* About Mobile */
    .about-stats {
        flex-direction: column;
        gap: var(--space-lg);
        align-items: center;
    }

    /* Contacts Mobile */
    .contacts-bar {
        flex-direction: column;
    }

    .contact-item {
        flex: none;
        width: 100%;
        padding: var(--space-md);
        border-bottom: 1px solid var(--gray-100);
    }

    .contact-item:last-child {
        border-bottom: none;
    }

    .map-header {
        padding: var(--space-lg);
    }

    .map-wrapper {
        height: 300px;
    }

    /* Footer Mobile */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-info {
        margin-bottom: var(--space-lg);
    }

    .social-links {
        justify-content: center;
    }

    /* Back to Top Mobile */
    .back-to-top {
        bottom: var(--space-md);
        right: var(--space-md);
        width: 44px;
        height: 44px;
    }
}

/* Mobile Small (max-width: 480px) */
@media (max-width: 480px) {
    :root {
        --font-size-5xl: 1.75rem;
        --font-size-4xl: 1.5rem;
        --font-size-3xl: 1.25rem;
        --font-size-2xl: 1.125rem;
    }

    .section-title {
        font-size: var(--font-size-2xl);
    }

    .btn {
        padding: var(--space-md) var(--space-lg);
        font-size: var(--font-size-sm);
    }

    .btn-lg {
        padding: var(--space-md) var(--space-xl);
        font-size: var(--font-size-base);
    }

    .hero-subtitle {
        font-size: var(--font-size-base);
    }

    .consultation-form-wrapper {
        padding: var(--space-lg);
    }

    .pricing-card {
        padding: var(--space-lg);
    }

    .price-value {
        font-size: var(--font-size-3xl);
    }

    .contact-card {
        padding: var(--space-lg);
    }

    .modal-content {
        padding: var(--space-lg);
        margin: var(--space-md);
    }
}

/* Hover effects only for non-touch devices */
@media (hover: hover) {
    .feature-card:hover,
    .pricing-card:hover,
    .contact-card:hover,
    .faq-item:hover {
        transform: translateY(-4px);
    }
}

/* Reduced motion */
@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;
    }
}

/* Print styles */
@media print {
    .header,
    .back-to-top,
    .modal,
    .nav-toggle,
    .hero-buttons,
    .consultation-form-wrapper {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    .hero {
        padding: 20px 0;
    }

    section {
        page-break-inside: avoid;
    }
}
