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

/* --- CSS VARIABLES --- */
:root {
    --font-primary: 'Inter', sans-serif;
    --font-headings: 'Playfair Display', serif;
    --background-color: #F8F7F4;
    --text-color: #222222;
    --primary-color: #0A3D62;
    --accent-color: #C8963E;
    --secondary-text-color: #666666;
    --footer-bg-color: #0A3D62;
    --footer-text-color: #E0E0E0;
    --footer-link-hover: #FFFFFF;
}

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

html {
    scroll-behavior: smooth;
}

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

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

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

ul {
    list-style: none;
}

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

/* --- LOGO --- */
.logo {
    font-family: var(--font-headings);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
}

/* --- HEADER --- */
.header {
    background-color: var(--background-color);
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(5px);
    background-color: rgba(248, 247, 244, 0.85);
}

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

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

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

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

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

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


/* --- FOOTER --- */
.footer {
    background-color: var(--footer-bg-color);
    color: var(--footer-text-color);
    padding: 60px 0;
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1.5fr;
    gap: 40px;
}

.footer .logo {
    color: var(--footer-link-hover);
}

.footer__tagline {
    margin-top: 15px;
    color: var(--footer-text-color);
    opacity: 0.7;
    max-width: 250px;
}

.footer__title {
    font-family: var(--font-headings);
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--footer-link-hover);
}

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

.footer__link {
    color: var(--footer-text-color);
    opacity: 0.8;
}

.footer__link:hover {
    color: var(--footer-link-hover);
    opacity: 1;
}

.footer__list--contacts {
    gap: 15px;
}

.footer__contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

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

.footer__text {
    opacity: 0.8;
}

/* --- RESPONSIVENESS (Mobile-First) --- */

/* Tablet */
@media (max-width: 992px) {
    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 50px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    body {
        font-size: 15px;
    }

    .header__container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav__list {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px 20px;
    }
    
    .footer__grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer {
        padding: 40px 0;
    }
}

/* --- BUTTON (Reusable Component) --- */
.button {
    display: inline-block;
    padding: 12px 28px;
    background-color: var(--primary-color);
    color: #FFFFFF;
    font-weight: 500;
    font-size: 16px;
    border-radius: 6px;
    text-align: center;
    border: 2px solid transparent;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.button:hover {
    background-color: var(--accent-color);
    color: var(--text-color);
}

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

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

.hero__title {
    font-family: var(--font-headings);
    font-size: 52px;
    line-height: 1.2;
    color: var(--primary-color);
    margin-bottom: 20px;
}

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

.hero__image-wrapper {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
}

/* --- RESPONSIVENESS (Mobile-First) --- */

/* Tablet */
@media (max-width: 992px) {
    .hero__title {
        font-size: 42px;
    }
    .hero__description {
        font-size: 16px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .hero {
        padding: 40px 0;
        text-align: center;
        min-height: auto;
    }

    .hero__container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero__content {
        /* Меняем порядок на мобильных, чтобы текст был над картинкой */
        order: 2;
    }

    .hero__image-wrapper {
        order: 1;
    }

    .hero__title {
        font-size: 36px;
    }
    
    .hero__description {
        margin-left: auto;
        margin-right: auto;
    }
}

/* --- SECTION HEADER (Reusable Component) --- */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-header__title {
    font-family: var(--font-headings);
    font-size: 42px;
    line-height: 1.2;
    color: var(--primary-color);
    margin-bottom: 15px;
}

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

/* --- ANALYTICS SECTION --- */
.analytics {
    padding: 100px 0;
    background-color: #FFFFFF; /* Белый фон для контраста */
}

.analytics__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* --- CARD (Reusable Component) --- */
.card {
    background-color: var(--background-color);
    padding: 35px;
    border: 1px solid #EAEAEA;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card__icon-wrapper {
    margin: 0 auto 25px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #EAEAEA;
}

.card__icon {
    width: 32px;
    height: 32px;
    color: var(--accent-color);
}

.card__title {
    font-family: var(--font-headings);
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

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

/* --- RESPONSIVENESS (Mobile-First) --- */

/* Tablet */
@media (max-width: 992px) {
    .analytics__grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }

    .analytics {
        padding: 80px 0;
    }

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

/* Mobile */
@media (max-width: 768px) {
    .analytics {
        padding: 60px 0;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .section-header__title {
        font-size: 32px;
    }

    .section-header__subtitle {
        font-size: 16px;
    }
}

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

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    /* Декоративная линия таймлайна */
    --line-color: #E0E0E0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--line-color);
    top: 20px;
    bottom: 20px;
    left: 50%;
    margin-left: -1px;
}

.timeline__item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    display: flex;
    align-items: center;
}

/* Кружочки на линии */
.timeline__item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: #FFFFFF;
    border: 2px solid var(--accent-color);
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    z-index: 1;
}

/* Размещаем блоки поочередно слева и справа */
.timeline__item:nth-child(odd) {
    left: 0;
    padding-right: 70px;
    justify-content: flex-end;
}

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

/* Меняем положение кружочков для четных элементов */
.timeline__item:nth-child(even)::after {
    left: -10px;
}

/* Контент внутри блока */
.timeline__content {
    flex: 1;
    text-align: right;
}
.timeline__item:nth-child(even) .timeline__content {
    text-align: left;
}


.timeline__step {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-color);
    margin-bottom: 10px;
}

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

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

