/* ============================================
   COSMIC FANTASY MODELS PAGE MOBILE
   Компактная и удобная адаптация страницы моделей для мобильных
   ============================================ */

/* ========== ЗАГОЛОВОК СТРАНИЦЫ ========== */
@media (max-width: 768px) {
    /* Заголовок страницы */
    .models-page .page-header {
        padding: 60px 16px 40px !important;
        min-height: auto;
    }
    
    /* Заголовок */
    .models-page .page-title,
    .models-page .header-content .page-title,
    .frozyai-main .models-page .page-title {
        font-size: 28px !important;
        font-weight: 800;
        margin-bottom: 12px !important;
        letter-spacing: -0.5px;
        line-height: 1.2;
    }
    
    /* Подзаголовок */
    .models-page .page-subtitle,
    .models-page .header-content .page-subtitle,
    .frozyai-main .models-page .page-subtitle {
        font-size: 14px !important;
        margin: 0;
        line-height: 1.4;
        opacity: 0.9;
    }
    
    .models-page .header-content {
        padding: 0 16px;
    }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
    .models-page .page-header {
        padding: 50px 12px 30px !important;
    }
    
    .models-page .page-title {
        font-size: 24px !important;
        margin-bottom: 8px !important;
    }
    
    .models-page .page-subtitle {
        font-size: 13px !important;
    }
    
    .models-page .header-content {
        padding: 0 12px;
    }
}

/* ========== SHOWCASE РЕКОМЕНДУЕМОЙ МОДЕЛИ ========== */
@media (max-width: 768px) {
    /* Контейнер showcase */
    .model-showcase {
        padding: 24px 16px !important;
        margin: -20px auto 32px !important;
        border-radius: 16px;
    }
    
    /* Заголовок showcase */
    .model-showcase-header {
        margin-bottom: 24px !important;
        padding: 0;
    }
    
    /* Бейдж модели */
    .model-badge {
        padding: 8px 16px !important;
        font-size: 11px !important;
        margin-bottom: 16px !important;
        border-radius: 20px;
    }
    
    .model-badge i {
        font-size: 12px;
    }
    
    /* Название модели */
    .model-title {
        font-size: 24px !important;
        margin-bottom: 12px !important;
        line-height: 1.2;
    }
    
    /* Описание модели */
    .model-description {
        font-size: 13px !important;
        line-height: 1.5;
        padding: 0 8px;
    }
    
    /* Контент showcase */
    .model-showcase-content {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    
    /* Swiper галерея */
    .demo-gallery-swiper {
        margin-bottom: 20px;
    }
    
    .demo-item {
        border-radius: 12px;
        overflow: hidden;
    }
    
    .demo-image-container {
        aspect-ratio: 1;
    }
    
    .demo-image-container img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    /* Скрываем overlay на мобильных */
    .demo-overlay {
        display: none !important;
    }
    
    /* Навигация Swiper */
    .swiper-button-next,
    .swiper-button-prev {
        width: 32px !important;
        height: 32px !important;
    }
    
    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 14px !important;
    }
    
    /* Пагинация Swiper */
    .swiper-pagination {
        bottom: 8px !important;
    }
    
    .swiper-pagination-bullet {
        width: 6px !important;
        height: 6px !important;
    }
    
    /* Особенности модели - компактные */
    .model-features {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    
    .feature-card {
        padding: 12px !important;
        border-radius: 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 8px;
    }
    
    .feature-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 18px !important;
        border-radius: 10px;
    }
    
    .feature-content h4 {
        font-size: 12px !important;
        margin-bottom: 4px;
    }
    
    .feature-content p {
        font-size: 10px !important;
        margin: 0;
        line-height: 1.3;
    }
    
    /* Действия модели */
    .model-actions {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100%;
    }
    
    .model-actions .btn-primary,
    .model-actions .btn-secondary {
        width: 100% !important;
        padding: 12px 20px !important;
        font-size: 13px !important;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    
    .model-actions .btn-primary i,
    .model-actions .btn-secondary i {
        font-size: 14px;
    }
    
    .model-actions .btn-primary span,
    .model-actions .btn-secondary span {
        font-size: 13px;
    }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
    .model-showcase {
        padding: 20px 12px !important;
        margin: -15px auto 24px !important;
        border-radius: 14px;
    }
    
    .model-showcase-header {
        margin-bottom: 20px !important;
    }
    
    .model-badge {
        padding: 6px 12px !important;
        font-size: 10px !important;
        margin-bottom: 12px !important;
    }
    
    .model-title {
        font-size: 20px !important;
        margin-bottom: 10px !important;
    }
    
    .model-description {
        font-size: 12px !important;
    }
    
    .model-features {
        gap: 10px !important;
    }
    
    .feature-card {
        padding: 10px !important;
        gap: 6px;
    }
    
    .feature-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 16px !important;
    }
    
    .feature-content h4 {
        font-size: 11px !important;
    }
    
    .feature-content p {
        font-size: 9px !important;
    }
    
    .model-actions .btn-primary,
    .model-actions .btn-secondary {
        padding: 10px 16px !important;
        font-size: 12px !important;
    }
}

