/* ---------- 0. ГЛОБАЛЬНЫЕ СТИЛИ ---------- */

/* Подключение шрифтов */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@600;800&family=Roboto:wght@400;500&display=swap');

:root {
    --bg-color: #f9f9f9;
    --text-color: #222222;
    --primary-color: #4f46e5;
    --secondary-color: #a5b4fc;
    --border-color: #e5e7eb;
    --header-height: 70px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    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;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

h1, h2, h3, h4, h5, h6, .logo {
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
}

ul {
    list-style: none;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-color);
}

/* ---------- 1. ХЕДЕР ---------- */
.header {
    background-color: var(--bg-color);
    height: var(--header-height);
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.nav__list {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav__link {
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 0;
    position: relative;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease-in-out;
}

.nav__link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav__link--button {
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    transition: background-color 0.3s ease;
}

.nav__link--button:hover {
    background-color: #3730a3;
    color: #fff;
}

.nav__link--button::after {
    display: none;
}


/* ---------- 2. ФУТЕР ---------- */
.footer {
    background-color: #111827;
    color: #d1d5db;
    padding-top: 4rem;
}

.footer__container {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1.5fr;
    gap: 3rem;
    padding-bottom: 3rem;
}

.footer__logo {
    margin-bottom: 1rem;
}

.footer__tagline {
    font-size: 0.9rem;
    max-width: 280px;
    line-height: 1.5;
    color: #9ca3af;
}

.footer__title {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

.footer__list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer__link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.footer__list--contacts {
    gap: 1rem;
}

.footer__list--contacts a, .footer__address {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.footer__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--secondary-color);
}

.footer__bottom {
    border-top: 1px solid #374151;
    text-align: center;
    padding: 1.5rem 0;
    font-size: 0.9rem;
    color: #9ca3af;
}


/* ---------- АДАПТИВНОСТЬ ---------- */
@media (max-width: 1024px) {
    .footer__container {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    .nav__list {
        /* В будущем здесь может быть логика для бургер-меню */
        gap: 1.2rem;
    }
    .nav__link {
        font-size: 0.9rem;
    }
    .nav__link--button {
        padding: 0.4rem 1rem;
    }
    .logo {
        font-size: 22px;
    }
    
    .footer__container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }
    .footer__tagline {
        margin: 0 auto 1rem auto;
    }
    .footer__list--contacts a, .footer__address {
       justify-content: center;
    }
}

@media (max-width: 640px) {
    .header__nav {
        display: none; /* Скрываем навигацию на очень маленьких экранах, готовимся к бургеру */
    }
}

/* ---------- ОБЩИЙ КЛАСС КНОПКИ ---------- */
.button {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.button:hover {
    background-color: #3730a3;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.25);
}


/* ---------- 3. HERO СЕКЦИЯ ---------- */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--header-height));
    padding: 4rem 0;
    text-align: center;
    overflow: hidden; /* Скрываем части фигур, выходящие за пределы */
}

.hero__content {
    position: relative;
    z-index: 2;
}

.hero__title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #111827; /* Немного темнее основного текста для акцента */
}

/* Стили для анимированного курсора */
.hero__title--typing::after {
    content: '|';
    animation: blink 1s step-end infinite;
    color: var(--primary-color);
    font-weight: 800;
}

@keyframes blink {
    from, to { opacity: 1 }
    50% { opacity: 0 }
}

.hero__subtitle {
    font-size: 1.2rem;
    max-width: 650px;
    margin: 0 auto 2.5rem auto;
    color: #4b5563;
    transform: translateY(20px); /* Изначально сдвинут вниз */
    transition: opacity 0.8s ease 0.5s, transform 0.8s ease 0.5s;
}

.hero__button {
    transform: translateY(20px); /* Изначально сдвинут вниз */
    transition: opacity 0.8s ease 0.7s, transform 0.8s ease 0.7s, background-color 0.3s, box-shadow 0.3s;
}

/* Класс для проявления элементов */
.hero--content-visible .hero__subtitle,
.hero--content-visible .hero__button {
    opacity: 1;
    transform: translateY(0);
}

