﻿/* Додаткові адаптивні стилі */
@media (max-width: 768px) {
    /* Виправлення відступів */
    .hero {
        padding: 100px 0 50px;
    }
    
    .hero-wrapper {
        gap: 30px;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    /* Виправлення для сіток */
    .services-grid,
    .usp-grid,
    .blog-grid,
    .pricing-grid {
        gap: 20px;
    }
    
    /* Виправлення для футера */
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

/* Для дуже маленьких екранів */
@media (max-width: 380px) {
    .logo-text {
        font-size: 18px;
    }
    
    .animated-icon {
        width: 100%;
        height: 40px;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .section-title {
        font-size: 24px;
    }
}


/* ===== ВИПРАВЛЕННЯ ДЛЯ МОБІЛЬНОГО МЕНЮ ===== */

/* Скидання для десктопу (прибираємо fixed на великих екранах) */
@media (min-width: 769px) {
    .main-nav {
        position: relative !important;
        left: 0 !important;
        width: auto !important;
        height: auto !important;
        background: transparent !important;
        padding-top: 0 !important;
        box-shadow: none !important;
    }
    
    .mobile-menu-toggle {
        display: none !important;
    }
    
    body.menu-open::before {
        display: none !important;
    }
}

/* Виправлення для мобільних (від 320px до 768px) */
@media (max-width: 768px) {
    /* Фіксація позиції меню - для ВСІХ мобільних */
    .main-nav {
        position: fixed !important;
        top: 100% !important;
        left: -100% !important;
        width: 85% !important;
        max-width: 350px !important; 
        background: var(--light-color) !important;
        z-index: 999 !important;
        padding: 0 0 0 !important;
        transition: left 0.3s ease !important;
        box-shadow: 2px 0 20px rgba(0,0,0,0.15) !important;
        overflow-y: auto !important;
    }
    
    /* Відкрите меню */
    .main-nav.active {
        left: 0 !important;
    }
    
    /* Затемнення фону */
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        z-index: 998;
        backdrop-filter: blur(3px);
        animation: fadeIn 0.3s ease;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    
    /* Фіксація бургер-меню */
    .mobile-menu-toggle {
        display: flex !important;
        position: relative;
        z-index: 1000;
    }
    
}

/* Для планшетів в горизонтальній орієнтації */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .main-nav {
        max-width: 400px !important;
    }
}