/* Базовые стили */
:root {
    --bg-color: #f5f5f7;
    --text-color: #1d1d1f;
    --nav-bg: rgba(255, 255, 255, 0.8);
    --card-bg: #ffffff;
    --radius: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Плавная прокрутка для якорных ссылок */
html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Навигация */
.header {
    position: sticky;
    top: 0;
    background-color: var(--nav-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid #d2d2d7;
    z-index: 100;
}

.nav {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 16px;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.nav-link {
    position: relative;
    text-decoration: none;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.nav-link:hover {
    opacity: 1;
    transform: translateY(-2px);
}

/* Красивое подчеркивание в меню */
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--text-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Секции */
.section {
    padding: 80px 20px;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.section h1 {
    font-size: 48px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.section p {
    font-size: 21px;
    font-weight: 400;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.8;
}

/* Подзаголовки */
.sub-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 40px;
    text-align: center;
}

/* ====== КАРТОЧКИ ПРОЕКТОВ ====== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

a.card {
    display: flex;
    flex-direction: column;
    text-decoration: none; 
    color: var(--text-color); 
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    overflow: hidden;
}

a.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.card-img-wrapper {
    width: 100%;
    height: 220px;
    border-radius: 16px;
    overflow: hidden; 
    margin-bottom: 15px;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: block;
}

a.card:hover .card-img-wrapper img {
    transform: scale(1.08);
}

.card h3 {
    margin: 10px 0;
    font-size: 22px;
    font-weight: 600;
}

.card p {
    font-size: 16px;
    opacity: 0.75;
    margin-bottom: 15px;
}

.btn-link {
    display: inline-block;
    margin-top: auto; 
    padding-top: 15px;
    color: #0066cc;
    font-weight: 500;
    font-size: 16px;
    transition: color 0.3s ease, transform 0.3s ease;
}

a.card:hover .btn-link {
    color: #004499;
    text-decoration: underline;
    transform: translateX(5px);
}

/* ====== КОМАНДА ====== */
.team-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
}

.team-card {
    text-decoration: none;
    color: var(--text-color);
    text-align: center;
    transition: transform 0.4s ease;
    width: 200px;
}

.team-card:hover {
    transform: translateY(-6px);
}

.team-card img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.5s ease;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.team-card:hover img {
    transform: scale(1.12);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.18);
}

.team-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.team-card p {
    font-size: 14px;
    opacity: 0.7;
}

/* ====== ОТЗЫВЫ ====== */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.review-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    text-align: left;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.review-text {
    font-size: 18px;
    font-style: italic;
    line-height: 1.5;
    margin-bottom: 20px;
    opacity: 0.9;
}

.review-author {
    font-size: 14px;
    color: #86868b;
    border-top: 1px solid #e5e5ea;
    padding-top: 15px;
}

/* ====== ПАРТНЁРЫ (APPLE STYLE) — ИСПРАВЛЕНО ====== */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.partners-grid img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 16px;
    display: block;
    cursor: default;
    filter: grayscale(100%);
    transform: scale(1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    will-change: transform, filter;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1),
                filter 0.15s ease-out,
                box-shadow 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.partners-grid img:hover {
    transform: scale(1.04);
    filter: grayscale(0%);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* ====== ПУБЛИКАЦИИ ====== */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.article-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--card-bg);
    padding: 20px 30px;
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-item:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.article-date {
    font-size: 14px;
    color: #0066cc;
    font-weight: 600;
    min-width: 120px;
}

.article-title {
    font-size: 18px;
    font-weight: 500;
}

/* ====== ПОДВАЛ ====== */
.footer {
    text-align: center;
    padding: 40px;
    font-size: 12px;
    color: #86868b;
    border-top: 1px solid #d2d2d7;
    margin-top: 40px;
}

/* ====== ПРИНЦИП РАБОТЫ (ШАГИ) ====== */
.steps-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 900px;
    margin: 40px auto 0;
}

.step-item {
    display: flex;
    justify-content: center;
    align-items: center;     
    gap: 10px;               
    background: var(--card-bg);
    padding: 20px 30px;
    border-radius: var(--radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.step-action {
    color: #0066cc;
    font-weight: 500;
    font-size: 18px;
}

.step-desc {
    font-size: 18px;
    color: var(--text-color);
}

/* ====== АНИМАЦИИ ПОЯВЛЕНИЯ ПРИ СКРОЛЛЕ ====== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Красивая пружинная анимация */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Задержки для каскадного появления */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ====== АДАПТИВНОСТЬ ====== */
@media (max-width: 768px) {
    .section h1 { font-size: 34px; }
    .section p { font-size: 17px; }
    .team-card img { width: 140px; height: 140px; }
    .sub-title { font-size: 26px; }
    .article-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .step-item {
        flex-direction: column;
        text-align: center;
        gap: 5px;
        padding: 15px 20px;
    }
    .step-action, .step-desc {
        font-size: 16px;
    }
}
