/* ========================================
   Mobile Responsive Styles
   ======================================== */

/* Tablet: 768px - 1023px */
@media (max-width: 1023px) {
    :root {
        --spacing-3xl: 64px;
        --spacing-2xl: 48px;
    }
    
    .section-title {
        font-size: 36px;
    }
    
    .section-subtitle {
        font-size: 16px;
    }
    
    /* Header */
    .header-info {
        display: none;
    }
    
    .header-phone {
        font-size: 18px;
    }
    
    /* Hero */
    .hero-title {
        font-size: 48px;
    }
    
    .hero-subtitle {
        font-size: 20px;
    }
    
    .hero-benefits {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    /* Offer */
    .offer-title {
        font-size: 32px;
    }
    
    .offer-benefits {
        flex-direction: column;
    }
    
    .offer-benefit {
        max-width: 100%;
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    
    /* Portfolio */
    .portfolio-item {
        flex: 0 0 100%;
    }
    
    /* Reviews */
    .reviews-grid {
        grid-template-columns: 1fr;
    }
    
    /* Contacts */
    .contacts-grid {
        grid-template-columns: 1fr;
    }
    
    .contacts-map {
        min-height: 0;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-lg);
    }
    
    .footer-logo {
        grid-column: 1 / -1;
    }
}

/* Mobile Large: 481px - 767px */
@media (max-width: 767px) {
    :root {
        --spacing-3xl: 40px;
        --spacing-2xl: 28px;
        --spacing-xl: 24px;
        --spacing-lg: 18px;
        --spacing-md: 14px;
        --container-padding: 16px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .section-subtitle {
        font-size: 15px;
        margin-bottom: var(--spacing-lg);
    }
    
    /* Header */
    .header-content {
        padding: 12px 0;
    }
    
    .header-logo .logo-img {
        height: 40px;
    }
    
    .logo-img {
        height: 40px;
    }
    
    .header-contacts {
        display: none;
    }
    
    /* Убираем бургер меню */
    /* Hero */
    .hero {
        min-height: auto;
        padding-top: 80px;
        padding-bottom: var(--spacing-xl);
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .hero-benefits {
        gap: 12px;
    }
    
    .benefit-item {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .btn-large {
        padding: 16px 28px;
        font-size: 16px;
        width: 100%;
    }
    
    .hero-messengers {
        flex-direction: column;
        width: 100%;
    }
    
    .messenger-link {
        width: 100%;
        justify-content: center;
    }
    
    .hero-scroll {
        display: none;
    }
    
    /* Offer */
    .offer {
        padding: var(--spacing-xl) 0;
    }
    
    .offer-title {
        font-size: 28px;
    }
    
    .offer-subtitle {
        font-size: 16px;
    }
    
    .offer-benefit {
        flex-direction: column;
        text-align: center;
        padding: 16px;
        min-width: auto;
    }
    
    .timer-countdown {
        gap: 12px;
    }
    
    .timer-item {
        padding: 16px;
        min-width: 80px;
    }
    
    .timer-value {
        font-size: 36px;
    }
    
    .timer-unit {
        font-size: 12px;
    }
    
    /* Advantages */
    .advantages-grid {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-md);
    }
    
    .advantage-card {
        max-width: 100%;
        width: 100%;
        padding: var(--spacing-md);
    }
    
    .advantage-icon {
        width: 48px;
        height: 48px;
    }
    
    .advantage-title {
        font-size: 20px;
    }
    
    /* Services */
    .services-grid {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-md);
    }
    
    .service-card {
        max-width: 100%;
        width: 100%;
        padding: var(--spacing-md);
    }
    
    .service-icon {
        width: 48px;
        height: 48px;
    }
    
    .service-title {
        font-size: 20px;
    }
    
    .service-price {
        font-size: 24px;
    }
    
    /* Process */
    .process-step {
        flex-direction: column;
        padding: var(--spacing-lg);
        gap: var(--spacing-md);
    }
    
    .step-number {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    
    .step-title {
        font-size: 20px;
    }
    
    /* Portfolio */
    .slider-btn {
        width: 44px;
        height: 44px;
    }
    
    .slider-prev {
        left: 10px;
    }
    
    .slider-next {
        right: 10px;
    }
    
    /* Reviews */
    .reviews-grid {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-md);
    }
    
    .review-card {
        max-width: 100%;
        width: 100%;
        padding: var(--spacing-md);
    }
    
    .review-author {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    /* Guarantee */
    .guarantee-grid {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-md);
    }
    
    .guarantee-item {
        max-width: 100%;
        width: 100%;
        padding: var(--spacing-md);
    }
    
    .guarantee-icon {
        width: 48px;
        height: 48px;
    }
    
    .guarantee-title {
        font-size: 20px;
    }
    
    /* FAQ */
    .faq-question {
        padding: var(--spacing-md);
        font-size: 16px;
    }
    
    .faq-answer p {
        padding: 0 var(--spacing-md) var(--spacing-md);
        font-size: 15px;
    }
    
    /* Contacts */
    .contact-item {
        flex-direction: column;
        padding: var(--spacing-md);
        text-align: center;
    }
    
    .contact-messengers {
        flex-direction: column;
    }
    
    .messenger-badge {
        justify-content: center;
    }
    
    .contacts-map {
        min-height: 0;
    }
    
    .route-plan-lightbox-close {
        top: 4px;
        right: 4px;
    }
    
    /* Footer */
    .footer {
        padding: var(--spacing-xl) 0 var(--spacing-md);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .footer-logo .logo-img {
        height: 110px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-sm);
        text-align: center;
    }
    
    /* Modal */
    .modal {
        padding: var(--spacing-sm);
    }
    
    .modal-content {
        padding: var(--spacing-lg);
        max-height: 95vh;
    }
    
    .modal-title {
        font-size: 24px;
        padding-right: 40px;
    }
    
    .form-messengers-buttons {
        flex-direction: column;
    }
    
    .btn-messenger {
        width: 100%;
    }
}

/* Mobile Small: 320px - 480px */
@media (max-width: 480px) {
    :root {
        --spacing-3xl: 32px;
        --spacing-2xl: 24px;
        --spacing-xl: 18px;
        --spacing-lg: 14px;
        --spacing-md: 12px;
        --container-padding: 14px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .section-subtitle {
        font-size: 14px;
        margin-bottom: var(--spacing-md);
    }
    
    /* Header */
    .header-logo .logo-img {
        height: 36px;
    }
    
    .logo-img {
        height: 36px;
    }
    
    /* Hero */
    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .benefit-item {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .benefit-icon {
        width: 20px;
        height: 20px;
    }
    
    /* Offer */
    .offer-title {
        font-size: 24px;
    }
    
    .offer-subtitle {
        font-size: 15px;
    }
    
    .offer-benefit {
        padding: 14px;
    }
    
    .offer-icon {
        width: 28px;
        height: 28px;
    }
    
    .timer-item {
        padding: 12px;
        min-width: 70px;
    }
    
    .timer-value {
        font-size: 28px;
    }
    
    /* Cards */
    .advantage-card,
    .service-card,
    .review-card,
    .guarantee-item {
        padding: var(--spacing-md);
    }
    
    .advantage-icon,
    .service-icon,
    .guarantee-icon {
        width: 40px;
        height: 40px;
    }
    
    .advantage-title,
    .service-title,
    .guarantee-title {
        font-size: 18px;
    }
    
    /* Process */
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .step-title {
        font-size: 18px;
    }
    
    /* Portfolio */
    .portfolio-label {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .portfolio-caption {
        font-size: 14px;
    }
    
    /* Contacts */
    .contact-icon {
        width: 28px;
        height: 28px;
    }
    
    .contact-title {
        font-size: 16px;
    }
    
    .contact-link {
        font-size: 18px;
    }
    
    /* Modal */
    .modal-content {
        padding: var(--spacing-md);
    }
    
    .modal-title {
        font-size: 22px;
    }
    
    .modal-close {
        width: 36px;
        height: 36px;
        top: 12px;
        right: 12px;
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        padding: 12px 14px;
        font-size: 15px;
    }
}

/* ========================================
   Touch Optimizations
   ======================================== */

@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .faq-question {
        min-height: 44px;
    }
    
    .messenger-btn,
    .social-link {
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Disable hover effects on touch devices */
    .advantage-card:hover,
    .service-card:hover,
    .review-card:hover,
    .guarantee-item:hover {
        transform: none;
    }
    
    /* Remove hover animations */
    .btn:hover::before {
        width: 0;
        height: 0;
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .header,
    .burger-menu,
    .hero-scroll,
    .modal,
    .slider-btn,
    .footer-social,
    .messenger-btn,
    .messenger-link {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .section-title,
    .highlight {
        color: black;
    }
    
    a {
        text-decoration: underline;
    }
    
    .btn {
        border: 1px solid black;
        color: black;
        background: white;
    }
}

/* ========================================
   Landscape Orientation
   ======================================== */

@media (max-width: 767px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding-top: 70px;
        padding-bottom: var(--spacing-xl);
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .modal-content {
        max-height: 80vh;
    }
}

/* ========================================
   Reduced Motion
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-scroll {
        animation: none;
    }
}

/* ========================================
   High Contrast Mode
   ======================================== */

@media (prefers-contrast: high) {
    :root {
        --color-gray: #CCCCCC;
    }
    
    .btn-outline {
        border-width: 3px;
    }
    
    .advantage-card,
    .service-card,
    .review-card {
        border-width: 2px;
    }
}

/* ========================================
   Dark Mode (if system preference)
   ======================================== */

@media (prefers-color-scheme: dark) {
    /* Already dark by default */
}
