/*
 * Molestiae-Accusantium | STYLE.CSS
 * ЭТАП 0, 1, 2: Глобальные стили, Хедер, Футер
 */

/* --- GOOGLE FONTS IMPORT --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Manrope:wght@600;700&display=swap');

/* --- CSS VARIABLES --- */
:root {
    --font-heading: 'Manrope', sans-serif;
    --font-body: 'Inter', sans-serif;

    --color-bg: #F8F9FA;
    --color-text: #212529;
    --color-primary: #1B4332;
    --color-primary-hover: #2D6A4F;
    --color-secondary: #40916C;
    --color-border: #DEE2E6;
}

/* --- GLOBAL STYLES & RESET --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

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

ul {
    list-style: none;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 700;
}

address {
    font-style: normal;
}

/* --- HEADER --- */
.header {
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(5px);
    background-color: rgba(248, 249, 250, 0.8);
}

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

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

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

.header__burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 28px;
    height: 22px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.header__burger-line {
    width: 100%;
    height: 2px;
    background-color: var(--color-text);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* --- NAVIGATION (MOBILE FIRST) --- */
.header__nav {
    display: block;
}

.header__list {
    display: flex;
    gap: 30px;
}

.header__link {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text);
    position: relative;
    padding-bottom: 5px;
}

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

.header__link:hover::after {
    width: 100%;
}

/* --- MOBILE MENU STYLES --- */
@media (max-width: 850px) {
    .header__burger {
        display: flex;
    }

    .header__nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background-color: var(--color-bg);
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
        padding-top: 80px;
    }

    .header__nav.is-active {
        transform: translateX(0);
    }
    
    .header__burger.is-active .header__burger-line:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .header__burger.is-active .header__burger-line:nth-child(2) {
        opacity: 0;
    }
    .header__burger.is-active .header__burger-line:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .header__list {
        flex-direction: column;
        align-items: center;
        gap: 35px;
    }

    .header__link {
        font-size: 20px;
    }
}


/* --- FOOTER --- */
.footer {
    background-color: #ffffff;
    padding: 60px 0;
    border-top: 1px solid var(--color-border);
}

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

.footer__column--brand {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer__logo {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text);
}

.footer__description {
    font-size: 15px;
    color: #6C757D;
}

.footer__title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

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

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

.footer__address {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer__contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-text);
    font-size: 15px;
}

.footer__contact-item i {
    width: 20px;
    height: 20px;
    color: var(--color-secondary);
}

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

.hero__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    text-align: center;
}

.hero__content {
    max-width: 600px;
}

.hero__title {
    font-size: 36px;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero__subtitle {
    font-size: 18px;
    color: #495057;
    margin-bottom: 30px;
}

.hero__cta {
    display: inline-block;
    background-color: var(--color-primary);
    color: var(--color-bg);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 16px;
    padding: 14px 28px;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

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

.hero__visual {
    width: 100%;
    max-width: 500px;
    height: 300px;
}

#hero-canvas {
    width: 100%;
    height: 100%;
    display: block;
}


/* Адаптивность для десктопов */
@media (min-width: 992px) {
    .hero {
        padding: 80px 0;
    }
    
    .hero__container {
        flex-direction: row;
        justify-content: space-between;
        gap: 60px;
        text-align: left;
    }

    .hero__content {
        flex: 1;
        max-width: 550px;
    }

    .hero__title {
        font-size: 48px;
    }

    .hero__visual {
        flex: 1;
        height: 450px;
        max-width: none;
    }
}

.section-title {
    font-size: 32px;
    text-align: center;
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 18px;
    color: #495057;
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px auto;
}

.analytics {
    padding: 80px 0;
    background-color: #ffffff;
}

.analytics__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.analytics__card {
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.analytics__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.07);
}

.analytics__card-icon {
    margin-bottom: 20px;
}

.analytics__card-icon i {
    width: 48px;
    height: 48px;
    color: var(--color-primary);
}

.analytics__card-title {
    font-size: 22px;
    margin-bottom: 15px;
}

.analytics__card-description {
    font-size: 15px;
    line-height: 1.6;
    color: #495057;
}

/* Адаптивность для планшетов и десктопов */
@media (min-width: 768px) {
    .analytics__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .section-title {
        font-size: 38px;
    }
}

