/* Адаптивные стили для всех устройств */

/* Большие экраны (Desktop) */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .section-header h2 {
        font-size: 3rem;
    }
}

/* Планшеты (Tablet) */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 25px;
    }
    
    .courses-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .nav-menu {
        gap: 20px;
    }
    
    .success-stories {
        grid-template-columns: 1fr;
    }
}

/* Маленькие планшеты */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 50px;
        gap: 30px;
        transition: var(--transition);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-auth {
        flex-direction: column;
        gap: 10px;
        position: fixed;
        top: 200px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1001;
        opacity: 0;
        transition: var(--transition);
    }
    
    .nav-menu.active + .nav-auth {
        opacity: 1;
    }
    
    .hero {
        padding-top: 80px;
    }
    
    .hero-content {
        padding: 50px 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 25px;
    }
    
    .hero-stats {
        gap: 30px;
        margin-bottom: 30px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .feature-card {
        padding: 30px 20px;
    }
    
    .course-filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding: 10px 0;
        gap: 10px;
    }
    
    .course-filters::-webkit-scrollbar {
        display: none;
    }
    
    .filter-btn {
        flex-shrink: 0;
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
    
    .cta-content p {
        font-size: 1.1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 30px 25px;
        width: 95%;
        max-width: 400px;
    }
    
    .floating-elements {
        display: none;
    }
}

/* Мобильные устройства */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 25px;
    }
    
    .stat {
        display: flex;
        align-items: center;
        gap: 10px;
        justify-content: center;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    .features-grid {
        gap: 15px;
    }
    
    .feature-card {
        padding: 25px 15px;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .feature-card h3 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .course-card {
        margin: 0 10px;
    }
    
    .course-header {
        padding: 15px;
    }
    
    .course-subject {
        font-size: 1.3rem;
    }
    
    .course-content {
        padding: 20px;
    }
    
    .course-stats {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .course-price {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }
    
    .cta-content h2 {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
    
    .story {
        padding: 15px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .modal-content {
        padding: 25px 20px;
        margin: 15% auto;
    }
    
    .modal-content h2 {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }
    
    .auth-form {
        gap: 15px;
    }
    
    .hero-card {
        padding: 20px;
        margin: 0 10px;
    }
    
    .card-header {
        margin-bottom: 20px;
    }
    
    .avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .achievement {
        margin-top: 15px;
        padding: 12px;
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
}

/* Очень маленькие экраны */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .section-header h2 {
        font-size: 1.6rem;
    }
    
    .btn-primary, .btn-secondary {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .feature-card h3 {
        font-size: 1.1rem;
    }
    
    .feature-card p {
        font-size: 0.9rem;
    }
    
    .course-subject {
        font-size: 1.2rem;
    }
    
    .course-description {
        font-size: 0.9rem;
    }
    
    .modal-content {
        padding: 20px 15px;
    }
}

/* Ландшафтная ориентация на мобильных */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 100px 0 50px;
    }
    
    .hero-content {
        padding: 30px 0;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-stats {
        flex-direction: row;
        gap: 20px;
    }
    
    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* Высокие экраны */
@media (min-height: 800px) {
    .hero {
        min-height: 90vh;
    }
}

/* Принтер */
@media print {
    .navbar,
    .hero-buttons,
    .cta-section,
    .modal {
        display: none !important;
    }
    
    .hero {
        background: white !important;
        color: black !important;
        min-height: auto;
    }
    
    .hero-title,
    .section-header h2 {
        color: black !important;
    }
    
    .feature-card,
    .course-card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/* Настройки для улучшенной доступности */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Высокий контраст */
@media (prefers-contrast: high) {
    :root {
        --text-primary: #000000;
        --text-secondary: #333333;
        --bg-primary: #ffffff;
        --bg-secondary: #f5f5f5;
        --primary: #0000ff;
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    }
}

/* Темная тема */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0f172a;
        --bg-secondary: #1e293b;
        --bg-card: #334155;
        --text-primary: #f8fafc;
        --text-secondary: #cbd5e1;
        --text-light: #94a3b8;
    }
    
    .navbar {
        background: rgba(15, 23, 42, 0.95);
    }
    
    .modal-content {
        background-color: var(--bg-card);
    }
}