/* =====================================================
   Mobile-First Features Section (iOS 18 Style)
   ===================================================== */

.features-section {
    margin: 32px 0;
}

.features-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.02) 0%, rgba(88, 86, 214, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:active {
    transform: scale(0.98);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.feature-card:active::before {
    opacity: 1;
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .feature-card {
        background: rgba(28, 28, 30, 0.8);
        border-color: rgba(255, 255, 255, 0.1);
    }
}

/* Telegram WebApp dark theme support */
body.tg-dark-theme .feature-card {
    background: rgba(29, 39, 51, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

body.tg-dark-theme .feature-card::before {
    background: linear-gradient(135deg, rgba(10, 132, 255, 0.04) 0%, rgba(94, 92, 230, 0.04) 100%);
}

body.tg-dark-theme .feature-card:active {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.features-section .feature-icon {
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #007aff 0%, #5856d6 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
    font-size: 20px !important;
    flex-shrink: 0 !important;
}

.feature-content {
    flex: 1;
    min-width: 0;
}

.feature-title {
    font-size: 17px;
    font-weight: 600;
    color: #1c1c1e;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.feature-description {
    font-size: 15px;
    color: #6d6d7a;
    margin: 0;
    line-height: 1.4;
}

/* Dark theme text colors */
@media (prefers-color-scheme: dark) {
    .feature-title {
        color: #ffffff;
    }

    .feature-description {
        color: #8e8e93;
    }
}

/* Telegram WebApp dark theme text colors */
body.tg-dark-theme .feature-title {
    color: #ffffff;
}

body.tg-dark-theme .feature-description {
    color: #98989d;
}

/* Specific icons and colors for each feature */
.features-section .feature-card:nth-child(1) .feature-icon {
    background: linear-gradient(135deg, #ff9f0a 0%, #ff6b00 100%) !important;
    box-shadow: 0 2px 12px rgba(255, 159, 10, 0.3);
}

.features-section .feature-card:nth-child(2) .feature-icon {
    background: linear-gradient(135deg, #30d158 0%, #00c896 100%) !important;
    box-shadow: 0 2px 12px rgba(48, 209, 88, 0.3) !important;
}

/* Фиксирует проблему с отображением иконки */
.features-section .feature-card:nth-child(2) .feature-icon i {
    display: block !important;
    font-size: 20px !important;
    color: white !important;
}

.features-section .feature-card:nth-child(3) .feature-icon {
    background: linear-gradient(135deg, #af52de 0%, #5856d6 100%) !important;
    box-shadow: 0 2px 12px rgba(175, 82, 222, 0.3);
}

.features-section .feature-card:nth-child(4) .feature-icon {
    background: linear-gradient(135deg, #007aff 0%, #5856d6 100%) !important;
    box-shadow: 0 2px 12px rgba(0, 122, 255, 0.3);
}

/* Tablet and Desktop improvements */
@media (min-width: 768px) {
    .features-section {
        margin: 48px 0;
    }

    .features-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 16px;
    }

    .feature-card {
        padding: 24px;
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .feature-icon {
        width: 56px;
        height: 56px;
        border-radius: 16px;
        font-size: 24px;
    }

    .feature-title {
        font-size: 19px;
    }

    .feature-description {
        font-size: 16px;
    }
}

/* Large screens */
@media (min-width: 1024px) {
    .features-section {
        max-width: 1200px;
        margin: 64px auto;
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }

    .feature-card {
        padding: 32px;
        gap: 24px;
    }

    .feature-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    }
}

/* Telegram WebApp integration */
.tg-viewport .feature-card {
    background: var(--tg-theme-bg-color, rgba(255, 255, 255, 0.8));
    border-color: var(--tg-theme-hint-color, rgba(255, 255, 255, 0.2));
}

.tg-viewport .feature-title {
    color: var(--tg-theme-text-color, #1c1c1e);
}

.tg-viewport .feature-description {
    color: var(--tg-theme-hint-color, #6d6d7a);
}
