html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: #333;
}

/* Скрытая ссылка */
.hidden-link {
    color: inherit;
    text-decoration: none;
}

/* Герой-блок */
.hero {
    position: relative;
    height: 100vh;
    background: url('../img/background.jpg') no-repeat center center/cover;
    color: white;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

/* Меню */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    transform: translateY(-100%);
    transition: transform 0.8s ease-out;
}

.navbar.visible {
    transform: translateY(0);
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: white;
}

.nav-links a {
    color: white;
    text-decoration: none;
    margin-left: 30px;
    font-size: 18px;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.8;
}

.hero-content {
    position: absolute;
    z-index: 10;
    text-align: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
}

.company-name {
    font-size: 60px;
    margin: 0;
}

.slogan {
    font-size: 28px;
    margin-top: 10px;
}

/* Секции */
.section-common {
    padding: 120px 50px;
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.section-title-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: start;
}

.section-title {
    font-size: 48px;
    margin: 0;
    opacity: 0;
    transition: all 1s ease-out;
}

.section-title.visible {
    opacity: 1;
}

#about .section-title { transform: translateX(-100px); }
#about .section-title.visible { transform: translateX(0); }

#mission .section-title {
    transform: translateX(100px);
    text-align: right;
}
#mission .section-title.visible { transform: translateX(0); }

.underline {
    height: 6px;
    background: #ccc;
    margin-top: 20px;
    width: 100%;
}

#mission .underline { margin-left: auto; }

.section-text {
    font-size: 20px;
    line-height: 1.35;
    opacity: 0;
    transition: all 1s ease-out 0.3s;
}

.section-text.visible { opacity: 1; }

#mission .section-text { transform: translateX(-100px); }
#mission .section-text.visible { transform: translateX(0); }

#about .section-text { transform: translateX(100px); }
#about .section-text.visible { transform: translateX(0); }

.mission-intro { margin-bottom: 15px; }

.mission-text ol {
    margin-top: 0;
    padding-left: 0;
    list-style: none;
    counter-reset: mission-counter;
}

.mission-text ol li {
    counter-increment: mission-counter;
    position: relative;
    padding-left: 60px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    
    /* Начальное состояние для анимации */
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Задержка появления каждого следующего пункта */
.mission-text ol li:nth-child(1) { transition-delay: 0.1s; }
.mission-text ol li:nth-child(2) { transition-delay: 0.3s; }
.mission-text ol li:nth-child(3) { transition-delay: 0.5s; }
.mission-text ol li:nth-child(4) { transition-delay: 0.7s; }
.mission-text ol li:nth-child(5) { transition-delay: 0.9s; }
.mission-text ol li:nth-child(6) { transition-delay: 1.1s; }

/* Когда блок миссии стал видимым — анимируем пункты */
.mission-text.visible ol li {
    opacity: 1;
    transform: translateX(0);
    height: 60px;
}

/* Кружок с номером тоже анимируется */
.mission-text ol li::before {
    content: counter(mission-counter);
    position: absolute;
    left: 0;
    width: 40px;
    height: 40px;
    background: #000;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    flex-shrink: 0;
    
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.mission-text.visible ol li::before {
    opacity: 1;
    transform: scale(1);
}

/* Контакты */
.contacts-section {
    padding: 120px 50px;
    background: #f9f9f9;
    text-align: center;
}

.contacts-title {
    font-size: 36px;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease-out;
}

.contacts-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.contacts-grid {
    display: flex;
    justify-content: center;
    gap: 100px;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease-out 0.4s;
}

.contacts-grid.visible {
    opacity: 1;
    transform: translateY(0);
}

.contact-item {
    font-size: 20px;
}

.contact-label {
    font-weight: bold;
    margin-bottom: 10px;
}

.contact-value a {
    color: #0077b5;
    text-decoration: none;
}

/* лого */
.logo-img {
    height: 50px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.logo-img:hover {
    opacity: 0.9;
}

@media (max-width: 768px) {
    .logo-img {
        height: 40px;
    }
}

/* Мобильные устройства (до 768px) */
@media (max-width: 768px) {
    /* Полностью скрываем шапку на мобильных */
    .navbar {
        display: none !important;
    }

    /* Герой-блок */
    .company-name {
        font-size: 40px;
    }

    .slogan {
        font-size: 22px;
    }

    /* Секции "О компании" и "Миссия" */
    .section-common {
        padding: 80px 20px;
        grid-template-columns: 1fr; /* Одна колонка */
        gap: 40px;
    }

    .section-title {
        font-size: 36px;
        text-align: center;
    }

    #mission .section-title {
        text-align: center;
    }

    .underline {
        margin: 20px auto;
        width: 150px;
    }

    .section-text {
        font-size: 18px;
    }

    #mission .section-title-wrapper {
        order: -1; /* Заголовок выше */
    }

    #mission .section-text {
        order: 1; /* Текст ниже */
    }

    /* Список в миссии */
    .mission-text ol li {
        padding-left: 50px;
    }

    .mission-text ol li::before {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    /* Контакты */
    .contacts-section {
        padding: 80px 20px;
    }

    .contacts-title {
        font-size: 32px;
    }

    .contacts-grid {
        flex-direction: column;
        gap: 40px;
        align-items: center;
    }

    .contact-item {
        font-size: 18px;
    }
}

/* Очень маленькие экраны (до 480px) */
@media (max-width: 480px) {
    .company-name {
        font-size: 32px;
    }

    .slogan {
        font-size: 20px;
    }

    .section-title {
        font-size: 30px;
    }

    .section-text {
        font-size: 17px;
    }

    .logo-img {
        height: 35px;
    }
}
