/* adaptive.css - Оптимизированная версия */

/* Мобильные устройства (все стили для ширины до 768px) */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    header {
        padding: 0.5rem;
    }
    
    header .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }
    
    .logo-container {
        margin-bottom: 0;
        justify-content: flex-start;
    }
    
    .logo-container img {
        height: 60px;
    }
    
    .logo-container h1 {
        font-size: 1.2rem;
    }
    
    /* Стили для кнопки меню */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 24px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1000;
    }
    
    .menu-toggle span {
        display: block;
        width: 100%;
        height: 3px;
        background: var(--black);
        border-radius: 3px;
        transition: all 0.3s ease;
        transform-origin: center;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    /* Навигация */
    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: white;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        z-index: 999;
        padding: 1rem 0;
        margin-top: 0.5rem;
    }
    
    nav ul.active {
        display: flex;
    }
    
    nav ul li {
        margin: 0;
    }
    
    nav ul li a {
        display: block;
        padding: 0.75rem 1.5rem;
        border-bottom: 1px solid var(--gray-light);
    }
    
    nav ul li:last-child a {
        border-bottom: none;
    }
    
    /* Основное содержимое */
    main {
        padding: 1rem 0.5rem;
    }
    
    .article-preview, .video-item {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .article-preview {
        flex-direction: column;
    }
    
    .article-image {
        flex: 0 0 auto;
        margin-bottom: 1rem;
    }
    
    /* Элементы управления */
    .articles-controls {
        flex-direction: column;
    }
    
    .filter-box {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .donation-options {
        flex-direction: column;
    }
    
    /* Сетки */
    .video-list, .articles-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    /* Секции */
    .hero-section, .qa-section, .donation-section {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    /* Футер */
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .footer-section {
        text-align: center;
    }
}

/* Планшеты (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    main {
        padding: 1.5rem;
    }
    
    .articles-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .video-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-section, .qa-section, .donation-section {
        padding: 2rem;
    }
}

/* Десктоп (1025px и выше) */
@media (min-width: 1025px) {
    .video-list, .articles-list {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .donation-options {
        display: flex;
        gap: 2rem;
    }
    
    .donation-option {
        flex: 1;
    }
    
    /* Кнопка меню скрыта на десктопе */
    .menu-toggle {
        display: none;
    }
    
    /* Навигация всегда видима на десктопе */
    nav ul {
        display: flex !important;
    }
}

/* Убедимся, что кнопка меню скрыта на планшетах и десктопах */
@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
    
    nav ul {
        display: flex !important;
    }
}