/* ============================================
   WHY US SECTION
   Блок "Почему мы?" — преимущества компании
   ============================================ */

.why-section {
    width: 100%;
    padding: 80px 40px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

/* === HEADER === */
.why-header {
    margin-bottom: 60px;
    text-align: left;
}

.why-title {
    font-size: clamp(42px, 6vw, 72px);
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.1;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(30px);
    animation: whyFadeUp 0.7s ease forwards;
}

.why-title::after {
    content: '';
    display: block;
    margin-top: 12px;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-500), var(--primary-400));
    border-radius: 2px;
    animation: whyLineExpand 0.8s ease 0.4s forwards;
}

@keyframes whyLineExpand {
    to { width: 120px; }
}

@keyframes whyFadeUp {
    to { opacity: 1; transform: translateY(0); }
}

.why-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 700px;
    line-height: 1.7;
    opacity: 0;
    transform: translateY(20px);
    animation: whyFadeUp 0.6s ease 0.2s forwards;
}

/* === MAIN CONTENT === */
.why-content {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 60px;
    align-items: start;
}

/* Left Column */
.why-left {
    opacity: 0;
    transform: translateX(-30px);
    animation: whySlideRight 0.7s ease 0.3s forwards;
}

@keyframes whySlideRight {
    to { opacity: 1; transform: translateX(0); }
}

.why-description {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 36px;
}

/* Button - Hero Style */
.why-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 36px;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 600;
    color: #F8FAFC;
    text-decoration: none;
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.why-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-400) 0%, var(--primary-500) 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.why-btn:hover::before { opacity: 1; }
.why-btn span { position: relative; z-index: 1; }
.why-btn-arrow { 
    width: 20px; 
    height: 20px; 
    position: relative; 
    z-index: 1; 
    transition: transform 0.2s ease; 
}
.why-btn:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4); 
    color: #F8FAFC;
}
.why-btn:hover .why-btn-arrow { transform: translateX(4px); }

/* === STATS GRID === */
.why-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.stat-card {
    position: relative;
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    overflow: hidden;
    opacity: 0;
    transform: translateY(40px);
}

.stat-card:nth-child(1) { animation: whyCardReveal 0.6s ease 0.4s forwards; }
.stat-card:nth-child(2) { animation: whyCardReveal 0.6s ease 0.5s forwards; }
.stat-card:nth-child(3) { animation: whyCardReveal 0.6s ease 0.6s forwards; }
.stat-card:nth-child(4) { animation: whyCardReveal 0.6s ease 0.7s forwards; }

@keyframes whyCardReveal {
    to { opacity: 1; transform: translateY(0); }
}

/* Beam animation */
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(59, 130, 246, 0.03) 40%,
        rgba(59, 130, 246, 0.08) 50%,
        rgba(59, 130, 246, 0.03) 60%,
        transparent 100%
    );
    transform: skewX(-20deg);
    animation: whyBeamSweep 8s ease-in-out infinite;
}

.stat-card:nth-child(1)::before { animation-delay: 0s; }
.stat-card:nth-child(2)::before { animation-delay: 2s; }
.stat-card:nth-child(3)::before { animation-delay: 4s; }
.stat-card:nth-child(4)::before { animation-delay: 6s; }

/* Default 8s, can be overridden via inline styles */
@keyframes whyBeamSweep {
    0%, 100% { left: -100%; }
    50% { left: 150%; }
}

/* Top gradient line on hover */
.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-500), var(--primary-400), var(--primary-300));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.stat-card:hover::after { transform: scaleX(1); }

.stat-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    border-radius: 14px;
    color: white;
    margin-bottom: 20px;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.stat-card:hover .stat-icon {
    transform: scale(1.08) rotate(3deg);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

.stat-icon svg { width: 26px; height: 26px; }

.stat-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* === LANGUAGE FONTS === */
[data-lang="ru"] .why-title,
[data-lang="ru"] .why-subtitle,
[data-lang="ru"] .why-description,
[data-lang="ru"] .stat-text,
[data-lang="ru"] .why-btn { font-family: var(--font-body); }

[data-lang="en"] .why-title,
[data-lang="en"] .why-subtitle,
[data-lang="en"] .why-description,
[data-lang="en"] .stat-text,
[data-lang="en"] .why-btn { font-family: var(--font-logo); }

[data-lang="zh"] .why-title,
[data-lang="zh"] .why-subtitle,
[data-lang="zh"] .why-description,
[data-lang="zh"] .stat-text,
[data-lang="zh"] .why-btn { font-family: var(--font-chinese); }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .why-content { 
        grid-template-columns: 1fr; 
        gap: 50px; 
    }
}

@media (max-width: 768px) {
    .why-section { 
        padding: 60px 24px; 
    }
    
    .why-stats { 
        gap: 16px; 
    }
    
    .stat-card { 
        padding: 24px; 
    }
}

@media (max-width: 500px) {
    .why-stats { 
        grid-template-columns: 1fr; 
    }
}
