/*
 * Глобальные настройки и переменные
 */
:root {
    --bg-color: #111317;
    --text-color: #E1E1E1;
    --accent-color: #00F5A0;
    --secondary-color: #4A4E5A;
    --font-main: 'Inter', sans-serif;
    --font-headings: 'Space Grotesk', sans-serif;
}

/*
 * Сброс стилей и базовые настройки
 */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

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

ul {
    list-style: none;
}

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

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/*
 * Header
 */
.header {
    padding: 20px 0;
    border-bottom: 1px solid var(--secondary-color);
    position: sticky;
    top: 0;
    background-color: var(--bg-color);
    z-index: 100;
}

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

.header__logo {
    font-family: var(--font-headings);
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-color);
}

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

.header__nav-link {
    font-size: 16px;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

.header__nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.header__nav-link:hover::after {
    width: 100%;
}

.header__nav-link--cta {
    background-color: var(--accent-color);
    color: var(--bg-color);
    padding: 8px 20px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.header__nav-link--cta:hover {
    background-color: #fff;
    color: var(--bg-color);
}

.header__nav-link--cta::after {
    display: none;
}

.header__burger-menu {
    display: none; /* Будет показан на мобильных устройствах */
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
}

/*
 * Footer
 */
.footer {
    padding: 60px 0;
    background-color: #0D0F12; /* Чуть светлее основного фона для отделения */
    border-top: 1px solid var(--secondary-color);
}

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

.footer__logo {
    font-family: var(--font-headings);
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 10px;
    display: inline-block;
}

.footer__tagline {
    font-size: 14px;
    color: var(--secondary-color);
    max-width: 220px;
}

.footer__title {
    font-family: var(--font-headings);
    font-size: 20px;
    margin-bottom: 20px;
    color: #fff;
}

.footer__list li {
    margin-bottom: 10px;
}

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

.footer__list--contacts li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.footer__icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 4px;
    color: var(--accent-color);
}

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

/*
 * Адаптивность
 */
@media (max-width: 768px) {
    .header__nav {
        display: none; /* Скрываем навигацию, будет реализовано мобильное меню */
    }

    .header__burger-menu {
        display: block;
    }

    .footer__container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer__tagline {
        margin: 0 auto;
    }

    .footer__list--contacts li {
        justify-content: center;
    }
}

/*
 * Hero Section
 */
.hero {
    min-height: calc(100vh - 81px); /* Высота экрана минус высота хедера */
    display: flex;
    align-items: center;
    padding: 60px 0;
}

.hero__content {
    max-width: 750px;
}

.hero__title {
    font-family: var(--font-headings);
    font-size: 56px;
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero__title--dynamic {
    color: var(--accent-color);
}

/* Эффект курсора для пишущей машинки */
.hero__title--dynamic::after {
    content: '_';
    font-weight: 700;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero__subtitle {
    font-size: 18px;
    line-height: 1.7;
    color: #b0b0b0; /* Немного светлее основного текста для иерархии */
    margin-bottom: 40px;
    max-width: 600px;
}

.hero__cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--bg-color);
    padding: 15px 35px;
    border-radius: 5px;
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-headings);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.hero__cta-button:hover {
    transform: translateY(-3px);
    background-color: #fff;
    color: var(--bg-color);
}

/*
 * Адаптивность для Hero
 */
@media (max-width: 768px) {
    .hero {
        text-align: center;
    }

    .hero__title {
        font-size: 42px;
    }

    .hero__subtitle {
        font-size: 16px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 480px) {
    .hero__title {
        font-size: 32px;
    }
}

/*
 * Общие стили для секций
 */
.section-title {
    font-family: var(--font-headings);
    font-size: 42px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
}

/*
 * Секция "Истории" (Stories)
 */
.stories {
    padding: 80px 0;
    background-color: #14161B; /* Немного отличается от фона для визуального разделения */
}

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

.story-card {
    background-color: var(--bg-color);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--secondary-color);
    display: flex; /* Для прижатия футера к низу */
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.story-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px -5px rgba(0, 245, 160, 0.1);
}

.story-card__link-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.story-card__image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.story-card__content {
    padding: 25px;
    flex-grow: 1; /* Позволяет этому блоку занять все доступное пространство */
}

.story-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.story-card__tag {
    font-size: 12px;
    font-weight: 500;
    background-color: var(--secondary-color);
    color: var(--text-color);
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
}

.story-card__title {
    font-family: var(--font-headings);
    font-size: 22px;
    line-height: 1.3;
    margin-bottom: 15px;
    color: #fff; /* Ярче, чем основной текст */
    transition: color 0.3s ease;
}

.story-card:hover .story-card__title {
    color: var(--accent-color);
}

.story-card__excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: #b0b0b0;
}

.story-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-top: 1px solid var(--secondary-color);
}

