/* Адаптивный дизайн */

/* Планшеты (максимум 992px) */
@media (max-width: 992px) {
    :root {
        --spacing-xl: 4rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Планшеты и мобильные (максимум 768px) */
@media (max-width: 768px) {
    :root {
        --spacing-xl: 3rem;
        --spacing-lg: 2rem;
        --spacing-md: 1.5rem;
    }
    
    /* Навигация */
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        background: var(--color-white);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: var(--spacing-lg) 0;
        transition: all 0.3s ease;
        box-shadow: var(--shadow-md);
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        width: 100%;
        text-align: center;
        padding: var(--spacing-sm) 0;
    }
    
    .nav-menu a {
        font-size: 1.1rem;
        width: 100%;
        display: block;
        padding: var(--spacing-xs) 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    /* Hero секция */
    .hero {
        min-height: 80vh;
        padding-top: 80px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    /* Разделы */
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 1.1rem;
    }
    
    /* Сетки */
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .specialists-grid,
    .values-grid {
        grid-template-columns: 1fr;
    }
    
    .course-meta {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    /* Контакты */
    .contact-wrapper {
        gap: var(--spacing-lg);
    }
    
    /* Модальное окно */
    .modal-content {
        padding: var(--spacing-md);
    }
}

/* Мобильные устройства (максимум 576px) */
@media (max-width: 576px) {
    :root {
        --spacing-xl: 2.5rem;
        --spacing-lg: 1.5rem;
        --spacing-md: 1rem;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    /* Hero секция */
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero .btn {
        width: 100%;
        margin-top: var(--spacing-sm);
    }
    
    /* Разделы */
    .section {
        padding: var(--spacing-lg) 0;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* Карточки */
    .specialist-card,
    .value-card,
    .course-card {
        padding: var(--spacing-sm);
    }
    
    .specialist-image {
        height: 250px;
    }
    
    .specialist-name {
        font-size: 1.25rem;
    }
    
    .course-title {
        font-size: 1.5rem;
    }
    
    /* Формы */
    .enrollment-form {
        padding: var(--spacing-sm);
    }
    
    .btn {
        width: 100%;
        padding: 0.875rem 1.5rem;
    }
    
    .btn-secondary {
        margin-top: var(--spacing-xs);
    }
    
    /* Футер */
    footer {
        padding: var(--spacing-md) 0;
        font-size: 0.9rem;
    }
}

/* Очень маленькие экраны (максимум 375px) */
@media (max-width: 375px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.375rem;
    }
    
    .logo {
        font-size: 1.25rem;
    }
}

/* Ландшафтная ориентация мобильных */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
    }
    
    .nav-menu {
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
}

/* Высокие экраны */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Принтер */
@media print {
    header,
    footer,
    .nav-menu,
    .btn,
    .modal,
    .enrollment-form {
        display: none !important;
    }
    
    .hero {
        min-height: auto;
        padding: var(--spacing-lg) 0;
    }
    
    .section {
        page-break-inside: avoid;
    }
}

/* Accessibility: уменьшение анимаций */
@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;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Высокая плотность пикселей */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .specialist-image,
    .hero::before {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