.timeline__image-wrapper {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    margin-left: 20px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 3px solid #fff;
}
.timeline__item:nth-child(even) .timeline__image-wrapper {
    order: -1;
    margin-left: 0;
    margin-right: 20px;
}


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


/* --- RESPONSIVENESS --- */
@media (max-width: 992px) {
    .timeline::after {
        left: 31px;
    }

    .timeline__item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
        justify-content: flex-start;
    }
    
    .timeline__item:nth-child(odd),
    .timeline__item:nth-child(even) {
        left: 0;
        padding-left: 70px;
    }

    /* Все кружочки теперь слева */
    .timeline__item::after,
    .timeline__item:nth-child(even)::after,
    .timeline__item:nth-child(odd)::after {
        left: 21px;
    }

    .timeline__content,
    .timeline__item:nth-child(even) .timeline__content {
       text-align: left;
    }
    
    .timeline__image-wrapper {
        display: none; /* Скрываем картинки на средних и малых экранах для экономии места */
    }
}

@media (max-width: 768px) {
    .strategies {
        padding: 60px 0;
    }
}

/* --- MARKETS SECTION --- */
.markets {
    padding: 100px 0;
    background-color: #FFFFFF; /* Белый фон для контраста */
}

.markets__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.market-card {
    background-color: var(--background-color);
    border: 1px solid #EAEAEA;
    border-radius: 8px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.market-card__header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.market-card__icon {
    width: 40px;
    height: 40px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.market-card__title {
    font-family: var(--font-headings);
    font-size: 22px;
    line-height: 1.3;
    color: var(--primary-color);
}

.market-card__description {
    color: var(--secondary-text-color);
    margin-bottom: 30px;
    flex-grow: 1; /* Позволяет описанию занять доступное место */
}

.market-card__chart {
    height: 120px;
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: flex-end;
    width: 100%;
}

.market-card__bar {
    display: block;
    width: 100%;
    background-color: #DDE2E7;
    border-radius: 4px 4px 0 0;
    animation: growBar 1s ease-out forwards;
    /* Управляем задержкой анимации для каждого бара через data-aos-delay на родительской карточке */
    animation-delay: calc(var(--aos-delay, 0s) + 0.4s); 
}

.market-card:hover .market-card__bar {
    background-color: var(--accent-color);
}

@keyframes growBar {
    from {
        height: 0;
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}


/* --- RESPONSIVENESS --- */
@media (max-width: 992px) {
    .market-card__title {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .markets {
        padding: 60px 0;
    }
    
    .markets__grid {
        grid-template-columns: 1fr;
    }
}

/* --- CASES SECTION --- */
.cases {
    padding: 100px 0;
    background-color: var(--background-color);
}

.cases-slider {
    padding-bottom: 60px; /* Место для пагинации и кнопок */
}

.swiper-slide {
    height: auto; /* Позволяет слайдам иметь разную высоту, если нужно */
}

.case-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #FFFFFF;
    border: 1px solid #EAEAEA;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.case-card__image-wrapper {
    width: 100%;
    aspect-ratio: 16 / 10; /* Сохраняем пропорции изображения */
}

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

.case-card__content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.case-card__tag {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--background-color);
    border: 1px solid #EAEAEA;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--secondary-text-color);
    margin-bottom: 15px;
    align-self: flex-start;
}

.case-card__title {
    font-family: var(--font-headings);
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

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

/* --- SLIDER CONTROLS STYLING --- */
.cases-slider__controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.swiper-button-prev,
.swiper-button-next {
    position: static;
    width: 44px;
    height: 44px;
    margin: 0;
    background-color: #fff;
    border: 1px solid #EAEAEA;
    border-radius: 50%;
    color: var(--primary-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.swiper-button-prev::after,
.swiper-button-next::after {
    font-size: 18px;
    font-weight: bold;
}

.swiper-pagination {
    position: static;
    width: auto;
}

.swiper-pagination-bullet {
    background-color: #D1D1D1;
    width: 10px;
    height: 10px;
    opacity: 1;
}

.swiper-pagination-bullet-active {
    background-color: var(--accent-color);
}


/* --- RESPONSIVENESS --- */
@media (max-width: 768px) {
    .cases {
        padding: 60px 0;
    }
}

/* --- CONTACT SECTION --- */
.contact {
    padding: 100px 0;
    background-color: #FFFFFF;
}

.contact__grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    background-color: var(--background-color);
    padding: 50px;
    border: 1px solid #EAEAEA;
    border-radius: 8px;
}

.contact__info-title {
    font-family: var(--font-headings);
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.contact__info-text {
    color: var(--secondary-text-color);
    line-height: 1.7;
    margin-bottom: 30px;
}

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

.contact__info-item {
    display: flex;
    align-items: center;
    gap: 12px;
}
.contact__info-item a {
    color: var(--text-color);
    font-weight: 500;
}
.contact__info-item a:hover {
    color: var(--primary-color);
}
.contact__info-icon {
    width: 22px;
    height: 22px;
    color: var(--accent-color);
}

/* --- FORM STYLES --- */
.form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form__label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-color);
}

.form__input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #D1D1D1;
    border-radius: 6px;
    background-color: #FFFFFF;
    font-size: 16px;
    font-family: var(--font-primary);
    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(200, 150, 62, 0.2);
}

.form__group--checkbox {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.form__checkbox {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.form__label--checkbox {
    margin-bottom: 0;
    font-weight: 400;
    font-size: 14px;
    color: var(--secondary-text-color);
}

.form__label--checkbox a {
    color: var(--primary-color);
    text-decoration: underline;
}

.form__button {
    align-self: flex-start;
}

.form__status {
    padding: 12px;
    border-radius: 6px;
    display: none; /* Скрыт по умолчанию */
    margin-top: 10px;
}

.form__status--success {
    background-color: #E6F4EA;
    border: 1px solid #B7E4C7;
    color: #0A3D62;
}

.form__status--error {
    background-color: #F8D7DA;
    border: 1px solid #F5C6CB;
    color: #721C24;
}

/* --- RESPONSIVENESS --- */
@media (max-width: 992px) {
    .contact__grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    .contact {
        padding: 60px 0;
    }
    .contact__grid {
        padding: 30px;
    }
    .form__row {
        grid-template-columns: 1fr;
    }
}

/* --- COOKIE POPUP --- */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--primary-color);
    color: var(--footer-text-color);
    z-index: 1000;
    padding: 20px 0;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    transform: translateY(100%);
    transition: transform 0.5s ease-in-out;
}

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

.cookie-popup__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

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

.cookie-popup__text a {
    color: #FFFFFF;
    text-decoration: underline;
    font-weight: 500;
}

.cookie-popup__button {
    background-color: #FFFFFF;
    color: var(--primary-color);
    flex-shrink: 0;
}
.cookie-popup__button:hover {
    background-color: var(--accent-color);
    color: var(--text-color);
}

/* --- RESPONSIVENESS --- */
@media (max-width: 768px) {
    .cookie-popup__container {
        flex-direction: column;
        text-align: center;
    }
}

/* --- POLICY & STATIC PAGES STYLES --- */
.pages {
    padding: 80px 0;
    background-color: #FFFFFF;
}

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

.pages h1,
.pages h2,
.pages h3 {
    font-family: var(--font-headings);
    color: var(--primary-color);
    margin-bottom: 20px;
}

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

.pages h2 {
    font-size: 32px;
    margin-top: 40px;
}

.pages h3 {
    font-size: 24px;
    margin-top: 30px;
}

.pages p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-color);
    margin-bottom: 20px;
}

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

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

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

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

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