@media (min-width: 992px) {
    .analytics__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.strategies {
    padding: 80px 0;
    background-color: var(--color-bg); /* Возвращаемся к основному фону */
}

.strategies__steps-container {
    margin-top: 60px;
}

.strategies__step {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
    margin-bottom: 50px;
}

.strategies__step-visual {
    flex: 1;
    width: 100%;
}

.strategies__step-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    background-color: #e9ecef; /* Цвет фона для плейсхолдера */
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.strategies__step-content {
    flex: 1;
    position: relative;
    padding-left: 15px;
}

.strategies__step-number {
    position: absolute;
    top: -30px;
    left: -15px;
    font-size: 80px;
    font-weight: 700;
    color: rgba(27, 67, 50, 0.07); /* Полупрозрачный --color-primary */
    z-index: 1;
    line-height: 1;
}

.strategies__step-title {
    font-size: 24px;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
}

.strategies__step-description {
    font-size: 16px;
    color: #495057;
    position: relative;
    z-index: 2;
}


/* Адаптивность для десктопов */
@media (min-width: 992px) {
    .strategies__step {
        flex-direction: row;
        gap: 60px;
        margin-bottom: 80px;
    }

    .strategies__step--reverse {
        flex-direction: row-reverse;
    }

    .strategies__step-content {
        padding-left: 0;
    }
    
    .strategies__step--reverse .strategies__step-content {
        padding-right: 15px;
    }

    .strategies__step-number {
        font-size: 120px;
        top: -50px;
        left: -30px;
    }
    
    .strategies__step--reverse .strategies__step-number {
        left: auto;
        right: -30px;
    }

    .strategies__step-title {
        font-size: 28px;
    }
}

.cases {
    padding: 80px 0;
    background-color: #ffffff;
}

.cases__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.cases__card {
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cases__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.07);
}

.cases__card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background-color: #e9ecef;
}

.cases__card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.cases__card-tag {
    display: inline-block;
    background-color: rgba(64, 145, 108, 0.1); /* полупрозрачный --color-secondary */
    color: var(--color-primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 15px;
    align-self: flex-start;
}

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

.cases__card-description {
    font-size: 15px;
    color: #495057;
    margin-bottom: 20px;
    flex-grow: 1;
}

.cases__card-result {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 25px;
}

.cases__card-result i {
    width: 24px;
    height: 24px;
}

.cases__card-link {
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: underline;
}

/*
 * --- ЭТАП 3: PUBLICATIONS SECTION ---
 */

.publications {
    padding: 80px 0;
    background-color: var(--color-bg);
}

.publications__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.publications__card {
    border: 1px solid var(--color-border);
    background-color: #ffffff;
    padding: 25px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    transition: border-color 0.3s ease;
}

.publications__card:hover {
    border-color: var(--color-secondary);
}

.publications__card-date {
    font-size: 14px;
    color: #6C757D;
    margin-bottom: 10px;
}

.publications__card-title {
    font-size: 20px;
    margin-bottom: 15px;
    flex-grow: 1;
}

.publications__card-excerpt {
    font-size: 15px;
    color: #495057;
    margin-bottom: 20px;
}

.publications__card-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--color-primary);
}

.publications__card-link i {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.publications__card-link:hover i {
    transform: translateX(5px);
}

/* Адаптивность для десктопов */
@media (min-width: 768px) {
    .cases__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .publications__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
     .publications__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.contact {
    padding: 80px 0;
    background-color: #ffffff;
}

.contact__wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
    margin-top: 50px;
}

.contact__info-title {
    font-size: 24px;
    margin-bottom: 15px;
}

.contact__info-description {
    color: #495057;
    margin-bottom: 30px;
}
/* Переиспользование стилей из футера */
.contact__info .footer__contact-item {
    margin-bottom: 15px;
    font-size: 16px;
}

.contact__form-group {
    margin-bottom: 20px;
}

.contact__form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 15px;
}

#captcha-label {
    display: inline-block;
    margin-right: 5px;
}

.contact__form-input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-family: var(--font-body);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background-color: var(--color-bg);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact__form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(27, 67, 50, 0.1);
}

textarea.contact__form-input {
    resize: vertical;
    min-height: 120px;
}

.contact__form-button {
    width: 100%;
    padding: 15px;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    color: var(--color-bg);
    background-color: var(--color-primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.contact__form-button:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-3px);
}

.contact__form-message {
    padding: 15px;
    margin-top: 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    display: none; /* Скрыто по умолчанию */
}

.contact__form-message--success {
    background-color: #D1E7DD;
    color: #0F5132;
    border: 1px solid #BADBCC;
    display: block;
}

.contact__form-message--error {
    background-color: #F8D7DA;
    color: #842029;
    border: 1px solid #F5C2C7;
    display: block;
}

/* Адаптивность для десктопов */
@media (min-width: 992px) {
    .contact__wrapper {
        grid-template-columns: 1fr 1.2fr;
        gap: 80px;
    }
}

/*
 * --- ЭТАП 5: ДОПОЛНИТЕЛЬНЫЕ ЭЛЕМЕНТЫ ---
 */

/* 1. COOKIE POPUP */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--color-text);
    color: var(--color-bg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 15px;
    z-index: 2000;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

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

.cookie-popup__text {
    font-size: 15px;
}

.cookie-popup__link {
    color: #ffffff;
    text-decoration: underline;
    font-weight: 500;
}

.cookie-popup__button {
    background-color: var(--color-bg);
    color: var(--color-text);
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.cookie-popup__button:hover {
    background-color: #e9ecef;
}

@media (min-width: 768px) {
    .cookie-popup {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}


/* 2. POLICY & OTHER STATIC PAGES */
.pages {
    padding: 60px 0;
    background-color: #ffffff;
}

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

.pages h1 {
    font-size: 36px;
    margin-bottom: 30px;
}

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

.pages p {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 20px;
    color: #495057;
}

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

.pages li {
    margin-bottom: 10px;
    line-height: 1.7;
    color: #495057;
}

.pages a {
    text-decoration: underline;
}

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