/* Глобальные переменные и стили */
:root {
    --color-background: #0D1117;
    --color-surface: #161B22;
    --color-primary: #2F81F7;
    --color-primary-hover: #4C8FF7;
    --color-text-main: #E6EDF3;
    --color-text-secondary: #8B949E;
    --font-family-headings: 'Space Grotesk', sans-serif;
    --font-family-body: 'Inter', sans-serif;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-body);
    background-color: var(--color-background);
    color: var(--color-text-main);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-headings);
    color: var(--color-text-main);
    line-height: 1.2;
}

a {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-primary);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

.logo {
    font-family: var(--font-family-headings);
    font-weight: 700;
    font-size: 24px;
    color: var(--color-text-main);
    text-decoration: none;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    background-color: transparent;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.header--scrolled {
    background-color: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__list {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav__link {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.nav__link:hover {
    color: var(--color-text-main);
}

.nav__link--cta {
    background-color: var(--color-primary);
    color: var(--color-text-main);
    padding: 8px 16px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.nav__link--cta:hover {
    background-color: var(--color-primary-hover);
    color: var(--color-text-main);
}

.burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.burger__line {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-text-main);
    margin: 5px 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}


/* Footer */
.footer {
    background-color: var(--color-surface);
    padding: 60px 0 20px;
    border-top: 1px solid rgba(139, 148, 158, 0.2);
}

.footer__container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer__description {
    margin-top: 15px;
    color: var(--color-text-secondary);
    font-size: 14px;
    max-width: 250px;
}

.footer__title {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--color-text-main);
}

.footer__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer__link {
    font-size: 15px;
    color: var(--color-text-secondary);
}

.footer__link:hover {
    color: var(--color-text-main);
    text-decoration: underline;
}

.footer__address {
    font-style: normal;
    color: var(--color-text-secondary);
    font-size: 15px;
    line-height: 1.5;
}

.footer__bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(139, 148, 158, 0.2);
    font-size: 14px;
    color: var(--color-text-secondary);
}


/* Адаптивность */
@media (max-width: 768px) {
    .nav {
        display: none; /* Будет управляться через JS */
    }

    .burger {
        display: block;
    }

    .footer__container {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer__column--about, .footer__column--contact {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .footer__container {
        grid-template-columns: 1fr;
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 60px;
    overflow: hidden;
}

.hero__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
}

.hero__title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    min-height: 150px; /* Резервируем место под заголовок */
}

/* Эффект курсора для анимации печати */
.hero__title::after {
    content: '_';
    animation: blink 0.7s infinite;
    font-weight: normal;
}

@keyframes blink {
    50% { opacity: 0; }
}

.hero__subtitle {
    font-size: 18px;
    color: var(--color-text-secondary);
    max-width: 500px;
    margin-bottom: 30px;
}

.button {
    display: inline-block;
    background-color: var(--color-primary);
    color: var(--color-text-main);
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.button:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
    color: var(--color-text-main);
}

.hero__visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero__image-wrapper {
    position: relative;
    width: 100%;
    max-width: 450px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background-color: var(--color-surface);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 80px rgba(47, 129, 247, 0.1);
}

.hero__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    opacity: 0.8;
}

/* Скрываем элементы для анимации */
.hero__subtitle, .hero__cta {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.hero__subtitle.is-visible, .hero__cta.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* Адаптивность для Hero */
@media (max-width: 992px) {
    .hero__title {
        font-size: 40px;
        min-height: 120px;
    }
}

@media (max-width: 768px) {
    .hero {
        text-align: center;
    }
    .hero__container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .hero__content {
        order: 2;
    }
    .hero__visual {
        order: 1;
    }
    .hero__subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    .hero__image-wrapper {
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .hero {
       padding-top: 100px;
    }
    .hero__title {
        font-size: 32px;
        min-height: 100px;
    }
    .hero__subtitle {
        font-size: 16px;
    }
}

/* Общие стили для заголовков секций */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-header__title {
    font-size: 36px;
    margin-bottom: 15px;
}

.section-header__subtitle {
    font-size: 18px;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

/* Секция Directions */
.directions {
    padding: 80px 0;
    background-color: var(--color-surface);
}

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

.card {
    background-color: var(--color-background);
    border: 1px solid rgba(139, 148, 158, 0.2);
    border-radius: 12px;
    padding: 30px;
    transition: transform 0.3s ease, border-color 0.3s ease;
    text-align: center;
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--color-primary);
}

.card__icon {
    margin: 0 auto 20px;
    color: var(--color-primary);
    width: 48px;
    height: 48px;
}

.card__icon svg {
    width: 100%;
    height: 100%;
}

.card__title {
    font-size: 22px;
    margin-bottom: 10px;
}

.card__description {
    font-size: 15px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* Анимация появления */
.directions__card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.directions__card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Адаптивность для заголовков секций */
@media (max-width: 768px) {
    .section-header__title {
        font-size: 32px;
    }
    .section-header__subtitle {
        font-size: 16px;
    }
    .directions {
        padding: 60px 0;
    }
}

/* Секция Approach */
.approach {
    padding: 80px 0;
    background-color: var(--color-background);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

/* Центральная линия таймлайна */
.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: rgba(139, 148, 158, 0.2);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline__item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

/* Располагаем элементы поочередно слева и справа */
.timeline__item:nth-child(odd) {
    left: 0;
}

.timeline__item:nth-child(even) {
    left: 50%;
}

.timeline__marker {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--color-background);
    border: 3px solid var(--color-primary);
    top: 20px;
    z-index: 1;
}

.timeline__item:nth-child(odd) .timeline__marker {
    right: -8px;
}
.timeline__item:nth-child(even) .timeline__marker {
    left: -8px;
}

.timeline__content {
    text-align: left;
}

.timeline__title {
    font-size: 22px;
    margin-bottom: 10px;
    color: var(--color-primary);
}

/* Универсальный класс для анимации */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Специфичные трансформации для таймлайна */
.timeline__item.fade-in-on-scroll:nth-child(odd) {
    transform: translateX(-30px);
}
.timeline__item.fade-in-on-scroll:nth-child(even) {
    transform: translateX(30px);
}
.timeline__item.fade-in-on-scroll.is-visible {
    transform: translateX(0);
}


/* Адаптивность для Approach */
@media (max-width: 768px) {
    .timeline::after {
        left: 20px;
    }

    .timeline__item {
        width: 100%;
        padding-left: 50px;
        padding-right: 0;
        left: 0 !important; /* Убираем позиционирование для четных/нечетных */
    }

    .timeline__marker {
        left: 12px !important; /* Ставим маркер на линию */
    }
    
    .timeline__item.fade-in-on-scroll {
        transform: translateX(30px) !important;
    }
    .timeline__item.fade-in-on-scroll.is-visible {
        transform: translateX(0) !important;
    }
}

/* Секция Cases */
.cases {
    padding: 80px 0;
    background-color: var(--color-surface);
}

.cases__wrapper {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.case-study {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 50px;
}

.case-study__image-wrapper {
    border-radius: 12px;
    overflow: hidden;
}

.case-study__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Модификатор для чередования блоков */
.case-study--reverse .case-study__image-wrapper {
    order: 2;
}
.case-study--reverse .case-study__content {
    order: 1;
}

.case-study__tag {
    display: inline-block;
    background-color: rgba(47, 129, 247, 0.1);
    color: var(--color-primary);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
}

.case-study__title {
    font-size: 28px;
    margin-bottom: 20px;
}

.case-study__quote {
    font-size: 16px;
    font-style: italic;
    color: var(--color-text-secondary);
    padding-left: 20px;
    border-left: 3px solid var(--color-primary);
    margin: 0 0 20px;
}

.case-study__result p {
    font-size: 16px;
    line-height: 1.6;
}

.case-study__result strong {
    color: var(--color-text-main);
}

/* Адаптивность для Cases */
@media (max-width: 768px) {
    .case-study {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .case-study--reverse .case-study__image-wrapper,
    .case-study--reverse .case-study__content {
        order: initial; /* Сбрасываем порядок на мобильных */
    }
    .case-study__title {
        font-size: 24px;
    }
}
/* Секция Articles */
.articles {
    padding: 80px 0;
    background-color: var(--color-background);
}

.articles__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.article-card {
    background-color: var(--color-surface);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(139, 148, 158, 0.2);
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.article-card__image-link {
    display: block;
    aspect-ratio: 16 / 9;
}

.article-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-card__image {
    transform: scale(1.05);
}

.article-card__content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Чтобы карточки были одной высоты */
}

.article-card__category {
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
}

.article-card__title {
    font-size: 20px;
    margin-bottom: 15px;
}

.article-card__title a {
    color: var(--color-text-main);
}

.article-card__title a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.article-card__excerpt {
    color: var(--color-text-secondary);
    font-size: 15px;
    margin-bottom: 20px;
    flex-grow: 1;
}

.article-card__read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--color-text-main);
}

.article-card__read-more:hover {
    color: var(--color-primary);
}

.article-card__read-more i {
    transition: transform 0.3s ease;
}

.article-card__read-more:hover i {
    transform: translateX(4px);
}

.articles__view-all {
    text-align: center;
}

/* Адаптивность для Articles */
@media (max-width: 360px) {
    .articles__grid {
        grid-template-columns: 1fr;
    }
}

/* Секция Contact */
.contact {
    padding: 80px 0;
    background-color: var(--color-surface);
}

.contact__container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: flex-start;
}

.contact__title {
    font-size: 36px;
    margin-bottom: 20px;
}

.contact__description {
    font-size: 18px;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 30px;
}

.contact__details {
    padding-top: 20px;
    border-top: 1px solid rgba(139, 148, 158, 0.2);
}

.contact__details p {
    margin-bottom: 15px;
    font-weight: 500;
}

.contact__link {
    display: block;
    font-size: 18px;
    color: var(--color-text-main);
    margin-bottom: 10px;
    font-weight: 500;
}
.contact__link:hover {
    color: var(--color-primary);
}

.contact__form-wrapper {
    background-color: var(--color-background);
    padding: 40px;
    border-radius: 12px;
}

/* Форма */
.form-group {
    margin-bottom: 20px;
}

.form-group__label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--color-text-secondary);
}

.form-group__input {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--color-surface);
    border: 1px solid rgba(139, 148, 158, 0.2);
    border-radius: 8px;
    color: var(--color-text-main);
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group__input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(47, 129, 247, 0.2);
}

.form-group--checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.form-group--checkbox input {
    margin-top: 5px;
}
.form-group--checkbox label {
    font-size: 14px;
    color: var(--color-text-secondary);
}
.form-group--checkbox a {
    color: var(--color-text-main);
    text-decoration: underline;
}
.form-group--checkbox a:hover {
    color: var(--color-primary);
}

.contact-form__button {
    width: 100%;
    padding-top: 16px;
    padding-bottom: 16px;
}

/* Сообщение об успехе */
.success-message {
    display: none; /* Скрыто по умолчанию */
    text-align: center;
    padding: 40px;
    border: 1px solid var(--color-primary);
    border-radius: 12px;
}

.success-message.is-visible {
    display: block; /* Показываем при успехе */
}

.success-message i {
    color: #34D399; /* Зеленый цвет для иконки */
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
}
.success-message h4 {
    font-size: 24px;
    margin-bottom: 10px;
}

/* Адаптивность для Contact */
@media (max-width: 992px) {
    .contact__container {
        grid-template-columns: 1fr;
    }
}
/* Cookie Pop-up */
.cookie-popup { position: fixed; bottom: -100%; left: 0; width: 100%; background-color: var(--color-surface); padding: 20px; box-shadow: 0 -5px 20px rgba(0,0,0,0.2); z-index: 2000; transition: bottom 0.5s ease-in-out; }
.cookie-popup.is-visible { bottom: 0; }
.cookie-popup__content { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; gap: 20px; }
.cookie-popup__text { color: var(--color-text-secondary); }
.cookie-popup__text a { color: var(--color-text-main); text-decoration: underline; }
.cookie-popup__button { padding: 10px 20px; flex-shrink: 0; }

/* Policy Pages Styles */
.pages { padding: 120px 0 80px; }
.pages .container { max-width: 800px; }
.pages h1 { font-size: 40px; margin-bottom: 30px; }
.pages h2 { font-size: 28px; margin-top: 40px; margin-bottom: 20px; }
.pages p { margin-bottom: 20px; line-height: 1.7; color: var(--color-text-secondary); }
.pages ul { list-style: disc; padding-left: 25px; margin-bottom: 20px; color: var(--color-text-secondary); }
.pages li { margin-bottom: 10px; }
.pages a { color: var(--color-primary); text-decoration: underline; }
.pages a:hover { text-decoration: none; }
.pages strong { color: var(--color-text-main); font-weight: 600; }