/* ============================================
   EAP - Home Page Styles (Override & New)
   ============================================ */

/* Сброс конфликтов для главной страницы */
.hero-home,
.hero-home *,
.quick-categories,
.quick-categories *,
.apps-section-v2,
.apps-section-v2 *,
.features-section-v2,
.features-section-v2 *,
.bento-section,
.bento-section *,
.news-section-v2,
.news-section-v2 *,
.cta-section-v2,
.cta-section-v2 * {
    box-sizing: border-box;
}

/* Variables */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    --success: #10b981;
    --warning: #f59e0b;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* Base */
body {
    font-family: 'Wix Madefor Display', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* ============================================
   Hero Section (Защита от конфликтов style.css)
   ============================================ */

.hero-home {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    padding: 120px 0 80px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    overflow: hidden !important;
    margin: 0 !important;
    z-index: 1;
}

.hero-bg-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    bottom: -50px;
    left: -50px;
    animation-delay: 2s;
}

.shape-3 {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 50%;
    animation-delay: 4s;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    width: 100%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
}

.hero-badge i {
    color: #fbbf24;
}

.hero-title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    color: white;
}

.gradient-text {
    background: linear-gradient(135deg, #fbbf24 0%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.6;
    color: white;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-hero-primary {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    color: var(--primary-dark);
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    color: white;
}

/* Stats Grid */
.hero-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.stat-card-v2 {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s ease;
    color: white;
}

.stat-card-v2:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.stat-icon-wrapper {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.stat-value {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* ============================================
   Section Headers
   ============================================ */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.section-link:hover {
    gap: 12px;
    color: var(--primary-dark);
}

/* ============================================
   Quick Categories
   ============================================ */

.quick-categories {
    padding: 80px 0;
    background: var(--bg-primary);
}

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

.category-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.category-card:hover {
    border-color: var(--cat-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    width: 56px;
    height: 56px;
    background: var(--cat-color);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    flex-shrink: 0;
}

.category-info {
    flex: 1;
}

.category-info h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    margin-top: 0;
}

.category-count {
    font-size: 14px;
    color: var(--text-muted);
}

.category-arrow {
    color: var(--text-muted);
    font-size: 20px;
    transition: all 0.3s ease;
}

.category-card:hover .category-arrow {
    color: var(--cat-color);
    transform: translateX(4px);
}

/* ============================================
   Apps Section V2
   ============================================ */

.apps-section-v2 {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.apps-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.app-card-v2 {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.app-card-v2:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.app-card-icon {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}

.app-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
}

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

.app-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    margin-top: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-card-dev {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
    margin-top: 0;
}

.app-card-stats {
    display: flex;
    gap: 16px;
    font-size: 14px;
}

.app-rating,
.app-downloads {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
}

.app-rating i {
    color: #fbbf24;
}

/* ============================================
   Features Section V2
   ============================================ */

.features-section-v2 {
    padding: 80px 0;
    background: var(--bg-primary);
}

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

.feature-card-v2 {
    padding: 32px 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card-v2:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.feature-icon-v2 {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    background: var(--feature-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 36px;
}

.feature-title-v2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    margin-top: 0;
    color: var(--text-primary);
}

.feature-desc-v2 {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ============================================
   Bento Grid V2
   ============================================ */

.bento-section {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.bento-grid-v2 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 180px);
    gap: 20px;
}

.bento-card-v2 {
    position: relative;
    padding: 28px;
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.bento-card-v2::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(99, 102, 241, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bento-card-v2:hover::before {
    opacity: 1;
}

.bento-card-v2:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.bento-large {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    position: relative;
    z-index: 1;
}

/* === ИСПРАВЛЕНИЕ ИКОНОК === */
.bento-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 28px;
    color: white !important;
    flex-shrink: 0;
}

/* Принудительное отображение иконок Boxicons внутри bento */
.bento-icon i {
    font-family: 'boxicons' !important;
    font-weight: normal !important;
    font-style: normal !important;
    display: inline-block !important;
    font-size: 32px !important;
    color: #ffffff !important;
    line-height: 1 !important;
    speak: none !important;
    -webkit-font-smoothing: antialiased !important;
}

/* Стили фонов для иконок Bento */
.bento-macos { 
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%); 
}

.bento-windows { 
    background: linear-gradient(135deg, #0078d7 0%, #005a9e 100%); 
    box-shadow: 0 4px 12px rgba(0, 120, 215, 0.3);
}

.bento-android { 
    background: linear-gradient(135deg, #3ddc84 0%, #1a9c53 100%); 
    box-shadow: 0 4px 12px rgba(61, 220, 132, 0.3);
}

.bento-j2me { 
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%); 
}

.bento-wall { 
    background: linear-gradient(135deg, #10b981 0%, #059669 100%); 
}

.bento-search { 
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); 
}

.bento-cats { 
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%); 
}

.bento-text h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    margin-top: 0;
}

.bento-text p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.bento-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.bento-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.bento-arrow {
    font-size: 20px;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.bento-card-v2:hover .bento-arrow {
    transform: translateX(4px);
}

/* ============================================
   News Section V2
   ============================================ */

.news-section-v2 {
    padding: 80px 0;
    background: var(--bg-primary);
}

.news-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
}

.news-card-v2 {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-decoration: none;
    color: inherit;
}

.news-card-v2:hover {
    border-color: var(--news-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.news-header {
    padding: 24px;
    background: var(--news-color);
    display: flex;
    align-items: center;
    gap: 16px;
}

.news-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.news-category {
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.news-body {
    padding: 24px;
}

.news-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.news-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.3;
    margin-top: 0;
}

.news-excerpt {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 16px;
    margin-top: 0;
}

.news-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--news-color);
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.3s ease;
}

.news-link:hover {
    gap: 12px;
}

/* ============================================
   CTA Section V2
   ============================================ */

.cta-section-v2 {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.cta-card-v2 {
    position: relative;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-xl);
    padding: 60px;
    color: white;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.cta-decoration {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 120px;
    opacity: 0.1;
    animation: float 4s ease-in-out infinite;
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.cta-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 16px;
    margin-top: 0;
    color: white;
}

.cta-desc {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 32px;
    line-height: 1.6;
    margin-top: 0;
    color: white;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-cta-primary,
.btn-cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-cta-primary {
    background: white;
    color: var(--primary);
}

.btn-cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    color: var(--primary-dark);
}

.btn-cta-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    color: white;
}

/* ============================================
   Footer Overrides (на случай конфликтов)
   ============================================ */

.site-footer {
    background: var(--text-primary);
    color: white;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-logo img {
    width: 40px;
    height: 40px;
}

.footer-logo span {
    font-size: 24px;
    font-weight: 700;
    color: white;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin: 0;
}

.footer-links h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    margin-top: 0;
    color: white;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    margin: 0;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
    .bento-grid-v2 {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }
    
    .bento-large {
        grid-column: span 2;
        grid-row: span 1;
        min-height: 280px;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-home {
        padding: 80px 0 60px !important;
    }
    
    .hero-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .bento-grid-v2 {
        grid-template-columns: 1fr;
    }
    
    .bento-large {
        grid-column: span 1;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .cta-card-v2 {
        padding: 40px 24px;
        flex-direction: column;
        text-align: center;
    }
    
    .cta-decoration {
        display: none;
    }
    
    .news-grid-v2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .apps-grid-v2 {
        grid-template-columns: 1fr;
    }
    
    .features-grid-v2 {
        grid-template-columns: 1fr;
    }
}