/* ==========================================
   МОБИЛЬНЫЕ ПРИЛОЖЕНИЯ
   ========================================== */

/* Услуги */
.apps-services {
    padding: 60px 0 40px;
}

.apps-services h1 {
    text-align: center;
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 800;
    color: #2d3436;
    margin-bottom: 8px;
}

.apps-services > .container > p {
    text-align: center;
    color: #636e72;
    margin-bottom: 40px;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.app-card {
    background: #fff;
    padding: 30px 20px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    transition: transform 0.3s;
}

.app-card:hover {
    transform: translateY(-4px);
}

.app-card i {
    color: #6C5CE7;
    margin-bottom: 16px;
}

.app-card h3 {
    font-size: 1.1rem;
    color: #2d3436;
    margin-bottom: 8px;
}

.app-card p {
    font-size: 0.85rem;
    color: #636e72;
    line-height: 1.5;
}

/* Витрина */
.apps-showcase {
    padding: 40px 0 80px;
    background: #f8f9fa;
}

.apps-showcase .section-title {
    text-align: center;
    font-size: clamp(22px, 2.5vw, 30px);
    font-weight: 800;
    color: #2d3436;
    margin-bottom: 8px;
}

.apps-showcase .section-subtitle {
    text-align: center;
    color: #636e72;
    margin-bottom: 40px;
}

/* Сетка телефонов */
.apps-showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 40px 30px;
    justify-items: center;
}

/* ==========================================
   КАРТОЧКА ТЕЛЕФОНА
   ========================================== */

.app-phone-card {
    cursor: pointer;
    transition: transform 0.3s;
    text-align: center;
    max-width: 220px;
}

.app-phone-card:hover {
    transform: translateY(-6px);
}

.app-phone-card:hover .app-phone-frame {
    box-shadow: 0 16px 40px rgba(108, 92, 231, 0.2);
}

/* Корпус телефона */
.app-phone-frame {
    background: #1a1a2e;
    border-radius: 28px;
    padding: 10px;
    aspect-ratio: 9/18;
    margin-bottom: 16px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.2);
    transition: box-shadow 0.3s;
}

/* Экран */
.app-phone-screen {
    background: #fff;
    border-radius: 18px;
    height: 100%;
    overflow: hidden;
    position: relative;
    border: 2px dashed #d0d0d0;
}

.app-phone-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Чёлка */
.app-phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32%;
    height: 18px;
    background: #1a1a2e;
    border-radius: 0 0 10px 10px;
    z-index: 2;
}

/* ==========================================
   СКЕЛЕТ ПРИЛОЖЕНИЯ
   ========================================== */

.app-skeleton {
    position: absolute;
    inset: 0;
    padding: 22px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 5%;
    pointer-events: none;
}

/* Статус-бар */
.app-sk-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-sk-time {
    width: 20%;
    height: 5px;
    border: 1px dashed #ccc;
    border-radius: 2px;
}

.app-sk-icons {
    display: flex;
    gap: 3px;
}

.app-sk-icons span {
    width: 8px;
    height: 5px;
    border: 1px dashed #ddd;
    border-radius: 2px;
}

/* Хедер приложения */
.app-sk-header {
    display: flex;
    align-items: center;
    gap: 6px;
}

.app-sk-back {
    width: 14px;
    height: 14px;
    border: 1px dashed #ccc;
    border-radius: 3px;
}

.app-sk-title {
    flex: 1;
    height: 8px;
    border: 1px dashed #ccc;
    border-radius: 3px;
}

/* Меню */
.app-sk-menu {
    display: flex;
    gap: 4px;
}

.app-sk-menu-item {
    flex: 1;
    height: 24px;
    border: 1px dashed #e0e0e0;
    border-radius: 4px;
    background: rgba(0,0,0,0.02);
}

/* Hero-карточка */
.app-sk-hero {
    border: 1px dashed #ddd;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.app-sk-hero-line {
    height: 4px;
    border: 1px dashed #e0e0e0;
    border-radius: 2px;
}

.app-sk-hero-line:first-child {
    width: 70%;
    height: 6px;
}

.app-sk-hero-btn {
    width: 45%;
    height: 12px;
    border: 1px dashed #6C5CE7;
    border-radius: 6px;
    margin-top: 3px;
}

/* Сетка карточек */
.app-sk-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    flex: 1;
}

.app-sk-card {
    border: 1px dashed #eee;
    border-radius: 4px;
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.app-sk-card-icon {
    width: 14px;
    height: 14px;
    border: 1px dashed #ddd;
    border-radius: 3px;
}

.app-sk-card-line {
    height: 3px;
    border: 1px dashed #f0f0f0;
    border-radius: 1px;
}

/* Нижняя навигация */
.app-sk-bottom-nav {
    display: flex;
    gap: 3px;
    justify-content: space-around;
    padding-top: 4px;
    border-top: 1px dashed #eee;
}

.app-sk-nav-item {
    width: 18px;
    height: 18px;
    border: 1px dashed #ddd;
    border-radius: 3px;
}

/* Название */
.app-phone-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #2d3436;
    margin-bottom: 4px;
}

.app-phone-desc {
    font-size: 0.75rem;
    color: #636e72;
}

/* ==========================================
   МОДАЛЬНОЕ ОКНО
   ========================================== */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-site {
    background: #fff;
    border-radius: 20px;
    width: 95%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: #fff;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.modal-header {
    padding: 14px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.modal-header h2 {
    font-size: 1rem;
    color: #2d3436;
}

.modal-tabs {
    display: flex;
    gap: 3px;
}

.modal-tab {
    padding: 5px 10px;
    background: #f0f0f0;
    border: 2px solid #e0e0e0;
    border-radius: 14px;
    font-size: 0.7rem;
    cursor: pointer;
    color: #666;
}

.modal-tab.active {
    background: #6C5CE7;
    color: #fff;
    border-color: #6C5CE7;
}

.app-modal-body {
    background: #f5f5f5;
    text-align: center;
    padding: 20px;
}

.app-modal-body .app-screen {
    display: none;
}

.app-modal-body .app-screen.active {
    display: block;
}

.app-modal-body img {
    max-width: 280px;
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    margin: 0 auto;
}

.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.modal-footer .btn-primary {
    padding: 12px 32px;
    background: #6C5CE7;
    color: #fff;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
}

/* ==========================================
   АДАПТИВ
   ========================================== */

@media (max-width: 768px) {
    .apps-showcase-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px 16px;
    }
    
    .app-phone-card {
        max-width: 180px;
    }
}

@media (max-width: 460px) {
    .apps-showcase-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px 12px;
    }
    
    .app-phone-card {
        max-width: 150px;
    }
    
    .app-phone-frame {
        border-radius: 20px;
        padding: 7px;
    }
    
    .app-phone-screen {
        border-radius: 13px;
    }
}