/* Декоративные фоновые фигуры */
.hero__background-shapes .shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}
.shape-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}
.shape-2 {
    width: 500px;
    height: 500px;
    bottom: -150px;
    right: -150px;
    animation-delay: 5s;
    animation-duration: 25s;
}
.shape-3 {
    width: 150px;
    height: 150px;
    top: 20%;
    right: 15%;
    animation-delay: 10s;
    background: linear-gradient(45deg, var(--secondary-color), #fca5a5);
}

@keyframes float {
    0% { transform: translateY(0px) translateX(0px) rotate(0deg); }
    50% { transform: translateY(-40px) translateX(20px) rotate(180deg); }
    100% { transform: translateY(0px) translateX(0px) rotate(360deg); }
}

/* ---------- АДАПТИВНОСТЬ HERO ---------- */
@media (max-width: 768px) {
    .hero__title {
        font-size: 2.8rem;
    }
    .hero__subtitle {
        font-size: 1.1rem;
    }
    .shape-1 {
        width: 200px;
        height: 200px;
    }
    .shape-2 {
        width: 350px;
        height: 350px;
    }
}
@media (max-width: 480px) {
    .hero {
        min-height: 80vh;
    }
    .hero__title {
        font-size: 2.2rem;
    }
    .hero__subtitle {
        font-size: 1rem;
    }
}

/* ---------- 4. ОБЩИЕ СТИЛИ СЕКЦИЙ ---------- */
.section {
    padding: 5rem 0;
}

.section:nth-of-type(even) {
     background-color: #ffffff;
}

.section-header {
    text-align: center;
    max-width: 750px;
    margin: 0 auto 3.5rem auto;
}

.section-header__title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #111827;
}

.section-header__subtitle {
    font-size: 1.1rem;
    color: #4b5563;
    line-height: 1.7;
}


/* ---------- 5. СЕКЦИЯ КОНЦЕПЦИИ ---------- */
.concepts__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.concept-card {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.concept-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

.concept-card__icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background-color: var(--bg-color);
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    transition: background-color 0.3s ease;
}

.concept-card:hover .concept-card__icon {
    background-color: var(--primary-color);
    color: #fff;
}

.concept-card__icon i {
    width: 28px;
    height: 28px;
}

.concept-card__title {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    color: #111827;
}

.concept-card__description {
    font-size: 1rem;
    color: #4b5563;
    flex-grow: 1; /* Заставляет описание занимать все доступное место */
    margin-bottom: 1.5rem;
}

.concept-card__link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--primary-color);
    align-self: flex-start; /* Прижимает ссылку к низу карточки, если она не в flex-end */
}

.concept-card__link i {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.concept-card__link:hover i {
    transform: translateX(4px);
}


/* ---------- АДАПТИВНОСТЬ КОНЦЕПЦИЙ ---------- */
@media (max-width: 1024px) {
    .concepts__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 4rem 0;
    }
    .section-header__title {
        font-size: 2.2rem;
    }
}

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

/* ---------- 6. СЕКЦИЯ ТЕХНОЛОГИИ ---------- */
.technologies__list {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.technologies__item {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.technologies__item--reversed {
    flex-direction: row-reverse;
}

.technologies__image-wrapper {
    flex: 1;
    min-width: 0; /* Важно для flexbox, чтобы изображение сжималось */
}

.technologies__image-wrapper img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    aspect-ratio: 4 / 3;
    background-color: var(--border-color); /* Фон для плейсхолдера */
}

.technologies__text-content {
    flex: 1;
}

.technologies__item-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #111827;
}

.technologies__text-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #4b5563;
}

.technologies__cta-wrapper {
    text-align: center;
    margin-top: 4rem;
}

/* Стили для анимации при скролле */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* ---------- АДАПТИВНОСТЬ ТЕХНОЛОГИЙ ---------- */
@media (max-width: 820px) {
    .technologies__item,
    .technologies__item--reversed {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .technologies__item-title {
        font-size: 1.6rem;
    }
}

/* ---------- 7. СЕКЦИЯ БИБЛИОТЕКА ---------- */
.library {
    background-color: #ffffff;
}

.library__panel {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.07);
}

.library__panel-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: #111827;
}

.library__search-bar {
    position: relative;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.8rem 1rem 0.8rem 3rem;
    text-align: left;
    color: #9ca3af;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.library__search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #6b7280;
}

