/* ============================================
   responsive.css - САМО ЗА МОБИЛНИ УСТРОЙСТВА
   ============================================ */

/* --------------------------------------------
   1. МОБИЛНА БАЗА (до 1024px) - САМО ТЕЛЕФОНИ
-------------------------------------------- */
@media screen and (max-width: 1024px) {

    /* ========== АГРЕСИВЕН FIX ========== */
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        position: relative !important;
    }

    /* ===== ХЕДЪР И БАНЕР ===== */
    .banner {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        padding: 40px 0 20px 0 !important;  /* ПРОМЕНЕНО: 0 отляво/отдясно */
        gap: 5px !important;
        min-height: auto !important;
        background: #295236 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        position: relative !important;
        left: 0 !important;
        right: 0 !important;
        box-sizing: border-box !important;
    }

    .banner .logo {
        width: 130px !important;
        height: 130px !important;
        min-width: 130px !important;
        max-width: 130px !important;
        min-height: 130px !important;
        max-height: 130px !important;
        margin: 0 auto 5px auto !important;
        display: block !important;
        object-fit: contain !important;
        position: relative !important;
        left: auto !important;
        transform: none !important;
        top: 0 !important;
    }

    .banner-extension {
        display: block !important;
        width: 100% !important;
        height: 60px !important;
        background: #295236 !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 0 !important;
        font-size: 0 !important;
        position: relative !important;
        top: -1px !important;
        z-index: 10 !important;
    }

    .hamburger-btn {
        display: block !important;
        position: absolute !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 200px !important;
        height: 40px !important;
        background: #5A9BE6 !important;
        border: 2px solid white !important;
        border-radius: 8px !important;
        cursor: pointer !important;
        z-index: 1001 !important;
        color: white !important;
        font-size: 24px !important;
        line-height: 36px !important;
        text-align: center !important;
        font-weight: bold !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.3) !important;
        margin: 0 !important;
    }

    .slider-container {
        width: 100% !important;  /* ПРОМЕНЕНО: 100% вместо 95% */
        height: 200px !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        border-radius: 0 !important;  /* ПРОМЕНЕНО: 0 за тест */
        position: relative !important;
        order: 2 !important;
        flex: 0 0 auto !important;
        align-self: center !important;
        box-sizing: border-box !important;
    }

    /* Премахваме всички потенциални проблеми от слайдовете */
    .slide {
        width: 100% !important;
        max-width: 100% !important;
        background-size: cover !important;
        background-position: center !important;
    }

    .slide-content {
        padding: 8px;
    }

    .slide-content h3 {
        font-size: 14px;
        margin-bottom: 3px;
    }

    .slide-content p {
        font-size: 11px;
    }

    .slider-arrow {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .slider-dots {
        bottom: 3px;
    }

    .slider-dots .dot {
        width: 8px;
        height: 8px;
        margin: 0 3px;
    }

    /* ===== НАВИГАЦИЯ ===== */
    .navbar {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: 280px !important;
        max-width: 80vw !important;
        height: auto !important;
        max-height: 90vh !important;
        background: linear-gradient(180deg, #1e4b7a 0%, #0a2e4a 100%) !important;
        padding: 0 !important;
        transition: left 0.3s ease !important;
        z-index: 1000 !important;
        overflow-y: auto !important;
        box-shadow: -5px 0 20px rgba(0,0,0,0.3) !important;
        border-radius: 0 20px 20px 0 !important;
        margin: 10px 0 !important;
    }

    .navbar.active {
        left: 0 !important;
    }

    .menu-overlay {
        display: none !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: rgba(0,0,0,0.5) !important;
        z-index: 999 !important;
    }

    .menu-overlay.active {
        display: block !important;
    }

    .menu {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
    }

    .menu > li {
        width: 100% !important;
        border-bottom: 1px solid rgba(255,255,255,0.1) !important;
        margin: 0 !important;
        background: transparent !important;
    }

    .menu > li:first-child > a {
        border-radius: 20px 0 0 0 !important;
    }

    .menu > li:last-child {
        border-bottom: none !important;
    }

    .menu > li:last-child > a {
        border-radius: 0 0 0 20px !important;
    }

    .menu > li > a {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        height: 50px !important;
        padding: 0 20px !important;
        font-size: 18px !important;
        color: white !important;
        text-decoration: none !important;
        background: transparent !important;
        cursor: pointer !important;
    }

    .menu > li > a:hover,
    .submenu li a:hover {
        background: linear-gradient(180deg, #66cccc 0%, #008080 100%) !important;
        color: #ffffff !important;
    }

    .submenu {
        display: none !important;
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: linear-gradient(180deg, #4a90e2 0%, #1e3a5f 100%) !important;
    }

    .has-submenu.active > .submenu {
        display: block !important;
    }

    .submenu li a {
        display: block !important;
        padding: 12px 30px !important;
        font-size: 16px !important;
        color: white !important;
        text-decoration: none !important;
        border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    }

    .submenu-depth2 {
        display: none !important;
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: linear-gradient(180deg, #3a7bd5 0%, #1a2f4a 100%) !important;
    }

    .has-submenu-depth2.active > .submenu-depth2 {
        display: block !important;
    }

    .submenu-depth2 li a {
        padding: 10px 40px !important;
        font-size: 15px !important;
    }

    .has-submenu > a::after {
        content: " +" !important;
        display: inline-block !important;
        font-size: 24px !important;
        font-weight: bold !important;
        color: white !important;
        float: right !important;
    }

    .has-submenu.active > a::after {
        content: " -" !important;
    }

    .has-submenu-depth2 > a::after {
        content: " +" !important;
        font-size: 22px !important;
        float: right !important;
    }

    .has-submenu-depth2.active > a::after {
        content: " -" !important;
    }

    /* ===== ОСНОВНО СЪДЪРЖАНИЕ ===== */
    .content {
        padding: 20px 10px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .contacts-wrapper {
        flex-direction: column !important;
        gap: 20px !important;
        padding: 20px !important;
    }

    .contact-info, 
    .contact-form-page {
        width: 100% !important;
        padding: 15px !important;
        box-sizing: border-box !important;
    }

    /* ===== ФУТЪР ===== */
    .footer-container {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
        text-align: center;
        padding: 0 15px;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .footer-section h3::after {
        left: 50% !important;
        transform: translateX(-50%);
    }

    .footer-section .contact-info-footer p {
        justify-content: center;
    }

    .social-links {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column !important;
        text-align: center !important;
        padding: 15px !important;
        gap: 10px;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .footer-bottom-links {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 5px !important;
    }

    .newsletter-form {
        flex-direction: column;
        gap: 10px;
    }

    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
        padding: 12px;
        font-size: 16px;
        box-sizing: border-box !important;
    }

    /* ===== ПОПРАВКИ ЗА ВСИЧКИ КОНТЕЙНЕРИ ===== */
    .site-header,
    .site-footer,
    .contacts-container,
    #page-content,
    #stationary-content,
    #summer-camps-content,
    #about-us-content,
    #contacts-form-container {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    /* Поправка за вградени div-ове със сложни стилове */
    #stationary-content > div,
    #summer-camps-content > div,
    #about-us-content > div,
    #page-content > div {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Поправка за секцията "За нас" */
    #about-us-content [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Поправка за всички flex/grid елементи */
    [style*="display: flex"],
    [style*="display:grid"] {
        max-width: 100% !important;
        flex-wrap: wrap !important;
        box-sizing: border-box !important;
    }

    /* Поправка за снимки */
    img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Гарантираме, че всички елементи с padding не излизат извън екрана */
    * {
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }

    /* ===== ЛАНДШАФТ РЕЖИМ ЗА ТЕЛЕФОНИ ===== */
    @media screen and (orientation: landscape) {
        
        .banner-extension {
            height: 80px !important;
        }
        
        .hamburger-btn {
            width: 240px !important;
            height: 45px !important;
            font-size: 26px !important;
            line-height: 41px !important;
        }
        
        .slider-container {
            height: 150px !important;
        }
        
        .banner .logo {
            width: 100px !important;
        }
        
        .navbar {
            max-height: 80vh !important;
        }
    }
}

/* --------------------------------------------
   2. МНОГО МАЛКИ ТЕЛЕФОНИ (до 480px)
-------------------------------------------- */
@media screen and (max-width: 480px) {
    
    .banner .logo {
        width: 100px !important;
        height: 100px !important;
    }
    
    .slider-container {
        height: 150px !important;
    }
    
    .hamburger-btn {
        width: 160px !important;
        height: 35px !important;
        font-size: 20px !important;
        line-height: 31px !important;
    }
    
    #stationary-content h1 {
        font-size: 1.6rem !important;
    }
}