.story-card__author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.story-card__author-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.story-card__author-name {
    font-size: 14px;
    font-weight: 500;
}

.story-card__read-more {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-color);
}

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

.story-card:hover .story-card__read-more i {
    transform: translateX(5px);
}

/*
 * Адаптивность для секции "Истории"
 */
@media (max-width: 768px) {
    .section-title {
        font-size: 36px;
    }
    .stories {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 30px;
        margin-bottom: 40px;
    }
    .stories__grid {
        grid-template-columns: 1fr;
    }
}

/*
 * Общие стили для подзаголовка секции
 */
.section-subtitle {
    text-align: center;
    font-size: 18px;
    color: #b0b0b0;
    max-width: 700px;
    margin: -40px auto 60px;
    line-height: 1.7;
}

/*
 * Секция "Карьера" (Career)
 */
.career {
    padding: 80px 0;
}

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

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

.career-timeline__item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    opacity: 0; /* Скрыто для анимации */
    transform: translateY(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.career-timeline__item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Расположение элементов по сторонам */
.career-timeline__item:nth-child(odd) {
    left: 0;
    text-align: right;
}
.career-timeline__item:nth-child(even) {
    left: 50%;
}

/* Кружочки на центральной линии */
.career-timeline__item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: var(--bg-color);
    border: 3px solid var(--accent-color);
    top: 35px;
    border-radius: 50%;
    z-index: 1;
}
.career-timeline__item:nth-child(odd)::after {
    right: -8px;
}
.career-timeline__item:nth-child(even)::after {
    left: -8px;
}

.career-timeline__content {
    padding: 30px;
    background-color: #1A1C20;
    border-radius: 8px;
    border: 1px solid var(--secondary-color);
    position: relative;
}

.career-timeline__icon {
    position: absolute;
    top: 28px;
    background-color: var(--accent-color);
    color: var(--bg-color);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.career-timeline__icon i {
    width: 18px;
    height: 18px;
}
.career-timeline__item:nth-child(odd) .career-timeline__icon {
    right: -55px;
}
.career-timeline__item:nth-child(even) .career-timeline__icon {
    left: -55px;
}

.career-timeline__title {
    font-family: var(--font-headings);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}

.career-timeline__description {
    font-size: 15px;
    line-height: 1.6;
    color: #b0b0b0;
}

/*
 * Адаптивность для таймлайна
 */
@media (max-width: 768px) {
    .section-subtitle {
        font-size: 16px;
    }

    .career-timeline::after {
        left: 20px;
    }

    .career-timeline__item {
        width: 100%;
        padding-left: 60px;
        padding-right: 15px;
    }
    
    .career-timeline__item:nth-child(odd),
    .career-timeline__item:nth-child(even) {
        left: 0;
        text-align: left;
    }
    
    .career-timeline__item:nth-child(odd)::after,
    .career-timeline__item:nth-child(even)::after {
        left: 12px;
    }

    .career-timeline__item:nth-child(odd) .career-timeline__icon,
    .career-timeline__item:nth-child(even) .career-timeline__icon {
        left: -25px; /* Иконка поверх линии */
    }
}

/*
 * Секция "Инструменты" (Tools)
 */
.tools {
    padding: 80px 0;
    background-color: #14161B;
}

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

.tool-card {
    background-color: transparent;
    height: 220px;
    perspective: 1000px; /* Для 3D-эффекта */
    border-radius: 8px;
}

.tool-card__inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s;
    transform-style: preserve-3d;
}

.tool-card:hover .tool-card__inner {
    transform: rotateY(180deg);
}

.tool-card__front,
.tool-card__back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; /* Safari */
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    background-color: var(--bg-color);
}

.tool-card__front {
    color: var(--text-color);
}

.tool-card__back {
    background-color: #1A1C20;
    color: var(--text-color);
    transform: rotateY(180deg);
}

.tool-card__icon {
    width: 64px;
    height: 64px;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.tool-card__title {
    font-family: var(--font-headings);
    font-size: 24px;
    font-weight: 700;
}

.tool-card__description {
    font-size: 15px;
    line-height: 1.6;
    margin-top: 10px;
}

/*
 * Адаптивность для секции "Инструменты"
 */
@media (max-width: 480px) {
    .tool-card {
        height: 200px;
    }
    .tool-card__icon {
        width: 50px;
        height: 50px;
    }
    .tool-card__title {
        font-size: 20px;
    }
    .tool-card__description {
        font-size: 14px;
    }
}

/*
 * Секция "Инсайты" (Insights)
 */
.insights {
    padding: 80px 0;
}

.insights-accordion {
    max-width: 800px;
    margin: 0 auto;
    border-top: 1px solid var(--secondary-color);
}

.accordion-item {
    border-bottom: 1px solid var(--secondary-color);
}

.accordion-item__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 25px 10px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    color: var(--text-color);
}