.library__tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.tag {
    display: inline-block;
    background-color: #eef2ff;
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tag:hover {
    background-color: #e0e7ff;
    transform: translateY(-2px);
}

.library__button {
    font-size: 1rem;
}

/* ---------- АДАПТИВНОСТЬ БИБЛИОТЕКИ ---------- */
@media (max-width: 768px) {
    .library__panel {
        padding: 2rem;
    }
    .library__panel-title {
        font-size: 1.6rem;
    }
}
@media (max-width: 480px) {
     .library__panel {
        padding: 1.5rem;
    }
}

/* ---------- 8. СЕКЦИЯ МЫШЛЕНИЕ ---------- */
.mindset {
    background-color: var(--bg-color); /* Используем основной фон для этой секции */
}

.mindset__list {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.mindset__item {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
}

.mindset__item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.mindset__item-number {
    font-family: 'Manrope', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--secondary-color);
}

.mindset__item-content {
    padding-top: 0.5rem; /* Небольшой отступ для выравнивания с номером */
}

.mindset__item-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: #111827;
}

.mindset__item-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #4b5563;
}


/* ---------- АДАПТИВНОСТЬ МЫШЛЕНИЯ ---------- */
@media (max-width: 768px) {
    .mindset__item {
        gap: 1.5rem;
    }
    .mindset__item-number {
        font-size: 2.5rem;
    }
    .mindset__item-title {
        font-size: 1.4rem;
    }
    .mindset__item-description {
        font-size: 1rem;
    }
}
@media (max-width: 480px) {
    .mindset__item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        text-align: left;
    }
    .mindset__item-number {
        margin-bottom: 0.5rem;
    }
    .mindset__item-content {
        padding-top: 0;
    }
}

/* ---------- 9. СЕКЦИЯ КОНТАКТОВ ---------- */
.contact {
    background-color: #ffffff;
}

.contact__wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: flex-start;
}

.contact__info-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.contact__info-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #4b5563;
    margin-bottom: 2rem;
}

.contact__info-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.contact__info-details a {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.contact__info-details a:hover {
    color: var(--primary-color);
}


/* --- Стили формы --- */
.contact__form-container {
    background-color: var(--bg-color);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.contact-form.shake {
    animation: shake 0.5s ease-in-out;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.form-group--checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1rem;
}
.form-group--checkbox input {
    margin-top: 5px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}
.form-group--checkbox label {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
}
.form-group--checkbox a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.contact-form__button {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}
.contact-form__button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* --- Сообщение об успехе --- */
.form-success-message {
    display: none; /* Скрыто по умолчанию */
    text-align: center;
    padding: 2rem;
}
.form-success-message i {
    color: #22c55e;
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
}
.form-success-message h4 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}
.form-success-message p {
    font-size: 1.1rem;
    color: #4b5563;
}


/* ---------- АДАПТИВНОСТЬ КОНТАКТОВ ---------- */
@media (max-width: 900px) {
    .contact__wrapper {
        grid-template-columns: 1fr;
    }
}

/* ---------- 10. COOKIE POP-UP ---------- */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #111827;
    color: #d1d5db;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    z-index: 200;
    transform: translateY(150%);
    transition: transform 0.5s ease-in-out;
}

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

.cookie-popup__text {
    font-size: 0.95rem;
}

.cookie-popup__text a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 4px;
}
.cookie-popup__text a:hover {
    color: var(--secondary-color);
}

.cookie-popup__button {
    flex-shrink: 0;
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .cookie-popup {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 1rem;
    }
}

/* ---------- 11. СТИЛИ ДЛЯ СТРАНИЦ ПОЛИТИК ---------- */
.pages {
    padding: 4rem 0;
    background-color: #fff;
}

.pages .container {
    max-width: 800px; /* Делаем контентную область уже для лучшей читаемости */
}

.pages h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: #111827;
}

.pages h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: #111827;
}

.pages p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #374151;
    margin-bottom: 1.5rem;
}

.pages ul {
    list-style: disc;
    padding-left: 2rem;
    margin-bottom: 1.5rem;
}

.pages li {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #374151;
    margin-bottom: 1rem;
}

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

.pages a:hover {
    text-decoration: none;
}

.pages strong {
    color: #111827;
}