/* ========== СЕТКА МОДЕЛЕЙ ========== */
@media (max-width: 768px) {
    /* Секция моделей */
    .models-section {
        padding: 0 16px 40px !important;
    }
    
    .models-section .section-title {
        font-size: 22px !important;
        margin-bottom: 20px !important;
        text-align: center;
    }
    
    /* Сетка моделей - 2 в ряд */
    .models-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    
    /* Карточки моделей */
    .model-card {
        padding: 20px 16px !important;
        border-radius: 14px;
        text-align: center;
    }
    
    /* Иконка модели */
    .model-card-icon {
        width: 60px !important;
        height: 60px !important;
        margin: 0 auto 16px !important;
        font-size: 28px !important;
        border-radius: 12px;
    }
    
    /* Название модели */
    .model-card h3 {
        font-size: 18px !important;
        margin-bottom: 12px !important;
        line-height: 1.2;
    }
    
    /* Описание модели */
    .model-card p {
        font-size: 12px !important;
        line-height: 1.5;
        margin-bottom: 12px;
    }
    
    /* Теги модели */
    .model-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        justify-content: center;
    }
    
    .model-tags .tag {
        padding: 4px 10px !important;
        font-size: 10px !important;
        border-radius: 6px;
    }
    
    /* Убираем hover эффекты на мобильных */
    .model-card:hover {
        transform: none;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    
    .model-card:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
    .models-section {
        padding: 0 12px 32px !important;
    }
    
    .models-section .section-title {
        font-size: 20px !important;
        margin-bottom: 16px !important;
    }
    
    /* На очень маленьких экранах - 1 колонка */
    .models-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    
    .model-card {
        padding: 18px 14px !important;
        border-radius: 12px;
    }
    
    .model-card-icon {
        width: 56px !important;
        height: 56px !important;
        font-size: 26px !important;
        margin-bottom: 14px !important;
    }
    
    .model-card h3 {
        font-size: 16px !important;
        margin-bottom: 10px !important;
    }
    
    .model-card p {
        font-size: 11px !important;
        margin-bottom: 10px;
    }
    
    .model-tags .tag {
        padding: 3px 8px !important;
        font-size: 9px !important;
    }
}

/* ========== МОДАЛЬНОЕ ОКНО ИНФОРМАЦИИ О МОДЕЛИ ========== */
@media (max-width: 768px) {
    .model-info-modal {
        padding: 0 !important;
        align-items: flex-end !important;
    }
    
    .model-info-modal .modal-content {
        max-width: 100% !important;
        width: 100% !important;
        max-height: 90vh !important;
        border-radius: 20px 20px 0 0 !important;
        margin: 0;
    }
    
    .model-info-modal .modal-close {
        top: 12px !important;
        right: 12px !important;
        width: 32px !important;
        height: 32px !important;
    }
    
    .model-info-modal .modal-header h2 {
        font-size: 20px !important;
    }
    
    .model-info-modal .modal-subtitle {
        font-size: 13px !important;
    }
    
    .model-info-modal .info-section {
        margin-bottom: 20px;
    }
    
    .model-info-modal .info-section h3 {
        font-size: 16px !important;
    }
    
    .model-info-modal .info-section p {
        font-size: 13px !important;
        line-height: 1.6;
    }
    
    .model-info-modal .features-list li {
        font-size: 13px !important;
        padding: 8px 0;
    }
}

/* ========== ОБЩИЕ УЛУЧШЕНИЯ ========== */
@media (max-width: 768px) {
    /* Контейнер */
    .models-page .container {
        padding: 0 16px !important;
    }
    
    /* Плавные анимации */
    .model-card,
    .feature-card,
    .model-actions .btn-primary,
    .model-actions .btn-secondary {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* Улучшенная читаемость */
    .page-title,
    .page-subtitle,
    .model-title,
    .model-description,
    .model-card h3,
    .model-card p {
        text-rendering: optimizeLegibility;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}