.accordion-item__title {
    font-family: var(--font-headings);
    font-size: 20px;
    font-weight: 500;
    padding-right: 20px;
    color: #fff;
}

.accordion-item__icon {
    color: var(--accent-color);
    flex-shrink: 0;
    transition: transform 0.4s ease;
}

.accordion-item.active .accordion-item__icon {
    transform: rotate(45deg);
}

.accordion-item__body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background-color: #14161B;
}

.accordion-item__content {
    padding: 0 30px 30px 30px;
    font-size: 16px;
    line-height: 1.7;
    color: #b0b0b0;
}

/*
 * Адаптивность для аккордеона
 */
@media (max-width: 768px) {
    .accordion-item__title {
        font-size: 18px;
    }
}

/*
 * Добавьте это в секцию :root в начале файла
 */
:root {
    /* ... ваши существующие переменные ... */
    --success-color: #00F5A0;
    --error-color: #FF5B5B;
}

/* ... остальной код ... */

/*
 * Секция "Контакты" (Contact)
 */
.contact {
    padding: 80px 0;
}

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

.contact__title,
.contact__subtitle {
    text-align: left;
    margin: 0;
}

.contact__subtitle {
    margin-top: 20px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #b0b0b0;
}

.form-input {
    width: 100%;
    padding: 15px;
    background-color: #1A1C20;
    border: 1px solid var(--secondary-color);
    border-radius: 5px;
    color: var(--text-color);
    font-size: 16px;
    font-family: var(--font-main);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 245, 160, 0.2);
}

.form-group--captcha {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
}

.form-input--captcha {
    max-width: 100px;
}

.form-group--checkbox {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.form-label--checkbox {
    margin: 0;
    font-size: 14px;
    color: #b0b0b0;
}
.form-label--checkbox a {
    color: var(--accent-color);
    text-decoration: underline;
}

.form-checkbox {
    width: 20px;
    height: 20px;
}

.contact-form__button {
    background-color: var(--accent-color);
    color: var(--bg-color);
    padding: 15px 35px;
    border-radius: 5px;
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-headings);
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    margin-top: 10px;
}
.contact-form__button:hover {
    background-color: #fff;
}

/* Стили для сообщений формы */
#form-message-container {
    padding: 20px;
    margin-top: 20px;
    border-radius: 5px;
    text-align: center;
}
#form-message-container.success {
    background-color: rgba(0, 245, 160, 0.1);
    border: 1px solid var(--success-color);
    color: var(--success-color);
}
#form-message-container.error {
    background-color: rgba(255, 91, 91, 0.1);
    border: 1px solid var(--error-color);
    color: var(--error-color);
}

/* Адаптивность для контактов */
@media (max-width: 992px) {
    .contact__container {
        grid-template-columns: 1fr;
    }
    .contact__info {
        text-align: center;
    }
    .contact__title, .contact__subtitle {
        text-align: center;
    }
}

/*
 * Cookie Pop-up
 */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #1A1C20;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    z-index: 200;
    border-top: 1px solid var(--secondary-color);
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
    visibility: hidden;
}

.cookie-popup.is-visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.cookie-popup__text {
    font-size: 15px;
    color: #b0b0b0;
    text-align: center;
}

.cookie-popup__text a {
    color: var(--accent-color);
    text-decoration: underline;
}

.cookie-popup__btn {
    background-color: var(--accent-color);
    color: var(--bg-color);
    border: none;
    padding: 10px 25px;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.3s ease;
}
.cookie-popup__btn:hover {
    background-color: #fff;
}

@media (max-width: 768px) {
    .cookie-popup {
        flex-direction: column;
    }
}

/*
 * Стили для статических текстовых страниц (политики, условия и т.д.)
 */
.pages {
    padding: 60px 0 80px;
}

.pages .container {
    max-width: 800px; /* Ограничиваем ширину для лучшей читаемости */
}

.pages h1, .pages h2, .pages h3 {
    font-family: var(--font-headings);
    color: #fff;
}

.pages h1 {
    font-size: 42px;
    color: var(--accent-color);
    margin-bottom: 30px;
    line-height: 1.2;
}

.pages h2 {
    font-size: 28px;
    margin-top: 40px;
    margin-bottom: 20px;
}

.pages p {
    font-size: 17px;
    line-height: 1.8;
    color: #b0b0b0;
    margin-bottom: 20px;
}

.pages a {
    color: var(--accent-color);
    text-decoration: underline;
    font-weight: 500;
}
.pages a:hover {
    text-decoration: none;
}

.pages ul, .pages ol {
    padding-left: 25px;
    margin-bottom: 20px;
}

.pages li {
    font-size: 17px;
    line-height: 1.8;
    color: #b0b0b0;
    margin-bottom: 15px;
}

.pages strong {
    color: var(--text-color);
    font-weight: 700;
}